-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Gio bindings
--   
--   Bindings for Gio, autogenerated by haskell-gi.
@package gi-gio
@version 2.0.38


-- | Build time configuration used during code generation.
module GI.Gio.Config

-- | Overrides used when generating these bindings.
overrides :: Text

-- | Modules in this package
modules :: [Text]


module GI.Gio.Constants

-- | Extension point for volume monitor functionality. See <a>Extending
--   GIO</a>.
pattern VOLUME_MONITOR_EXTENSION_POINT_NAME :: Text

-- | The string used to obtain a UUID with <a>volumeGetIdentifier</a>.
pattern VOLUME_IDENTIFIER_KIND_UUID :: Text

-- | The string used to obtain a Unix device path with
--   <a>volumeGetIdentifier</a>.
pattern VOLUME_IDENTIFIER_KIND_UNIX_DEVICE :: Text

-- | The string used to obtain a NFS mount with <a>volumeGetIdentifier</a>.
pattern VOLUME_IDENTIFIER_KIND_NFS_MOUNT :: Text

-- | The string used to obtain a filesystem label with
--   <a>volumeGetIdentifier</a>.
pattern VOLUME_IDENTIFIER_KIND_LABEL :: Text

-- | The string used to obtain a Hal UDI with <a>volumeGetIdentifier</a>.

-- | <i>Deprecated: (Since version 2.58)Do not use, HAL is deprecated.</i>
pattern VOLUME_IDENTIFIER_KIND_HAL_UDI :: Text

-- | The string used to obtain the volume class with
--   <a>volumeGetIdentifier</a>.
--   
--   Known volume classes include <tt>device</tt>, <tt>network</tt>, and
--   <tt>loop</tt>. Other classes may be added in the future.
--   
--   This is intended to be used by applications to classify <a>Volume</a>
--   instances into different sections - for example a file manager or file
--   chooser can use this information to show <tt>network</tt> volumes
--   under a "Network" heading and <tt>device</tt> volumes under a
--   "Devices" heading.
pattern VOLUME_IDENTIFIER_KIND_CLASS :: Text

-- | Extension point for <a>Vfs</a> functionality. See <a>Extending
--   GIO</a>.
pattern VFS_EXTENSION_POINT_NAME :: Text

-- | The purpose used to verify the server certificate in a TLS connection.
--   This is the most common purpose in use. Used by TLS clients.
pattern TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER :: Text

-- | The purpose used to verify the client certificate in a TLS connection.
--   Used by TLS servers.
pattern TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT :: Text

-- | Extension point for TLS functionality via <a>TlsBackend</a>. See
--   <a>Extending GIO</a>.
pattern TLS_BACKEND_EXTENSION_POINT_NAME :: Text

-- | Extension point for <a>SettingsBackend</a> functionality.
pattern SETTINGS_BACKEND_EXTENSION_POINT_NAME :: Text

-- | Extension point for proxy resolving functionality. See <a>Extending
--   GIO</a>.
pattern PROXY_RESOLVER_EXTENSION_POINT_NAME :: Text

-- | Extension point for proxy functionality. See <a>Extending GIO</a>.
--   
--   <i>Since: 2.26</i>
pattern PROXY_EXTENSION_POINT_NAME :: Text

-- | Extension point for power profile usage monitoring functionality. See
--   <a>Extending GIO</a>.
--   
--   <i>Since: 2.70</i>
pattern POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME :: Text

-- | Extension point for network status monitoring functionality. See
--   <a>Extending GIO</a>.
--   
--   <i>Since: 2.30</i>
pattern NETWORK_MONITOR_EXTENSION_POINT_NAME :: Text

-- | <i>No description available in the introspection data.</i>
pattern NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME :: Text

-- | The name of the link that associates a menu item with a submenu.
--   
--   See also <a>menuItemSetLink</a>.
--   
--   <i>Since: 2.32</i>
pattern MENU_LINK_SUBMENU :: Text

-- | The name of the link that associates a menu item with a section. The
--   linked menu will usually be shown in place of the menu item, using the
--   item's label as a header.
--   
--   See also <a>menuItemSetLink</a>.
--   
--   <i>Since: 2.32</i>
pattern MENU_LINK_SECTION :: Text

-- | The maximum number of entries in a menu section supported by
--   <a>dBusConnectionExportMenuModel</a>.
--   
--   The exact value of the limit may change in future GLib versions.
--   
--   <i>Since: 2.76</i>
pattern MENU_EXPORTER_MAX_SECTION_SIZE :: Int32

-- | The menu item attribute which holds the target with which the item's
--   action will be activated.
--   
--   See also <tt><i>g_menu_item_set_action_and_target()</i></tt>
--   
--   <i>Since: 2.32</i>
pattern MENU_ATTRIBUTE_TARGET :: Text

-- | The menu item attribute which holds the label of the item.
--   
--   <i>Since: 2.32</i>
pattern MENU_ATTRIBUTE_LABEL :: Text

-- | The menu item attribute which holds the icon of the item.
--   
--   The icon is stored in the format returned by <a>iconSerialize</a>.
--   
--   This attribute is intended only to represent 'noun' icons such as
--   favicons for a webpage, or application icons. It should not be used
--   for 'verbs' (ie: stock icons).
--   
--   <i>Since: 2.38</i>
pattern MENU_ATTRIBUTE_ICON :: Text

-- | The menu item attribute that holds the namespace for all action names
--   in menus that are linked from this item.
--   
--   <i>Since: 2.36</i>
pattern MENU_ATTRIBUTE_ACTION_NAMESPACE :: Text

-- | The menu item attribute which holds the action name of the item.
--   Action names are namespaced with an identifier for the action group in
--   which the action resides. For example, "win." for window-specific
--   actions and "app." for application-wide actions.
--   
--   See also <tt><i>g_menu_model_get_item_attribute()</i></tt> and
--   <tt><i>g_menu_item_set_attribute()</i></tt>.
--   
--   <i>Since: 2.32</i>
pattern MENU_ATTRIBUTE_ACTION :: Text

-- | Extension point for memory usage monitoring functionality. See
--   <a>Extending GIO</a>.
--   
--   <i>Since: 2.64</i>
pattern MEMORY_MONITOR_EXTENSION_POINT_NAME :: Text

-- | A key in the "unix" namespace for getting the user ID for the file.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_UNIX_UID :: Text

-- | A key in the "unix" namespace for getting the device ID for the file
--   (if it is a special file).
--   
--   See the documentation for <tt>lstat()</tt>.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_UNIX_RDEV :: Text

-- | A key in the "unix" namespace for getting the number of hard links for
--   a file.
--   
--   See the documentation for <tt>lstat()</tt>.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_UNIX_NLINK :: Text

-- | A key in the "unix" namespace for getting the mode of the file (e.g.
--   whether the file is a regular file, symlink, etc).
--   
--   See the documentation for <tt>lstat()</tt>: this attribute is
--   equivalent to the <tt>st_mode</tt> member of <tt>struct stat</tt>, and
--   includes both the file type and permissions.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_UNIX_MODE :: Text

-- | A key in the "unix" namespace for checking if the file represents a
--   UNIX mount point.
--   
--   This attribute is <a>True</a> if the file is a UNIX mount point.
--   
--   Since 2.58, <tt>/</tt> is considered to be a mount point.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT :: Text

-- | A key in the "unix" namespace for getting the inode of the file.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>.
pattern FILE_ATTRIBUTE_UNIX_INODE :: Text

-- | A key in the "unix" namespace for getting the group ID for the file.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_UNIX_GID :: Text

-- | A key in the "unix" namespace for getting the device id of the device
--   the file is located on (see <tt><i>stat()</i></tt> documentation).
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_UNIX_DEVICE :: Text

-- | A key in the "unix" namespace for getting the block size for the file
--   system.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_UNIX_BLOCK_SIZE :: Text

-- | A key in the "unix" namespace for getting the number of blocks
--   allocated for the file.
--   
--   This attribute is only available for UNIX file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>.
pattern FILE_ATTRIBUTE_UNIX_BLOCKS :: Text

-- | A key in the "trash" namespace for getting the original path of a file
--   inside the <tt>trash:///</tt> folder before it was trashed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
--   
--   <i>Since: 2.24</i>
pattern FILE_ATTRIBUTE_TRASH_ORIG_PATH :: Text

-- | A key in the "trash" namespace for getting the number of (toplevel)
--   items that are present in the <tt>trash:///</tt> folder.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_TRASH_ITEM_COUNT :: Text

-- | A key in the "trash" namespace for getting the deletion date and time
--   of a file inside the <tt>trash:///</tt> folder.
--   
--   The format of the returned string is <tt>YYYY-MM-DDThh:mm:ss</tt>.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
--   
--   <i>Since: 2.24</i>
pattern FILE_ATTRIBUTE_TRASH_DELETION_DATE :: Text

-- | A key in the "time" namespace for getting the microseconds of the time
--   the file was last modified.
--   
--   This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED</a>.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_TIME_MODIFIED_USEC :: Text

-- | A key in the "time" namespace for getting the nanoseconds of the time
--   the file was last modified. This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED</a>. Corresponding
--   <a>FileAttributeType</a> is <a>FileAttributeTypeUint32</a>.
--   
--   <i>Since: 2.74</i>
pattern FILE_ATTRIBUTE_TIME_MODIFIED_NSEC :: Text

-- | A key in the "time" namespace for getting the time the file was last
--   modified.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>, and contains the time since the file
--   was modified, in seconds since the UNIX epoch.
pattern FILE_ATTRIBUTE_TIME_MODIFIED :: Text

-- | A key in the "time" namespace for getting the microseconds of the time
--   the file was created.
--   
--   This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_CREATED</a>.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_TIME_CREATED_USEC :: Text

-- | A key in the "time" namespace for getting the nanoseconds of the time
--   the file was created. This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_CREATED</a>. Corresponding
--   <a>FileAttributeType</a> is <a>FileAttributeTypeUint32</a>.
--   
--   <i>Since: 2.74</i>
pattern FILE_ATTRIBUTE_TIME_CREATED_NSEC :: Text

-- | A key in the "time" namespace for getting the time the file was
--   created.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>, and contains the time since the file
--   was created, in seconds since the UNIX epoch.
--   
--   This may correspond to Linux <tt>stx_btime</tt>, FreeBSD
--   <tt>st_birthtim</tt>, NetBSD <tt>st_birthtime</tt> or NTFS
--   <tt>ctime</tt>.
pattern FILE_ATTRIBUTE_TIME_CREATED :: Text

-- | A key in the "time" namespace for getting the microseconds of the time
--   the file was last changed.
--   
--   This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_CHANGED</a>.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_TIME_CHANGED_USEC :: Text

-- | A key in the "time" namespace for getting the nanoseconds of the time
--   the file was last changed. This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_CHANGED</a>. Corresponding
--   <a>FileAttributeType</a> is <a>FileAttributeTypeUint32</a>.
--   
--   <i>Since: 2.74</i>
pattern FILE_ATTRIBUTE_TIME_CHANGED_NSEC :: Text

-- | A key in the "time" namespace for getting the time the file was last
--   changed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>, and contains the time since the file
--   was last changed, in seconds since the UNIX epoch.
--   
--   This corresponds to the traditional UNIX ctime.
pattern FILE_ATTRIBUTE_TIME_CHANGED :: Text

-- | A key in the "time" namespace for getting the microseconds of the time
--   the file was last accessed.
--   
--   This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_ACCESS</a>.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_TIME_ACCESS_USEC :: Text

-- | A key in the "time" namespace for getting the nanoseconds of the time
--   the file was last accessed. This should be used in conjunction with
--   <a>FILE_ATTRIBUTE_TIME_ACCESS</a>. Corresponding
--   <a>FileAttributeType</a> is <a>FileAttributeTypeUint32</a>.
--   
--   <i>Since: 2.74</i>
pattern FILE_ATTRIBUTE_TIME_ACCESS_NSEC :: Text

-- | A key in the "time" namespace for getting the time the file was last
--   accessed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>, and contains the time since the file
--   was last accessed, in seconds since the UNIX epoch.
pattern FILE_ATTRIBUTE_TIME_ACCESS :: Text

-- | A key in the "thumbnail" namespace for getting the path to the
--   xx-large thumbnail image.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE :: Text

-- | A key in the "thumbnail" namespace for getting the path to the x-large
--   thumbnail image.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE :: Text

-- | A key in the "thumbnail" namespace for getting the path to the normal
--   thumbnail image.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL :: Text

-- | A key in the "thumbnail" namespace for getting the path to the large
--   thumbnail image.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE :: Text

-- | A key in the "thumbnail" namespace for getting the path to the
--   thumbnail image with the biggest size available.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
pattern FILE_ATTRIBUTE_THUMBNAIL_PATH :: Text

-- | A key in the "thumbnail" namespace for checking whether the xx-large
--   thumbnail is outdated.
--   
--   This attribute is <a>True</a> if the x-large thumbnail is up-to-date
--   with the file it represents, and <a>False</a> if the file has been
--   modified since the thumbnail was generated.
--   
--   If <a>FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE</a> is <a>True</a>
--   and this attribute is <a>False</a>, it indicates that thumbnailing may
--   be attempted again and may succeed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE :: Text

-- | A key in the "thumbnail" namespace for checking whether the x-large
--   thumbnail is outdated.
--   
--   This attribute is <a>True</a> if the x-large thumbnail is up-to-date
--   with the file it represents, and <a>False</a> if the file has been
--   modified since the thumbnail was generated.
--   
--   If <a>FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE</a> is <a>True</a> and
--   this attribute is <a>False</a>, it indicates that thumbnailing may be
--   attempted again and may succeed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE :: Text

-- | A key in the "thumbnail" namespace for checking whether the normal
--   thumbnail is outdated.
--   
--   This attribute is <a>True</a> if the normal thumbnail is up-to-date
--   with the file it represents, and <a>False</a> if the file has been
--   modified since the thumbnail was generated.
--   
--   If <a>FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL</a> is <a>True</a> and
--   this attribute is <a>False</a>, it indicates that thumbnailing may be
--   attempted again and may succeed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL :: Text

-- | A key in the "thumbnail" namespace for checking whether the large
--   thumbnail is outdated.
--   
--   This attribute is <a>True</a> if the large thumbnail is up-to-date
--   with the file it represents, and <a>False</a> if the file has been
--   modified since the thumbnail was generated.
--   
--   If <a>FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE</a> is <a>True</a> and
--   this attribute is <a>False</a>, it indicates that thumbnailing may be
--   attempted again and may succeed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE :: Text

-- | A key in the "thumbnail" namespace for checking whether the thumbnail
--   is outdated.
--   
--   This attribute is <a>True</a> if the thumbnail is up-to-date with the
--   file it represents, and <a>False</a> if the file has been modified
--   since the thumbnail was generated.
--   
--   If <a>FILE_ATTRIBUTE_THUMBNAILING_FAILED</a> is <a>True</a> and this
--   attribute is <a>False</a>, it indicates that thumbnailing may be
--   attempted again and may succeed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.40</i>
pattern FILE_ATTRIBUTE_THUMBNAIL_IS_VALID :: Text

-- | A key in the "thumbnail" namespace for checking if thumbnailing failed
--   for the xx-large image.
--   
--   This attribute is <a>True</a> if thumbnailing failed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE :: Text

-- | A key in the "thumbnail" namespace for checking if thumbnailing failed
--   for the x-large image.
--   
--   This attribute is <a>True</a> if thumbnailing failed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE :: Text

-- | A key in the "thumbnail" namespace for checking if thumbnailing failed
--   for the normal image.
--   
--   This attribute is <a>True</a> if thumbnailing failed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL :: Text

-- | A key in the "thumbnail" namespace for checking if thumbnailing failed
--   for the large image.
--   
--   This attribute is <a>True</a> if thumbnailing failed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.76</i>
pattern FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE :: Text

-- | A key in the "thumbnail" namespace for checking if thumbnailing
--   failed.
--   
--   This attribute is <a>True</a> if thumbnailing failed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_THUMBNAILING_FAILED :: Text

-- | A key in the "standard" namespace for storing file types.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
--   
--   The value for this key should contain a <a>FileType</a>.
pattern FILE_ATTRIBUTE_STANDARD_TYPE :: Text

-- | A key in the "standard" namespace for getting the target URI for the
--   file, in the case of <a>FileTypeShortcut</a> or
--   <a>FileTypeMountable</a> files.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_STANDARD_TARGET_URI :: Text

-- | A key in the "standard" namespace for getting the symlink target, if
--   the file is a symlink.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
pattern FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET :: Text

-- | A key in the "standard" namespace for getting the symbolic icon for
--   the file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeObject</a>.
--   
--   The value for this key should contain a <a>Icon</a>.
--   
--   <i>Since: 2.34</i>
pattern FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON :: Text

-- | A key in the "standard" namespace for setting the sort order of a
--   file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeInt32</a>.
--   
--   An example use would be in file managers, which would use this key to
--   set the order files are displayed. Files with smaller sort order
--   should be sorted first, and files without sort order as if sort order
--   was zero.
pattern FILE_ATTRIBUTE_STANDARD_SORT_ORDER :: Text

-- | A key in the "standard" namespace for getting the file's size (in
--   bytes).
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>.
pattern FILE_ATTRIBUTE_STANDARD_SIZE :: Text

-- | A key in the "standard" namespace for getting the name of the file.
--   
--   The name is the on-disk filename which may not be in any known
--   encoding, and can thus not be generally displayed as is. It is
--   guaranteed to be set on every file.
--   
--   Use <a>FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</a> if you need to display
--   the name in a user interface.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeByteString</a>.
pattern FILE_ATTRIBUTE_STANDARD_NAME :: Text

-- | A key in the "standard" namespace for checking if a file is volatile.
--   This is meant for opaque, non-POSIX-like backends to indicate that the
--   URI is not persistent. Applications should look at
--   <a>FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</a> for the persistent URI.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.46</i>
pattern FILE_ATTRIBUTE_STANDARD_IS_VOLATILE :: Text

-- | A key in the "standard" namespace for checking if a file is virtual.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL :: Text

-- | A key in the "standard" namespace for checking if the file is a
--   symlink. Typically the actual type is something else, if we followed
--   the symlink to get the type.
--   
--   On Windows NTFS mountpoints are considered to be symlinks as well.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_STANDARD_IS_SYMLINK :: Text

-- | A key in the "standard" namespace for checking if a file is hidden.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_STANDARD_IS_HIDDEN :: Text

-- | A key in the "standard" namespace for checking if a file is a backup
--   file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_STANDARD_IS_BACKUP :: Text

-- | A key in the "standard" namespace for getting the icon for the file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeObject</a>.
--   
--   The value for this key should contain a <a>Icon</a>.
pattern FILE_ATTRIBUTE_STANDARD_ICON :: Text

-- | A key in the "standard" namespace for getting the fast content type.
--   
--   The fast content type isn't as reliable as the regular one, as it only
--   uses the filename to guess it, but it is faster to calculate than the
--   regular content type.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE :: Text

-- | A key in the "standard" namespace for edit name of the file.
--   
--   An edit name is similar to the display name, but it is meant to be
--   used when you want to rename the file in the UI. The display name
--   might contain information you don't want in the new filename (such as
--   "(invalid unicode)" if the filename was in an invalid encoding).
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_STANDARD_EDIT_NAME :: Text

-- | A key in the "standard" namespace for getting the display name of the
--   file.
--   
--   A display name is guaranteed to be in UTF-8 and can thus be displayed
--   in the UI. It is guaranteed to be set on every file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME :: Text

-- | A key in the "standard" namespace for getting the description of the
--   file.
--   
--   The description is a utf8 string that describes the file, generally
--   containing the filename, but can also contain further information.
--   Example descriptions could be "filename (on hostname)" for a remote
--   file or "filename (in trash)" for a file in the trash. This is useful
--   for instance as the window title when displaying a directory or for a
--   bookmarks menu.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_STANDARD_DESCRIPTION :: Text

-- | A key in the "standard" namespace for getting the copy name of the
--   file.
--   
--   The copy name is an optional version of the name. If available it's
--   always in UTF8, and corresponds directly to the original filename
--   (only transcoded to UTF8). This is useful if you want to copy the file
--   to another filesystem that might have a different encoding. If the
--   filename is not a valid string in the encoding selected for the
--   filesystem it is in then the copy name will not be set.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_STANDARD_COPY_NAME :: Text

-- | A key in the "standard" namespace for getting the content type of the
--   file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
--   
--   The value for this key should contain a valid content type.
pattern FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE :: Text

-- | A key in the "standard" namespace for getting the amount of disk space
--   that is consumed by the file (in bytes).
--   
--   This will generally be larger than the file size (due to block size
--   overhead) but can occasionally be smaller (for example, for sparse
--   files).
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>.
--   
--   <i>Since: 2.20</i>
pattern FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE :: Text

-- | A key in the "selinux" namespace for getting the file's SELinux
--   context.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
--   
--   Note that this attribute is only available if GLib has been built with
--   SELinux support.
pattern FILE_ATTRIBUTE_SELINUX_CONTEXT :: Text

-- | A key in the "recent" namespace for getting time, when the metadata
--   for the file in <tt>recent:///</tt> was last changed.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeInt64</a>.
--   
--   <i>Since: 2.52</i>
pattern FILE_ATTRIBUTE_RECENT_MODIFIED :: Text

-- | A key in the "preview" namespace for getting a <a>Icon</a> that can be
--   used to get preview of the file.
--   
--   For example, it may be a low resolution thumbnail without metadata.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeObject</a>.
--   
--   The value for this key should contain a <a>Icon</a>.
--   
--   <i>Since: 2.20</i>
pattern FILE_ATTRIBUTE_PREVIEW_ICON :: Text

-- | A key in the "owner" namespace for getting the real name of the user
--   that owns the file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_OWNER_USER_REAL :: Text

-- | A key in the "owner" namespace for getting the user name of the file's
--   owner.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_OWNER_USER :: Text

-- | A key in the "owner" namespace for getting the file owner's group.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_OWNER_GROUP :: Text

-- | A key in the "mountable" namespace for getting the unix device file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
--   
--   <i>Since: 2.22</i>
pattern FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE :: Text

-- | A key in the "mountable" namespace for getting the unix device.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
pattern FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE :: Text

-- | A key in the "mountable" namespace for getting the
--   <a>DriveStartStopType</a>.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
--   
--   <i>Since: 2.22</i>
pattern FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) is automatically polled for media.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.22</i>
pattern FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC :: Text

-- | A key in the "mountable" namespace for getting the HAL UDI for the
--   mountable file.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) is unmountable.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) can be stopped.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.22</i>
pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) can be started degraded.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.22</i>
pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) can be started.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.22</i>
pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_START :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) can be polled.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.22</i>
pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) is mountable.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT :: Text

-- | A key in the "mountable" namespace for checking if a file (of type
--   G_FILE_TYPE_MOUNTABLE) can be ejected.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT :: Text

-- | A key in the "id" namespace for getting the file system identifier.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
--   
--   An example use would be during drag and drop to see if the source and
--   target are on the same filesystem (default to move) or not (default to
--   copy).
pattern FILE_ATTRIBUTE_ID_FILESYSTEM :: Text

-- | A key in the "id" namespace for getting a file identifier.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
--   
--   An example use would be during listing files, to avoid recursive
--   directory scanning.
--   
--   For local files on Linux, this is a combination of the file’s device
--   number and inode, so is invariant with respect to hard linking. The
--   format used by other VFS implementations may vary, and some VFS
--   backends may not set it.
--   
--   For simply seeing if two <a>File</a> instances refer to the same path
--   on disk, see <a>fileEqual</a>.
pattern FILE_ATTRIBUTE_ID_FILE :: Text

-- | A key in the "gvfs" namespace that gets the name of the current GVFS
--   backend in use.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_GVFS_BACKEND :: Text

-- | A key in the "filesystem" namespace for hinting a file manager
--   application whether it should preview (e.g. thumbnail) files on the
--   file system.
--   
--   The value for this key contain a <a>FilesystemPreviewType</a>.
pattern FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW :: Text

-- | A key in the "filesystem" namespace for getting the number of bytes
--   used by data on the file system.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>.
--   
--   <i>Since: 2.32</i>
pattern FILE_ATTRIBUTE_FILESYSTEM_USED :: Text

-- | A key in the "filesystem" namespace for getting the file system's
--   type.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_FILESYSTEM_TYPE :: Text

-- | A key in the "filesystem" namespace for getting the total size (in
--   bytes) of the file system, used in <a>fileQueryFilesystemInfo</a>.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>.
pattern FILE_ATTRIBUTE_FILESYSTEM_SIZE :: Text

-- | A key in the "filesystem" namespace for checking if the file system is
--   remote.
--   
--   Is set to <a>True</a> if the file system is remote.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_FILESYSTEM_REMOTE :: Text

-- | A key in the "filesystem" namespace for checking if the file system is
--   read only.
--   
--   Is set to <a>True</a> if the file system is read only.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_FILESYSTEM_READONLY :: Text

-- | A key in the "filesystem" namespace for getting the number of bytes of
--   free space left on the file system.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint64</a>.
pattern FILE_ATTRIBUTE_FILESYSTEM_FREE :: Text

-- | A key in the "etag" namespace for getting the value of the file's
--   entity tag.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeString</a>.
pattern FILE_ATTRIBUTE_ETAG_VALUE :: Text

-- | A key in the "dos" namespace for getting the file NTFS reparse tag.
--   
--   This value is 0 for files that are not reparse points.
--   
--   See the <a>Reparse Tags</a> page for possible reparse tag values.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeUint32</a>.
--   
--   <i>Since: 2.60</i>
pattern FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG :: Text

-- | A key in the "dos" namespace for checking if the file's backup flag is
--   set.
--   
--   This attribute is <a>True</a> if the backup flag is set.
--   
--   This attribute is only available for DOS file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_DOS_IS_SYSTEM :: Text

-- | A key in the "dos" namespace for checking if the file is a NTFS mount
--   point (a volume mount or a junction point).
--   
--   This attribute is <a>True</a> if file is a reparse point of type
--   <a>IO_REPARSE_TAG_MOUNT_POINT</a>.
--   
--   This attribute is only available for DOS file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   <i>Since: 2.60</i>
pattern FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT :: Text

-- | A key in the "dos" namespace for checking if the file's archive flag
--   is set.
--   
--   This attribute is <a>True</a> if the archive flag is set.
--   
--   This attribute is only available for DOS file systems.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
pattern FILE_ATTRIBUTE_DOS_IS_ARCHIVE :: Text

-- | A key in the "access" namespace for getting write privileges.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   This attribute will be <a>True</a> if the user is able to write to the
--   file.
pattern FILE_ATTRIBUTE_ACCESS_CAN_WRITE :: Text

-- | A key in the "access" namespace for checking trashing privileges.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   This attribute will be <a>True</a> if the user is able to move the
--   file to the trash.
pattern FILE_ATTRIBUTE_ACCESS_CAN_TRASH :: Text

-- | A key in the "access" namespace for checking renaming privileges.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   This attribute will be <a>True</a> if the user is able to rename the
--   file.
pattern FILE_ATTRIBUTE_ACCESS_CAN_RENAME :: Text

-- | A key in the "access" namespace for getting read privileges.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   This attribute will be <a>True</a> if the user is able to read the
--   file.
pattern FILE_ATTRIBUTE_ACCESS_CAN_READ :: Text

-- | A key in the "access" namespace for getting execution privileges.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   This attribute will be <a>True</a> if the user is able to execute the
--   file.
pattern FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE :: Text

-- | A key in the "access" namespace for checking deletion privileges.
--   
--   Corresponding <a>FileAttributeType</a> is
--   <a>FileAttributeTypeBoolean</a>.
--   
--   This attribute will be <a>True</a> if the user is able to delete the
--   file.
pattern FILE_ATTRIBUTE_ACCESS_CAN_DELETE :: Text

-- | The string used to obtain a Unix device path with
--   <a>driveGetIdentifier</a>.
--   
--   <i>Since: 2.58</i>
pattern DRIVE_IDENTIFIER_KIND_UNIX_DEVICE :: Text

-- | Extension point for debug control functionality. See <a>Extending
--   GIO</a>.
--   
--   <i>Since: 2.72</i>
pattern DEBUG_CONTROLLER_EXTENSION_POINT_NAME :: Text

-- | The value returned by handlers of the signals generated by the
--   <tt>gdbus-codegen</tt> tool to indicate that a method call has not
--   been handled by an implementation. It is equal to <a>False</a>, but
--   using this macro is sometimes more readable.
--   
--   In code that needs to be backwards-compatible with older GLib, use
--   <a>False</a> instead.
--   
--   <i>Since: 2.68</i>
pattern DBUS_METHOD_INVOCATION_UNHANDLED :: Bool

-- | The value returned by handlers of the signals generated by the
--   <tt>gdbus-codegen</tt> tool to indicate that a method call has been
--   handled by an implementation. It is equal to <a>True</a>, but using
--   this macro is sometimes more readable.
--   
--   In code that needs to be backwards-compatible with older GLib, use
--   <a>True</a> instead, often written like this:
--   
--   <pre>
--   g_dbus_method_invocation_return_error (invocation, ...);
--   return TRUE;    // handled
--   </pre>
--   
--   <i>Since: 2.68</i>
pattern DBUS_METHOD_INVOCATION_HANDLED :: Bool


module GI.Gio.Enums

-- | An enumeration for well-known message buses.
--   
--   <i>Since: 2.26</i>
data BusType

-- | An alias for the message bus that activated the process, if any.
BusTypeStarter :: BusType

-- | Not a message bus.
BusTypeNone :: BusType

-- | The system-wide message bus.
BusTypeSystem :: BusType

-- | The login session message bus.
BusTypeSession :: BusType

-- | Catch-all for unknown values
AnotherBusType :: Int -> BusType

-- | Results returned from <a>converterConvert</a>.
--   
--   <i>Since: 2.24</i>
data ConverterResult

-- | There was an error during conversion.
ConverterResultError :: ConverterResult

-- | Some data was consumed or produced
ConverterResultConverted :: ConverterResult

-- | The conversion is finished
ConverterResultFinished :: ConverterResult

-- | Flushing is finished
ConverterResultFlushed :: ConverterResult

-- | Catch-all for unknown values
AnotherConverterResult :: Int -> ConverterResult

-- | Enumeration describing different kinds of native credential types.
--   
--   <i>Since: 2.26</i>
data CredentialsType

-- | Indicates an invalid native credential type.
CredentialsTypeInvalid :: CredentialsType

-- | The native credentials type is a <tt>struct ucred</tt>.
CredentialsTypeLinuxUcred :: CredentialsType

-- | The native credentials type is a <tt>struct cmsgcred</tt>.
CredentialsTypeFreebsdCmsgcred :: CredentialsType

-- | The native credentials type is a <tt>struct sockpeercred</tt>. Added
--   in 2.30.
CredentialsTypeOpenbsdSockpeercred :: CredentialsType

-- | The native credentials type is a <tt>ucred_t</tt>. Added in 2.40.
CredentialsTypeSolarisUcred :: CredentialsType

-- | The native credentials type is a <tt>struct unpcbid</tt>. Added in
--   2.42.
CredentialsTypeNetbsdUnpcbid :: CredentialsType

-- | The native credentials type is a <tt>struct xucred</tt>. Added in
--   2.66.
CredentialsTypeAppleXucred :: CredentialsType

-- | The native credentials type is a PID <tt>DWORD</tt>. Added in 2.72.
CredentialsTypeWin32Pid :: CredentialsType

-- | Catch-all for unknown values
AnotherCredentialsType :: Int -> CredentialsType

-- | Error codes for the <tt><i>G_DBUS_ERROR</i></tt> error domain.
--   
--   <i>Since: 2.26</i>
data DBusError

-- | A generic error; "something went wrong" - see the error message for
--   more.
DBusErrorFailed :: DBusError

-- | There was not enough memory to complete an operation.
DBusErrorNoMemory :: DBusError

-- | The bus doesn't know how to launch a service to supply the bus name
--   you wanted.
DBusErrorServiceUnknown :: DBusError

-- | The bus name you referenced doesn't exist (i.e. no application owns
--   it).
DBusErrorNameHasNoOwner :: DBusError

-- | No reply to a message expecting one, usually means a timeout occurred.
DBusErrorNoReply :: DBusError

-- | Something went wrong reading or writing to a socket, for example.
DBusErrorIoError :: DBusError

-- | A D-Bus bus address was malformed.
DBusErrorBadAddress :: DBusError

-- | Requested operation isn't supported (like ENOSYS on UNIX).
DBusErrorNotSupported :: DBusError

-- | Some limited resource is exhausted.
DBusErrorLimitsExceeded :: DBusError

-- | Security restrictions don't allow doing what you're trying to do.
DBusErrorAccessDenied :: DBusError

-- | Authentication didn't work.
DBusErrorAuthFailed :: DBusError

-- | Unable to connect to server (probably caused by ECONNREFUSED on a
--   socket).
DBusErrorNoServer :: DBusError

-- | Certain timeout errors, possibly ETIMEDOUT on a socket. Note that
--   <a>DBusErrorNoReply</a> is used for message reply timeouts. Warning:
--   this is confusingly-named given that <a>DBusErrorTimedOut</a> also
--   exists. We can't fix it for compatibility reasons so just be careful.
DBusErrorTimeout :: DBusError

-- | No network access (probably ENETUNREACH on a socket).
DBusErrorNoNetwork :: DBusError

-- | Can't bind a socket since its address is in use (i.e. EADDRINUSE).
DBusErrorAddressInUse :: DBusError

-- | The connection is disconnected and you're trying to use it.
DBusErrorDisconnected :: DBusError

-- | Invalid arguments passed to a method call.
DBusErrorInvalidArgs :: DBusError

-- | Missing file.
DBusErrorFileNotFound :: DBusError

-- | Existing file and the operation you're using does not silently
--   overwrite.
DBusErrorFileExists :: DBusError

-- | Method name you invoked isn't known by the object you invoked it on.
DBusErrorUnknownMethod :: DBusError

-- | Certain timeout errors, e.g. while starting a service. Warning: this
--   is confusingly-named given that <a>DBusErrorTimeout</a> also exists.
--   We can't fix it for compatibility reasons so just be careful.
DBusErrorTimedOut :: DBusError

-- | Tried to remove or modify a match rule that didn't exist.
DBusErrorMatchRuleNotFound :: DBusError

-- | The match rule isn't syntactically valid.
DBusErrorMatchRuleInvalid :: DBusError

-- | While starting a new process, the <tt><i>exec()</i></tt> call failed.
DBusErrorSpawnExecFailed :: DBusError

-- | While starting a new process, the <tt><i>fork()</i></tt> call failed.
DBusErrorSpawnForkFailed :: DBusError

-- | While starting a new process, the child exited with a status code.
DBusErrorSpawnChildExited :: DBusError

-- | While starting a new process, the child exited on a signal.
DBusErrorSpawnChildSignaled :: DBusError

-- | While starting a new process, something went wrong.
DBusErrorSpawnFailed :: DBusError

-- | We failed to setup the environment correctly.
DBusErrorSpawnSetupFailed :: DBusError

-- | We failed to setup the config parser correctly.
DBusErrorSpawnConfigInvalid :: DBusError

-- | Bus name was not valid.
DBusErrorSpawnServiceInvalid :: DBusError

-- | Service file not found in system-services directory.
DBusErrorSpawnServiceNotFound :: DBusError

-- | Permissions are incorrect on the setuid helper.
DBusErrorSpawnPermissionsInvalid :: DBusError

-- | Service file invalid (Name, User or Exec missing).
DBusErrorSpawnFileInvalid :: DBusError

-- | Tried to get a UNIX process ID and it wasn't available.
DBusErrorSpawnNoMemory :: DBusError

-- | Tried to get a UNIX process ID and it wasn't available.
DBusErrorUnixProcessIdUnknown :: DBusError

-- | A type signature is not valid.
DBusErrorInvalidSignature :: DBusError

-- | A file contains invalid syntax or is otherwise broken.
DBusErrorInvalidFileContent :: DBusError

-- | Asked for SELinux security context and it wasn't available.
DBusErrorSelinuxSecurityContextUnknown :: DBusError

-- | Asked for ADT audit data and it wasn't available.
DBusErrorAdtAuditDataUnknown :: DBusError

-- | There's already an object with the requested object path.
DBusErrorObjectPathInUse :: DBusError

-- | Object you invoked a method on isn't known. Since 2.42
DBusErrorUnknownObject :: DBusError

-- | Interface you invoked a method on isn't known by the object. Since
--   2.42
DBusErrorUnknownInterface :: DBusError

-- | Property you tried to access isn't known by the object. Since 2.42
DBusErrorUnknownProperty :: DBusError

-- | Property you tried to set is read-only. Since 2.42
DBusErrorPropertyReadOnly :: DBusError

-- | Catch-all for unknown values
AnotherDBusError :: Int -> DBusError

-- | Catch exceptions of type <a>DBusError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchDBusError :: IO a -> (DBusError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>DBusError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
handleDBusError :: (DBusError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Enumeration used to describe the byte order of a D-Bus message.
--   
--   <i>Since: 2.26</i>
data DBusMessageByteOrder

-- | The byte order is big endian.
DBusMessageByteOrderBigEndian :: DBusMessageByteOrder

-- | The byte order is little endian.
DBusMessageByteOrderLittleEndian :: DBusMessageByteOrder

-- | Catch-all for unknown values
AnotherDBusMessageByteOrder :: Int -> DBusMessageByteOrder

-- | Header fields used in <a>DBusMessage</a>.
--   
--   <i>Since: 2.26</i>
data DBusMessageHeaderField

-- | Not a valid header field.
DBusMessageHeaderFieldInvalid :: DBusMessageHeaderField

-- | The object path.
DBusMessageHeaderFieldPath :: DBusMessageHeaderField

-- | The interface name.
DBusMessageHeaderFieldInterface :: DBusMessageHeaderField

-- | The method or signal name.
DBusMessageHeaderFieldMember :: DBusMessageHeaderField

-- | The name of the error that occurred.
DBusMessageHeaderFieldErrorName :: DBusMessageHeaderField

-- | The serial number the message is a reply to.
DBusMessageHeaderFieldReplySerial :: DBusMessageHeaderField

-- | The name the message is intended for.
DBusMessageHeaderFieldDestination :: DBusMessageHeaderField

-- | Unique name of the sender of the message (filled in by the bus).
DBusMessageHeaderFieldSender :: DBusMessageHeaderField

-- | The signature of the message body.
DBusMessageHeaderFieldSignature :: DBusMessageHeaderField

-- | The number of UNIX file descriptors that accompany the message.
DBusMessageHeaderFieldNumUnixFds :: DBusMessageHeaderField

-- | Catch-all for unknown values
AnotherDBusMessageHeaderField :: Int -> DBusMessageHeaderField

-- | Message types used in <a>DBusMessage</a>.
--   
--   <i>Since: 2.26</i>
data DBusMessageType

-- | Message is of invalid type.
DBusMessageTypeInvalid :: DBusMessageType

-- | Method call.
DBusMessageTypeMethodCall :: DBusMessageType

-- | Method reply.
DBusMessageTypeMethodReturn :: DBusMessageType

-- | Error reply.
DBusMessageTypeError :: DBusMessageType

-- | Signal emission.
DBusMessageTypeSignal :: DBusMessageType

-- | Catch-all for unknown values
AnotherDBusMessageType :: Int -> DBusMessageType

-- | <a>DataStreamByteOrder</a> is used to ensure proper endianness of
--   streaming data sources across various machine architectures.
data DataStreamByteOrder

-- | Selects Big Endian byte order.
DataStreamByteOrderBigEndian :: DataStreamByteOrder

-- | Selects Little Endian byte order.
DataStreamByteOrderLittleEndian :: DataStreamByteOrder

-- | Selects endianness based on host machine's architecture.
DataStreamByteOrderHostEndian :: DataStreamByteOrder

-- | Catch-all for unknown values
AnotherDataStreamByteOrder :: Int -> DataStreamByteOrder

-- | <a>DataStreamNewlineType</a> is used when checking for or setting the
--   line endings for a given file.
data DataStreamNewlineType

-- | Selects "LF" line endings, common on most modern UNIX platforms.
DataStreamNewlineTypeLf :: DataStreamNewlineType

-- | Selects "CR" line endings.
DataStreamNewlineTypeCr :: DataStreamNewlineType

-- | Selects "CR, LF" line ending, common on Microsoft Windows.
DataStreamNewlineTypeCrLf :: DataStreamNewlineType

-- | Automatically try to handle any line ending type.
DataStreamNewlineTypeAny :: DataStreamNewlineType

-- | Catch-all for unknown values
AnotherDataStreamNewlineType :: Int -> DataStreamNewlineType

-- | Enumeration describing how a drive can be started/stopped.
--   
--   <i>Since: 2.22</i>
data DriveStartStopType

-- | Unknown or drive doesn't support start/stop.
DriveStartStopTypeUnknown :: DriveStartStopType

-- | The stop method will physically shut down the drive and e.g. power
--   down the port the drive is attached to.
DriveStartStopTypeShutdown :: DriveStartStopType

-- | The start/stop methods are used for connecting/disconnect to the drive
--   over the network.
DriveStartStopTypeNetwork :: DriveStartStopType

-- | The start/stop methods will assemble/disassemble a virtual drive from
--   several physical drives.
DriveStartStopTypeMultidisk :: DriveStartStopType

-- | The start/stop methods will unlock/lock the disk (for example using
--   the ATA <tt>SECURITY UNLOCK DEVICE</tt> command)
DriveStartStopTypePassword :: DriveStartStopType

-- | Catch-all for unknown values
AnotherDriveStartStopType :: Int -> DriveStartStopType

-- | GEmblemOrigin is used to add information about the origin of the
--   emblem to <a>Emblem</a>.
--   
--   <i>Since: 2.18</i>
data EmblemOrigin

-- | Emblem of unknown origin
EmblemOriginUnknown :: EmblemOrigin

-- | Emblem adds device-specific information
EmblemOriginDevice :: EmblemOrigin

-- | Emblem depicts live metadata, such as "readonly"
EmblemOriginLivemetadata :: EmblemOrigin

-- | Emblem comes from a user-defined tag, e.g. set by nautilus (in the
--   future)
EmblemOriginTag :: EmblemOrigin

-- | Catch-all for unknown values
AnotherEmblemOrigin :: Int -> EmblemOrigin

-- | Used by <a>fileSetAttributesFromInfo</a> when setting file attributes.
data FileAttributeStatus

-- | Attribute value is unset (empty).
FileAttributeStatusUnset :: FileAttributeStatus

-- | Attribute value is set.
FileAttributeStatusSet :: FileAttributeStatus

-- | Indicates an error in setting the value.
FileAttributeStatusErrorSetting :: FileAttributeStatus

-- | Catch-all for unknown values
AnotherFileAttributeStatus :: Int -> FileAttributeStatus

-- | The data types for file attributes.
data FileAttributeType

-- | indicates an invalid or uninitialized type.
FileAttributeTypeInvalid :: FileAttributeType

-- | a null terminated UTF8 string.
FileAttributeTypeString :: FileAttributeType

-- | a zero terminated string of non-zero bytes.
FileAttributeTypeByteString :: FileAttributeType

-- | a boolean value.
FileAttributeTypeBoolean :: FileAttributeType

-- | an unsigned 4-byte/32-bit integer.
FileAttributeTypeUint32 :: FileAttributeType

-- | a signed 4-byte/32-bit integer.
FileAttributeTypeInt32 :: FileAttributeType

-- | an unsigned 8-byte/64-bit integer.
FileAttributeTypeUint64 :: FileAttributeType

-- | a signed 8-byte/64-bit integer.
FileAttributeTypeInt64 :: FileAttributeType

-- | a <a>Object</a>.
FileAttributeTypeObject :: FileAttributeType

-- | a <a>Nothing</a> terminated char __. Since 2.22
FileAttributeTypeStringv :: FileAttributeType

-- | Catch-all for unknown values
AnotherFileAttributeType :: Int -> FileAttributeType

-- | Specifies what type of event a monitor event is.
data FileMonitorEvent

-- | a file changed.
FileMonitorEventChanged :: FileMonitorEvent

-- | a hint that this was probably the last change in a set of changes.
FileMonitorEventChangesDoneHint :: FileMonitorEvent

-- | a file was deleted.
FileMonitorEventDeleted :: FileMonitorEvent

-- | a file was created.
FileMonitorEventCreated :: FileMonitorEvent

-- | a file attribute was changed.
FileMonitorEventAttributeChanged :: FileMonitorEvent

-- | the file location will soon be unmounted.
FileMonitorEventPreUnmount :: FileMonitorEvent

-- | the file location was unmounted.
FileMonitorEventUnmounted :: FileMonitorEvent

-- | the file was moved -- only sent if the (deprecated)
--   <a>FileMonitorFlagsSendMoved</a> flag is set
FileMonitorEventMoved :: FileMonitorEvent

-- | the file was renamed within the current directory -- only sent if the
--   <a>FileMonitorFlagsWatchMoves</a> flag is set. Since: 2.46.
FileMonitorEventRenamed :: FileMonitorEvent

-- | the file was moved into the monitored directory from another location
--   -- only sent if the <a>FileMonitorFlagsWatchMoves</a> flag is set.
--   Since: 2.46.
FileMonitorEventMovedIn :: FileMonitorEvent

-- | the file was moved out of the monitored directory to another location
--   -- only sent if the <a>FileMonitorFlagsWatchMoves</a> flag is set.
--   Since: 2.46
FileMonitorEventMovedOut :: FileMonitorEvent

-- | Catch-all for unknown values
AnotherFileMonitorEvent :: Int -> FileMonitorEvent

-- | Indicates the file's on-disk type.
--   
--   On Windows systems a file will never have <a>FileTypeSymbolicLink</a>
--   type; use <a>FileInfo</a> and
--   <a>FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</a> to determine whether a file
--   is a symlink or not. This is due to the fact that NTFS does not have a
--   single filesystem object type for symbolic links - it has files that
--   symlink to files, and directories that symlink to directories.
--   <a>FileType</a> enumeration cannot precisely represent this important
--   distinction, which is why all Windows symlinks will continue to be
--   reported as <a>FileTypeRegular</a> or <a>FileTypeDirectory</a>.
data FileType

-- | File's type is unknown.
FileTypeUnknown :: FileType

-- | File handle represents a regular file.
FileTypeRegular :: FileType

-- | File handle represents a directory.
FileTypeDirectory :: FileType

-- | File handle represents a symbolic link (Unix systems).
FileTypeSymbolicLink :: FileType

-- | File is a "special" file, such as a socket, fifo, block device, or
--   character device.
FileTypeSpecial :: FileType

-- | File is a shortcut (Windows systems).
FileTypeShortcut :: FileType

-- | File is a mountable location.
FileTypeMountable :: FileType

-- | Catch-all for unknown values
AnotherFileType :: Int -> FileType

-- | Indicates a hint from the file system whether files should be
--   previewed in a file manager. Returned as the value of the key
--   <a>FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW</a>.
data FilesystemPreviewType

-- | Only preview files if user has explicitly requested it.
FilesystemPreviewTypeIfAlways :: FilesystemPreviewType

-- | Preview files if user has requested preview of "local" files.
FilesystemPreviewTypeIfLocal :: FilesystemPreviewType

-- | Never preview files.
FilesystemPreviewTypeNever :: FilesystemPreviewType

-- | Catch-all for unknown values
AnotherFilesystemPreviewType :: Int -> FilesystemPreviewType

-- | Error codes returned by GIO functions.
--   
--   Note that this domain may be extended in future GLib releases. In
--   general, new error codes either only apply to new APIs, or else
--   replace <a>IOErrorEnumFailed</a> in cases that were not explicitly
--   distinguished before. You should therefore avoid writing code like
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED))
--     {
--       // Assume that this is EPRINTERONFIRE
--       ...
--     }
--   </pre>
--   
--   but should instead treat all unrecognized error codes the same as
--   <a>IOErrorEnumFailed</a>.
--   
--   See also <a>PollableReturn</a> for a cheaper way of returning
--   <a>IOErrorEnumWouldBlock</a> to callers without allocating a
--   <a>GError</a>.
data IOErrorEnum

-- | Generic error condition for when an operation fails and no more
--   specific <a>IOErrorEnum</a> value is defined.
IOErrorEnumFailed :: IOErrorEnum

-- | File not found.
IOErrorEnumNotFound :: IOErrorEnum

-- | File already exists.
IOErrorEnumExists :: IOErrorEnum

-- | File is a directory.
IOErrorEnumIsDirectory :: IOErrorEnum

-- | File is not a directory.
IOErrorEnumNotDirectory :: IOErrorEnum

-- | File is a directory that isn't empty.
IOErrorEnumNotEmpty :: IOErrorEnum

-- | File is not a regular file.
IOErrorEnumNotRegularFile :: IOErrorEnum

-- | File is not a symbolic link.
IOErrorEnumNotSymbolicLink :: IOErrorEnum

-- | File cannot be mounted.
IOErrorEnumNotMountableFile :: IOErrorEnum

-- | Filename is too many characters.
IOErrorEnumFilenameTooLong :: IOErrorEnum

-- | Filename is invalid or contains invalid characters.
IOErrorEnumInvalidFilename :: IOErrorEnum

-- | File contains too many symbolic links.
IOErrorEnumTooManyLinks :: IOErrorEnum

-- | No space left on drive.
IOErrorEnumNoSpace :: IOErrorEnum

-- | Invalid argument.
IOErrorEnumInvalidArgument :: IOErrorEnum

-- | Permission denied.
IOErrorEnumPermissionDenied :: IOErrorEnum

-- | Operation (or one of its parameters) not supported
IOErrorEnumNotSupported :: IOErrorEnum

-- | File isn't mounted.
IOErrorEnumNotMounted :: IOErrorEnum

-- | File is already mounted.
IOErrorEnumAlreadyMounted :: IOErrorEnum

-- | File was closed.
IOErrorEnumClosed :: IOErrorEnum

-- | Operation was cancelled. See <a>Cancellable</a>.
IOErrorEnumCancelled :: IOErrorEnum

-- | Operations are still pending.
IOErrorEnumPending :: IOErrorEnum

-- | File is read only.
IOErrorEnumReadOnly :: IOErrorEnum

-- | Backup couldn't be created.
IOErrorEnumCantCreateBackup :: IOErrorEnum

-- | File's Entity Tag was incorrect.
IOErrorEnumWrongEtag :: IOErrorEnum

-- | Operation timed out.
IOErrorEnumTimedOut :: IOErrorEnum

-- | Operation would be recursive.
IOErrorEnumWouldRecurse :: IOErrorEnum

-- | File is busy.
IOErrorEnumBusy :: IOErrorEnum

-- | Operation would block.
IOErrorEnumWouldBlock :: IOErrorEnum

-- | Host couldn't be found (remote operations).
IOErrorEnumHostNotFound :: IOErrorEnum

-- | Operation would merge files.
IOErrorEnumWouldMerge :: IOErrorEnum

-- | Operation failed and a helper program has already interacted with the
--   user. Do not display any error dialog.
IOErrorEnumFailedHandled :: IOErrorEnum

-- | The current process has too many files open and can't open any more.
--   Duplicate descriptors do count toward this limit. Since 2.20
IOErrorEnumTooManyOpenFiles :: IOErrorEnum

-- | The object has not been initialized. Since 2.22
IOErrorEnumNotInitialized :: IOErrorEnum

-- | The requested address is already in use. Since 2.22
IOErrorEnumAddressInUse :: IOErrorEnum

-- | Need more input to finish operation. Since 2.24
IOErrorEnumPartialInput :: IOErrorEnum

-- | The input data was invalid. Since 2.24
IOErrorEnumInvalidData :: IOErrorEnum

-- | A remote object generated an error that doesn't correspond to a
--   locally registered <a>GError</a> error domain. Use
--   <a>dbusErrorGetRemoteError</a> to extract the D-Bus error name and
--   <a>dbusErrorStripRemoteError</a> to fix up the message so it matches
--   what was received on the wire. Since 2.26.
IOErrorEnumDbusError :: IOErrorEnum

-- | Host unreachable. Since 2.26
IOErrorEnumHostUnreachable :: IOErrorEnum

-- | Network unreachable. Since 2.26
IOErrorEnumNetworkUnreachable :: IOErrorEnum

-- | Connection refused. Since 2.26
IOErrorEnumConnectionRefused :: IOErrorEnum

-- | Connection to proxy server failed. Since 2.26
IOErrorEnumProxyFailed :: IOErrorEnum

-- | Proxy authentication failed. Since 2.26
IOErrorEnumProxyAuthFailed :: IOErrorEnum

-- | Proxy server needs authentication. Since 2.26
IOErrorEnumProxyNeedAuth :: IOErrorEnum

-- | Proxy connection is not allowed by ruleset. Since 2.26
IOErrorEnumProxyNotAllowed :: IOErrorEnum

-- | Broken pipe. Since 2.36
IOErrorEnumBrokenPipe :: IOErrorEnum

-- | Connection closed by peer. Note that this is the same code as
--   <a>IOErrorEnumBrokenPipe</a>; before 2.44 some "connection closed"
--   errors returned <a>IOErrorEnumBrokenPipe</a>, but others returned
--   <a>IOErrorEnumFailed</a>. Now they should all return the same value,
--   which has this more logical name. Since 2.44.
IOErrorEnumConnectionClosed :: IOErrorEnum

-- | Transport endpoint is not connected. Since 2.44
IOErrorEnumNotConnected :: IOErrorEnum

-- | Message too large. Since 2.48.
IOErrorEnumMessageTooLarge :: IOErrorEnum

-- | No such device found. Since 2.74
IOErrorEnumNoSuchDevice :: IOErrorEnum

-- | Destination address unset. Since 2.80
IOErrorEnumDestinationUnset :: IOErrorEnum

-- | Catch-all for unknown values
AnotherIOErrorEnum :: Int -> IOErrorEnum

-- | Catch exceptions of type <a>IOErrorEnum</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchIOErrorEnum :: IO a -> (IOErrorEnum -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>IOErrorEnum</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
handleIOErrorEnum :: (IOErrorEnum -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Memory availability warning levels.
--   
--   Note that because new values might be added, it is recommended that
--   applications check <a>MemoryMonitorWarningLevel</a> as ranges, for
--   example:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   if (warning_level &gt; G_MEMORY_MONITOR_WARNING_LEVEL_LOW)
--     drop_caches ();
--   </pre>
--   
--   <i>Since: 2.64</i>
data MemoryMonitorWarningLevel

-- | Memory on the device is low, processes should free up unneeded
--   resources (for example, in-memory caches) so they can be used
--   elsewhere.
MemoryMonitorWarningLevelLow :: MemoryMonitorWarningLevel

-- | Same as <i><tt>gMEMORYMONITORWARNINGLEVELLOW</tt></i> but the device
--   has even less free memory, so processes should try harder to free up
--   unneeded resources. If your process does not need to stay running, it
--   is a good time for it to quit.
MemoryMonitorWarningLevelMedium :: MemoryMonitorWarningLevel

-- | The system will soon start terminating processes to reclaim memory,
--   including background processes.
MemoryMonitorWarningLevelCritical :: MemoryMonitorWarningLevel

-- | Catch-all for unknown values
AnotherMemoryMonitorWarningLevel :: Int -> MemoryMonitorWarningLevel

-- | <a>MountOperationResult</a> is returned as a result when a request for
--   information is send by the mounting operation.
data MountOperationResult

-- | The request was fulfilled and the user specified data is now available
MountOperationResultHandled :: MountOperationResult

-- | The user requested the mount operation to be aborted
MountOperationResultAborted :: MountOperationResult

-- | The request was unhandled (i.e. not implemented)
MountOperationResultUnhandled :: MountOperationResult

-- | Catch-all for unknown values
AnotherMountOperationResult :: Int -> MountOperationResult

-- | The host's network connectivity state, as reported by
--   <a>NetworkMonitor</a>.
--   
--   <i>Since: 2.44</i>
data NetworkConnectivity

-- | The host is not configured with a route to the Internet; it may or may
--   not be connected to a local network.
NetworkConnectivityLocal :: NetworkConnectivity

-- | The host is connected to a network, but does not appear to be able to
--   reach the full Internet, perhaps due to upstream network problems.
NetworkConnectivityLimited :: NetworkConnectivity

-- | The host is behind a captive portal and cannot reach the full
--   Internet.
NetworkConnectivityPortal :: NetworkConnectivity

-- | The host is connected to a network, and appears to be able to reach
--   the full Internet.
NetworkConnectivityFull :: NetworkConnectivity

-- | Catch-all for unknown values
AnotherNetworkConnectivity :: Int -> NetworkConnectivity

-- | Priority levels for <tt><i>GNotifications</i></tt>.
--   
--   <i>Since: 2.42</i>
data NotificationPriority

-- | the default priority, to be used for the majority of notifications
--   (for example email messages, software updates, completed download/sync
--   operations)
NotificationPriorityNormal :: NotificationPriority

-- | for notifications that do not require immediate attention - typically
--   used for contextual background information, such as contact birthdays
--   or local weather
NotificationPriorityLow :: NotificationPriority

-- | for events that require more attention, usually because responses are
--   time-sensitive (for example chat and SMS messages or alarms)
NotificationPriorityHigh :: NotificationPriority

-- | for urgent notifications, or notifications that require a response in
--   a short space of time (for example phone calls or emergency warnings)
NotificationPriorityUrgent :: NotificationPriority

-- | Catch-all for unknown values
AnotherNotificationPriority :: Int -> NotificationPriority

-- | <a>PasswordSave</a> is used to indicate the lifespan of a saved
--   password.
--   
--   <tt><i>Gvfs</i></tt> stores passwords in the Gnome keyring when this
--   flag allows it to, and later retrieves it again from there.
data PasswordSave

-- | never save a password.
PasswordSaveNever :: PasswordSave

-- | save a password for the session.
PasswordSaveForSession :: PasswordSave

-- | save a password permanently.
PasswordSavePermanently :: PasswordSave

-- | Catch-all for unknown values
AnotherPasswordSave :: Int -> PasswordSave

-- | Return value for various IO operations that signal errors via the
--   return value and not necessarily via a <a>GError</a>.
--   
--   This enum exists to be able to return errors to callers without having
--   to allocate a <a>GError</a>. Allocating <tt><i>GErrors</i></tt> can be
--   quite expensive for regularly happening errors like
--   <a>IOErrorEnumWouldBlock</a>.
--   
--   In case of <a>PollableReturnFailed</a> a <a>GError</a> should be set
--   for the operation to give details about the error that happened.
--   
--   <i>Since: 2.60</i>
data PollableReturn

-- | Generic error condition for when an operation fails.
PollableReturnFailed :: PollableReturn

-- | The operation was successfully finished.
PollableReturnOk :: PollableReturn

-- | The operation would block.
PollableReturnWouldBlock :: PollableReturn

-- | Catch-all for unknown values
AnotherPollableReturn :: Int -> PollableReturn

-- | An error code used with <tt><i>G_RESOLVER_ERROR</i></tt> in a
--   <a>GError</a> returned from a <a>Resolver</a> routine.
--   
--   <i>Since: 2.22</i>
data ResolverError

-- | the requested name/address/service was not found
ResolverErrorNotFound :: ResolverError

-- | the requested information could not be looked up due to a network
--   error or similar problem
ResolverErrorTemporaryFailure :: ResolverError

-- | unknown error
ResolverErrorInternal :: ResolverError

-- | Catch-all for unknown values
AnotherResolverError :: Int -> ResolverError

-- | Catch exceptions of type <a>ResolverError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchResolverError :: IO a -> (ResolverError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>ResolverError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
handleResolverError :: (ResolverError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | The type of record that <a>resolverLookupRecords</a> or
--   <a>resolverLookupRecordsAsync</a> should retrieve. The records are
--   returned as lists of <a>GVariant</a> tuples. Each record type has
--   different values in the variant tuples returned.
--   
--   <a>ResolverRecordTypeSrv</a> records are returned as variants with the
--   signature <tt>(qqqs)</tt>, containing a <tt>guint16</tt> with the
--   priority, a <tt>guint16</tt> with the weight, a <tt>guint16</tt> with
--   the port, and a string of the hostname.
--   
--   <a>ResolverRecordTypeMx</a> records are returned as variants with the
--   signature <tt>(qs)</tt>, representing a <tt>guint16</tt> with the
--   preference, and a string containing the mail exchanger hostname.
--   
--   <a>ResolverRecordTypeTxt</a> records are returned as variants with the
--   signature <tt>(as)</tt>, representing an array of the strings in the
--   text record. Note: Most TXT records only contain a single string, but
--   <a>RFC 1035</a> does allow a record to contain multiple strings. The
--   RFC which defines the interpretation of a specific TXT record will
--   likely require concatenation of multiple strings if they are present,
--   as with <a>RFC 7208</a>.
--   
--   <a>ResolverRecordTypeSoa</a> records are returned as variants with the
--   signature <tt>(ssuuuuu)</tt>, representing a string containing the
--   primary name server, a string containing the administrator, the serial
--   as a <tt>guint32</tt>, the refresh interval as a <tt>guint32</tt>, the
--   retry interval as a <tt>guint32</tt>, the expire timeout as a
--   <tt>guint32</tt>, and the TTL as a <tt>guint32</tt>.
--   
--   <a>ResolverRecordTypeNs</a> records are returned as variants with the
--   signature <tt>(s)</tt>, representing a string of the hostname of the
--   name server.
--   
--   <i>Since: 2.34</i>
data ResolverRecordType

-- | look up DNS SRV records for a domain
ResolverRecordTypeSrv :: ResolverRecordType

-- | look up DNS MX records for a domain
ResolverRecordTypeMx :: ResolverRecordType

-- | look up DNS TXT records for a name
ResolverRecordTypeTxt :: ResolverRecordType

-- | look up DNS SOA records for a zone
ResolverRecordTypeSoa :: ResolverRecordType

-- | look up DNS NS records for a domain
ResolverRecordTypeNs :: ResolverRecordType

-- | Catch-all for unknown values
AnotherResolverRecordType :: Int -> ResolverRecordType

-- | An error code used with <tt><i>G_RESOURCE_ERROR</i></tt> in a
--   <a>GError</a> returned from a <a>Resource</a> routine.
--   
--   <i>Since: 2.32</i>
data ResourceError

-- | no file was found at the requested path
ResourceErrorNotFound :: ResourceError

-- | unknown error
ResourceErrorInternal :: ResourceError

-- | Catch-all for unknown values
AnotherResourceError :: Int -> ResourceError

-- | Catch exceptions of type <a>ResourceError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchResourceError :: IO a -> (ResourceError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>ResourceError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
handleResourceError :: (ResourceError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | Describes an event occurring on a <a>SocketClient</a>. See the
--   <a>SocketClient::event</a> signal for more details.
--   
--   Additional values may be added to this type in the future.
--   
--   <i>Since: 2.32</i>
data SocketClientEvent

-- | The client is doing a DNS lookup.
SocketClientEventResolving :: SocketClientEvent

-- | The client has completed a DNS lookup.
SocketClientEventResolved :: SocketClientEvent

-- | The client is connecting to a remote host (either a proxy or the
--   destination server).
SocketClientEventConnecting :: SocketClientEvent

-- | The client has connected to a remote host.
SocketClientEventConnected :: SocketClientEvent

-- | The client is negotiating with a proxy to connect to the destination
--   server.
SocketClientEventProxyNegotiating :: SocketClientEvent

-- | The client has negotiated with the proxy server.
SocketClientEventProxyNegotiated :: SocketClientEvent

-- | The client is performing a TLS handshake.
SocketClientEventTlsHandshaking :: SocketClientEvent

-- | The client has performed a TLS handshake.
SocketClientEventTlsHandshaked :: SocketClientEvent

-- | The client is done with a particular <a>SocketConnectable</a>.
SocketClientEventComplete :: SocketClientEvent

-- | Catch-all for unknown values
AnotherSocketClientEvent :: Int -> SocketClientEvent

-- | The protocol family of a <a>SocketAddress</a>. (These values are
--   identical to the system defines <tt><i>AF_INET</i></tt>,
--   <tt><i>AF_INET6</i></tt> and <tt><i>AF_UNIX</i></tt>, if available.)
--   
--   <i>Since: 2.22</i>
data SocketFamily

-- | no address family
SocketFamilyInvalid :: SocketFamily

-- | the UNIX domain family
SocketFamilyUnix :: SocketFamily

-- | the IPv4 family
SocketFamilyIpv4 :: SocketFamily

-- | the IPv6 family
SocketFamilyIpv6 :: SocketFamily

-- | Catch-all for unknown values
AnotherSocketFamily :: Int -> SocketFamily

-- | Describes an event occurring on a <a>SocketListener</a>. See the
--   <a>SocketListener::event</a> signal for more details.
--   
--   Additional values may be added to this type in the future.
--   
--   <i>Since: 2.46</i>
data SocketListenerEvent

-- | The listener is about to bind a socket.
SocketListenerEventBinding :: SocketListenerEvent

-- | The listener has bound a socket.
SocketListenerEventBound :: SocketListenerEvent

-- | The listener is about to start listening on this socket.
SocketListenerEventListening :: SocketListenerEvent

-- | The listener is now listening on this socket.
SocketListenerEventListened :: SocketListenerEvent

-- | Catch-all for unknown values
AnotherSocketListenerEvent :: Int -> SocketListenerEvent

-- | A protocol identifier is specified when creating a <a>Socket</a>,
--   which is a family/type specific identifier, where 0 means the default
--   protocol for the particular family/type.
--   
--   This enum contains a set of commonly available and used protocols. You
--   can also pass any other identifiers handled by the platform in order
--   to use protocols not listed here.
--   
--   <i>Since: 2.22</i>
data SocketProtocol

-- | The protocol type is unknown
SocketProtocolUnknown :: SocketProtocol

-- | The default protocol for the family/type
SocketProtocolDefault :: SocketProtocol

-- | TCP over IP
SocketProtocolTcp :: SocketProtocol

-- | UDP over IP
SocketProtocolUdp :: SocketProtocol

-- | SCTP over IP
SocketProtocolSctp :: SocketProtocol

-- | Catch-all for unknown values
AnotherSocketProtocol :: Int -> SocketProtocol

-- | Flags used when creating a <a>Socket</a>. Some protocols may not
--   implement all the socket types.
--   
--   <i>Since: 2.22</i>
data SocketType

-- | Type unknown or wrong
SocketTypeInvalid :: SocketType

-- | Reliable connection-based byte streams (e.g. TCP).
SocketTypeStream :: SocketType

-- | Connectionless, unreliable datagram passing. (e.g. UDP)
SocketTypeDatagram :: SocketType

-- | Reliable connection-based passing of datagrams of fixed maximum length
--   (e.g. SCTP).
SocketTypeSeqpacket :: SocketType

-- | Catch-all for unknown values
AnotherSocketType :: Int -> SocketType

-- | The client authentication mode for a <a>TlsServerConnection</a>.
--   
--   <i>Since: 2.28</i>
data TlsAuthenticationMode

-- | client authentication not required
TlsAuthenticationModeNone :: TlsAuthenticationMode

-- | client authentication is requested
TlsAuthenticationModeRequested :: TlsAuthenticationMode

-- | client authentication is required
TlsAuthenticationModeRequired :: TlsAuthenticationMode

-- | Catch-all for unknown values
AnotherTlsAuthenticationMode :: Int -> TlsAuthenticationMode

-- | An error code used with <tt><i>G_TLS_CHANNEL_BINDING_ERROR</i></tt> in
--   a <a>GError</a> to indicate a TLS channel binding retrieval error.
--   
--   <i>Since: 2.66</i>
data TlsChannelBindingError

-- | Either entire binding retrieval facility or specific binding type is
--   not implemented in the TLS backend.
TlsChannelBindingErrorNotImplemented :: TlsChannelBindingError

-- | The handshake is not yet complete on the connection which is a strong
--   requirement for any existing binding type.
TlsChannelBindingErrorInvalidState :: TlsChannelBindingError

-- | Handshake is complete but binding data is not available. That normally
--   indicates the TLS implementation failed to provide the binding data.
--   For example, some implementations do not provide a peer certificate
--   for resumed connections.
TlsChannelBindingErrorNotAvailable :: TlsChannelBindingError

-- | Binding type is not supported on the current connection. This error
--   could be triggered when requesting <tt>tls-server-end-point</tt>
--   binding data for a certificate which has no hash function or uses
--   multiple hash functions.
TlsChannelBindingErrorNotSupported :: TlsChannelBindingError

-- | Any other backend error preventing binding data retrieval.
TlsChannelBindingErrorGeneralError :: TlsChannelBindingError

-- | Catch-all for unknown values
AnotherTlsChannelBindingError :: Int -> TlsChannelBindingError

-- | Catch exceptions of type <a>TlsChannelBindingError</a>. This is a
--   specialized version of <a>catchGErrorJustDomain</a>.
catchTlsChannelBindingError :: IO a -> (TlsChannelBindingError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>TlsChannelBindingError</a>. This is a
--   specialized version of <a>handleGErrorJustDomain</a>.
handleTlsChannelBindingError :: (TlsChannelBindingError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | The type of TLS channel binding data to retrieve from
--   <a>TlsConnection</a> or <a>DtlsConnection</a>, as documented by RFC
--   5929 or RFC 9266. The <a>`tls-unique-for-telnet`</a> binding type is
--   not currently implemented.
--   
--   <i>Since: 2.66</i>
data TlsChannelBindingType

-- | <a>`tls-unique`</a> binding type
TlsChannelBindingTypeUnique :: TlsChannelBindingType

-- | <a>`tls-server-end-point`</a> binding type
TlsChannelBindingTypeServerEndPoint :: TlsChannelBindingType

-- | <a>`tls-exporter`</a> binding type. Since: 2.74
TlsChannelBindingTypeExporter :: TlsChannelBindingType

-- | Catch-all for unknown values
AnotherTlsChannelBindingType :: Int -> TlsChannelBindingType

-- | An error code used with <tt><i>G_TLS_ERROR</i></tt> in a <a>GError</a>
--   returned from a TLS-related routine.
--   
--   <i>Since: 2.28</i>
data TlsError

-- | No TLS provider is available
TlsErrorUnavailable :: TlsError

-- | Miscellaneous TLS error
TlsErrorMisc :: TlsError

-- | The certificate presented could not be parsed or failed validation.
TlsErrorBadCertificate :: TlsError

-- | The TLS handshake failed because the peer does not seem to be a TLS
--   server.
TlsErrorNotTls :: TlsError

-- | The TLS handshake failed because the peer's certificate was not
--   acceptable.
TlsErrorHandshake :: TlsError

-- | The TLS handshake failed because the server requested a client-side
--   certificate, but none was provided. See
--   <a>tlsConnectionSetCertificate</a>.
TlsErrorCertificateRequired :: TlsError

-- | The TLS connection was closed without proper notice, which may
--   indicate an attack. See <a>tlsConnectionSetRequireCloseNotify</a>.
TlsErrorEof :: TlsError

-- | The TLS handshake failed because the client sent the fallback SCSV,
--   indicating a protocol downgrade attack. Since: 2.60
TlsErrorInappropriateFallback :: TlsError

-- | The certificate failed to load because a password was incorrect.
--   Since: 2.72
TlsErrorBadCertificatePassword :: TlsError

-- | Catch-all for unknown values
AnotherTlsError :: Int -> TlsError

-- | Catch exceptions of type <a>TlsError</a>. This is a specialized
--   version of <a>catchGErrorJustDomain</a>.
catchTlsError :: IO a -> (TlsError -> GErrorMessage -> IO a) -> IO a

-- | Handle exceptions of type <a>TlsError</a>. This is a specialized
--   version of <a>handleGErrorJustDomain</a>.
handleTlsError :: (TlsError -> GErrorMessage -> IO a) -> IO a -> IO a

-- | <a>TlsInteractionResult</a> is returned by various functions in
--   <a>TlsInteraction</a> when finishing an interaction request.
--   
--   <i>Since: 2.30</i>
data TlsInteractionResult

-- | The interaction was unhandled (i.e. not implemented).
TlsInteractionResultUnhandled :: TlsInteractionResult

-- | The interaction completed, and resulting data is available.
TlsInteractionResultHandled :: TlsInteractionResult

-- | The interaction has failed, or was cancelled. and the operation should
--   be aborted.
TlsInteractionResultFailed :: TlsInteractionResult

-- | Catch-all for unknown values
AnotherTlsInteractionResult :: Int -> TlsInteractionResult

-- | The TLS or DTLS protocol version used by a <a>TlsConnection</a> or
--   <a>DtlsConnection</a>. The integer values of these versions are
--   sequential to ensure newer known protocol versions compare greater
--   than older known versions. Any known DTLS protocol version will
--   compare greater than any SSL or TLS protocol version. The protocol
--   version may be <a>TlsProtocolVersionUnknown</a> if the TLS backend
--   supports a newer protocol version that GLib does not yet know about.
--   This means that it's possible for an unknown DTLS protocol version to
--   compare less than the TLS protocol versions.
--   
--   <i>Since: 2.70</i>
data TlsProtocolVersion

-- | No protocol version or unknown protocol version
TlsProtocolVersionUnknown :: TlsProtocolVersion

-- | SSL 3.0, which is insecure and should not be used
TlsProtocolVersionSsl30 :: TlsProtocolVersion

-- | TLS 1.0, which is insecure and should not be used
TlsProtocolVersionTls10 :: TlsProtocolVersion

-- | TLS 1.1, which is insecure and should not be used
TlsProtocolVersionTls11 :: TlsProtocolVersion

-- | TLS 1.2, defined by <a>RFC 5246</a>
TlsProtocolVersionTls12 :: TlsProtocolVersion

-- | TLS 1.3, defined by <a>RFC 8446</a>
TlsProtocolVersionTls13 :: TlsProtocolVersion

-- | DTLS 1.0, which is insecure and should not be used
TlsProtocolVersionDtls10 :: TlsProtocolVersion

-- | DTLS 1.2, defined by <a>RFC 6347</a>
TlsProtocolVersionDtls12 :: TlsProtocolVersion

-- | Catch-all for unknown values
AnotherTlsProtocolVersion :: Int -> TlsProtocolVersion

-- | When to allow rehandshaking. See
--   <a>tlsConnectionSetRehandshakeMode</a>.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.60.)Changing the rehandshake mode is
--   no longerrequired for compatibility. Also, rehandshaking has been
--   removedfrom the TLS protocol in TLS 1.3.</i>
data TlsRehandshakeMode

-- | Never allow rehandshaking
TlsRehandshakeModeNever :: TlsRehandshakeMode

-- | Allow safe rehandshaking only
TlsRehandshakeModeSafely :: TlsRehandshakeMode

-- | Allow unsafe rehandshaking
TlsRehandshakeModeUnsafely :: TlsRehandshakeMode

-- | Catch-all for unknown values
AnotherTlsRehandshakeMode :: Int -> TlsRehandshakeMode

-- | The type of name used by a <a>UnixSocketAddress</a>.
--   <a>UnixSocketAddressTypePath</a> indicates a traditional unix domain
--   socket bound to a filesystem path.
--   <a>UnixSocketAddressTypeAnonymous</a> indicates a socket not bound to
--   any name (eg, a client-side socket, or a socket created with
--   <tt><i>socketpair()</i></tt>).
--   
--   For abstract sockets, there are two incompatible ways of naming them;
--   the man pages suggest using the entire <tt>struct sockaddr_un</tt> as
--   the name, padding the unused parts of the <tt><i>sun_path</i></tt>
--   field with zeroes; this corresponds to
--   <a>UnixSocketAddressTypeAbstractPadded</a>. However, many programs
--   instead just use a portion of <tt><i>sun_path</i></tt>, and pass an
--   appropriate smaller length to <tt><i>bind()</i></tt> or
--   <tt><i>connect()</i></tt>. This is
--   <a>UnixSocketAddressTypeAbstract</a>.
--   
--   <i>Since: 2.26</i>
data UnixSocketAddressType

-- | invalid
UnixSocketAddressTypeInvalid :: UnixSocketAddressType

-- | anonymous
UnixSocketAddressTypeAnonymous :: UnixSocketAddressType

-- | a filesystem path
UnixSocketAddressTypePath :: UnixSocketAddressType

-- | an abstract name
UnixSocketAddressTypeAbstract :: UnixSocketAddressType

-- | an abstract name, 0-padded to the full length of a unix socket name
UnixSocketAddressTypeAbstractPadded :: UnixSocketAddressType

-- | Catch-all for unknown values
AnotherUnixSocketAddressType :: Int -> UnixSocketAddressType

-- | Used to select the type of data format to use for
--   <a>ZlibDecompressor</a> and <a>ZlibCompressor</a>.
--   
--   <i>Since: 2.24</i>
data ZlibCompressorFormat

-- | deflate compression with zlib header
ZlibCompressorFormatZlib :: ZlibCompressorFormat

-- | gzip file format
ZlibCompressorFormatGzip :: ZlibCompressorFormat

-- | deflate compression with no header
ZlibCompressorFormatRaw :: ZlibCompressorFormat

-- | Catch-all for unknown values
AnotherZlibCompressorFormat :: Int -> ZlibCompressorFormat
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.BusType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ConverterResult
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.CredentialsType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusMessageByteOrder
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusMessageHeaderField
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusMessageType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DataStreamByteOrder
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DataStreamNewlineType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DriveStartStopType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.EmblemOrigin
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileAttributeStatus
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileAttributeType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileMonitorEvent
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FilesystemPreviewType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.IOErrorEnum
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.MemoryMonitorWarningLevel
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.MountOperationResult
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.NetworkConnectivity
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.NotificationPriority
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.PasswordSave
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.PollableReturn
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ResolverError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ResolverRecordType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ResourceError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketClientEvent
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketFamily
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketListenerEvent
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketProtocol
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsAuthenticationMode
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsChannelBindingError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsChannelBindingType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsInteractionResult
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsProtocolVersion
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsRehandshakeMode
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.UnixSocketAddressType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ZlibCompressorFormat
instance GHC.Internal.Enum.Enum GI.Gio.Enums.BusType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.ConverterResult
instance GHC.Internal.Enum.Enum GI.Gio.Enums.CredentialsType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.DBusError
instance GHC.Internal.Enum.Enum GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Internal.Enum.Enum GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Internal.Enum.Enum GI.Gio.Enums.DBusMessageType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.DataStreamByteOrder
instance GHC.Internal.Enum.Enum GI.Gio.Enums.DataStreamNewlineType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.DriveStartStopType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.EmblemOrigin
instance GHC.Internal.Enum.Enum GI.Gio.Enums.FileAttributeStatus
instance GHC.Internal.Enum.Enum GI.Gio.Enums.FileAttributeType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.FileMonitorEvent
instance GHC.Internal.Enum.Enum GI.Gio.Enums.FileType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.FilesystemPreviewType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.IOErrorEnum
instance GHC.Internal.Enum.Enum GI.Gio.Enums.MemoryMonitorWarningLevel
instance GHC.Internal.Enum.Enum GI.Gio.Enums.MountOperationResult
instance GHC.Internal.Enum.Enum GI.Gio.Enums.NetworkConnectivity
instance GHC.Internal.Enum.Enum GI.Gio.Enums.NotificationPriority
instance GHC.Internal.Enum.Enum GI.Gio.Enums.PasswordSave
instance GHC.Internal.Enum.Enum GI.Gio.Enums.PollableReturn
instance GHC.Internal.Enum.Enum GI.Gio.Enums.ResolverError
instance GHC.Internal.Enum.Enum GI.Gio.Enums.ResolverRecordType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.ResourceError
instance GHC.Internal.Enum.Enum GI.Gio.Enums.SocketClientEvent
instance GHC.Internal.Enum.Enum GI.Gio.Enums.SocketFamily
instance GHC.Internal.Enum.Enum GI.Gio.Enums.SocketListenerEvent
instance GHC.Internal.Enum.Enum GI.Gio.Enums.SocketProtocol
instance GHC.Internal.Enum.Enum GI.Gio.Enums.SocketType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Internal.Enum.Enum GI.Gio.Enums.TlsChannelBindingError
instance GHC.Internal.Enum.Enum GI.Gio.Enums.TlsChannelBindingType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.TlsError
instance GHC.Internal.Enum.Enum GI.Gio.Enums.TlsInteractionResult
instance GHC.Internal.Enum.Enum GI.Gio.Enums.TlsProtocolVersion
instance GHC.Internal.Enum.Enum GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Internal.Enum.Enum GI.Gio.Enums.UnixSocketAddressType
instance GHC.Internal.Enum.Enum GI.Gio.Enums.ZlibCompressorFormat
instance GHC.Classes.Eq GI.Gio.Enums.BusType
instance GHC.Classes.Eq GI.Gio.Enums.ConverterResult
instance GHC.Classes.Eq GI.Gio.Enums.CredentialsType
instance GHC.Classes.Eq GI.Gio.Enums.DBusError
instance GHC.Classes.Eq GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Classes.Eq GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Classes.Eq GI.Gio.Enums.DBusMessageType
instance GHC.Classes.Eq GI.Gio.Enums.DataStreamByteOrder
instance GHC.Classes.Eq GI.Gio.Enums.DataStreamNewlineType
instance GHC.Classes.Eq GI.Gio.Enums.DriveStartStopType
instance GHC.Classes.Eq GI.Gio.Enums.EmblemOrigin
instance GHC.Classes.Eq GI.Gio.Enums.FileAttributeStatus
instance GHC.Classes.Eq GI.Gio.Enums.FileAttributeType
instance GHC.Classes.Eq GI.Gio.Enums.FileMonitorEvent
instance GHC.Classes.Eq GI.Gio.Enums.FileType
instance GHC.Classes.Eq GI.Gio.Enums.FilesystemPreviewType
instance GHC.Classes.Eq GI.Gio.Enums.IOErrorEnum
instance GHC.Classes.Eq GI.Gio.Enums.MemoryMonitorWarningLevel
instance GHC.Classes.Eq GI.Gio.Enums.MountOperationResult
instance GHC.Classes.Eq GI.Gio.Enums.NetworkConnectivity
instance GHC.Classes.Eq GI.Gio.Enums.NotificationPriority
instance GHC.Classes.Eq GI.Gio.Enums.PasswordSave
instance GHC.Classes.Eq GI.Gio.Enums.PollableReturn
instance GHC.Classes.Eq GI.Gio.Enums.ResolverError
instance GHC.Classes.Eq GI.Gio.Enums.ResolverRecordType
instance GHC.Classes.Eq GI.Gio.Enums.ResourceError
instance GHC.Classes.Eq GI.Gio.Enums.SocketClientEvent
instance GHC.Classes.Eq GI.Gio.Enums.SocketFamily
instance GHC.Classes.Eq GI.Gio.Enums.SocketListenerEvent
instance GHC.Classes.Eq GI.Gio.Enums.SocketProtocol
instance GHC.Classes.Eq GI.Gio.Enums.SocketType
instance GHC.Classes.Eq GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Classes.Eq GI.Gio.Enums.TlsChannelBindingError
instance GHC.Classes.Eq GI.Gio.Enums.TlsChannelBindingType
instance GHC.Classes.Eq GI.Gio.Enums.TlsError
instance GHC.Classes.Eq GI.Gio.Enums.TlsInteractionResult
instance GHC.Classes.Eq GI.Gio.Enums.TlsProtocolVersion
instance GHC.Classes.Eq GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Classes.Eq GI.Gio.Enums.UnixSocketAddressType
instance GHC.Classes.Eq GI.Gio.Enums.ZlibCompressorFormat
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.DBusError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.IOErrorEnum
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.ResolverError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.ResourceError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.TlsChannelBindingError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.TlsError
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.BusType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.ConverterResult
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.CredentialsType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.DBusError
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.DBusMessageByteOrder
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.DBusMessageHeaderField
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.DBusMessageType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.DataStreamByteOrder
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.DataStreamNewlineType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.DriveStartStopType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.EmblemOrigin
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.FileAttributeStatus
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.FileAttributeType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.FileMonitorEvent
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.FileType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.FilesystemPreviewType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.IOErrorEnum
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.MemoryMonitorWarningLevel
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.MountOperationResult
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.NetworkConnectivity
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.NotificationPriority
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.PasswordSave
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.PollableReturn
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.ResolverError
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.ResolverRecordType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.ResourceError
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.SocketClientEvent
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.SocketFamily
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.SocketListenerEvent
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.SocketProtocol
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.SocketType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.TlsAuthenticationMode
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.TlsChannelBindingError
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.TlsChannelBindingType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.TlsError
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.TlsInteractionResult
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.TlsProtocolVersion
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.TlsRehandshakeMode
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.UnixSocketAddressType
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Enums.ZlibCompressorFormat
instance GHC.Classes.Ord GI.Gio.Enums.BusType
instance GHC.Classes.Ord GI.Gio.Enums.ConverterResult
instance GHC.Classes.Ord GI.Gio.Enums.CredentialsType
instance GHC.Classes.Ord GI.Gio.Enums.DBusError
instance GHC.Classes.Ord GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Classes.Ord GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Classes.Ord GI.Gio.Enums.DBusMessageType
instance GHC.Classes.Ord GI.Gio.Enums.DataStreamByteOrder
instance GHC.Classes.Ord GI.Gio.Enums.DataStreamNewlineType
instance GHC.Classes.Ord GI.Gio.Enums.DriveStartStopType
instance GHC.Classes.Ord GI.Gio.Enums.EmblemOrigin
instance GHC.Classes.Ord GI.Gio.Enums.FileAttributeStatus
instance GHC.Classes.Ord GI.Gio.Enums.FileAttributeType
instance GHC.Classes.Ord GI.Gio.Enums.FileMonitorEvent
instance GHC.Classes.Ord GI.Gio.Enums.FileType
instance GHC.Classes.Ord GI.Gio.Enums.FilesystemPreviewType
instance GHC.Classes.Ord GI.Gio.Enums.IOErrorEnum
instance GHC.Classes.Ord GI.Gio.Enums.MemoryMonitorWarningLevel
instance GHC.Classes.Ord GI.Gio.Enums.MountOperationResult
instance GHC.Classes.Ord GI.Gio.Enums.NetworkConnectivity
instance GHC.Classes.Ord GI.Gio.Enums.NotificationPriority
instance GHC.Classes.Ord GI.Gio.Enums.PasswordSave
instance GHC.Classes.Ord GI.Gio.Enums.PollableReturn
instance GHC.Classes.Ord GI.Gio.Enums.ResolverError
instance GHC.Classes.Ord GI.Gio.Enums.ResolverRecordType
instance GHC.Classes.Ord GI.Gio.Enums.ResourceError
instance GHC.Classes.Ord GI.Gio.Enums.SocketClientEvent
instance GHC.Classes.Ord GI.Gio.Enums.SocketFamily
instance GHC.Classes.Ord GI.Gio.Enums.SocketListenerEvent
instance GHC.Classes.Ord GI.Gio.Enums.SocketProtocol
instance GHC.Classes.Ord GI.Gio.Enums.SocketType
instance GHC.Classes.Ord GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Classes.Ord GI.Gio.Enums.TlsChannelBindingError
instance GHC.Classes.Ord GI.Gio.Enums.TlsChannelBindingType
instance GHC.Classes.Ord GI.Gio.Enums.TlsError
instance GHC.Classes.Ord GI.Gio.Enums.TlsInteractionResult
instance GHC.Classes.Ord GI.Gio.Enums.TlsProtocolVersion
instance GHC.Classes.Ord GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Classes.Ord GI.Gio.Enums.UnixSocketAddressType
instance GHC.Classes.Ord GI.Gio.Enums.ZlibCompressorFormat
instance GHC.Internal.Show.Show GI.Gio.Enums.BusType
instance GHC.Internal.Show.Show GI.Gio.Enums.ConverterResult
instance GHC.Internal.Show.Show GI.Gio.Enums.CredentialsType
instance GHC.Internal.Show.Show GI.Gio.Enums.DBusError
instance GHC.Internal.Show.Show GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Internal.Show.Show GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Internal.Show.Show GI.Gio.Enums.DBusMessageType
instance GHC.Internal.Show.Show GI.Gio.Enums.DataStreamByteOrder
instance GHC.Internal.Show.Show GI.Gio.Enums.DataStreamNewlineType
instance GHC.Internal.Show.Show GI.Gio.Enums.DriveStartStopType
instance GHC.Internal.Show.Show GI.Gio.Enums.EmblemOrigin
instance GHC.Internal.Show.Show GI.Gio.Enums.FileAttributeStatus
instance GHC.Internal.Show.Show GI.Gio.Enums.FileAttributeType
instance GHC.Internal.Show.Show GI.Gio.Enums.FileMonitorEvent
instance GHC.Internal.Show.Show GI.Gio.Enums.FileType
instance GHC.Internal.Show.Show GI.Gio.Enums.FilesystemPreviewType
instance GHC.Internal.Show.Show GI.Gio.Enums.IOErrorEnum
instance GHC.Internal.Show.Show GI.Gio.Enums.MemoryMonitorWarningLevel
instance GHC.Internal.Show.Show GI.Gio.Enums.MountOperationResult
instance GHC.Internal.Show.Show GI.Gio.Enums.NetworkConnectivity
instance GHC.Internal.Show.Show GI.Gio.Enums.NotificationPriority
instance GHC.Internal.Show.Show GI.Gio.Enums.PasswordSave
instance GHC.Internal.Show.Show GI.Gio.Enums.PollableReturn
instance GHC.Internal.Show.Show GI.Gio.Enums.ResolverError
instance GHC.Internal.Show.Show GI.Gio.Enums.ResolverRecordType
instance GHC.Internal.Show.Show GI.Gio.Enums.ResourceError
instance GHC.Internal.Show.Show GI.Gio.Enums.SocketClientEvent
instance GHC.Internal.Show.Show GI.Gio.Enums.SocketFamily
instance GHC.Internal.Show.Show GI.Gio.Enums.SocketListenerEvent
instance GHC.Internal.Show.Show GI.Gio.Enums.SocketProtocol
instance GHC.Internal.Show.Show GI.Gio.Enums.SocketType
instance GHC.Internal.Show.Show GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Internal.Show.Show GI.Gio.Enums.TlsChannelBindingError
instance GHC.Internal.Show.Show GI.Gio.Enums.TlsChannelBindingType
instance GHC.Internal.Show.Show GI.Gio.Enums.TlsError
instance GHC.Internal.Show.Show GI.Gio.Enums.TlsInteractionResult
instance GHC.Internal.Show.Show GI.Gio.Enums.TlsProtocolVersion
instance GHC.Internal.Show.Show GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Internal.Show.Show GI.Gio.Enums.UnixSocketAddressType
instance GHC.Internal.Show.Show GI.Gio.Enums.ZlibCompressorFormat
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.BusType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.ConverterResult
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.CredentialsType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.DBusError
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.DBusMessageByteOrder
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.DBusMessageHeaderField
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.DBusMessageType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.DataStreamByteOrder
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.DataStreamNewlineType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.DriveStartStopType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.EmblemOrigin
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.FileAttributeStatus
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.FileAttributeType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.FileMonitorEvent
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.FileType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.FilesystemPreviewType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.IOErrorEnum
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.MemoryMonitorWarningLevel
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.MountOperationResult
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.NetworkConnectivity
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.NotificationPriority
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.PasswordSave
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.PollableReturn
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.ResolverError
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.ResolverRecordType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.ResourceError
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.SocketClientEvent
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.SocketFamily
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.SocketListenerEvent
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.SocketProtocol
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.SocketType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.TlsAuthenticationMode
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.TlsChannelBindingError
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.TlsChannelBindingType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.TlsError
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.TlsInteractionResult
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.TlsProtocolVersion
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.TlsRehandshakeMode
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.UnixSocketAddressType
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Enums.ZlibCompressorFormat


module GI.Gio.Flags

-- | Flags used when creating a <a>AppInfo</a>.
data AppInfoCreateFlags

-- | No flags.
AppInfoCreateFlagsNone :: AppInfoCreateFlags

-- | Application opens in a terminal window.
AppInfoCreateFlagsNeedsTerminal :: AppInfoCreateFlags

-- | Application supports URI arguments.
AppInfoCreateFlagsSupportsUris :: AppInfoCreateFlags

-- | Application supports startup notification. Since 2.26
AppInfoCreateFlagsSupportsStartupNotification :: AppInfoCreateFlags

-- | Catch-all for unknown values
AnotherAppInfoCreateFlags :: Int -> AppInfoCreateFlags

-- | Flags used to define the behaviour of a <a>Application</a>.
--   
--   <i>Since: 2.28</i>
data ApplicationFlags

-- | Default flags.
ApplicationFlagsFlagsNone :: ApplicationFlags

-- | Default flags.
--   
--   <i>Since: 2.74</i>
ApplicationFlagsDefaultFlags :: ApplicationFlags

-- | Run as a service. In this mode, registration fails if the service is
--   already running, and the application will initially wait up to 10
--   seconds for an initial activation message to arrive.
ApplicationFlagsIsService :: ApplicationFlags

-- | Don't try to become the primary instance.
ApplicationFlagsIsLauncher :: ApplicationFlags

-- | This application handles opening files (in the primary instance). Note
--   that this flag only affects the default implementation of
--   <tt><i>local_command_line()</i></tt>, and has no effect if
--   <a>ApplicationFlagsHandlesCommandLine</a> is given. See
--   <a>applicationRun</a> for details.
ApplicationFlagsHandlesOpen :: ApplicationFlags

-- | This application handles command line arguments (in the primary
--   instance). Note that this flag only affect the default implementation
--   of <tt><i>local_command_line()</i></tt>. See <a>applicationRun</a> for
--   details.
ApplicationFlagsHandlesCommandLine :: ApplicationFlags

-- | Send the environment of the launching process to the primary instance.
--   Set this flag if your application is expected to behave differently
--   depending on certain environment variables. For instance, an editor
--   might be expected to use the <tt>GIT_COMMITTER_NAME</tt> environment
--   variable when editing a git commit message. The environment is
--   available to the <a>Application::commandLine</a> signal handler, via
--   <a>applicationCommandLineGetenv</a>.
ApplicationFlagsSendEnvironment :: ApplicationFlags

-- | Make no attempts to do any of the typical single-instance application
--   negotiation, even if the application ID is given. The application
--   neither attempts to become the owner of the application ID nor does it
--   check if an existing owner already exists. Everything occurs in the
--   local process. Since: 2.30.
ApplicationFlagsNonUnique :: ApplicationFlags

-- | Allow users to override the application ID from the command line with
--   <tt>--gapplication-app-id</tt>. Since: 2.48
ApplicationFlagsCanOverrideAppId :: ApplicationFlags

-- | Allow another instance to take over the bus name. Since: 2.60
ApplicationFlagsAllowReplacement :: ApplicationFlags

-- | Take over from another instance. This flag is usually set by passing
--   <tt>--gapplication-replace</tt> on the commandline. Since: 2.60
ApplicationFlagsReplace :: ApplicationFlags

-- | Catch-all for unknown values
AnotherApplicationFlags :: Int -> ApplicationFlags

-- | <a>AskPasswordFlags</a> are used to request specific information from
--   the user, or to notify the user of their choices in an authentication
--   situation.
data AskPasswordFlags

-- | operation requires a password.
AskPasswordFlagsNeedPassword :: AskPasswordFlags

-- | operation requires a username.
AskPasswordFlagsNeedUsername :: AskPasswordFlags

-- | operation requires a domain.
AskPasswordFlagsNeedDomain :: AskPasswordFlags

-- | operation supports saving settings.
AskPasswordFlagsSavingSupported :: AskPasswordFlags

-- | operation supports anonymous users.
AskPasswordFlagsAnonymousSupported :: AskPasswordFlags

-- | operation takes TCRYPT parameters (Since: 2.58)
AskPasswordFlagsTcrypt :: AskPasswordFlags

-- | Catch-all for unknown values
AnotherAskPasswordFlags :: Int -> AskPasswordFlags

-- | Flags used in <tt><i>g_bus_own_name()</i></tt>.
--   
--   <i>Since: 2.26</i>
data BusNameOwnerFlags

-- | No flags set.
BusNameOwnerFlagsNone :: BusNameOwnerFlags

-- | Allow another message bus connection to claim the name.
BusNameOwnerFlagsAllowReplacement :: BusNameOwnerFlags

-- | If another message bus connection owns the name and have specified
--   <a>BusNameOwnerFlagsAllowReplacement</a>, then take the name from the
--   other connection.
BusNameOwnerFlagsReplace :: BusNameOwnerFlags

-- | If another message bus connection owns the name, immediately return an
--   error from <a>busOwnName</a> rather than entering the waiting queue
--   for that name.
--   
--   <i>Since: 2.54</i>
BusNameOwnerFlagsDoNotQueue :: BusNameOwnerFlags

-- | Catch-all for unknown values
AnotherBusNameOwnerFlags :: Int -> BusNameOwnerFlags

-- | Flags used in <tt><i>g_bus_watch_name()</i></tt>.
--   
--   <i>Since: 2.26</i>
data BusNameWatcherFlags

-- | No flags set.
BusNameWatcherFlagsNone :: BusNameWatcherFlags

-- | If no-one owns the name when beginning to watch the name, ask the bus
--   to launch an owner for the name.
BusNameWatcherFlagsAutoStart :: BusNameWatcherFlags

-- | Catch-all for unknown values
AnotherBusNameWatcherFlags :: Int -> BusNameWatcherFlags

-- | Flags used when calling a <a>converterConvert</a>.
--   
--   <i>Since: 2.24</i>
data ConverterFlags

-- | No flags.
ConverterFlagsNone :: ConverterFlags

-- | At end of input data
ConverterFlagsInputAtEnd :: ConverterFlags

-- | Flush data
ConverterFlagsFlush :: ConverterFlags

-- | Catch-all for unknown values
AnotherConverterFlags :: Int -> ConverterFlags

-- | Flags used in <a>dBusConnectionCall</a> and similar APIs.
--   
--   <i>Since: 2.26</i>
data DBusCallFlags

-- | No flags set.
DBusCallFlagsNone :: DBusCallFlags

-- | The bus must not launch an owner for the destination name in response
--   to this method invocation.
DBusCallFlagsNoAutoStart :: DBusCallFlags

-- | the caller is prepared to wait for interactive authorization. Since
--   2.46.
DBusCallFlagsAllowInteractiveAuthorization :: DBusCallFlags

-- | Catch-all for unknown values
AnotherDBusCallFlags :: Int -> DBusCallFlags

-- | Capabilities negotiated with the remote peer.
--   
--   <i>Since: 2.26</i>
data DBusCapabilityFlags

-- | No flags set.
DBusCapabilityFlagsNone :: DBusCapabilityFlags

-- | The connection supports exchanging UNIX file descriptors with the
--   remote peer.
DBusCapabilityFlagsUnixFdPassing :: DBusCapabilityFlags

-- | Catch-all for unknown values
AnotherDBusCapabilityFlags :: Int -> DBusCapabilityFlags

-- | Flags used when creating a new <a>DBusConnection</a>.
--   
--   <i>Since: 2.26</i>
data DBusConnectionFlags

-- | No flags set.
DBusConnectionFlagsNone :: DBusConnectionFlags

-- | Perform authentication against server.
DBusConnectionFlagsAuthenticationClient :: DBusConnectionFlags

-- | Perform authentication against client.
DBusConnectionFlagsAuthenticationServer :: DBusConnectionFlags

-- | When authenticating as a server, allow the anonymous authentication
--   method.
DBusConnectionFlagsAuthenticationAllowAnonymous :: DBusConnectionFlags

-- | Pass this flag if connecting to a peer that is a message bus. This
--   means that the <tt><i>Hello()</i></tt> method will be invoked as part
--   of the connection setup.
DBusConnectionFlagsMessageBusConnection :: DBusConnectionFlags

-- | If set, processing of D-Bus messages is delayed until
--   <a>dBusConnectionStartMessageProcessing</a> is called.
DBusConnectionFlagsDelayMessageProcessing :: DBusConnectionFlags

-- | When authenticating as a server, require the UID of the peer to be the
--   same as the UID of the server. (Since: 2.68)
DBusConnectionFlagsAuthenticationRequireSameUser :: DBusConnectionFlags

-- | When authenticating, try to use protocols that work across a Linux
--   user namespace boundary, even if this reduces interoperability with
--   older D-Bus implementations. This currently affects client-side
--   <tt>EXTERNAL</tt> authentication, for which this flag makes
--   connections to a server in another user namespace succeed, but causes
--   a deadlock when connecting to a GDBus server older than 2.73.3. Since:
--   2.74
DBusConnectionFlagsCrossNamespace :: DBusConnectionFlags

-- | Catch-all for unknown values
AnotherDBusConnectionFlags :: Int -> DBusConnectionFlags

-- | Flags describing the behavior of a <a>DBusInterfaceSkeleton</a>
--   instance.
--   
--   <i>Since: 2.30</i>
data DBusInterfaceSkeletonFlags

-- | No flags set.
DBusInterfaceSkeletonFlagsNone :: DBusInterfaceSkeletonFlags

-- | Each method invocation is handled in a thread dedicated to the
--   invocation. This means that the method implementation can use blocking
--   IO without blocking any other part of the process. It also means that
--   the method implementation must use locking to access data structures
--   used by other threads.
DBusInterfaceSkeletonFlagsHandleMethodInvocationsInThread :: DBusInterfaceSkeletonFlags

-- | Catch-all for unknown values
AnotherDBusInterfaceSkeletonFlags :: Int -> DBusInterfaceSkeletonFlags

-- | Message flags used in <a>DBusMessage</a>.
--   
--   <i>Since: 2.26</i>
data DBusMessageFlags

-- | No flags set.
DBusMessageFlagsNone :: DBusMessageFlags

-- | A reply is not expected.
DBusMessageFlagsNoReplyExpected :: DBusMessageFlags

-- | The bus must not launch an owner for the destination name in response
--   to this message.
DBusMessageFlagsNoAutoStart :: DBusMessageFlags

-- | If set on a method call, this flag means that the caller is prepared
--   to wait for interactive authorization. Since 2.46.
DBusMessageFlagsAllowInteractiveAuthorization :: DBusMessageFlags

-- | Catch-all for unknown values
AnotherDBusMessageFlags :: Int -> DBusMessageFlags

-- | Flags used when constructing a <a>DBusObjectManagerClient</a>.
--   
--   <i>Since: 2.30</i>
data DBusObjectManagerClientFlags

-- | No flags set.
DBusObjectManagerClientFlagsNone :: DBusObjectManagerClientFlags

-- | If not set and the manager is for a well-known name, then request the
--   bus to launch an owner for the name if no-one owns the name. This flag
--   can only be used in managers for well-known names.
DBusObjectManagerClientFlagsDoNotAutoStart :: DBusObjectManagerClientFlags

-- | Catch-all for unknown values
AnotherDBusObjectManagerClientFlags :: Int -> DBusObjectManagerClientFlags

-- | Flags describing the access control of a D-Bus property.
--   
--   <i>Since: 2.26</i>
data DBusPropertyInfoFlags

-- | No flags set.
DBusPropertyInfoFlagsNone :: DBusPropertyInfoFlags

-- | Property is readable.
DBusPropertyInfoFlagsReadable :: DBusPropertyInfoFlags

-- | Property is writable.
DBusPropertyInfoFlagsWritable :: DBusPropertyInfoFlags

-- | Catch-all for unknown values
AnotherDBusPropertyInfoFlags :: Int -> DBusPropertyInfoFlags

-- | Flags used when constructing an instance of a <a>DBusProxy</a> derived
--   class.
--   
--   <i>Since: 2.26</i>
data DBusProxyFlags

-- | No flags set.
DBusProxyFlagsNone :: DBusProxyFlags

-- | Don't load properties.
DBusProxyFlagsDoNotLoadProperties :: DBusProxyFlags

-- | Don't connect to signals on the remote object.
DBusProxyFlagsDoNotConnectSignals :: DBusProxyFlags

-- | If the proxy is for a well-known name, do not ask the bus to launch an
--   owner during proxy initialization or a method call. This flag is only
--   meaningful in proxies for well-known names.
DBusProxyFlagsDoNotAutoStart :: DBusProxyFlags

-- | If set, the property value for any <b>invalidated property</b> will be
--   (asynchronously) retrieved upon receiving the
--   <a>`PropertiesChanged`</a> D-Bus signal and the property will not
--   cause emission of the <a>DBusProxy::gPropertiesChanged</a> signal.
--   When the value is received the <a>DBusProxy::gPropertiesChanged</a>
--   signal is emitted for the property along with the retrieved value.
--   Since 2.32.
DBusProxyFlagsGetInvalidatedProperties :: DBusProxyFlags

-- | If the proxy is for a well-known name, do not ask the bus to launch an
--   owner during proxy initialization, but allow it to be autostarted by a
--   method call. This flag is only meaningful in proxies for well-known
--   names, and only if <a>DBusProxyFlagsDoNotAutoStart</a> is not also
--   specified.
DBusProxyFlagsDoNotAutoStartAtConstruction :: DBusProxyFlags

-- | Don't actually send the AddMatch D-Bus call for this signal
--   subscription. This gives you more control over which match rules you
--   add (but you must add them manually). (Since: 2.72)
DBusProxyFlagsNoMatchRule :: DBusProxyFlags

-- | Catch-all for unknown values
AnotherDBusProxyFlags :: Int -> DBusProxyFlags

-- | Flags used when sending <tt><i>GDBusMessages</i></tt> on a
--   <a>DBusConnection</a>.
--   
--   <i>Since: 2.26</i>
data DBusSendMessageFlags

-- | No flags set.
DBusSendMessageFlagsNone :: DBusSendMessageFlags

-- | Do not automatically assign a serial number from the
--   <a>DBusConnection</a> object when sending a message.
DBusSendMessageFlagsPreserveSerial :: DBusSendMessageFlags

-- | Catch-all for unknown values
AnotherDBusSendMessageFlags :: Int -> DBusSendMessageFlags

-- | Flags used when creating a <a>DBusServer</a>.
--   
--   <i>Since: 2.26</i>
data DBusServerFlags

-- | No flags set.
DBusServerFlagsNone :: DBusServerFlags

-- | All <a>DBusServer::newConnection</a> signals will run in separated
--   dedicated threads (see signal for details).
DBusServerFlagsRunInThread :: DBusServerFlags

-- | Allow the anonymous authentication method.
DBusServerFlagsAuthenticationAllowAnonymous :: DBusServerFlags

-- | Require the UID of the peer to be the same as the UID of the server
--   when authenticating. (Since: 2.68)
DBusServerFlagsAuthenticationRequireSameUser :: DBusServerFlags

-- | Catch-all for unknown values
AnotherDBusServerFlags :: Int -> DBusServerFlags

-- | Flags used when subscribing to signals via
--   <a>dBusConnectionSignalSubscribe</a>.
--   
--   <i>Since: 2.26</i>
data DBusSignalFlags

-- | No flags set.
DBusSignalFlagsNone :: DBusSignalFlags

-- | Don't actually send the AddMatch D-Bus call for this signal
--   subscription. This gives you more control over which match rules you
--   add (but you must add them manually).
DBusSignalFlagsNoMatchRule :: DBusSignalFlags

-- | Match first arguments that contain a bus or interface name with the
--   given namespace.
DBusSignalFlagsMatchArg0Namespace :: DBusSignalFlags

-- | Match first arguments that contain an object path that is either
--   equivalent to the given path, or one of the paths is a subpath of the
--   other.
DBusSignalFlagsMatchArg0Path :: DBusSignalFlags

-- | Catch-all for unknown values
AnotherDBusSignalFlags :: Int -> DBusSignalFlags

-- | Flags passed to <a>dBusConnectionRegisterSubtree</a>.
--   
--   <i>Since: 2.26</i>
data DBusSubtreeFlags

-- | No flags set.
DBusSubtreeFlagsNone :: DBusSubtreeFlags

-- | Method calls to objects not in the enumerated range will still be
--   dispatched. This is useful if you want to dynamically spawn objects in
--   the subtree.
DBusSubtreeFlagsDispatchToUnenumeratedNodes :: DBusSubtreeFlags

-- | Catch-all for unknown values
AnotherDBusSubtreeFlags :: Int -> DBusSubtreeFlags

-- | Flags used when starting a drive.
--   
--   <i>Since: 2.22</i>
data DriveStartFlags

-- | No flags set.
DriveStartFlagsNone :: DriveStartFlags

-- | Catch-all for unknown values
AnotherDriveStartFlags :: Int -> DriveStartFlags

-- | Flags specifying the behaviour of an attribute.
data FileAttributeInfoFlags

-- | no flags set.
FileAttributeInfoFlagsNone :: FileAttributeInfoFlags

-- | copy the attribute values when the file is copied.
FileAttributeInfoFlagsCopyWithFile :: FileAttributeInfoFlags

-- | copy the attribute values when the file is moved.
FileAttributeInfoFlagsCopyWhenMoved :: FileAttributeInfoFlags

-- | Catch-all for unknown values
AnotherFileAttributeInfoFlags :: Int -> FileAttributeInfoFlags

-- | Flags used when copying or moving files.
data FileCopyFlags

-- | No flags set.
FileCopyFlagsNone :: FileCopyFlags

-- | Overwrite any existing files
FileCopyFlagsOverwrite :: FileCopyFlags

-- | Make a backup of any existing files.
FileCopyFlagsBackup :: FileCopyFlags

-- | Don't follow symlinks.
FileCopyFlagsNofollowSymlinks :: FileCopyFlags

-- | Copy all file metadata instead of just default set used for copy (see
--   <a>FileInfo</a>).
FileCopyFlagsAllMetadata :: FileCopyFlags

-- | Don't use copy and delete fallback if native move not supported.
FileCopyFlagsNoFallbackForMove :: FileCopyFlags

-- | Leaves target file with default perms, instead of setting the source
--   file perms.
FileCopyFlagsTargetDefaultPerms :: FileCopyFlags

-- | Use default modification timestamps instead of copying them from the
--   source file. Since 2.80
FileCopyFlagsTargetDefaultModifiedTime :: FileCopyFlags

-- | Catch-all for unknown values
AnotherFileCopyFlags :: Int -> FileCopyFlags

-- | Flags used when an operation may create a file.
data FileCreateFlags

-- | No flags set.
FileCreateFlagsNone :: FileCreateFlags

-- | Create a file that can only be accessed by the current user.
FileCreateFlagsPrivate :: FileCreateFlags

-- | Replace the destination as if it didn't exist before. Don't try to
--   keep any old permissions, replace instead of following links. This is
--   generally useful if you're doing a "copy over" rather than a "save new
--   version of" replace operation. You can think of it as "unlink
--   destination" before writing to it, although the implementation may not
--   be exactly like that. This flag can only be used with
--   <a>fileReplace</a> and its variants, including
--   <a>fileReplaceContents</a>. Since 2.20
FileCreateFlagsReplaceDestination :: FileCreateFlags

-- | Catch-all for unknown values
AnotherFileCreateFlags :: Int -> FileCreateFlags

-- | Flags that can be used with <a>fileMeasureDiskUsage</a>.
--   
--   <i>Since: 2.38</i>
data FileMeasureFlags

-- | No flags set.
FileMeasureFlagsNone :: FileMeasureFlags

-- | Report any error encountered while traversing the directory tree.
--   Normally errors are only reported for the toplevel file.
FileMeasureFlagsReportAnyError :: FileMeasureFlags

-- | Tally usage based on apparent file sizes. Normally, the block-size is
--   used, if available, as this is a more accurate representation of disk
--   space used. Compare with <tt>du --apparent-size</tt>. Since GLib 2.78.
--   and similarly to <tt>du</tt> since GNU Coreutils 9.2, this will ignore
--   the sizes of file types other than regular files and links, as the
--   sizes of other file types are not specified in a standard way.
FileMeasureFlagsApparentSize :: FileMeasureFlags

-- | Do not cross mount point boundaries. Compare with <tt>du -x</tt>.
FileMeasureFlagsNoXdev :: FileMeasureFlags

-- | Catch-all for unknown values
AnotherFileMeasureFlags :: Int -> FileMeasureFlags

-- | Flags used to set what a <a>FileMonitor</a> will watch for.
data FileMonitorFlags

-- | No flags set.
FileMonitorFlagsNone :: FileMonitorFlags

-- | Watch for mount events.
FileMonitorFlagsWatchMounts :: FileMonitorFlags

-- | Pair DELETED and CREATED events caused by file renames (moves) and
--   send a single G_FILE_MONITOR_EVENT_MOVED event instead (NB: not
--   supported on all backends; the default behaviour -without specifying
--   this flag- is to send single DELETED and CREATED events). Deprecated
--   since 2.46: use <a>FileMonitorFlagsWatchMoves</a> instead.
FileMonitorFlagsSendMoved :: FileMonitorFlags

-- | Watch for changes to the file made via another hard link. Since 2.36.
FileMonitorFlagsWatchHardLinks :: FileMonitorFlags

-- | Watch for rename operations on a monitored directory. This causes
--   <a>FileMonitorEventRenamed</a>, <a>FileMonitorEventMovedIn</a> and
--   <a>FileMonitorEventMovedOut</a> events to be emitted when possible.
--   Since: 2.46.
FileMonitorFlagsWatchMoves :: FileMonitorFlags

-- | Catch-all for unknown values
AnotherFileMonitorFlags :: Int -> FileMonitorFlags

-- | Flags used when querying a <a>FileInfo</a>.
data FileQueryInfoFlags

-- | No flags set.
FileQueryInfoFlagsNone :: FileQueryInfoFlags

-- | Don't follow symlinks.
FileQueryInfoFlagsNofollowSymlinks :: FileQueryInfoFlags

-- | Catch-all for unknown values
AnotherFileQueryInfoFlags :: Int -> FileQueryInfoFlags

-- | Flags for use with <tt><i>g_io_module_scope_new()</i></tt>.
--   
--   <i>Since: 2.30</i>
data IOModuleScopeFlags

-- | No module scan flags
IOModuleScopeFlagsNone :: IOModuleScopeFlags

-- | When using this scope to load or scan modules, automatically block a
--   modules which has the same base basename as previously loaded module.
IOModuleScopeFlagsBlockDuplicates :: IOModuleScopeFlags

-- | Catch-all for unknown values
AnotherIOModuleScopeFlags :: Int -> IOModuleScopeFlags

-- | GIOStreamSpliceFlags determine how streams should be spliced.
--   
--   <i>Since: 2.28</i>
data IOStreamSpliceFlags

-- | Do not close either stream.
IOStreamSpliceFlagsNone :: IOStreamSpliceFlags

-- | Close the first stream after the splice.
IOStreamSpliceFlagsCloseStream1 :: IOStreamSpliceFlags

-- | Close the second stream after the splice.
IOStreamSpliceFlagsCloseStream2 :: IOStreamSpliceFlags

-- | Wait for both splice operations to finish before calling the callback.
IOStreamSpliceFlagsWaitForBoth :: IOStreamSpliceFlags

-- | Catch-all for unknown values
AnotherIOStreamSpliceFlags :: Int -> IOStreamSpliceFlags

-- | Flags used when mounting a mount.
data MountMountFlags

-- | No flags set.
MountMountFlagsNone :: MountMountFlags

-- | Catch-all for unknown values
AnotherMountMountFlags :: Int -> MountMountFlags

-- | Flags used when an unmounting a mount.
data MountUnmountFlags

-- | No flags set.
MountUnmountFlagsNone :: MountUnmountFlags

-- | Unmount even if there are outstanding file operations on the mount.
MountUnmountFlagsForce :: MountUnmountFlags

-- | Catch-all for unknown values
AnotherMountUnmountFlags :: Int -> MountUnmountFlags

-- | GOutputStreamSpliceFlags determine how streams should be spliced.
data OutputStreamSpliceFlags

-- | Do not close either stream.
OutputStreamSpliceFlagsNone :: OutputStreamSpliceFlags

-- | Close the source stream after the splice.
OutputStreamSpliceFlagsCloseSource :: OutputStreamSpliceFlags

-- | Close the target stream after the splice.
OutputStreamSpliceFlagsCloseTarget :: OutputStreamSpliceFlags

-- | Catch-all for unknown values
AnotherOutputStreamSpliceFlags :: Int -> OutputStreamSpliceFlags

-- | Flags to modify lookup behavior.
--   
--   <i>Since: 2.60</i>
data ResolverNameLookupFlags

-- | default behavior (same as <a>resolverLookupByName</a>)
ResolverNameLookupFlagsDefault :: ResolverNameLookupFlags

-- | only resolve ipv4 addresses
ResolverNameLookupFlagsIpv4Only :: ResolverNameLookupFlags

-- | only resolve ipv6 addresses
ResolverNameLookupFlagsIpv6Only :: ResolverNameLookupFlags

-- | Catch-all for unknown values
AnotherResolverNameLookupFlags :: Int -> ResolverNameLookupFlags

-- | GResourceFlags give information about a particular file inside a
--   resource bundle.
--   
--   <i>Since: 2.32</i>
data ResourceFlags

-- | No flags set.
ResourceFlagsNone :: ResourceFlags

-- | The file is compressed.
ResourceFlagsCompressed :: ResourceFlags

-- | Catch-all for unknown values
AnotherResourceFlags :: Int -> ResourceFlags

-- | GResourceLookupFlags determine how resource path lookups are handled.
--   
--   <i>Since: 2.32</i>
data ResourceLookupFlags

-- | No flags set.
ResourceLookupFlagsNone :: ResourceLookupFlags

-- | Catch-all for unknown values
AnotherResourceLookupFlags :: Int -> ResourceLookupFlags

-- | Flags used when creating a binding.
--   
--   These flags determine in which direction the binding works. The
--   default is to synchronize in both directions.
data SettingsBindFlags

-- | Equivalent to <tt>G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET</tt>
SettingsBindFlagsDefault :: SettingsBindFlags

-- | Update the <a>Object</a> property when the setting changes. It is an
--   error to use this flag if the property is not writable.
SettingsBindFlagsGet :: SettingsBindFlags

-- | Update the setting when the <a>Object</a> property changes. It is an
--   error to use this flag if the property is not readable.
SettingsBindFlagsSet :: SettingsBindFlags

-- | Do not try to bind a ‘sensitivity’ property to the writability of the
--   setting
SettingsBindFlagsNoSensitivity :: SettingsBindFlags

-- | When set in addition to
--   [flags<i><tt>gio</tt></i>.SettingsBindFlags.GET], set the
--   <a>Object</a> property value initially from the setting, but do not
--   listen for changes of the setting
SettingsBindFlagsGetNoChanges :: SettingsBindFlags

-- | When passed to <a>settingsBind</a>, uses a pair of mapping functions
--   that invert the boolean value when mapping between the setting and the
--   property. The setting and property must both be booleans. You cannot
--   pass this flag to <a>settingsBindWithMapping</a>.
SettingsBindFlagsInvertBoolean :: SettingsBindFlags

-- | Catch-all for unknown values
AnotherSettingsBindFlags :: Int -> SettingsBindFlags

-- | Flags used in <a>socketReceiveMessage</a> and
--   <a>socketSendMessage</a>. The flags listed in the enum are some
--   commonly available flags, but the values used for them are the same as
--   on the platform, and any other flags are passed in/out as is. So to
--   use a platform specific flag, just include the right system header and
--   pass in the flag.
--   
--   <i>Since: 2.22</i>
data SocketMsgFlags

-- | No flags.
SocketMsgFlagsNone :: SocketMsgFlags

-- | Request to send/receive out of band data.
SocketMsgFlagsOob :: SocketMsgFlags

-- | Read data from the socket without removing it from the queue.
SocketMsgFlagsPeek :: SocketMsgFlags

-- | Don't use a gateway to send out the packet, only send to hosts on
--   directly connected networks.
SocketMsgFlagsDontroute :: SocketMsgFlags

-- | Catch-all for unknown values
AnotherSocketMsgFlags :: Int -> SocketMsgFlags

-- | Flags to define the behaviour of a <a>Subprocess</a>.
--   
--   Note that the default for stdin is to redirect from
--   <tt>/dev/null</tt>. For stdout and stderr the default are for them to
--   inherit the corresponding descriptor from the calling process.
--   
--   Note that it is a programmer error to mix 'incompatible' flags. For
--   example, you may not request both <a>SubprocessFlagsStdoutPipe</a> and
--   <a>SubprocessFlagsStdoutSilence</a>.
--   
--   <i>Since: 2.40</i>
data SubprocessFlags

-- | No flags.
SubprocessFlagsNone :: SubprocessFlags

-- | create a pipe for the stdin of the spawned process that can be
--   accessed with <a>subprocessGetStdinPipe</a>.
SubprocessFlagsStdinPipe :: SubprocessFlags

-- | stdin is inherited from the calling process.
SubprocessFlagsStdinInherit :: SubprocessFlags

-- | create a pipe for the stdout of the spawned process that can be
--   accessed with <a>subprocessGetStdoutPipe</a>.
SubprocessFlagsStdoutPipe :: SubprocessFlags

-- | silence the stdout of the spawned process (ie: redirect to
--   <tt>/dev/null</tt>).
SubprocessFlagsStdoutSilence :: SubprocessFlags

-- | create a pipe for the stderr of the spawned process that can be
--   accessed with <a>subprocessGetStderrPipe</a>.
SubprocessFlagsStderrPipe :: SubprocessFlags

-- | silence the stderr of the spawned process (ie: redirect to
--   <tt>/dev/null</tt>).
SubprocessFlagsStderrSilence :: SubprocessFlags

-- | merge the stderr of the spawned process with whatever the stdout
--   happens to be. This is a good way of directing both streams to a
--   common log file, for example.
SubprocessFlagsStderrMerge :: SubprocessFlags

-- | spawned processes will inherit the file descriptors of their parent,
--   unless those descriptors have been explicitly marked as close-on-exec.
--   This flag has no effect over the "standard" file descriptors (stdin,
--   stdout, stderr).
SubprocessFlagsInheritFds :: SubprocessFlags

-- | if path searching is needed when spawning the subprocess, use the
--   <tt>PATH</tt> in the launcher environment. (Since: 2.72)
SubprocessFlagsSearchPathFromEnvp :: SubprocessFlags

-- | Catch-all for unknown values
AnotherSubprocessFlags :: Int -> SubprocessFlags

-- | Flags to define future <a>TestDBus</a> behaviour.
--   
--   <i>Since: 2.34</i>
data TestDBusFlags

-- | No flags.
TestDBusFlagsNone :: TestDBusFlags

-- | Catch-all for unknown values
AnotherTestDBusFlags :: Int -> TestDBusFlags

-- | A set of flags describing TLS certification validation. This can be
--   used to describe why a particular certificate was rejected (for
--   example, in <a>TlsConnection::acceptCertificate</a>).
--   
--   GLib guarantees that if certificate verification fails, at least one
--   flag will be set, but it does not guarantee that all possible flags
--   will be set. Accordingly, you may not safely decide to ignore any
--   particular type of error. For example, it would be incorrect to mask
--   <a>TlsCertificateFlagsExpired</a> if you want to allow expired
--   certificates, because this could potentially be the only error flag
--   set even if other problems exist with the certificate.
--   
--   <i>Since: 2.28</i>
data TlsCertificateFlags

-- | No flags set. Since: 2.74
TlsCertificateFlagsNoFlags :: TlsCertificateFlags

-- | The signing certificate authority is not known.
TlsCertificateFlagsUnknownCa :: TlsCertificateFlags

-- | The certificate does not match the expected identity of the site that
--   it was retrieved from.
TlsCertificateFlagsBadIdentity :: TlsCertificateFlags

-- | The certificate's activation time is still in the future
TlsCertificateFlagsNotActivated :: TlsCertificateFlags

-- | The certificate has expired
TlsCertificateFlagsExpired :: TlsCertificateFlags

-- | The certificate has been revoked according to the
--   <a>TlsConnection</a>'s certificate revocation list.
TlsCertificateFlagsRevoked :: TlsCertificateFlags

-- | The certificate's algorithm is considered insecure.
TlsCertificateFlagsInsecure :: TlsCertificateFlags

-- | Some other error occurred validating the certificate
TlsCertificateFlagsGenericError :: TlsCertificateFlags

-- | the combination of all of the above flags
TlsCertificateFlagsValidateAll :: TlsCertificateFlags

-- | Catch-all for unknown values
AnotherTlsCertificateFlags :: Int -> TlsCertificateFlags

-- | Flags for <a>tlsInteractionRequestCertificate</a>,
--   <a>tlsInteractionRequestCertificateAsync</a>, and
--   <a>tlsInteractionInvokeRequestCertificate</a>.
--   
--   <i>Since: 2.40</i>
data TlsCertificateRequestFlags

-- | No flags
TlsCertificateRequestFlagsNone :: TlsCertificateRequestFlags

-- | Catch-all for unknown values
AnotherTlsCertificateRequestFlags :: Int -> TlsCertificateRequestFlags

-- | Flags for <a>tlsDatabaseLookupCertificateForHandle</a>,
--   <a>tlsDatabaseLookupCertificateIssuer</a>, and
--   <a>tlsDatabaseLookupCertificatesIssuedBy</a>.
--   
--   <i>Since: 2.30</i>
data TlsDatabaseLookupFlags

-- | No lookup flags
TlsDatabaseLookupFlagsNone :: TlsDatabaseLookupFlags

-- | Restrict lookup to certificates that have a private key.
TlsDatabaseLookupFlagsKeypair :: TlsDatabaseLookupFlags

-- | Catch-all for unknown values
AnotherTlsDatabaseLookupFlags :: Int -> TlsDatabaseLookupFlags

-- | Flags for <a>tlsDatabaseVerifyChain</a>.
--   
--   <i>Since: 2.30</i>
data TlsDatabaseVerifyFlags

-- | No verification flags
TlsDatabaseVerifyFlagsNone :: TlsDatabaseVerifyFlags

-- | Catch-all for unknown values
AnotherTlsDatabaseVerifyFlags :: Int -> TlsDatabaseVerifyFlags

-- | Various flags for the password.
--   
--   <i>Since: 2.30</i>
data TlsPasswordFlags

-- | No flags
TlsPasswordFlagsNone :: TlsPasswordFlags

-- | The password was wrong, and the user should retry.
TlsPasswordFlagsRetry :: TlsPasswordFlags

-- | Hint to the user that the password has been wrong many times, and the
--   user may not have many chances left.
TlsPasswordFlagsManyTries :: TlsPasswordFlags

-- | Hint to the user that this is the last try to get this password right.
TlsPasswordFlagsFinalTry :: TlsPasswordFlags

-- | For PKCS <tt><i>11</i></tt>, the user PIN is required. Since: 2.70.
TlsPasswordFlagsPkcs11User :: TlsPasswordFlags

-- | For PKCS <tt><i>11</i></tt>, the security officer PIN is required.
--   Since: 2.70.
TlsPasswordFlagsPkcs11SecurityOfficer :: TlsPasswordFlags

-- | For PKCS <tt><i>11</i></tt>, the context-specific PIN is required.
--   Since: 2.70.
TlsPasswordFlagsPkcs11ContextSpecific :: TlsPasswordFlags

-- | Catch-all for unknown values
AnotherTlsPasswordFlags :: Int -> TlsPasswordFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.AppInfoCreateFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ApplicationFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.AskPasswordFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.BusNameOwnerFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.BusNameWatcherFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ConverterFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusCallFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusCapabilityFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusConnectionFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusMessageFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusObjectManagerClientFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusPropertyInfoFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusProxyFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusSendMessageFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusServerFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusSignalFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusSubtreeFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DriveStartFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileAttributeInfoFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileCopyFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileCreateFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileMeasureFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileMonitorFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileQueryInfoFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.IOModuleScopeFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.IOStreamSpliceFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.MountMountFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.MountUnmountFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.OutputStreamSpliceFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ResolverNameLookupFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ResourceFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ResourceLookupFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.SettingsBindFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.SocketMsgFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.SubprocessFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TestDBusFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsCertificateFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsCertificateRequestFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsDatabaseLookupFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsDatabaseVerifyFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsPasswordFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.ApplicationFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.AskPasswordFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.ConverterFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusCallFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusConnectionFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusMessageFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusProxyFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusServerFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusSignalFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.DriveStartFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.FileCopyFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.FileCreateFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.FileMeasureFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.FileMonitorFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.IOModuleScopeFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.MountMountFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.MountUnmountFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.ResourceFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.ResourceLookupFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.SettingsBindFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.SocketMsgFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.SubprocessFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.TestDBusFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.TlsCertificateFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.TlsCertificateRequestFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.TlsDatabaseLookupFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Internal.Enum.Enum GI.Gio.Flags.TlsPasswordFlags
instance GHC.Classes.Eq GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Classes.Eq GI.Gio.Flags.ApplicationFlags
instance GHC.Classes.Eq GI.Gio.Flags.AskPasswordFlags
instance GHC.Classes.Eq GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Classes.Eq GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Classes.Eq GI.Gio.Flags.ConverterFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusCallFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusConnectionFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusMessageFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusProxyFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusServerFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusSignalFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Classes.Eq GI.Gio.Flags.DriveStartFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileCopyFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileCreateFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileMeasureFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileMonitorFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Classes.Eq GI.Gio.Flags.IOModuleScopeFlags
instance GHC.Classes.Eq GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Classes.Eq GI.Gio.Flags.MountMountFlags
instance GHC.Classes.Eq GI.Gio.Flags.MountUnmountFlags
instance GHC.Classes.Eq GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Classes.Eq GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Classes.Eq GI.Gio.Flags.ResourceFlags
instance GHC.Classes.Eq GI.Gio.Flags.ResourceLookupFlags
instance GHC.Classes.Eq GI.Gio.Flags.SettingsBindFlags
instance GHC.Classes.Eq GI.Gio.Flags.SocketMsgFlags
instance GHC.Classes.Eq GI.Gio.Flags.SubprocessFlags
instance GHC.Classes.Eq GI.Gio.Flags.TestDBusFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsCertificateFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsCertificateRequestFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsDatabaseLookupFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsPasswordFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.AppInfoCreateFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.ApplicationFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.AskPasswordFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.BusNameOwnerFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.BusNameWatcherFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.ConverterFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusCallFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusCapabilityFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusConnectionFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusMessageFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusObjectManagerClientFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusPropertyInfoFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusProxyFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusSendMessageFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusServerFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusSignalFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DBusSubtreeFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.DriveStartFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.FileAttributeInfoFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.FileCopyFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.FileCreateFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.FileMeasureFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.FileMonitorFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.FileQueryInfoFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.IOModuleScopeFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.IOStreamSpliceFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.MountMountFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.MountUnmountFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.OutputStreamSpliceFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.ResolverNameLookupFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.ResourceFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.ResourceLookupFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.SettingsBindFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.SocketMsgFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.SubprocessFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.TestDBusFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.TlsCertificateFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.TlsCertificateRequestFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.TlsDatabaseLookupFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.TlsDatabaseVerifyFlags
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Flags.TlsPasswordFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.AppInfoCreateFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ApplicationFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.AskPasswordFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.BusNameOwnerFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.BusNameWatcherFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ConverterFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusCallFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusCapabilityFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusConnectionFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusMessageFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusObjectManagerClientFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusPropertyInfoFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusProxyFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusSendMessageFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusServerFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusSignalFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusSubtreeFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DriveStartFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileAttributeInfoFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileCopyFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileCreateFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileMeasureFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileMonitorFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileQueryInfoFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.IOModuleScopeFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.IOStreamSpliceFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.MountMountFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.MountUnmountFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.OutputStreamSpliceFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ResolverNameLookupFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ResourceFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ResourceLookupFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.SettingsBindFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.SocketMsgFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.SubprocessFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TestDBusFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsCertificateFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsCertificateRequestFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsDatabaseLookupFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsDatabaseVerifyFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsPasswordFlags
instance GHC.Classes.Ord GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Classes.Ord GI.Gio.Flags.ApplicationFlags
instance GHC.Classes.Ord GI.Gio.Flags.AskPasswordFlags
instance GHC.Classes.Ord GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Classes.Ord GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Classes.Ord GI.Gio.Flags.ConverterFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusCallFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusConnectionFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusMessageFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusProxyFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusServerFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusSignalFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Classes.Ord GI.Gio.Flags.DriveStartFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileCopyFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileCreateFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileMeasureFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileMonitorFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Classes.Ord GI.Gio.Flags.IOModuleScopeFlags
instance GHC.Classes.Ord GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Classes.Ord GI.Gio.Flags.MountMountFlags
instance GHC.Classes.Ord GI.Gio.Flags.MountUnmountFlags
instance GHC.Classes.Ord GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Classes.Ord GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Classes.Ord GI.Gio.Flags.ResourceFlags
instance GHC.Classes.Ord GI.Gio.Flags.ResourceLookupFlags
instance GHC.Classes.Ord GI.Gio.Flags.SettingsBindFlags
instance GHC.Classes.Ord GI.Gio.Flags.SocketMsgFlags
instance GHC.Classes.Ord GI.Gio.Flags.SubprocessFlags
instance GHC.Classes.Ord GI.Gio.Flags.TestDBusFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsCertificateFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsCertificateRequestFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsDatabaseLookupFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsPasswordFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.ApplicationFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.AskPasswordFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.ConverterFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusCallFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusConnectionFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusMessageFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusProxyFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusServerFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusSignalFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.DriveStartFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.FileCopyFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.FileCreateFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.FileMeasureFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.FileMonitorFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.IOModuleScopeFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.MountMountFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.MountUnmountFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.ResourceFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.ResourceLookupFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.SettingsBindFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.SocketMsgFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.SubprocessFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.TestDBusFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.TlsCertificateFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.TlsCertificateRequestFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.TlsDatabaseLookupFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Internal.Show.Show GI.Gio.Flags.TlsPasswordFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.AppInfoCreateFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.ApplicationFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.AskPasswordFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.BusNameOwnerFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.BusNameWatcherFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.ConverterFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusCallFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusCapabilityFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusConnectionFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusMessageFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusObjectManagerClientFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusPropertyInfoFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusProxyFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusSendMessageFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusServerFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusSignalFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DBusSubtreeFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.DriveStartFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.FileAttributeInfoFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.FileCopyFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.FileCreateFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.FileMeasureFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.FileMonitorFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.FileQueryInfoFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.IOModuleScopeFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.IOStreamSpliceFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.MountMountFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.MountUnmountFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.OutputStreamSpliceFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.ResolverNameLookupFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.ResourceFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.ResourceLookupFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.SettingsBindFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.SocketMsgFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.SubprocessFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.TestDBusFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.TlsCertificateFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.TlsCertificateRequestFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.TlsDatabaseLookupFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.TlsDatabaseVerifyFlags
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.TlsPasswordFlags


-- | <tt>GAction</tt> represents a single named action.
--   
--   The main interface to an action is that it can be activated with
--   <a>actionActivate</a>. This results in the 'activate' signal being
--   emitted. An activation has a <tt>GVariant</tt> parameter (which may be
--   <tt>NULL</tt>). The correct type for the parameter is determined by a
--   static parameter type (which is given at construction time).
--   
--   An action may optionally have a state, in which case the state may be
--   set with <a>actionChangeState</a>. This call takes a
--   [type<i><tt>gLib</tt></i>.Variant]. The correct type for the state is
--   determined by a static state type (which is given at construction
--   time).
--   
--   The state may have a hint associated with it, specifying its valid
--   range.
--   
--   <tt>GAction</tt> is merely the interface to the concept of an action,
--   as described above. Various implementations of actions exist,
--   including <a>SimpleAction</a>.
--   
--   In all cases, the implementing class is responsible for storing the
--   name of the action, the parameter type, the enabled state, the
--   optional state type and the state and emitting the appropriate signals
--   when these change. The implementor is responsible for filtering calls
--   to <a>actionActivate</a> and <a>actionChangeState</a> for type safety
--   and for the state being enabled.
--   
--   Probably the only useful thing to do with a <tt>GAction</tt> is to put
--   it inside of a <a>SimpleActionGroup</a>.
module GI.Gio.Interfaces.Action

-- | Memory-managed wrapper type.
newtype Action
Action :: ManagedPtr Action -> Action

-- | Type class for types which can be safely cast to <a>Action</a>, for
--   instance with <a>toAction</a>.
class (GObject o, IsDescendantOf Action o) => IsAction o

-- | Cast to <a>Action</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toAction :: (MonadIO m, IsAction o) => o -> m Action

-- | Activates the action.
--   
--   <i><tt>parameter</tt></i> must be the correct type of parameter for
--   the action (ie: the parameter type given at construction time). If the
--   parameter type was <tt>NULL</tt> then <i><tt>parameter</tt></i> must
--   also be <tt>NULL</tt>.
--   
--   If the <i><tt>parameter</tt></i> [type<i><tt>gLib</tt></i>.Variant] is
--   floating, it is consumed.
--   
--   <i>Since: 2.28</i>
actionActivate :: (HasCallStack, MonadIO m, IsAction a) => a -> Maybe GVariant -> m ()

-- | Request for the state of <i><tt>action</tt></i> to be changed to
--   <i><tt>value</tt></i>.
--   
--   The action must be stateful and <i><tt>value</tt></i> must be of the
--   correct type. See <a>actionGetStateType</a>.
--   
--   This call merely requests a change. The action may refuse to change
--   its state or may change its state to something other than
--   <i><tt>value</tt></i>. See <a>actionGetStateHint</a>.
--   
--   If the <i><tt>value</tt></i> [type<i><tt>gLib</tt></i>.Variant] is
--   floating, it is consumed.
--   
--   <i>Since: 2.30</i>
actionChangeState :: (HasCallStack, MonadIO m, IsAction a) => a -> GVariant -> m ()

-- | Checks if <i><tt>action</tt></i> is currently enabled.
--   
--   An action must be enabled in order to be activated or in order to have
--   its state changed from outside callers.
--   
--   <i>Since: 2.28</i>
actionGetEnabled :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool

-- | Queries the name of <i><tt>action</tt></i>.
--   
--   <i>Since: 2.28</i>
actionGetName :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text

-- | Queries the type of the parameter that must be given when activating
--   <i><tt>action</tt></i>.
--   
--   When activating the action using <a>actionActivate</a>, the
--   [type<i><tt>gLib</tt></i>.Variant] given to that function must be of
--   the type returned by this function.
--   
--   In the case that this function returns <tt>NULL</tt>, you must not
--   give any [type<i><tt>gLib</tt></i>.Variant], but <tt>NULL</tt>
--   instead.
--   
--   <i>Since: 2.28</i>
actionGetParameterType :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe VariantType)

-- | Queries the current state of <i><tt>action</tt></i>.
--   
--   If the action is not stateful then <tt>NULL</tt> will be returned. If
--   the action is stateful then the type of the return value is the type
--   given by <a>actionGetStateType</a>.
--   
--   The return value (if non-<tt>NULL</tt>) should be freed with
--   <a>variantUnref</a> when it is no longer required.
--   
--   <i>Since: 2.28</i>
actionGetState :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe GVariant)

-- | Requests a hint about the valid range of values for the state of
--   <i><tt>action</tt></i>.
--   
--   If <tt>NULL</tt> is returned it either means that the action is not
--   stateful or that there is no hint about the valid range of values for
--   the state of the action.
--   
--   If a [type<i><tt>gLib</tt></i>.Variant] array is returned then each
--   item in the array is a possible value for the state. If a
--   [type<i><tt>gLib</tt></i>.Variant] pair (ie: two-tuple) is returned
--   then the tuple specifies the inclusive lower and upper bound of valid
--   values for the state.
--   
--   In any case, the information is merely a hint. It may be possible to
--   have a state value outside of the hinted range and setting a value
--   within the range may fail.
--   
--   The return value (if non-<tt>NULL</tt>) should be freed with
--   <a>variantUnref</a> when it is no longer required.
--   
--   <i>Since: 2.28</i>
actionGetStateHint :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe GVariant)

-- | Queries the type of the state of <i><tt>action</tt></i>.
--   
--   If the action is stateful (e.g. created with
--   <a>simpleActionNewStateful</a>) then this function returns the
--   [type<i><tt>gLib</tt></i>.VariantType] of the state. This is the type
--   of the initial value given as the state. All calls to
--   <a>actionChangeState</a> must give a
--   [type<i><tt>gLib</tt></i>.Variant] of this type and
--   <a>actionGetState</a> will return a [type<i><tt>gLib</tt></i>.Variant]
--   of the same type.
--   
--   If the action is not stateful (e.g. created with
--   <a>simpleActionNew</a>) then this function will return <tt>NULL</tt>.
--   In that case, <a>actionGetState</a> will return <tt>NULL</tt> and you
--   must not call <a>actionChangeState</a>.
--   
--   <i>Since: 2.28</i>
actionGetStateType :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe VariantType)

-- | Checks if <i><tt>actionName</tt></i> is valid.
--   
--   <i><tt>actionName</tt></i> is valid if it consists only of
--   alphanumeric characters, plus <tt>-</tt> and <tt>.</tt>. The empty
--   string is not a valid action name.
--   
--   It is an error to call this function with a non-UTF-8
--   <i><tt>actionName</tt></i>. <i><tt>actionName</tt></i> must not be
--   <tt>NULL</tt>.
--   
--   <i>Since: 2.38</i>
actionNameIsValid :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Parses a detailed action name into its separate name and target
--   components.
--   
--   Detailed action names can have three formats.
--   
--   The first format is used to represent an action name with no target
--   value and consists of just an action name containing no whitespace nor
--   the characters <tt>:</tt>, <tt>(</tt> or <tt>)</tt>. For example:
--   <tt>app.action</tt>.
--   
--   The second format is used to represent an action with a target value
--   that is a non-empty string consisting only of alphanumerics, plus
--   <tt>-</tt> and <tt>.</tt>. In that case, the action name and target
--   value are separated by a double colon (<tt>::</tt>). For example:
--   <tt>app.action::target</tt>.
--   
--   The third format is used to represent an action with any type of
--   target value, including strings. The target value follows the action
--   name, surrounded in parens. For example: <tt>app.action(42)</tt>. The
--   target value is parsed using <a>variantParse</a>. If a tuple-typed
--   value is desired, it must be specified in the same way, resulting in
--   two sets of parens, for example: <tt>app.action((1,2,3))</tt>. A
--   string target can be specified this way as well:
--   <tt>app.action('target')</tt>. For strings, this third format must be
--   used if target value is empty or contains characters other than
--   alphanumerics, <tt>-</tt> and <tt>.</tt>.
--   
--   If this function returns <tt>TRUE</tt>, a non-<tt>NULL</tt> value is
--   guaranteed to be returned in <i><tt>actionName</tt></i> (if a pointer
--   is passed in). A <tt>NULL</tt> value may still be returned in
--   <i><tt>targetValue</tt></i>, as the <i><tt>detailedName</tt></i> may
--   not contain a target.
--   
--   If returned, the [type<i><tt>gLib</tt></i>.Variant] in
--   <i><tt>targetValue</tt></i> is guaranteed to not be floating.
--   
--   <i>Since: 2.38</i>
actionParseDetailedName :: (HasCallStack, MonadIO m) => Text -> m (Text, Maybe GVariant)

-- | Formats a detailed action name from <i><tt>actionName</tt></i> and
--   <i><tt>targetValue</tt></i>.
--   
--   It is an error to call this function with an invalid action name.
--   
--   This function is the opposite of <a>actionParseDetailedName</a>. It
--   will produce a string that can be parsed back to the
--   <i><tt>actionName</tt></i> and <i><tt>targetValue</tt></i> by that
--   function.
--   
--   See that function for the types of strings that will be printed by
--   this function.
--   
--   <i>Since: 2.38</i>
actionPrintDetailedName :: (HasCallStack, MonadIO m) => Text -> Maybe GVariant -> m Text

-- | Get the value of the “<tt>enabled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> action #enabled
--   </pre>
getActionEnabled :: (MonadIO m, IsAction o) => o -> m Bool

-- | Get the value of the “<tt>name</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> action #name
--   </pre>
getActionName :: (MonadIO m, IsAction o) => o -> m Text

-- | Get the value of the “<tt>parameter-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> action #parameterType
--   </pre>
getActionParameterType :: (MonadIO m, IsAction o) => o -> m (Maybe VariantType)

-- | Get the value of the “<tt>state</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> action #state
--   </pre>
getActionState :: (MonadIO m, IsAction o) => o -> m (Maybe GVariant)

-- | Get the value of the “<tt>state-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> action #stateType
--   </pre>
getActionStateType :: (MonadIO m, IsAction o) => o -> m (Maybe VariantType)
instance GHC.Classes.Eq GI.Gio.Interfaces.Action.Action
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Action.Action
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Action.Action
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Action.Action o) => GI.Gio.Interfaces.Action.IsAction o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Action.Action)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Action.Action
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Action.Action


-- | <tt>GActionGroup</tt> represents a group of actions.
--   
--   Actions can be used to expose functionality in a structured way,
--   either from one part of a program to another, or to the outside world.
--   Action groups are often used together with a
--   [type<i><tt>gio</tt></i>.MenuModel] that provides additional
--   representation data for displaying the actions to the user, e.g. in a
--   menu.
--   
--   The main way to interact with the actions in a <tt>GActionGroup</tt>
--   is to activate them with <a>actionGroupActivateAction</a>. Activating
--   an action may require a [type<i><tt>gLib</tt></i>.Variant] parameter.
--   The required type of the parameter can be inquired with
--   <a>actionGroupGetActionParameterType</a>. Actions may be disabled, see
--   <a>actionGroupGetActionEnabled</a>. Activating a disabled action has
--   no effect.
--   
--   Actions may optionally have a state in the form of a
--   [type<i><tt>gLib</tt></i>.Variant]. The current state of an action can
--   be inquired with <a>actionGroupGetActionState</a>. Activating a
--   stateful action may change its state, but it is also possible to set
--   the state by calling <a>actionGroupChangeActionState</a>.
--   
--   As typical example, consider a text editing application which has an
--   option to change the current font to ‘bold’. A good way to represent
--   this would be a stateful action, with a boolean state. Activating the
--   action would toggle the state.
--   
--   Each action in the group has a unique name (which is a string). All
--   method calls, except <a>actionGroupListActions</a> take the name of an
--   action as an argument.
--   
--   The <tt>GActionGroup</tt> API is meant to be the ‘public’ API to the
--   action group. The calls here are exactly the interaction that
--   ‘external forces’ (eg: UI, incoming D-Bus messages, etc.) are supposed
--   to have with actions. ‘Internal’ APIs (ie: ones meant only to be
--   accessed by the action group implementation) are found on subclasses.
--   This is why you will find – for example –
--   <a>actionGroupGetActionEnabled</a> but not an equivalent
--   <tt>set_action_enabled()</tt> method.
--   
--   Signals are emitted on the action group in response to state changes
--   on individual actions.
--   
--   Implementations of <tt>GActionGroup</tt> should provide
--   implementations for the virtual functions
--   <a>actionGroupListActions</a> and <a>actionGroupQueryAction</a>. The
--   other virtual functions should not be implemented — their ‘wrappers’
--   are actually implemented with calls to <a>actionGroupQueryAction</a>.
module GI.Gio.Interfaces.ActionGroup

-- | Memory-managed wrapper type.
newtype ActionGroup
ActionGroup :: ManagedPtr ActionGroup -> ActionGroup

-- | Type class for types which can be safely cast to <a>ActionGroup</a>,
--   for instance with <a>toActionGroup</a>.
class (GObject o, IsDescendantOf ActionGroup o) => IsActionGroup o

-- | Cast to <a>ActionGroup</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toActionGroup :: (MonadIO m, IsActionGroup o) => o -> m ActionGroup

-- | Emits the <a>ActionGroup::actionAdded</a> signal on
--   <i><tt>actionGroup</tt></i>.
--   
--   This function should only be called by
--   [type<i><tt>gio</tt></i>.ActionGroup] implementations.
--   
--   <i>Since: 2.28</i>
actionGroupActionAdded :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m ()

-- | Emits the <a>ActionGroup::actionEnabledChanged</a> signal on
--   <i><tt>actionGroup</tt></i>.
--   
--   This function should only be called by
--   [type<i><tt>gio</tt></i>.ActionGroup] implementations.
--   
--   <i>Since: 2.28</i>
actionGroupActionEnabledChanged :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> Bool -> m ()

-- | Emits the <a>ActionGroup::actionRemoved</a> signal on
--   <i><tt>actionGroup</tt></i>.
--   
--   This function should only be called by
--   [type<i><tt>gio</tt></i>.ActionGroup] implementations.
--   
--   <i>Since: 2.28</i>
actionGroupActionRemoved :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m ()

-- | Emits the <a>ActionGroup::actionStateChanged</a> signal on
--   <i><tt>actionGroup</tt></i>.
--   
--   This function should only be called by
--   [type<i><tt>gio</tt></i>.ActionGroup] implementations.
--   
--   <i>Since: 2.28</i>
actionGroupActionStateChanged :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> GVariant -> m ()

-- | Activate the named action within <i><tt>actionGroup</tt></i>.
--   
--   If the action is expecting a parameter, then the correct type of
--   parameter must be given as <i><tt>parameter</tt></i>. If the action is
--   expecting no parameters then <i><tt>parameter</tt></i> must be
--   <tt>NULL</tt>. See <a>actionGroupGetActionParameterType</a>.
--   
--   If the [type<i><tt>gio</tt></i>.ActionGroup] implementation supports
--   asynchronous remote activation over D-Bus, this call may return before
--   the relevant D-Bus traffic has been sent, or any replies have been
--   received. In order to block on such asynchronous activation calls,
--   <a>dBusConnectionFlush</a> should be called prior to the code, which
--   depends on the result of the action activation. Without flushing the
--   D-Bus connection, there is no guarantee that the action would have
--   been activated.
--   
--   The following code which runs in a remote app instance, shows an
--   example of a ‘quit’ action being activated on the primary app instance
--   over D-Bus. Here <a>dBusConnectionFlush</a> is called before
--   <tt>exit()</tt>. Without <tt>g_dbus_connection_flush()</tt>, the
--   ‘quit’ action may fail to be activated on the primary instance.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   // call ‘quit’ action on primary instance
--   g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
--   
--   // make sure the action is activated now
--   g_dbus_connection_flush (…);
--   
--   g_debug ("Application has been terminated. Exiting.");
--   
--   exit (0);
--   </pre>
--   
--   <i>Since: 2.28</i>
actionGroupActivateAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> Maybe GVariant -> m ()

-- | Request for the state of the named action within
--   <i><tt>actionGroup</tt></i> to be changed to <i><tt>value</tt></i>.
--   
--   The action must be stateful and <i><tt>value</tt></i> must be of the
--   correct type. See <a>actionGroupGetActionStateType</a>.
--   
--   This call merely requests a change. The action may refuse to change
--   its state or may change its state to something other than
--   <i><tt>value</tt></i>. See <a>actionGroupGetActionStateHint</a>.
--   
--   If the <i><tt>value</tt></i> GVariant is floating, it is consumed.
--   
--   <i>Since: 2.28</i>
actionGroupChangeActionState :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> GVariant -> m ()

-- | Checks if the named action within <i><tt>actionGroup</tt></i> is
--   currently enabled.
--   
--   An action must be enabled in order to be activated or in order to have
--   its state changed from outside callers.
--   
--   <i>Since: 2.28</i>
actionGroupGetActionEnabled :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m Bool

-- | Queries the type of the parameter that must be given when activating
--   the named action within <i><tt>actionGroup</tt></i>.
--   
--   When activating the action using <a>actionGroupActivateAction</a>, the
--   [type<i><tt>gLib</tt></i>.Variant] given to that function must be of
--   the type returned by this function.
--   
--   In the case that this function returns <tt>NULL</tt>, you must not
--   give any [type<i><tt>gLib</tt></i>.Variant], but <tt>NULL</tt>
--   instead.
--   
--   The parameter type of a particular action will never change but it is
--   possible for an action to be removed and for a new action to be added
--   with the same name but a different parameter type.
--   
--   <i>Since: 2.28</i>
actionGroupGetActionParameterType :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe VariantType)

-- | Queries the current state of the named action within
--   <i><tt>actionGroup</tt></i>.
--   
--   If the action is not stateful then <tt>NULL</tt> will be returned. If
--   the action is stateful then the type of the return value is the type
--   given by <a>actionGroupGetActionStateType</a>.
--   
--   The return value (if non-<tt>NULL</tt>) should be freed with
--   <a>variantUnref</a> when it is no longer required.
--   
--   <i>Since: 2.28</i>
actionGroupGetActionState :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe GVariant)

-- | Requests a hint about the valid range of values for the state of the
--   named action within <i><tt>actionGroup</tt></i>.
--   
--   If <tt>NULL</tt> is returned it either means that the action is not
--   stateful or that there is no hint about the valid range of values for
--   the state of the action.
--   
--   If a [type<i><tt>gLib</tt></i>.Variant] array is returned then each
--   item in the array is a possible value for the state. If a
--   [type<i><tt>gLib</tt></i>.Variant] pair (ie: two-tuple) is returned
--   then the tuple specifies the inclusive lower and upper bound of valid
--   values for the state.
--   
--   In any case, the information is merely a hint. It may be possible to
--   have a state value outside of the hinted range and setting a value
--   within the range may fail.
--   
--   The return value (if non-<tt>NULL</tt>) should be freed with
--   <a>variantUnref</a> when it is no longer required.
--   
--   <i>Since: 2.28</i>
actionGroupGetActionStateHint :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe GVariant)

-- | Queries the type of the state of the named action within
--   <i><tt>actionGroup</tt></i>.
--   
--   If the action is stateful then this function returns the
--   [type<i><tt>gLib</tt></i>.VariantType] of the state. All calls to
--   <a>actionGroupChangeActionState</a> must give a
--   [type<i><tt>gLib</tt></i>.Variant] of this type and
--   <a>actionGroupGetActionState</a> will return a
--   [type<i><tt>gLib</tt></i>.Variant] of the same type.
--   
--   If the action is not stateful then this function will return
--   <tt>NULL</tt>. In that case, <a>actionGroupGetActionState</a> will
--   return <tt>NULL</tt> and you must not call
--   <a>actionGroupChangeActionState</a>.
--   
--   The state type of a particular action will never change but it is
--   possible for an action to be removed and for a new action to be added
--   with the same name but a different state type.
--   
--   <i>Since: 2.28</i>
actionGroupGetActionStateType :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe VariantType)

-- | Checks if the named action exists within <i><tt>actionGroup</tt></i>.
--   
--   <i>Since: 2.28</i>
actionGroupHasAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m Bool

-- | Lists the actions contained within <i><tt>actionGroup</tt></i>.
--   
--   The caller is responsible for freeing the list with <a>strfreev</a>
--   when it is no longer required.
--   
--   <i>Since: 2.28</i>
actionGroupListActions :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> m [Text]

-- | Queries all aspects of the named action within an
--   <i><tt>actionGroup</tt></i>.
--   
--   This function acquires the information available from
--   <a>actionGroupHasAction</a>, <a>actionGroupGetActionEnabled</a>,
--   <a>actionGroupGetActionParameterType</a>,
--   <a>actionGroupGetActionStateType</a>,
--   <a>actionGroupGetActionStateHint</a> and
--   <a>actionGroupGetActionState</a> with a single function call.
--   
--   This provides two main benefits.
--   
--   The first is the improvement in efficiency that comes with not having
--   to perform repeated lookups of the action in order to discover
--   different things about it. The second is that implementing
--   [type<i><tt>gio</tt></i>.ActionGroup] can now be done by only
--   overriding this one virtual function.
--   
--   The interface provides a default implementation of this function that
--   calls the individual functions, as required, to fetch the information.
--   The interface also provides default implementations of those functions
--   that call this function. All implementations, therefore, must override
--   either this function or all of the others.
--   
--   If the action exists, <tt>TRUE</tt> is returned and any of the
--   requested fields (as indicated by having a non-<tt>NULL</tt> reference
--   passed in) are filled. If the action doesn’t exist, <tt>FALSE</tt> is
--   returned and the fields may or may not have been modified.
--   
--   <i>Since: 2.32</i>
actionGroupQueryAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Bool, Bool, VariantType, VariantType, GVariant, GVariant)

-- | Signals that a new action was just added to the group.
--   
--   This signal is emitted after the action has been added and is now
--   visible.
--   
--   <i>Since: 2.28</i>
type ActionGroupActionAddedCallback = Text -> IO ()

-- | Connect a signal handler for the <a>actionAdded</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> actionGroup #actionAdded callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>action-added::detail</tt>”
--   instead.
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionAddedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>actionAdded</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> actionGroup #actionAdded callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>action-added::detail</tt>”
--   instead.
onActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionAddedCallback) -> m SignalHandlerId

-- | Signals that the enabled status of the named action has changed.
--   
--   <i>Since: 2.28</i>
type ActionGroupActionEnabledChangedCallback = Text -> Bool -> IO ()

-- | Connect a signal handler for the <a>actionEnabledChanged</a> signal,
--   to be run after the default handler. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>after</a> actionGroup #actionEnabledChanged callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to
--   “<tt>action-enabled-changed::detail</tt>” instead.
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionEnabledChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>actionEnabledChanged</a> signal,
--   to be run before the default handler. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>on</a> actionGroup #actionEnabledChanged callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to
--   “<tt>action-enabled-changed::detail</tt>” instead.
onActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionEnabledChangedCallback) -> m SignalHandlerId

-- | Signals that an action is just about to be removed from the group.
--   
--   This signal is emitted before the action is removed, so the action is
--   still visible and can be queried from the signal handler.
--   
--   <i>Since: 2.28</i>
type ActionGroupActionRemovedCallback = Text -> IO ()

-- | Connect a signal handler for the <a>actionRemoved</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> actionGroup #actionRemoved callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>action-removed::detail</tt>”
--   instead.
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>actionRemoved</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> actionGroup #actionRemoved callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>action-removed::detail</tt>”
--   instead.
onActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionRemovedCallback) -> m SignalHandlerId

-- | Signals that the state of the named action has changed.
--   
--   <i>Since: 2.28</i>
type ActionGroupActionStateChangedCallback = Text -> GVariant -> IO ()

-- | Connect a signal handler for the <a>actionStateChanged</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> actionGroup #actionStateChanged callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to
--   “<tt>action-state-changed::detail</tt>” instead.
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionStateChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>actionStateChanged</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> actionGroup #actionStateChanged callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to
--   “<tt>action-state-changed::detail</tt>” instead.
onActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionStateChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.ActionGroup.ActionGroup
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.ActionGroup.ActionGroup
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.ActionGroup.ActionGroup
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.ActionGroup.ActionGroup o) => GI.Gio.Interfaces.ActionGroup.IsActionGroup o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.ActionGroup.ActionGroup)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.ActionGroup.ActionGroup
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.ActionGroup.ActionGroup


-- | <tt>GAsyncResult</tt> provides a base class for implementing
--   asynchronous function results.
--   
--   Asynchronous operations are broken up into two separate operations
--   which are chained together by a <tt>GAsyncReadyCallback</tt>. To begin
--   an asynchronous operation, provide a <tt>GAsyncReadyCallback</tt> to
--   the asynchronous function. This callback will be triggered when the
--   operation has completed, and must be run in a later iteration of the
--   thread-default main context (see <a>mainContextPushThreadDefault</a>)
--   from where the operation was initiated. It will be passed a
--   <tt>GAsyncResult</tt> instance filled with the details of the
--   operation's success or failure, the object the asynchronous function
--   was started for and any error codes returned. The asynchronous
--   callback function is then expected to call the corresponding
--   <tt>_finish()</tt> function, passing the object the function was
--   called for, the <tt>GAsyncResult</tt> instance, and (optionally) an
--   <i><tt>error</tt></i> to grab any error conditions that may have
--   occurred.
--   
--   The <tt>_finish()</tt> function for an operation takes the generic
--   result (of type <tt>GAsyncResult</tt>) and returns the specific result
--   that the operation in question yields (e.g. a <a>FileEnumerator</a>
--   for a "enumerate children" operation). If the result or error status
--   of the operation is not needed, there is no need to call the
--   <tt>_finish()</tt> function; GIO will take care of cleaning up the
--   result and error information after the <tt>GAsyncReadyCallback</tt>
--   returns. You can pass <tt>NULL</tt> for the
--   <tt>GAsyncReadyCallback</tt> if you don't need to take any action at
--   all after the operation completes. Applications may also take a
--   reference to the <tt>GAsyncResult</tt> and call <tt>_finish()</tt>
--   later; however, the <tt>_finish()</tt> function may be called at most
--   once.
--   
--   Example of a typical asynchronous operation flow:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   void _theoretical_frobnitz_async (Theoretical         *t,
--                                     GCancellable        *c,
--                                     GAsyncReadyCallback  cb,
--                                     gpointer             u);
--   
--   gboolean _theoretical_frobnitz_finish (Theoretical   *t,
--                                          GAsyncResult  *res,
--                                          GError       **e);
--   
--   static void
--   frobnitz_result_func (GObject      *source_object,
--   		 GAsyncResult *res,
--   		 gpointer      user_data)
--   {
--     gboolean success = FALSE;
--   
--     success = _theoretical_frobnitz_finish (source_object, res, NULL);
--   
--     if (success)
--       g_printf ("Hurray!\n");
--     else
--       g_printf ("Uh oh!\n");
--   
--     ...
--   
--   }
--   
--   int main (int argc, void *argv[])
--   {
--      ...
--   
--      _theoretical_frobnitz_async (theoretical_data,
--                                   NULL,
--                                   frobnitz_result_func,
--                                   NULL);
--   
--      ...
--   }
--   </pre>
--   
--   The callback for an asynchronous operation is called only once, and is
--   always called, even in the case of a cancelled operation. On
--   cancellation the result is a <tt>G_IO_ERROR_CANCELLED</tt> error.
--   
--   <h2>I/O Priority</h2>
--   
--   Many I/O-related asynchronous operations have a priority parameter,
--   which is used in certain cases to determine the order in which
--   operations are executed. They are not used to determine system-wide
--   I/O scheduling. Priorities are integers, with lower numbers indicating
--   higher priority. It is recommended to choose priorities between
--   <tt>G_PRIORITY_LOW</tt> and <tt>G_PRIORITY_HIGH</tt>, with
--   <tt>G_PRIORITY_DEFAULT</tt> as a default.
module GI.Gio.Interfaces.AsyncResult

-- | Memory-managed wrapper type.
newtype AsyncResult
AsyncResult :: ManagedPtr AsyncResult -> AsyncResult

-- | Type class for types which can be safely cast to <a>AsyncResult</a>,
--   for instance with <a>toAsyncResult</a>.
class (GObject o, IsDescendantOf AsyncResult o) => IsAsyncResult o

-- | Cast to <a>AsyncResult</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toAsyncResult :: (MonadIO m, IsAsyncResult o) => o -> m AsyncResult

-- | Gets the source object from a <a>AsyncResult</a>.
asyncResultGetSourceObject :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (Maybe Object)

-- | Gets the user data from a <a>AsyncResult</a>.
asyncResultGetUserData :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (Ptr ())

-- | Checks if <i><tt>res</tt></i> has the given <i><tt>sourceTag</tt></i>
--   (generally a function pointer indicating the function
--   <i><tt>res</tt></i> was created by).
--   
--   <i>Since: 2.34</i>
asyncResultIsTagged :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> Ptr () -> m Bool

-- | If <i><tt>res</tt></i> is a <a>SimpleAsyncResult</a>, this is
--   equivalent to <a>simpleAsyncResultPropagateError</a>. Otherwise it
--   returns <tt>FALSE</tt>.
--   
--   This can be used for legacy error handling in async
--   <tt>*_finish()</tt> wrapper functions that traditionally handled
--   <a>SimpleAsyncResult</a> error returns themselves rather than calling
--   into the virtual method. This should not be used in new code;
--   <a>AsyncResult</a> errors that are set by virtual methods should also
--   be extracted by virtual methods, to enable subclasses to chain up
--   correctly.
--   
--   <i>Since: 2.34</i>
asyncResultLegacyPropagateError :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.AsyncResult.AsyncResult
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.AsyncResult.AsyncResult
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.AsyncResult.AsyncResult
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.AsyncResult.AsyncResult o) => GI.Gio.Interfaces.AsyncResult.IsAsyncResult o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.AsyncResult.AsyncResult)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.AsyncResult.AsyncResult
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.AsyncResult.AsyncResult


-- | <tt>GConverter</tt> is an interface for streaming conversions.
--   
--   <tt>GConverter</tt> is implemented by objects that convert binary data
--   in various ways. The conversion can be stateful and may fail at any
--   place.
--   
--   Some example conversions are: character set conversion, compression,
--   decompression and regular expression replace.
--   
--   <i>Since: 2.24</i>
module GI.Gio.Interfaces.Converter

-- | Memory-managed wrapper type.
newtype Converter
Converter :: ManagedPtr Converter -> Converter

-- | Type class for types which can be safely cast to <a>Converter</a>, for
--   instance with <a>toConverter</a>.
class (GObject o, IsDescendantOf Converter o) => IsConverter o

-- | Cast to <a>Converter</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toConverter :: (MonadIO m, IsConverter o) => o -> m Converter

-- | This is the main operation used when converting data. It is to be
--   called multiple times in a loop, and each time it will do some work,
--   i.e. producing some output (in <i><tt>outbuf</tt></i>) or consuming
--   some input (from <i><tt>inbuf</tt></i>) or both. If its not possible
--   to do any work an error is returned.
--   
--   Note that a single call may not consume all input (or any input at
--   all). Also a call may produce output even if given no input, due to
--   state stored in the converter producing output.
--   
--   If any data was either produced or consumed, and then an error
--   happens, then only the successful conversion is reported and the error
--   is returned on the next call.
--   
--   A full conversion loop involves calling this method repeatedly, each
--   time giving it new input and space output space. When there is no more
--   input data after the data in <i><tt>inbuf</tt></i>, the flag
--   <a>ConverterFlagsInputAtEnd</a> must be set. The loop will be (unless
--   some error happens) returning <a>ConverterResultConverted</a> each
--   time until all data is consumed and all output is produced, then
--   <a>ConverterResultFinished</a> is returned instead. Note, that
--   <a>ConverterResultFinished</a> may be returned even if
--   <a>ConverterFlagsInputAtEnd</a> is not set, for instance in a
--   decompression converter where the end of data is detectable from the
--   data (and there might even be other data after the end of the
--   compressed data).
--   
--   When some data has successfully been converted
--   <i><tt>bytesRead</tt></i> and is set to the number of bytes read from
--   <i><tt>inbuf</tt></i>, and <i><tt>bytesWritten</tt></i> is set to
--   indicate how many bytes was written to <i><tt>outbuf</tt></i>. If
--   there are more data to output or consume (i.e. unless the
--   <a>ConverterFlagsInputAtEnd</a> is specified) then
--   <a>ConverterResultConverted</a> is returned, and if no more data is to
--   be output then <a>ConverterResultFinished</a> is returned.
--   
--   On error <a>ConverterResultError</a> is returned and
--   <i><tt>error</tt></i> is set accordingly. Some errors need special
--   handling:
--   
--   <a>IOErrorEnumNoSpace</a> is returned if there is not enough space to
--   write the resulting converted data, the application should call the
--   function again with a larger <i><tt>outbuf</tt></i> to continue.
--   
--   <a>IOErrorEnumPartialInput</a> is returned if there is not enough
--   input to fully determine what the conversion should produce, and the
--   <a>ConverterFlagsInputAtEnd</a> flag is not set. This happens for
--   example with an incomplete multibyte sequence when converting text, or
--   when a regexp matches up to the end of the input (and may match
--   further input). It may also happen when <i><tt>inbufSize</tt></i> is
--   zero and there is no more data to produce.
--   
--   When this happens the application should read more input and then call
--   the function again. If further input shows that there is no more data
--   call the function again with the same data but with the
--   <a>ConverterFlagsInputAtEnd</a> flag set. This may cause the
--   conversion to finish as e.g. in the regexp match case (or, to fail
--   again with <a>IOErrorEnumPartialInput</a> in e.g. a charset conversion
--   where the input is actually partial).
--   
--   After <a>converterConvert</a> has returned
--   <a>ConverterResultFinished</a> the converter object is in an invalid
--   state where its not allowed to call <a>converterConvert</a> anymore.
--   At this time you can only free the object or call
--   <a>converterReset</a> to reset it to the initial state.
--   
--   If the flag <a>ConverterFlagsFlush</a> is set then conversion is
--   modified to try to write out all internal state to the output. The
--   application has to call the function multiple times with the flag set,
--   and when the available input has been consumed and all internal state
--   has been produced then <a>ConverterResultFlushed</a> (or
--   <a>ConverterResultFinished</a> if really at the end) is returned
--   instead of <a>ConverterResultConverted</a>. This is somewhat similar
--   to what happens at the end of the input stream, but done in the middle
--   of the data.
--   
--   This has different meanings for different conversions. For instance in
--   a compression converter it would mean that we flush all the
--   compression state into output such that if you uncompress the
--   compressed data you get back all the input data. Doing this may make
--   the final file larger due to padding though. Another example is a
--   regexp conversion, where if you at the end of the flushed data have a
--   match, but there is also a potential longer match. In the non-flushed
--   case we would ask for more input, but when flushing we treat this as
--   the end of input and do the match.
--   
--   Flushing is not always possible (like if a charset converter flushes
--   at a partial multibyte sequence). Converters are supposed to try to
--   produce as much output as possible and then return an error (typically
--   <a>IOErrorEnumPartialInput</a>).
--   
--   <i>Since: 2.24</i>
converterConvert :: (HasCallStack, MonadIO m, IsConverter a) => a -> Maybe ByteString -> ByteString -> [ConverterFlags] -> m (ConverterResult, CSize, CSize)

-- | Applies <i><tt>converter</tt></i> to the data in
--   <i><tt>bytes</tt></i>.
--   
--   <i>Since: 2.82</i>
converterConvertBytes :: (HasCallStack, MonadIO m, IsConverter a) => a -> Bytes -> m Bytes

-- | Resets all internal state in the converter, making it behave as if it
--   was just created. If the converter has any internal state that would
--   produce output then that output is lost.
--   
--   <i>Since: 2.24</i>
converterReset :: (HasCallStack, MonadIO m, IsConverter a) => a -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.Converter.Converter
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Converter.Converter
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Converter.Converter
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Converter.Converter o) => GI.Gio.Interfaces.Converter.IsConverter o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Converter.Converter)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Converter.Converter
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Converter.Converter


-- | <tt>GIcon</tt> is a very minimal interface for icons. It provides
--   functions for checking the equality of two icons, hashing of icons and
--   serializing an icon to and from strings.
--   
--   <tt>GIcon</tt> does not provide the actual pixmap for the icon as this
--   is out of GIO's scope, however implementations of <tt>GIcon</tt> may
--   contain the name of an icon (see <a>ThemedIcon</a>), or the path to an
--   icon (see <a>LoadableIcon</a>).
--   
--   To obtain a hash of a <tt>GIcon</tt>, see <a>iconHash</a>.
--   
--   To check if two <tt>GIcon</tt>s are equal, see <a>iconEqual</a>.
--   
--   For serializing a <tt>GIcon</tt>, use <a>iconSerialize</a> and
--   <a>iconDeserialize</a>.
--   
--   If you want to consume <tt>GIcon</tt> (for example, in a toolkit) you
--   must be prepared to handle at least the three following cases:
--   <a>LoadableIcon</a>, <a>ThemedIcon</a> and <a>EmblemedIcon</a>. It may
--   also make sense to have fast-paths for other cases (like handling
--   <a>`GdkPixbuf`</a> directly, for example) but all compliant
--   <tt>GIcon</tt> implementations outside of GIO must implement
--   <a>LoadableIcon</a>.
--   
--   If your application or library provides one or more <tt>GIcon</tt>
--   implementations you need to ensure that your new implementation also
--   implements <a>LoadableIcon</a>. Additionally, you must provide an
--   implementation of <a>iconSerialize</a> that gives a result that is
--   understood by <a>iconDeserialize</a>, yielding one of the built-in
--   icon types.
module GI.Gio.Interfaces.Icon

-- | Memory-managed wrapper type.
newtype Icon
Icon :: ManagedPtr Icon -> Icon

-- | Type class for types which can be safely cast to <a>Icon</a>, for
--   instance with <a>toIcon</a>.
class (GObject o, IsDescendantOf Icon o) => IsIcon o

-- | Cast to <a>Icon</a>, for types for which this is known to be safe. For
--   general casts, use <a>castTo</a>.
toIcon :: (MonadIO m, IsIcon o) => o -> m Icon

-- | Deserializes a <a>Icon</a> previously serialized using
--   <a>iconSerialize</a>.
--   
--   <i>Since: 2.38</i>
iconDeserialize :: (HasCallStack, MonadIO m) => GVariant -> m (Maybe Icon)

-- | Checks if two icons are equal.
iconEqual :: (HasCallStack, MonadIO m, IsIcon a, IsIcon b) => Maybe a -> Maybe b -> m Bool

-- | Gets a hash for an icon.
iconHash :: (HasCallStack, MonadIO m, IsIcon a) => a -> m Word32

-- | Generate a <a>Icon</a> instance from <i><tt>str</tt></i>. This
--   function can fail if <i><tt>str</tt></i> is not valid - see
--   <a>iconToString</a> for discussion.
--   
--   If your application or library provides one or more <a>Icon</a>
--   implementations you need to ensure that each <a>GType</a> is
--   registered with the type system prior to calling
--   <a>iconNewForString</a>.
--   
--   <i>Since: 2.20</i>
iconNewForString :: (HasCallStack, MonadIO m) => Text -> m Icon

-- | Serializes a <a>Icon</a> into a <a>GVariant</a>. An equivalent
--   <a>Icon</a> can be retrieved back by calling <a>iconDeserialize</a> on
--   the returned value. As serialization will avoid using raw icon data
--   when possible, it only makes sense to transfer the <a>GVariant</a>
--   between processes on the same machine, (as opposed to over the
--   network), and within the same file system namespace.
--   
--   <i>Since: 2.38</i>
iconSerialize :: (HasCallStack, MonadIO m, IsIcon a) => a -> m (Maybe GVariant)

-- | Generates a textual representation of <i><tt>icon</tt></i> that can be
--   used for serialization such as when passing <i><tt>icon</tt></i> to a
--   different process or saving it to persistent storage. Use
--   <a>iconNewForString</a> to get <i><tt>icon</tt></i> back from the
--   returned string.
--   
--   The encoding of the returned string is proprietary to <a>Icon</a>
--   except in the following two cases
--   
--   <ul>
--   <li>If <i><tt>icon</tt></i> is a <a>FileIcon</a>, the returned string
--   is a native path (such as <tt>/path/to/my icon.png</tt>) without
--   escaping if the <a>File</a> for <i><tt>icon</tt></i> is a native file.
--   If the file is not native, the returned string is the result of
--   <a>fileGetUri</a> (such as
--   <tt>sftp://path/to/my%20icon.png</tt>).</li>
--   <li>If <i><tt>icon</tt></i> is a <a>ThemedIcon</a> with exactly one
--   name and no fallbacks, the encoding is simply the name (such as
--   <tt>network-server</tt>).</li>
--   </ul>
--   
--   <i>Since: 2.20</i>
iconToString :: (HasCallStack, MonadIO m, IsIcon a) => a -> m (Maybe Text)
instance GHC.Classes.Eq GI.Gio.Interfaces.Icon.Icon
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Icon.Icon
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Icon.Icon
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Icon.Icon)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Icon.Icon o) => GI.Gio.Interfaces.Icon.IsIcon o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Icon.Icon
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Icon.Icon


-- | <tt>GListModel</tt> is an interface that represents a mutable list of
--   <a>Object</a>. Its main intention is as a model for various widgets in
--   user interfaces, such as list views, but it can also be used as a
--   convenient method of returning lists of data, with support for
--   updates.
--   
--   Each object in the list may also report changes in itself via some
--   mechanism (normally the <a>Object::notify</a> signal). Taken together
--   with the <a>ListModel::itemsChanged</a> signal, this provides for a
--   list that can change its membership, and in which the members can
--   change their individual properties.
--   
--   A good example would be the list of visible wireless network access
--   points, where each access point can report dynamic properties such as
--   signal strength.
--   
--   It is important to note that the <tt>GListModel</tt> itself does not
--   report changes to the individual items. It only reports changes to the
--   list membership. If you want to observe changes to the objects
--   themselves then you need to connect signals to the objects that you
--   are interested in.
--   
--   All items in a <tt>GListModel</tt> are of (or derived from) the same
--   type. <a>listModelGetItemType</a> returns that type. The type may be
--   an interface, in which case all objects in the list must implement it.
--   
--   The semantics are close to that of an array: <a>listModelGetNItems</a>
--   returns the number of items in the list and <a>listModelGetItem</a>
--   returns an item at a (0-based) position. In order to allow
--   implementations to calculate the list length lazily, you can also
--   iterate over items: starting from 0, repeatedly call
--   <a>listModelGetItem</a> until it returns <tt>NULL</tt>.
--   
--   An implementation may create objects lazily, but must take care to
--   return the same object for a given position until all references to it
--   are gone.
--   
--   On the other side, a consumer is expected only to hold references on
--   objects that are currently ‘user visible’, in order to facilitate the
--   maximum level of laziness in the implementation of the list and to
--   reduce the required number of signal connections at a given time.
--   
--   This interface is intended only to be used from a single thread. The
--   thread in which it is appropriate to use it depends on the particular
--   implementation, but typically it will be from the thread that owns the
--   thread-default main context (see <a>mainContextPushThreadDefault</a>)
--   in effect at the time that the model was created.
--   
--   Over time, it has established itself as good practice for list model
--   implementations to provide properties <tt>item-type</tt> and
--   <tt>n-items</tt> to ease working with them. While it is not required,
--   it is recommended that implementations provide these two properties.
--   They should return the values of <a>listModelGetItemType</a> and
--   <a>listModelGetNItems</a> respectively and be defined as such:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   properties[PROP_ITEM_TYPE] =
--     g_param_spec_gtype ("item-type", NULL, NULL, G_TYPE_OBJECT,
--                         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
--   properties[PROP_N_ITEMS] =
--     g_param_spec_uint ("n-items", NULL, NULL, 0, G_MAXUINT, 0,
--                        G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
--   </pre>
module GI.Gio.Interfaces.ListModel

-- | Memory-managed wrapper type.
newtype ListModel
ListModel :: ManagedPtr ListModel -> ListModel

-- | Type class for types which can be safely cast to <a>ListModel</a>, for
--   instance with <a>toListModel</a>.
class (GObject o, IsDescendantOf ListModel o) => IsListModel o

-- | Cast to <a>ListModel</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toListModel :: (MonadIO m, IsListModel o) => o -> m ListModel

-- | Get the item at <i><tt>position</tt></i>.
--   
--   If <i><tt>position</tt></i> is greater than the number of items in
--   <i><tt>list</tt></i>, <a>Nothing</a> is returned.
--   
--   <a>Nothing</a> is never returned for an index that is smaller than the
--   length of the list.
--   
--   This function is meant to be used by language bindings in place of
--   <tt><i>g_list_model_get_item()</i></tt>.
--   
--   See also: <a>listModelGetNItems</a>
--   
--   <i>Since: 2.44</i>
listModelGetItem :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> m (Maybe Object)

-- | Gets the type of the items in <i><tt>list</tt></i>.
--   
--   All items returned from <tt><i>g_list_model_get_item()</i></tt> are of
--   the type returned by this function, or a subtype, or if the type is an
--   interface, they are an implementation of that interface.
--   
--   The item type of a <a>ListModel</a> can not change during the life of
--   the model.
--   
--   <i>Since: 2.44</i>
listModelGetItemType :: (HasCallStack, MonadIO m, IsListModel a) => a -> m GType

-- | Gets the number of items in <i><tt>list</tt></i>.
--   
--   Depending on the model implementation, calling this function may be
--   less efficient than iterating the list with increasing values for
--   <i><tt>position</tt></i> until <tt><i>g_list_model_get_item()</i></tt>
--   returns <a>Nothing</a>.
--   
--   <i>Since: 2.44</i>
listModelGetNItems :: (HasCallStack, MonadIO m, IsListModel a) => a -> m Word32

-- | Emits the <a>ListModel::itemsChanged</a> signal on
--   <i><tt>list</tt></i>.
--   
--   This function should only be called by classes implementing
--   <a>ListModel</a>. It has to be called after the internal
--   representation of <i><tt>list</tt></i> has been updated, because
--   handlers connected to this signal might query the new state of the
--   list.
--   
--   Implementations must only make changes to the model (as visible to its
--   consumer) in places that will not cause problems for that consumer.
--   For models that are driven directly by a write API (such as
--   <a>ListStore</a>), changes can be reported in response to uses of that
--   API. For models that represent remote data, changes should only be
--   made from a fresh mainloop dispatch. It is particularly not permitted
--   to make changes in response to a call to the <a>ListModel</a> consumer
--   API.
--   
--   Stated another way: in general, it is assumed that code making a
--   series of accesses to the model via the API, without returning to the
--   mainloop, and without calling other code, will continue to view the
--   same contents of the model.
--   
--   <i>Since: 2.44</i>
listModelItemsChanged :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> Word32 -> Word32 -> m ()

-- | This signal is emitted whenever items were added to or removed from
--   <i><tt>list</tt></i>. At <i><tt>position</tt></i>,
--   <i><tt>removed</tt></i> items were removed and <i><tt>added</tt></i>
--   items were added in their place.
--   
--   Note: If <tt>removed != added</tt>, the positions of all later items
--   in the model change.
--   
--   <i>Since: 2.44</i>
type ListModelItemsChangedCallback = Word32 -> Word32 -> Word32 -> IO ()

-- | Connect a signal handler for the <a>itemsChanged</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> listModel #itemsChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ((?self :: a) => ListModelItemsChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>itemsChanged</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> listModel #itemsChanged callback
--   </pre>
onListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ((?self :: a) => ListModelItemsChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.ListModel.ListModel
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.ListModel.ListModel
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.ListModel.ListModel
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.ListModel.ListModel)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.ListModel.ListModel o) => GI.Gio.Interfaces.ListModel.IsListModel o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.ListModel.ListModel
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.ListModel.ListModel


-- | The <tt>GRemoteActionGroup</tt> interface is implemented by
--   <a>ActionGroup</a> instances that either transmit action invocations
--   to other processes or receive action invocations in the local process
--   from other processes.
--   
--   The interface has <tt>_full</tt> variants of the two methods on
--   <a>ActionGroup</a> used to activate actions:
--   <a>actionGroupActivateAction</a> and
--   <a>actionGroupChangeActionState</a>. These variants allow a ‘platform
--   data’ <a>GVariant</a> to be specified: a dictionary providing context
--   for the action invocation (for example: timestamps, startup
--   notification IDs, etc).
--   
--   <a>DBusActionGroup</a> implements <tt>GRemoteActionGroup</tt>. This
--   provides a mechanism to send platform data for action invocations over
--   D-Bus.
--   
--   Additionally, <a>dBusConnectionExportActionGroup</a> will check if the
--   exported <a>ActionGroup</a> implements <tt>GRemoteActionGroup</tt> and
--   use the <tt>_full</tt> variants of the calls if available. This
--   provides a mechanism by which to receive platform data for action
--   invocations that arrive by way of D-Bus.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Interfaces.RemoteActionGroup

-- | Memory-managed wrapper type.
newtype RemoteActionGroup
RemoteActionGroup :: ManagedPtr RemoteActionGroup -> RemoteActionGroup

-- | Type class for types which can be safely cast to
--   <a>RemoteActionGroup</a>, for instance with
--   <a>toRemoteActionGroup</a>.
class (GObject o, IsDescendantOf RemoteActionGroup o) => IsRemoteActionGroup o

-- | Cast to <a>RemoteActionGroup</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toRemoteActionGroup :: (MonadIO m, IsRemoteActionGroup o) => o -> m RemoteActionGroup

-- | Activates the remote action.
--   
--   This is the same as <a>actionGroupActivateAction</a> except that it
--   allows for provision of "platform data" to be sent along with the
--   activation request. This typically contains details such as the user
--   interaction timestamp or startup notification information.
--   
--   <i><tt>platformData</tt></i> must be non-<a>Nothing</a> and must have
--   the type <tt><i>G_VARIANT_TYPE_VARDICT</i></tt>. If it is floating, it
--   will be consumed.
--   
--   <i>Since: 2.32</i>
remoteActionGroupActivateActionFull :: (HasCallStack, MonadIO m, IsRemoteActionGroup a) => a -> Text -> Maybe GVariant -> GVariant -> m ()

-- | Changes the state of a remote action.
--   
--   This is the same as <a>actionGroupChangeActionState</a> except that it
--   allows for provision of "platform data" to be sent along with the
--   state change request. This typically contains details such as the user
--   interaction timestamp or startup notification information.
--   
--   <i><tt>platformData</tt></i> must be non-<a>Nothing</a> and must have
--   the type <tt><i>G_VARIANT_TYPE_VARDICT</i></tt>. If it is floating, it
--   will be consumed.
--   
--   <i>Since: 2.32</i>
remoteActionGroupChangeActionStateFull :: (HasCallStack, MonadIO m, IsRemoteActionGroup a) => a -> Text -> GVariant -> GVariant -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup o) => GI.Gio.Interfaces.RemoteActionGroup.IsRemoteActionGroup o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup


-- | <tt>GAppInfoMonitor</tt> monitors application information for changes.
--   
--   <tt>GAppInfoMonitor</tt> is a very simple object used for monitoring
--   the app info database for changes (newly installed or removed
--   applications).
--   
--   Call <a>appInfoMonitorGet</a> to get a <tt>GAppInfoMonitor</tt> and
--   connect to the <a>AppInfoMonitor::changed</a> signal. The signal will
--   be emitted once when the app info database changes, and will not be
--   emitted again until after the next call to <a>appInfoGetAll</a> or
--   another <tt>g_app_info_*()</tt> function. This is because monitoring
--   the app info database for changes is expensive.
--   
--   The following functions will re-arm the <a>AppInfoMonitor::changed</a>
--   signal so it can be emitted again:
--   
--   <ul>
--   <li><a>appInfoGetAll</a></li>
--   <li><a>appInfoGetAllForType</a></li>
--   <li><a>appInfoGetDefaultForType</a></li>
--   <li><a>appInfoGetFallbackForType</a></li>
--   <li><a>appInfoGetRecommendedForType</a></li>
--   <li><a>`g_desktop_app_info_get_implementations()`</a></li>
--   <li><a>`g_desktop_app_info_new()`</a></li>
--   <li><a>`g_desktop_app_info_new_from_filename()`</a></li>
--   <li><a>`g_desktop_app_info_new_from_keyfile()`</a></li>
--   <li><a>`g_desktop_app_info_search()`</a></li>
--   </ul>
--   
--   The latter functions are available if using <a>`GDesktopAppInfo`</a>
--   from <tt>gio-unix-2.0.pc</tt> (GIR namespace <tt>GioUnix-2.0</tt>).
--   
--   In the usual case, applications should try to make note of the change
--   (doing things like invalidating caches) but not act on it. In
--   particular, applications should avoid making calls to
--   <tt>GAppInfo</tt> APIs in response to the change signal, deferring
--   these until the time that the updated data is actually required. The
--   exception to this case is when application information is actually
--   being displayed on the screen (for example, during a search or when
--   the list of all applications is shown). The reason for this is that
--   changes to the list of installed applications often come in groups
--   (like during system updates) and rescanning the list on every change
--   is pointless and expensive.
--   
--   <i>Since: 2.40</i>
module GI.Gio.Objects.AppInfoMonitor

-- | Memory-managed wrapper type.
newtype AppInfoMonitor
AppInfoMonitor :: ManagedPtr AppInfoMonitor -> AppInfoMonitor

-- | Type class for types which can be safely cast to
--   <a>AppInfoMonitor</a>, for instance with <a>toAppInfoMonitor</a>.
class (GObject o, IsDescendantOf AppInfoMonitor o) => IsAppInfoMonitor o

-- | Cast to <a>AppInfoMonitor</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toAppInfoMonitor :: (MonadIO m, IsAppInfoMonitor o) => o -> m AppInfoMonitor

-- | Gets the <a>AppInfoMonitor</a> for the current thread-default main
--   context.
--   
--   The <a>AppInfoMonitor</a> will emit a “changed” signal in the
--   thread-default main context whenever the list of installed
--   applications (as reported by <a>appInfoGetAll</a>) may have changed.
--   
--   The <a>AppInfoMonitor::changed</a> signal will only be emitted once
--   until <a>appInfoGetAll</a> (or another <tt>g_app_info_*()</tt>
--   function) is called. Doing so will re-arm the signal ready to notify
--   about the next change.
--   
--   You must only call <a>objectUnref</a> on the return value from under
--   the same main context as you created it.
--   
--   <i>Since: 2.40</i>
appInfoMonitorGet :: (HasCallStack, MonadIO m) => m AppInfoMonitor

-- | Signal emitted when the app info database changes, when applications
--   are installed or removed.
--   
--   <i>Since: 2.40</i>
type AppInfoMonitorChangedCallback = IO ()

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> appInfoMonitor #changed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> ((?self :: a) => AppInfoMonitorChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> appInfoMonitor #changed callback
--   </pre>
onAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> ((?self :: a) => AppInfoMonitorChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor o) => GI.Gio.Objects.AppInfoMonitor.IsAppInfoMonitor o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor


-- | <tt>GCancellable</tt> allows operations to be cancelled.
--   
--   <tt>GCancellable</tt> is a thread-safe operation cancellation stack
--   used throughout GIO to allow for cancellation of synchronous and
--   asynchronous operations.
module GI.Gio.Objects.Cancellable

-- | Memory-managed wrapper type.
newtype Cancellable
Cancellable :: ManagedPtr Cancellable -> Cancellable

-- | Type class for types which can be safely cast to <a>Cancellable</a>,
--   for instance with <a>toCancellable</a>.
class (GObject o, IsDescendantOf Cancellable o) => IsCancellable o

-- | Cast to <a>Cancellable</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toCancellable :: (MonadIO m, IsCancellable o) => o -> m Cancellable

-- | Will set <i><tt>cancellable</tt></i> to cancelled, and will emit the
--   <a>Cancellable::cancelled</a> signal. (However, see the warning about
--   race conditions in the documentation for that signal if you are
--   planning to connect to it.)
--   
--   This function is thread-safe. In other words, you can safely call it
--   from a thread other than the one running the operation that was passed
--   the <i><tt>cancellable</tt></i>.
--   
--   If <i><tt>cancellable</tt></i> is <a>Nothing</a>, this function
--   returns immediately for convenience.
--   
--   The convention within GIO is that cancelling an asynchronous operation
--   causes it to complete asynchronously. That is, if you cancel the
--   operation from the same thread in which it is running, then the
--   operation's <a>AsyncReadyCallback</a> will not be invoked until the
--   application returns to the main loop.
--   
--   It is safe (although useless, since it will be a no-op) to call this
--   function from a <a>Cancellable::cancelled</a> signal handler.
cancellableCancel :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m ()

-- | Convenience function to connect to the <a>Cancellable::cancelled</a>
--   signal. Also handles the race condition that may happen if the
--   cancellable is cancelled right before connecting.
--   
--   <i><tt>callback</tt></i> is called exactly once each time
--   <i><tt>cancellable</tt></i> is cancelled, either directly at the time
--   of the connect if <i><tt>cancellable</tt></i> is already cancelled, or
--   when <i><tt>cancellable</tt></i> is cancelled in some thread. In case
--   the cancellable is reset via <a>cancellableReset</a> then the callback
--   can be called again if the <i><tt>cancellable</tt></i> is cancelled
--   and if it had not been previously cancelled at the time
--   <a>cancellableConnect</a> was called (e.g. if the connection actually
--   took place, returning a non-zero value).
--   
--   <i><tt>dataDestroyFunc</tt></i> will be called when the handler is
--   disconnected, or immediately if the cancellable is already cancelled.
--   
--   See <a>Cancellable::cancelled</a> for details on how to use this.
--   
--   Since GLib 2.40, the lock protecting <i><tt>cancellable</tt></i> is
--   not held when <i><tt>callback</tt></i> is invoked. This lifts a
--   restriction in place for earlier GLib versions which now makes it
--   easier to write cleanup code that unconditionally invokes e.g.
--   <a>cancellableCancel</a>. Note that since 2.82 GLib still holds a lock
--   during the callback but it’s designed in a way that most of the
--   <a>Cancellable</a> methods can be called, including
--   <a>cancellableCancel</a> or <a>objectUnref</a>.
--   
--   There are still some methods that will deadlock (by design) when
--   called from the <a>Cancellable::cancelled</a> callbacks: *
--   <a>cancellableConnect</a> * <a>cancellableDisconnect</a> *
--   <a>cancellableReset</a> * <a>cancellableMakePollfd</a> *
--   <a>cancellableReleaseFd</a>
--   
--   <i>Since: 2.22</i>
cancellableConnect :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> Callback -> m CULong

-- | Disconnects a handler from a cancellable instance similar to
--   <a>signalHandlerDisconnect</a>. Additionally, in the event that a
--   signal handler is currently running, this call will block until the
--   handler has finished. Calling this function from a
--   <a>Cancellable::cancelled</a> signal handler will therefore result in
--   a deadlock.
--   
--   This avoids a race condition where a thread cancels at the same time
--   as the cancellable operation is finished and the signal handler is
--   removed. See <a>Cancellable::cancelled</a> for details on how to use
--   this.
--   
--   If <i><tt>cancellable</tt></i> is <a>Nothing</a> or
--   <i><tt>handlerId</tt></i> is <tt>0</tt> this function does nothing.
--   
--   <i>Since: 2.22</i>
cancellableDisconnect :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> CULong -> m ()

-- | Gets the top cancellable from the stack.
cancellableGetCurrent :: (HasCallStack, MonadIO m) => m (Maybe Cancellable)

-- | Gets the file descriptor for a cancellable job. This can be used to
--   implement cancellable operations on Unix systems. The returned fd will
--   turn readable when <i><tt>cancellable</tt></i> is cancelled.
--   
--   You are not supposed to read from the fd yourself, just check for
--   readable status. Reading to unset the readable status is done with
--   <a>cancellableReset</a>.
--   
--   After a successful return from this function, you should use
--   <a>cancellableReleaseFd</a> to free up resources allocated for the
--   returned file descriptor.
--   
--   See also <a>cancellableMakePollfd</a>.
cancellableGetFd :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m Int32

-- | Checks if a cancellable job has been cancelled.
cancellableIsCancelled :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m Bool

-- | Creates a <a>PollFD</a> corresponding to <i><tt>cancellable</tt></i>;
--   this can be passed to <a>poll</a> and used to poll for cancellation.
--   This is useful both for unix systems without a native poll and for
--   portability to windows.
--   
--   When this function returns <a>True</a>, you should use
--   <a>cancellableReleaseFd</a> to free up resources allocated for the
--   <i><tt>pollfd</tt></i>. After a <a>False</a> return, do not call
--   <a>cancellableReleaseFd</a>.
--   
--   If this function returns <a>False</a>, either no
--   <i><tt>cancellable</tt></i> was given or resource limits prevent this
--   function from allocating the necessary structures for polling. (On
--   Linux, you will likely have reached the maximum number of file
--   descriptors.) The suggested way to handle these cases is to ignore the
--   <i><tt>cancellable</tt></i>.
--   
--   You are not supposed to read from the fd yourself, just check for
--   readable status. Reading to unset the readable status is done with
--   <a>cancellableReset</a>.
--   
--   Note that in the event that a <a>Cancellable::cancelled</a> signal
--   handler is currently running, this call will block until the handler
--   has finished. Calling this function from a signal handler will
--   therefore result in a deadlock.
--   
--   <i>Since: 2.22</i>
cancellableMakePollfd :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> PollFD -> m Bool

-- | Creates a new <a>Cancellable</a> object.
--   
--   Applications that want to start one or more operations that should be
--   cancellable should create a <a>Cancellable</a> and pass it to the
--   operations.
--   
--   One <a>Cancellable</a> can be used in multiple consecutive operations
--   or in multiple concurrent operations.
cancellableNew :: (HasCallStack, MonadIO m) => m Cancellable

-- | Pops <i><tt>cancellable</tt></i> off the cancellable stack (verifying
--   that <i><tt>cancellable</tt></i> is on the top of the stack).
cancellablePopCurrent :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m ()

-- | Pushes <i><tt>cancellable</tt></i> onto the cancellable stack. The
--   current cancellable can then be received using
--   <a>cancellableGetCurrent</a>.
--   
--   This is useful when implementing cancellable operations in code that
--   does not allow you to pass down the cancellable object.
--   
--   This is typically called automatically by e.g. <a>File</a> operations,
--   so you rarely have to call this yourself.
cancellablePushCurrent :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m ()

-- | Releases a resources previously allocated by <a>cancellableGetFd</a>
--   or <a>cancellableMakePollfd</a>.
--   
--   For compatibility reasons with older releases, calling this function
--   is not strictly required, the resources will be automatically freed
--   when the <i><tt>cancellable</tt></i> is finalized. However, the
--   <i><tt>cancellable</tt></i> will block scarce file descriptors until
--   it is finalized if this function is not called. This can cause the
--   application to run out of file descriptors when many
--   <tt><i>GCancellables</i></tt> are used at the same time.
--   
--   Note that in the event that a <a>Cancellable::cancelled</a> signal
--   handler is currently running, this call will block until the handler
--   has finished. Calling this function from a signal handler will
--   therefore result in a deadlock.
--   
--   <i>Since: 2.22</i>
cancellableReleaseFd :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m ()

-- | Resets <i><tt>cancellable</tt></i> to its uncancelled state.
--   
--   If cancellable is currently in use by any cancellable operation then
--   the behavior of this function is undefined.
--   
--   Note that it is generally not a good idea to reuse an existing
--   cancellable for more operations after it has been cancelled once, as
--   this function might tempt you to do. The recommended practice is to
--   drop the reference to a cancellable after cancelling it, and let it
--   die with the outstanding async operations. You should create a fresh
--   cancellable for further async operations.
--   
--   In the event that a <a>Cancellable::cancelled</a> signal handler is
--   currently running, this call will block until the handler has
--   finished. Calling this function from a signal handler will therefore
--   result in a deadlock.
cancellableReset :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m ()

-- | If the <i><tt>cancellable</tt></i> is cancelled, sets the error to
--   notify that the operation was cancelled.
cancellableSetErrorIfCancelled :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m ()

-- | Creates a source that triggers if <i><tt>cancellable</tt></i> is
--   cancelled and calls its callback of type <a>CancellableSourceFunc</a>.
--   This is primarily useful for attaching to another (non-cancellable)
--   source with <a>sourceAddChildSource</a> to add cancellability to it.
--   
--   For convenience, you can call this with a <a>Nothing</a>
--   <a>Cancellable</a>, in which case the source will never trigger.
--   
--   The new <a>Source</a> will hold a reference to the <a>Cancellable</a>.
--   
--   <i>Since: 2.28</i>
cancellableSourceNew :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m Source

-- | Emitted when the operation has been cancelled.
--   
--   Can be used by implementations of cancellable operations. If the
--   operation is cancelled from another thread, the signal will be emitted
--   in the thread that cancelled the operation, not the thread that is
--   running the operation.
--   
--   Note that disconnecting from this signal (or any signal) in a
--   multi-threaded program is prone to race conditions. For instance it is
--   possible that a signal handler may be invoked even after a call to
--   <a>signalHandlerDisconnect</a> for that handler has already returned.
--   
--   There is also a problem when cancellation happens right before
--   connecting to the signal. If this happens the signal will unexpectedly
--   not be emitted, and checking before connecting to the signal leaves a
--   race condition where this is still happening.
--   
--   In order to make it safe and easy to connect handlers there are two
--   helper functions: <a>cancellableConnect</a> and
--   <a>cancellableDisconnect</a> which protect against problems like this.
--   
--   An example of how to us this:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   // Make sure we don't do unnecessary work if already cancelled
--   if (g_cancellable_set_error_if_cancelled (cancellable, error))
--     return;
--   
--   // Set up all the data needed to be able to handle cancellation
--   // of the operation
--   my_data = my_data_new (...);
--   
--   id = 0;
--   if (cancellable)
--     id = g_cancellable_connect (cancellable,
--   			      G_CALLBACK (cancelled_handler)
--   			      data, NULL);
--   
--   // cancellable operation here...
--   
--   g_cancellable_disconnect (cancellable, id);
--   
--   // cancelled_handler is never called after this, it is now safe
--   // to free the data
--   my_data_free (my_data);
--   </pre>
--   
--   Note that the cancelled signal is emitted in the thread that the user
--   cancelled from, which may be the main thread. So, the cancellable
--   signal should not do something that can block.
type CancellableCancelledCallback = IO ()

-- | Connect a signal handler for the <a>cancelled</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> cancellable #cancelled callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterCancellableCancelled :: (IsCancellable a, MonadIO m) => a -> ((?self :: a) => CancellableCancelledCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>cancelled</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> cancellable #cancelled callback
--   </pre>
onCancellableCancelled :: (IsCancellable a, MonadIO m) => a -> ((?self :: a) => CancellableCancelledCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.Cancellable.Cancellable
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Cancellable.Cancellable
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Cancellable.Cancellable
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Cancellable.Cancellable o) => GI.Gio.Objects.Cancellable.IsCancellable o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Cancellable.Cancellable)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Cancellable.Cancellable
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Cancellable.Cancellable


-- | <tt>GSeekable</tt> is implemented by streams (implementations of
--   <a>InputStream</a> or <a>OutputStream</a>) that support seeking.
--   
--   Seekable streams largely fall into two categories: resizable and
--   fixed-size.
--   
--   <tt>GSeekable</tt> on fixed-sized streams is approximately the same as
--   POSIX <a>`lseek()`</a>) on a block device (for example: attempting to
--   seek past the end of the device is an error). Fixed streams typically
--   cannot be truncated.
--   
--   <tt>GSeekable</tt> on resizable streams is approximately the same as
--   POSIX <a>`lseek()`</a>) on a normal file. Seeking past the end and
--   writing data will usually cause the stream to resize by introducing
--   zero bytes.
module GI.Gio.Interfaces.Seekable

-- | Memory-managed wrapper type.
newtype Seekable
Seekable :: ManagedPtr Seekable -> Seekable

-- | Type class for types which can be safely cast to <a>Seekable</a>, for
--   instance with <a>toSeekable</a>.
class (GObject o, IsDescendantOf Seekable o) => IsSeekable o

-- | Cast to <a>Seekable</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toSeekable :: (MonadIO m, IsSeekable o) => o -> m Seekable

-- | Tests if the stream supports the <a>SeekableIface</a>.
seekableCanSeek :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Bool

-- | Tests if the length of the stream can be adjusted with
--   <a>seekableTruncate</a>.
seekableCanTruncate :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Bool

-- | Seeks in the stream by the given <i><tt>offset</tt></i>, modified by
--   <i><tt>type</tt></i>.
--   
--   Attempting to seek past the end of the stream will have different
--   results depending on if the stream is fixed-sized or resizable. If the
--   stream is resizable then seeking past the end and then writing will
--   result in zeros filling the empty space. Seeking past the end of a
--   resizable stream and reading will result in EOF. Seeking past the end
--   of a fixed-sized stream will fail.
--   
--   Any operation that would result in a negative offset will fail.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
seekableSeek :: (HasCallStack, MonadIO m, IsSeekable a, IsCancellable b) => a -> Int64 -> SeekType -> Maybe b -> m ()

-- | Tells the current position within the stream.
seekableTell :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Int64

-- | Sets the length of the stream to <i><tt>offset</tt></i>. If the stream
--   was previously larger than <i><tt>offset</tt></i>, the extra data is
--   discarded. If the stream was previously shorter than
--   <i><tt>offset</tt></i>, it is extended with NUL ('\0') bytes.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If an operation was
--   partially finished when the operation was cancelled the partial result
--   will be returned, without an error.
seekableTruncate :: (HasCallStack, MonadIO m, IsSeekable a, IsCancellable b) => a -> Int64 -> Maybe b -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.Seekable.Seekable
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Seekable.Seekable
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Seekable.Seekable
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Seekable.Seekable)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Seekable.Seekable o) => GI.Gio.Interfaces.Seekable.IsSeekable o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Seekable.Seekable
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Seekable.Seekable


-- | <tt>GPowerProfileMonitor</tt> makes it possible for applications as
--   well as OS components to monitor system power profiles and act upon
--   them. It currently only exports whether the system is in “Power Saver”
--   mode (known as “Low Power” mode on some systems).
--   
--   When in “Low Power” mode, it is recommended that applications:
--   
--   <ul>
--   <li>disable automatic downloads;</li>
--   <li>reduce the rate of refresh from online sources such as calendar or
--   email synchronisation;</li>
--   <li>reduce the use of expensive visual effects.</li>
--   </ul>
--   
--   It is also likely that OS components providing services to
--   applications will lower their own background activity, for the sake of
--   the system.
--   
--   There are a variety of tools that exist for power consumption
--   analysis, but those usually depend on the OS and hardware used. On
--   Linux, one could use <tt>upower</tt> to monitor the battery discharge
--   rate, <tt>powertop</tt> to check on the background activity or
--   activity at all), <tt>sysprof</tt> to inspect CPU usage, and
--   <tt>intel_gpu_time</tt> to profile GPU usage.
--   
--   Don’t forget to disconnect the <a>Object::notify</a> signal for
--   <a>PowerProfileMonitor:powerSaverEnabled</a>, and unref the
--   <tt>GPowerProfileMonitor</tt> itself when exiting.
--   
--   <i>Since: 2.70</i>
module GI.Gio.Interfaces.PowerProfileMonitor

-- | Memory-managed wrapper type.
newtype PowerProfileMonitor
PowerProfileMonitor :: ManagedPtr PowerProfileMonitor -> PowerProfileMonitor

-- | Type class for types which can be safely cast to
--   <a>PowerProfileMonitor</a>, for instance with
--   <a>toPowerProfileMonitor</a>.
class (GObject o, IsDescendantOf PowerProfileMonitor o) => IsPowerProfileMonitor o

-- | Cast to <a>PowerProfileMonitor</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toPowerProfileMonitor :: (MonadIO m, IsPowerProfileMonitor o) => o -> m PowerProfileMonitor

-- | Gets a reference to the default <a>PowerProfileMonitor</a> for the
--   system.
--   
--   <i>Since: 2.70</i>
powerProfileMonitorDupDefault :: (HasCallStack, MonadIO m) => m PowerProfileMonitor

-- | Gets whether the system is in “Power Saver” mode.
--   
--   You are expected to listen to the
--   <a>PowerProfileMonitor</a>::<tt><i>notify</i></tt><a>powerSaverEnabled</a>
--   signal to know when the profile has changed.
--   
--   <i>Since: 2.70</i>
powerProfileMonitorGetPowerSaverEnabled :: (HasCallStack, MonadIO m, IsPowerProfileMonitor a) => a -> m Bool

-- | Get the value of the “<tt>power-saver-enabled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> powerProfileMonitor #powerSaverEnabled
--   </pre>
getPowerProfileMonitorPowerSaverEnabled :: (MonadIO m, IsPowerProfileMonitor o) => o -> m Bool
instance GHC.Classes.Eq GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor o) => GI.Gio.Interfaces.PowerProfileMonitor.IsPowerProfileMonitor o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.PowerProfileMonitor.PowerProfileMonitor


-- | <tt>GMemoryMonitor</tt> will monitor system memory and suggest to the
--   application when to free memory so as to leave more room for other
--   applications. It is implemented on Linux using the <a>Low Memory
--   Monitor</a> (<a>API documentation</a>).
--   
--   There is also an implementation for use inside Flatpak sandboxes.
--   
--   Possible actions to take when the signal is received are:
--   
--   <ul>
--   <li>Free caches</li>
--   <li>Save files that haven’t been looked at in a while to disk, ready
--   to be reopened when needed</li>
--   <li>Run a garbage collection cycle</li>
--   <li>Try and compress fragmented allocations</li>
--   <li>Exit on idle if the process has no reason to stay around</li>
--   <li>Call <a>`malloc_trim(3)`</a>) to return cached heap pages to the
--   kernel (if supported by your libc)</li>
--   </ul>
--   
--   Note that some actions may not always improve system performance, and
--   so should be profiled for your application. <tt>malloc_trim()</tt>,
--   for example, may make future heap allocations slower (due to releasing
--   cached heap pages back to the kernel).
--   
--   See [type<i><tt>gio</tt></i>.MemoryMonitorWarningLevel] for details on
--   the various warning levels.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static void
--   warning_cb (GMemoryMonitor *m, GMemoryMonitorWarningLevel level)
--   {
--     g_debug ("Warning level: %d", level);
--     if (warning_level &gt; G_MEMORY_MONITOR_WARNING_LEVEL_LOW)
--       drop_caches ();
--   }
--   
--   static GMemoryMonitor *
--   monitor_low_memory (void)
--   {
--     GMemoryMonitor *m;
--     m = g_memory_monitor_dup_default ();
--     g_signal_connect (G_OBJECT (m), "low-memory-warning",
--                       G_CALLBACK (warning_cb), NULL);
--     return m;
--   }
--   </pre>
--   
--   Don’t forget to disconnect the <a>MemoryMonitor::lowMemoryWarning</a>
--   signal, and unref the <tt>GMemoryMonitor</tt> itself when exiting.
--   
--   <i>Since: 2.64</i>
module GI.Gio.Interfaces.MemoryMonitor

-- | Memory-managed wrapper type.
newtype MemoryMonitor
MemoryMonitor :: ManagedPtr MemoryMonitor -> MemoryMonitor

-- | Type class for types which can be safely cast to <a>MemoryMonitor</a>,
--   for instance with <a>toMemoryMonitor</a>.
class (GObject o, IsDescendantOf MemoryMonitor o) => IsMemoryMonitor o

-- | Cast to <a>MemoryMonitor</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toMemoryMonitor :: (MonadIO m, IsMemoryMonitor o) => o -> m MemoryMonitor

-- | Gets a reference to the default <a>MemoryMonitor</a> for the system.
--   
--   <i>Since: 2.64</i>
memoryMonitorDupDefault :: (HasCallStack, MonadIO m) => m MemoryMonitor

-- | Emitted when the system is running low on free memory.
--   
--   The signal handler should then take the appropriate action depending
--   on the warning level. See the <a>MemoryMonitorWarningLevel</a>
--   documentation for details.
--   
--   Since the <a>MemoryMonitor</a> is a singleton, this signal will be
--   emitted in the <a>mainContextDefault</a>[global-default main context].
--   
--   <i>Since: 2.64</i>
type MemoryMonitorLowMemoryWarningCallback = MemoryMonitorWarningLevel -> IO ()

-- | Connect a signal handler for the <a>lowMemoryWarning</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> memoryMonitor #lowMemoryWarning callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMemoryMonitorLowMemoryWarning :: (IsMemoryMonitor a, MonadIO m) => a -> ((?self :: a) => MemoryMonitorLowMemoryWarningCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>lowMemoryWarning</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> memoryMonitor #lowMemoryWarning callback
--   </pre>
onMemoryMonitorLowMemoryWarning :: (IsMemoryMonitor a, MonadIO m) => a -> ((?self :: a) => MemoryMonitorLowMemoryWarningCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.MemoryMonitor.MemoryMonitor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.MemoryMonitor.MemoryMonitor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.MemoryMonitor.MemoryMonitor
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.MemoryMonitor.MemoryMonitor)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.MemoryMonitor.MemoryMonitor o) => GI.Gio.Interfaces.MemoryMonitor.IsMemoryMonitor o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.MemoryMonitor.MemoryMonitor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.MemoryMonitor.MemoryMonitor


-- | <tt>GInitable</tt> is implemented by objects that can fail during
--   initialization. If an object implements this interface then it must be
--   initialized as the first thing after construction, either via
--   <a>initableInit</a> or <a>asyncInitableInitAsync</a> (the latter is
--   only available if it also implements <a>AsyncInitable</a>).
--   
--   If the object is not initialized, or initialization returns with an
--   error, then all operations on the object except
--   <tt>g_object_ref()</tt> and <tt>g_object_unref()</tt> are considered
--   to be invalid, and have undefined behaviour. They will often fail with
--   <tt><i>GLib.critical</i></tt> or <tt><i>GLib.warning</i></tt>, but
--   this must not be relied on.
--   
--   Users of objects implementing this are not intended to use the
--   interface method directly, instead it will be used automatically in
--   various ways. For C applications you generally just call
--   <a>Initable</a>.<tt><i>new</i></tt>() directly, or indirectly via a
--   <tt>foo_thing_new()</tt> wrapper. This will call <a>initableInit</a>
--   under the cover, returning <tt>NULL</tt> and setting a <tt>GError</tt>
--   on failure (at which point the instance is unreferenced).
--   
--   For bindings in languages where the native constructor supports
--   exceptions the binding could check for objects implementing
--   <tt>GInitable</tt> during normal construction and automatically
--   initialize them, throwing an exception on failure.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Interfaces.Initable

-- | Memory-managed wrapper type.
newtype Initable
Initable :: ManagedPtr Initable -> Initable

-- | Type class for types which can be safely cast to <a>Initable</a>, for
--   instance with <a>toInitable</a>.
class (GObject o, IsDescendantOf Initable o) => IsInitable o

-- | Cast to <a>Initable</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toInitable :: (MonadIO m, IsInitable o) => o -> m Initable

-- | Initializes the object implementing the interface.
--   
--   This method is intended for language bindings. If writing in C,
--   <tt><i>g_initable_new()</i></tt> should typically be used instead.
--   
--   The object must be initialized before any real use after initial
--   construction, either with this function or
--   <a>asyncInitableInitAsync</a>.
--   
--   Implementations may also support cancellation. If
--   <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then initialization
--   can be cancelled by triggering the cancellable object from another
--   thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If
--   <i><tt>cancellable</tt></i> is not <a>Nothing</a> and the object
--   doesn't support cancellable initialization the error
--   <a>IOErrorEnumNotSupported</a> will be returned.
--   
--   If the object is not initialized, or initialization returns with an
--   error, then all operations on the object except <a>objectRef</a> and
--   <a>objectUnref</a> are considered to be invalid, and have undefined
--   behaviour. See the
--   [description][iface<i><tt>gio</tt></i>.Initable<tt><i>description</i></tt>]
--   for more details.
--   
--   Callers should not assume that a class which implements
--   <a>Initable</a> can be initialized multiple times, unless the class
--   explicitly documents itself as supporting this. Generally, a class’
--   implementation of <tt><i>init()</i></tt> can assume (and assert) that
--   it will only be called once. Previously, this documentation
--   recommended all <a>Initable</a> implementations should be idempotent;
--   that recommendation was relaxed in GLib 2.54.
--   
--   If a class explicitly supports being initialized multiple times, it is
--   recommended that the method is idempotent: multiple calls with the
--   same arguments should return the same results. Only the first call
--   initializes the object; further calls return the result of the first
--   call.
--   
--   One reason why a class might need to support idempotent initialization
--   is if it is designed to be used via the singleton pattern, with a
--   <a>ObjectClass</a>.<tt><i>constructor</i></tt> that sometimes returns
--   an existing instance. In this pattern, a caller would expect to be
--   able to call <a>initableInit</a> on the result of
--   <tt><i>g_object_new()</i></tt>, regardless of whether it is in fact a
--   new instance.
--   
--   <i>Since: 2.22</i>
initableInit :: (HasCallStack, MonadIO m, IsInitable a, IsCancellable b) => a -> Maybe b -> m ()

-- | Helper function for constructing <a>Initable</a> object. This is
--   similar to <a>objectNewv</a> but also initializes the object and
--   returns <a>Nothing</a>, setting an error on failure.
--   
--   <i>Since: 2.22</i>

-- | <i>Deprecated: (Since version 2.54)Use
--   <tt><i>g_object_new_with_properties()</i></tt> and<a>initableInit</a>
--   instead. See <a>Parameter</a> for more information.</i>
initableNewv :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> [Parameter] -> Maybe a -> m Object
instance GHC.Classes.Eq GI.Gio.Interfaces.Initable.Initable
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Initable.Initable
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Initable.Initable
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Initable.Initable)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Initable.Initable o) => GI.Gio.Interfaces.Initable.IsInitable o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Initable.Initable
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Initable.Initable


-- | <tt>GDebugController</tt> is an interface to expose control of
--   debugging features and debug output.
--   
--   It is implemented on Linux using <a>DebugControllerDBus</a>, which
--   exposes a D-Bus interface to allow authenticated peers to control
--   debug features in this process.
--   
--   Whether debug output is enabled is exposed as
--   <a>DebugController:debugEnabled</a>. This controls
--   <a>logSetDebugEnabled</a> by default. Application code may connect to
--   the <a>Object::notify</a> signal for it to control other parts of its
--   debug infrastructure as necessary.
--   
--   If your application or service is using the default GLib log writer
--   function, creating one of the built-in implementations of
--   <tt>GDebugController</tt> should be all that’s needed to dynamically
--   enable or disable debug output.
--   
--   <i>Since: 2.72</i>
module GI.Gio.Interfaces.DebugController

-- | Memory-managed wrapper type.
newtype DebugController
DebugController :: ManagedPtr DebugController -> DebugController

-- | Type class for types which can be safely cast to
--   <a>DebugController</a>, for instance with <a>toDebugController</a>.
class (GObject o, IsDescendantOf DebugController o) => IsDebugController o

-- | Cast to <a>DebugController</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toDebugController :: (MonadIO m, IsDebugController o) => o -> m DebugController

-- | Get the value of <a>DebugController:debugEnabled</a>.
--   
--   <i>Since: 2.72</i>
debugControllerGetDebugEnabled :: (HasCallStack, MonadIO m, IsDebugController a) => a -> m Bool

-- | Set the value of <a>DebugController:debugEnabled</a>.
--   
--   <i>Since: 2.72</i>
debugControllerSetDebugEnabled :: (HasCallStack, MonadIO m, IsDebugController a) => a -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>debug-enabled</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDebugControllerDebugEnabled :: (IsDebugController o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>debug-enabled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> debugController #debugEnabled
--   </pre>
getDebugControllerDebugEnabled :: (MonadIO m, IsDebugController o) => o -> m Bool

-- | Set the value of the “<tt>debug-enabled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> debugController [ #debugEnabled <a>:=</a> value ]
--   </pre>
setDebugControllerDebugEnabled :: (MonadIO m, IsDebugController o) => o -> Bool -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.DebugController.DebugController
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DebugController.DebugController
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DebugController.DebugController
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DebugController.DebugController o) => GI.Gio.Interfaces.DebugController.IsDebugController o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DebugController.DebugController)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DebugController.DebugController
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DebugController.DebugController


-- | <tt>GCharsetConverter</tt> is an implementation of <a>Converter</a>
--   based on <tt><i>GLib.IConv</i></tt>.
module GI.Gio.Objects.CharsetConverter

-- | Memory-managed wrapper type.
newtype CharsetConverter
CharsetConverter :: ManagedPtr CharsetConverter -> CharsetConverter

-- | Type class for types which can be safely cast to
--   <a>CharsetConverter</a>, for instance with <a>toCharsetConverter</a>.
class (GObject o, IsDescendantOf CharsetConverter o) => IsCharsetConverter o

-- | Cast to <a>CharsetConverter</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toCharsetConverter :: (MonadIO m, IsCharsetConverter o) => o -> m CharsetConverter

-- | Gets the number of fallbacks that <i><tt>converter</tt></i> has
--   applied so far.
--   
--   <i>Since: 2.24</i>
charsetConverterGetNumFallbacks :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Word32

-- | Gets the <a>CharsetConverter:useFallback</a> property.
--   
--   <i>Since: 2.24</i>
charsetConverterGetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Bool

-- | Creates a new <a>CharsetConverter</a>.
--   
--   <i>Since: 2.24</i>
charsetConverterNew :: (HasCallStack, MonadIO m) => Text -> Text -> m CharsetConverter

-- | Sets the <a>CharsetConverter:useFallback</a> property.
--   
--   <i>Since: 2.24</i>
charsetConverterSetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>from-charset</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructCharsetConverterFromCharset :: (IsCharsetConverter o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>from-charset</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> charsetConverter #fromCharset
--   </pre>
getCharsetConverterFromCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>to-charset</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructCharsetConverterToCharset :: (IsCharsetConverter o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>to-charset</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> charsetConverter #toCharset
--   </pre>
getCharsetConverterToCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>use-fallback</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructCharsetConverterUseFallback :: (IsCharsetConverter o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>use-fallback</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> charsetConverter #useFallback
--   </pre>
getCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> m Bool

-- | Set the value of the “<tt>use-fallback</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> charsetConverter [ #useFallback <a>:=</a> value ]
--   </pre>
setCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> Bool -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.CharsetConverter.CharsetConverter
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.CharsetConverter.CharsetConverter
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.CharsetConverter.CharsetConverter
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.CharsetConverter.CharsetConverter o) => GI.Gio.Objects.CharsetConverter.IsCharsetConverter o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.CharsetConverter.CharsetConverter)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.CharsetConverter.CharsetConverter
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.CharsetConverter.CharsetConverter


-- | The <tt>GCredentials</tt> type is a reference-counted wrapper for
--   native credentials.
--   
--   The information in <tt>GCredentials</tt> is typically used for
--   identifying, authenticating and authorizing other processes.
--   
--   Some operating systems supports looking up the credentials of the
--   remote peer of a communication endpoint - see e.g.
--   <a>socketGetCredentials</a>.
--   
--   Some operating systems supports securely sending and receiving
--   credentials over a Unix Domain Socket, see
--   <a>UnixCredentialsMessage</a>, <a>unixConnectionSendCredentials</a>
--   and <a>unixConnectionReceiveCredentials</a> for details.
--   
--   On Linux, the native credential type is a <tt>struct ucred</tt> - see
--   the <a>`unix(7)` man page</a>) for details. This corresponds to
--   <tt>G_CREDENTIALS_TYPE_LINUX_UCRED</tt>.
--   
--   On Apple operating systems (including iOS, tvOS, and macOS), the
--   native credential type is a <tt>struct xucred</tt>. This corresponds
--   to <tt>G_CREDENTIALS_TYPE_APPLE_XUCRED</tt>.
--   
--   On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential
--   type is a <tt>struct cmsgcred</tt>. This corresponds to
--   <tt>G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED</tt>.
--   
--   On NetBSD, the native credential type is a <tt>struct unpcbid</tt>.
--   This corresponds to <tt>G_CREDENTIALS_TYPE_NETBSD_UNPCBID</tt>.
--   
--   On OpenBSD, the native credential type is a <tt>struct
--   sockpeercred</tt>. This corresponds to
--   <tt>G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED</tt>.
--   
--   On Solaris (including OpenSolaris and its derivatives), the native
--   credential type is a <tt>ucred_t</tt>. This corresponds to
--   <tt>G_CREDENTIALS_TYPE_SOLARIS_UCRED</tt>.
--   
--   Since GLib 2.72, on Windows, the native credentials may contain the
--   PID of a process. This corresponds to
--   <tt>G_CREDENTIALS_TYPE_WIN32_PID</tt>.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.Credentials

-- | Memory-managed wrapper type.
newtype Credentials
Credentials :: ManagedPtr Credentials -> Credentials

-- | Type class for types which can be safely cast to <a>Credentials</a>,
--   for instance with <a>toCredentials</a>.
class (GObject o, IsDescendantOf Credentials o) => IsCredentials o

-- | Cast to <a>Credentials</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toCredentials :: (MonadIO m, IsCredentials o) => o -> m Credentials

-- | Tries to get the UNIX process identifier from
--   <i><tt>credentials</tt></i>. This method is only available on UNIX
--   platforms.
--   
--   This operation can fail if <a>Credentials</a> is not supported on the
--   OS or if the native credentials type does not contain information
--   about the UNIX process ID.
--   
--   <i>Since: 2.36</i>
credentialsGetUnixPid :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Int32

-- | Tries to get the UNIX user identifier from
--   <i><tt>credentials</tt></i>. This method is only available on UNIX
--   platforms.
--   
--   This operation can fail if <a>Credentials</a> is not supported on the
--   OS or if the native credentials type does not contain information
--   about the UNIX user.
--   
--   As the signedness of <tt>uid_t</tt> is not specified by POSIX, it is
--   recommended to check <i><tt>error</tt></i> for failure rather than
--   trying to check the return value, particularly in language bindings.
--   
--   <i>Since: 2.26</i>
credentialsGetUnixUser :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Word32

-- | Checks if <i><tt>credentials</tt></i> and
--   <i><tt>otherCredentials</tt></i> is the same user.
--   
--   This operation can fail if <a>Credentials</a> is not supported on the
--   the OS.
--   
--   <i>Since: 2.26</i>
credentialsIsSameUser :: (HasCallStack, MonadIO m, IsCredentials a, IsCredentials b) => a -> b -> m ()

-- | Creates a new <a>Credentials</a> object with credentials matching the
--   the current process.
--   
--   <i>Since: 2.26</i>
credentialsNew :: (HasCallStack, MonadIO m) => m Credentials

-- | Copies the native credentials of type <i><tt>nativeType</tt></i> from
--   <i><tt>native</tt></i> into <i><tt>credentials</tt></i>.
--   
--   It is a programming error (which will cause a warning to be logged) to
--   use this method if there is no <a>Credentials</a> support for the OS
--   or if <i><tt>nativeType</tt></i> isn't supported by the OS.
--   
--   <i>Since: 2.26</i>
credentialsSetNative :: (HasCallStack, MonadIO m, IsCredentials a) => a -> CredentialsType -> Ptr () -> m ()

-- | Tries to set the UNIX user identifier on <i><tt>credentials</tt></i>.
--   This method is only available on UNIX platforms.
--   
--   This operation can fail if <a>Credentials</a> is not supported on the
--   OS or if the native credentials type does not contain information
--   about the UNIX user. It can also fail if the OS does not allow the use
--   of "spoofed" credentials.
--   
--   <i>Since: 2.26</i>
credentialsSetUnixUser :: (HasCallStack, MonadIO m, IsCredentials a) => a -> Word32 -> m ()

-- | Creates a human-readable textual representation of
--   <i><tt>credentials</tt></i> that can be used in logging and debug
--   messages. The format of the returned string may change in future GLib
--   release.
--   
--   <i>Since: 2.26</i>
credentialsToString :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Text
instance GHC.Classes.Eq GI.Gio.Objects.Credentials.Credentials
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Credentials.Credentials
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Credentials.Credentials
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Credentials.Credentials o) => GI.Gio.Objects.Credentials.IsCredentials o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Credentials.Credentials)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Credentials.Credentials
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Credentials.Credentials


-- | <tt>GEmblem</tt> is an implementation of <a>Icon</a> that supports
--   having an emblem, which is an icon with additional properties. It can
--   than be added to a <a>EmblemedIcon</a>.
--   
--   Currently, only metainformation about the emblem's origin is
--   supported. More may be added in the future.
module GI.Gio.Objects.Emblem

-- | Memory-managed wrapper type.
newtype Emblem
Emblem :: ManagedPtr Emblem -> Emblem

-- | Type class for types which can be safely cast to <a>Emblem</a>, for
--   instance with <a>toEmblem</a>.
class (GObject o, IsDescendantOf Emblem o) => IsEmblem o

-- | Cast to <a>Emblem</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toEmblem :: (MonadIO m, IsEmblem o) => o -> m Emblem

-- | Gives back the icon from <i><tt>emblem</tt></i>.
--   
--   <i>Since: 2.18</i>
emblemGetIcon :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m Icon

-- | Gets the origin of the emblem.
--   
--   <i>Since: 2.18</i>
emblemGetOrigin :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m EmblemOrigin

-- | Creates a new emblem for <i><tt>icon</tt></i>.
--   
--   <i>Since: 2.18</i>
emblemNew :: (HasCallStack, MonadIO m, IsIcon a) => a -> m Emblem

-- | Creates a new emblem for <i><tt>icon</tt></i>.
--   
--   <i>Since: 2.18</i>
emblemNewWithOrigin :: (HasCallStack, MonadIO m, IsIcon a) => a -> EmblemOrigin -> m Emblem

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>icon</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructEmblemIcon :: (IsEmblem o, MonadIO m, IsObject a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>icon</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> emblem #icon
--   </pre>
getEmblemIcon :: (MonadIO m, IsEmblem o) => o -> m (Maybe Object)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>origin</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructEmblemOrigin :: (IsEmblem o, MonadIO m) => EmblemOrigin -> m (GValueConstruct o)

-- | Get the value of the “<tt>origin</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> emblem #origin
--   </pre>
getEmblemOrigin :: (MonadIO m, IsEmblem o) => o -> m EmblemOrigin
instance GHC.Classes.Eq GI.Gio.Objects.Emblem.Emblem
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Emblem.Emblem
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Emblem.Emblem
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Emblem.Emblem o) => GI.Gio.Objects.Emblem.IsEmblem o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Emblem.Emblem)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Emblem.Emblem
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Emblem.Emblem


-- | <tt>GEmblemedIcon</tt> is an implementation of <a>Icon</a> that
--   supports adding an emblem to an icon. Adding multiple emblems to an
--   icon is ensured via <a>emblemedIconAddEmblem</a>.
--   
--   Note that <tt>GEmblemedIcon</tt> allows no control over the position
--   of the emblems. See also <a>Emblem</a> for more information.
module GI.Gio.Objects.EmblemedIcon

-- | Memory-managed wrapper type.
newtype EmblemedIcon
EmblemedIcon :: ManagedPtr EmblemedIcon -> EmblemedIcon

-- | Type class for types which can be safely cast to <a>EmblemedIcon</a>,
--   for instance with <a>toEmblemedIcon</a>.
class (GObject o, IsDescendantOf EmblemedIcon o) => IsEmblemedIcon o

-- | Cast to <a>EmblemedIcon</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toEmblemedIcon :: (MonadIO m, IsEmblemedIcon o) => o -> m EmblemedIcon

-- | Adds <i><tt>emblem</tt></i> to the <a>List</a> of
--   <tt><i>GEmblems</i></tt>.
--   
--   <i>Since: 2.18</i>
emblemedIconAddEmblem :: (HasCallStack, MonadIO m, IsEmblemedIcon a, IsEmblem b) => a -> b -> m ()

-- | Removes all the emblems from <i><tt>icon</tt></i>.
--   
--   <i>Since: 2.28</i>
emblemedIconClearEmblems :: (HasCallStack, MonadIO m, IsEmblemedIcon a) => a -> m ()

-- | Gets the list of emblems for the <i><tt>icon</tt></i>.
--   
--   <i>Since: 2.18</i>
emblemedIconGetEmblems :: (HasCallStack, MonadIO m, IsEmblemedIcon a) => a -> m [Emblem]

-- | Gets the main icon for <i><tt>emblemed</tt></i>.
--   
--   <i>Since: 2.18</i>
emblemedIconGetIcon :: (HasCallStack, MonadIO m, IsEmblemedIcon a) => a -> m Icon

-- | Creates a new emblemed icon for <i><tt>icon</tt></i> with the emblem
--   <i><tt>emblem</tt></i>.
--   
--   <i>Since: 2.18</i>
emblemedIconNew :: (HasCallStack, MonadIO m, IsIcon a, IsEmblem b) => a -> Maybe b -> m EmblemedIcon

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>gicon</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructEmblemedIconGicon :: (IsEmblemedIcon o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>gicon</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> emblemedIcon #gicon
--   </pre>
getEmblemedIconGicon :: (MonadIO m, IsEmblemedIcon o) => o -> m (Maybe Icon)
instance GHC.Classes.Eq GI.Gio.Objects.EmblemedIcon.EmblemedIcon
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.EmblemedIcon.EmblemedIcon
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.EmblemedIcon.EmblemedIcon
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.EmblemedIcon.EmblemedIcon o) => GI.Gio.Objects.EmblemedIcon.IsEmblemedIcon o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.EmblemedIcon.EmblemedIcon)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.EmblemedIcon.EmblemedIcon
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.EmblemedIcon.EmblemedIcon


-- | Completes partial file and directory names given a partial string by
--   looking in the file system for clues. Can return a list of possible
--   completion strings for widget implementations.
module GI.Gio.Objects.FilenameCompleter

-- | Memory-managed wrapper type.
newtype FilenameCompleter
FilenameCompleter :: ManagedPtr FilenameCompleter -> FilenameCompleter

-- | Type class for types which can be safely cast to
--   <a>FilenameCompleter</a>, for instance with
--   <a>toFilenameCompleter</a>.
class (GObject o, IsDescendantOf FilenameCompleter o) => IsFilenameCompleter o

-- | Cast to <a>FilenameCompleter</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toFilenameCompleter :: (MonadIO m, IsFilenameCompleter o) => o -> m FilenameCompleter

-- | Obtains a suffix completion for <i><tt>initialText</tt></i> from
--   <i><tt>completer</tt></i>.
--   
--   Suffix will be an empty string if there's no shared suffix among
--   matching completions. If there's no matching completions anyway,
--   <tt>NULL</tt> is returned.
filenameCompleterGetCompletionSuffix :: (HasCallStack, MonadIO m, IsFilenameCompleter a) => a -> Text -> m (Maybe Text)

-- | Gets an array of completion strings for a given initial text.
filenameCompleterGetCompletions :: (HasCallStack, MonadIO m, IsFilenameCompleter a) => a -> Text -> m [Text]

-- | Creates a new filename completer.
filenameCompleterNew :: (HasCallStack, MonadIO m) => m FilenameCompleter

-- | If <i><tt>dirsOnly</tt></i> is <a>True</a>, <i><tt>completer</tt></i>
--   will only complete directory names, and not file names.
--   
--   This function needs to be called before waiting for results from the
--   completer to be populated.
filenameCompleterSetDirsOnly :: (HasCallStack, MonadIO m, IsFilenameCompleter a) => a -> Bool -> m ()

-- | Emitted when the file name completion information comes available.
type FilenameCompleterGotCompletionDataCallback = IO ()

-- | Connect a signal handler for the <a>gotCompletionData</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> filenameCompleter #gotCompletionData callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> ((?self :: a) => FilenameCompleterGotCompletionDataCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>gotCompletionData</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> filenameCompleter #gotCompletionData callback
--   </pre>
onFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> ((?self :: a) => FilenameCompleterGotCompletionDataCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.FilenameCompleter.FilenameCompleter
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FilenameCompleter.FilenameCompleter
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FilenameCompleter.FilenameCompleter
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FilenameCompleter.FilenameCompleter o) => GI.Gio.Objects.FilenameCompleter.IsFilenameCompleter o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FilenameCompleter.FilenameCompleter)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FilenameCompleter.FilenameCompleter
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FilenameCompleter.FilenameCompleter


-- | <tt>GInetAddress</tt> represents an IPv4 or IPv6 internet address. Use
--   <a>resolverLookupByName</a> or <a>resolverLookupByNameAsync</a> to
--   look up the <tt>GInetAddress</tt> for a hostname. Use
--   <a>resolverLookupByAddress</a> or <a>resolverLookupByAddressAsync</a>
--   to look up the hostname for a <tt>GInetAddress</tt>.
--   
--   To actually connect to a remote host, you will need a
--   <a>InetSocketAddress</a> (which includes a <tt>GInetAddress</tt> as
--   well as a port number).
module GI.Gio.Objects.InetAddress

-- | Memory-managed wrapper type.
newtype InetAddress
InetAddress :: ManagedPtr InetAddress -> InetAddress

-- | Type class for types which can be safely cast to <a>InetAddress</a>,
--   for instance with <a>toInetAddress</a>.
class (GObject o, IsDescendantOf InetAddress o) => IsInetAddress o

-- | Cast to <a>InetAddress</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toInetAddress :: (MonadIO m, IsInetAddress o) => o -> m InetAddress

-- | Checks if two <a>InetAddress</a> instances are equal, e.g. the same
--   address.
--   
--   <i>Since: 2.30</i>
inetAddressEqual :: (HasCallStack, MonadIO m, IsInetAddress a, IsInetAddress b) => a -> b -> m Bool

-- | Gets <i><tt>address</tt></i>'s family
--   
--   <i>Since: 2.22</i>
inetAddressGetFamily :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m SocketFamily

-- | Gets the value of <a>InetAddress:flowinfo</a>.
--   
--   <i>Since: 2.86</i>
inetAddressGetFlowinfo :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Word32

-- | Tests whether <i><tt>address</tt></i> is the "any" address for its
--   family.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsAny :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is a link-local address (that
--   is, if it identifies a host on a local network that is not connected
--   to the Internet).
--   
--   <i>Since: 2.22</i>
inetAddressGetIsLinkLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is the loopback address for its
--   family.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsLoopback :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is a global multicast address.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsMcGlobal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is a link-local multicast
--   address.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsMcLinkLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is a node-local multicast
--   address.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsMcNodeLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is an organization-local
--   multicast address.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsMcOrgLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is a site-local multicast
--   address.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsMcSiteLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is a multicast address.
--   
--   <i>Since: 2.22</i>
inetAddressGetIsMulticast :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Tests whether <i><tt>address</tt></i> is a site-local address such as
--   10.0.0.1 (that is, the address identifies a host on a local network
--   that can not be reached directly from the Internet, but which may have
--   outgoing Internet connectivity via a NAT or firewall).
--   
--   <i>Since: 2.22</i>
inetAddressGetIsSiteLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool

-- | Gets the size of the native raw binary address for
--   <i><tt>address</tt></i>. This is the size of the data that you get
--   from <tt><i>g_inet_address_to_bytes()</i></tt>.
--   
--   <i>Since: 2.22</i>
inetAddressGetNativeSize :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m CSize

-- | Gets the value of <a>InetAddress:scopeId</a>.
--   
--   <i>Since: 2.86</i>
inetAddressGetScopeId :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Word32

-- | Creates a <a>InetAddress</a> for the "any" address (unassigned/"don't
--   care") for <i><tt>family</tt></i>.
--   
--   <i>Since: 2.22</i>
inetAddressNewAny :: (HasCallStack, MonadIO m) => SocketFamily -> m InetAddress

-- | Creates a new <a>InetAddress</a> from the given <i><tt>family</tt></i>
--   and <i><tt>bytes</tt></i>. <i><tt>bytes</tt></i> should be 4 bytes for
--   <a>SocketFamilyIpv4</a> and 16 bytes for <a>SocketFamilyIpv6</a>.
--   
--   <i>Since: 2.22</i>
inetAddressNewFromBytes :: (HasCallStack, MonadIO m) => Ptr Word8 -> SocketFamily -> m InetAddress

-- | Creates a new <a>InetAddress</a> from the given
--   <i><tt>family</tt></i>, <i><tt>bytes</tt></i> and
--   <i><tt>scopeId</tt></i>.
--   
--   <i><tt>bytes</tt></i> must be 4 bytes for <a>SocketFamilyIpv4</a> and
--   16 bytes for <a>SocketFamilyIpv6</a>.
--   
--   <i>Since: 2.86</i>
inetAddressNewFromBytesWithIpv6Info :: (HasCallStack, MonadIO m) => Ptr Word8 -> SocketFamily -> Word32 -> Word32 -> m InetAddress

-- | Parses <i><tt>string</tt></i> as an IP address and creates a new
--   <a>InetAddress</a>.
--   
--   If <i><tt>address</tt></i> is an IPv6 address, it can also contain a
--   scope ID (separated from the address by a <tt>%</tt>). Note that
--   currently this behavior is platform specific. This may change in a
--   future release.
--   
--   <i>Since: 2.22</i>
inetAddressNewFromString :: (HasCallStack, MonadIO m) => Text -> m (Maybe InetAddress)

-- | Creates a <a>InetAddress</a> for the loopback address for
--   <i><tt>family</tt></i>.
--   
--   <i>Since: 2.22</i>
inetAddressNewLoopback :: (HasCallStack, MonadIO m) => SocketFamily -> m InetAddress

-- | Converts <i><tt>address</tt></i> to string form.
--   
--   <i>Since: 2.22</i>
inetAddressToString :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>bytes</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructInetAddressBytes :: (IsInetAddress o, MonadIO m) => Ptr () -> m (GValueConstruct o)

-- | Get the value of the “<tt>bytes</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #bytes
--   </pre>
getInetAddressBytes :: (MonadIO m, IsInetAddress o) => o -> m (Ptr ())

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>family</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructInetAddressFamily :: (IsInetAddress o, MonadIO m) => SocketFamily -> m (GValueConstruct o)

-- | Get the value of the “<tt>family</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #family
--   </pre>
getInetAddressFamily :: (MonadIO m, IsInetAddress o) => o -> m SocketFamily

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flowinfo</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructInetAddressFlowinfo :: (IsInetAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>flowinfo</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #flowinfo
--   </pre>
getInetAddressFlowinfo :: (MonadIO m, IsInetAddress o) => o -> m Word32

-- | Get the value of the “<tt>is-any</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isAny
--   </pre>
getInetAddressIsAny :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-link-local</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isLinkLocal
--   </pre>
getInetAddressIsLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-loopback</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isLoopback
--   </pre>
getInetAddressIsLoopback :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-mc-global</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isMcGlobal
--   </pre>
getInetAddressIsMcGlobal :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-mc-link-local</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isMcLinkLocal
--   </pre>
getInetAddressIsMcLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-mc-node-local</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isMcNodeLocal
--   </pre>
getInetAddressIsMcNodeLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-mc-org-local</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isMcOrgLocal
--   </pre>
getInetAddressIsMcOrgLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-mc-site-local</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isMcSiteLocal
--   </pre>
getInetAddressIsMcSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-multicast</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isMulticast
--   </pre>
getInetAddressIsMulticast :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Get the value of the “<tt>is-site-local</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #isSiteLocal
--   </pre>
getInetAddressIsSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>scope-id</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructInetAddressScopeId :: (IsInetAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>scope-id</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddress #scopeId
--   </pre>
getInetAddressScopeId :: (MonadIO m, IsInetAddress o) => o -> m Word32
instance GHC.Classes.Eq GI.Gio.Objects.InetAddress.InetAddress
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InetAddress.InetAddress
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InetAddress.InetAddress
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.InetAddress.InetAddress)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.InetAddress.InetAddress o) => GI.Gio.Objects.InetAddress.IsInetAddress o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.InetAddress.InetAddress
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.InetAddress.InetAddress


-- | <tt>GInetAddressMask</tt> represents a range of IPv4 or IPv6 addresses
--   described by a base address and a length indicating how many bits of
--   the base address are relevant for matching purposes. These are often
--   given in string form. For example, <tt>10.0.0.0/8</tt>, or
--   <tt>fe80::/10</tt>.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Objects.InetAddressMask

-- | Memory-managed wrapper type.
newtype InetAddressMask
InetAddressMask :: ManagedPtr InetAddressMask -> InetAddressMask

-- | Type class for types which can be safely cast to
--   <a>InetAddressMask</a>, for instance with <a>toInetAddressMask</a>.
class (GObject o, IsDescendantOf InetAddressMask o) => IsInetAddressMask o

-- | Cast to <a>InetAddressMask</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toInetAddressMask :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddressMask

-- | Tests if <i><tt>mask</tt></i> and <i><tt>mask2</tt></i> are the same
--   mask.
--   
--   <i>Since: 2.32</i>
inetAddressMaskEqual :: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddressMask b) => a -> b -> m Bool

-- | Gets <i><tt>mask</tt></i>'s base address
--   
--   <i>Since: 2.32</i>
inetAddressMaskGetAddress :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m InetAddress

-- | Gets the <a>SocketFamily</a> of <i><tt>mask</tt></i>'s address
--   
--   <i>Since: 2.32</i>
inetAddressMaskGetFamily :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m SocketFamily

-- | Gets <i><tt>mask</tt></i>'s length
--   
--   <i>Since: 2.32</i>
inetAddressMaskGetLength :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Word32

-- | Tests if <i><tt>address</tt></i> falls within the range described by
--   <i><tt>mask</tt></i>.
--   
--   <i>Since: 2.32</i>
inetAddressMaskMatches :: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddress b) => a -> b -> m Bool

-- | Creates a new <a>InetAddressMask</a> representing all addresses whose
--   first <i><tt>length</tt></i> bits match <i><tt>addr</tt></i>.
--   
--   <i>Since: 2.32</i>
inetAddressMaskNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word32 -> m InetAddressMask

-- | Parses <i><tt>maskString</tt></i> as an IP address and (optional)
--   length, and creates a new <a>InetAddressMask</a>. The length, if
--   present, is delimited by a "/". If it is not present, then the length
--   is assumed to be the full length of the address.
--   
--   <i>Since: 2.32</i>
inetAddressMaskNewFromString :: (HasCallStack, MonadIO m) => Text -> m InetAddressMask

-- | Converts <i><tt>mask</tt></i> back to its corresponding string form.
--   
--   <i>Since: 2.32</i>
inetAddressMaskToString :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Text

-- | Set the value of the “<tt>address</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #address
--   </pre>
clearInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>address</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructInetAddressMaskAddress :: (IsInetAddressMask o, MonadIO m, IsInetAddress a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddressMask #address
--   </pre>
getInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddress

-- | Set the value of the “<tt>address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inetAddressMask [ #address <a>:=</a> value ]
--   </pre>
setInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o, IsInetAddress a) => o -> a -> m ()

-- | Get the value of the “<tt>family</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddressMask #family
--   </pre>
getInetAddressMaskFamily :: (MonadIO m, IsInetAddressMask o) => o -> m SocketFamily

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>length</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructInetAddressMaskLength :: (IsInetAddressMask o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>length</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetAddressMask #length
--   </pre>
getInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> m Word32

-- | Set the value of the “<tt>length</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inetAddressMask [ #length <a>:=</a> value ]
--   </pre>
setInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> Word32 -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.InetAddressMask.InetAddressMask
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InetAddressMask.InetAddressMask
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InetAddressMask.InetAddressMask
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.InetAddressMask.InetAddressMask)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.InetAddressMask.InetAddressMask o) => GI.Gio.Objects.InetAddressMask.IsInetAddressMask o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.InetAddressMask.InetAddressMask
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.InetAddressMask.InetAddressMask


-- | <tt>GListStore</tt> is a simple implementation of <a>ListModel</a>
--   that stores all items in memory.
--   
--   It provides insertions, deletions, and lookups in logarithmic time
--   with a fast path for the common case of iterating the list linearly.
module GI.Gio.Objects.ListStore

-- | Memory-managed wrapper type.
newtype ListStore
ListStore :: ManagedPtr ListStore -> ListStore

-- | Type class for types which can be safely cast to <a>ListStore</a>, for
--   instance with <a>toListStore</a>.
class (GObject o, IsDescendantOf ListStore o) => IsListStore o

-- | Cast to <a>ListStore</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toListStore :: (MonadIO m, IsListStore o) => o -> m ListStore

-- | Appends <i><tt>item</tt></i> to <i><tt>store</tt></i>.
--   <i><tt>item</tt></i> must be of type <a>ListStore:itemType</a>.
--   
--   This function takes a ref on <i><tt>item</tt></i>.
--   
--   Use <a>listStoreSplice</a> to append multiple items at the same time
--   efficiently.
--   
--   <i>Since: 2.44</i>
listStoreAppend :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> m ()

-- | Looks up the given <i><tt>item</tt></i> in the list store by looping
--   over the items until the first occurrence of <i><tt>item</tt></i>. If
--   <i><tt>item</tt></i> was not found, then <i><tt>position</tt></i> will
--   not be set, and this method will return <a>False</a>.
--   
--   If you need to compare the two items with a custom comparison
--   function, use <a>listStoreFindWithEqualFunc</a> with a custom
--   <a>EqualFunc</a> instead.
--   
--   <i>Since: 2.64</i>
listStoreFind :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> m (Bool, Word32)

-- | Looks up the given <i><tt>item</tt></i> in the list store by looping
--   over the items and comparing them with <i><tt>equalFunc</tt></i> until
--   the first occurrence of <i><tt>item</tt></i> which matches. If
--   <i><tt>item</tt></i> was not found, then <i><tt>position</tt></i> will
--   not be set, and this method will return <a>False</a>.
--   
--   <i><tt>item</tt></i> is always passed as second parameter to
--   <i><tt>equalFunc</tt></i>.
--   
--   Since GLib 2.76 it is possible to pass <tt>NULL</tt> for
--   <i><tt>item</tt></i>.
--   
--   <i>Since: 2.64</i>
listStoreFindWithEqualFunc :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Maybe b -> EqualFunc -> m (Bool, Word32)

-- | Like <a>listStoreFindWithEqualFunc</a> but with an additional
--   <i><tt>userData</tt></i> that is passed to <i><tt>equalFunc</tt></i>.
--   
--   <i><tt>item</tt></i> is always passed as second parameter to
--   <i><tt>equalFunc</tt></i>.
--   
--   Since GLib 2.76 it is possible to pass <tt>NULL</tt> for
--   <i><tt>item</tt></i>.
--   
--   <i>Since: 2.74</i>
listStoreFindWithEqualFuncFull :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Maybe b -> EqualFuncFull -> m (Bool, Word32)

-- | Inserts <i><tt>item</tt></i> into <i><tt>store</tt></i> at
--   <i><tt>position</tt></i>. <i><tt>item</tt></i> must be of type
--   <a>ListStore:itemType</a> or derived from it. <i><tt>position</tt></i>
--   must be smaller than the length of the list, or equal to it to append.
--   
--   This function takes a ref on <i><tt>item</tt></i>.
--   
--   Use <a>listStoreSplice</a> to insert multiple items at the same time
--   efficiently.
--   
--   <i>Since: 2.44</i>
listStoreInsert :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Word32 -> b -> m ()

-- | Inserts <i><tt>item</tt></i> into <i><tt>store</tt></i> at a position
--   to be determined by the <i><tt>compareFunc</tt></i>.
--   
--   The list must already be sorted before calling this function or the
--   result is undefined. Usually you would approach this by only ever
--   inserting items by way of this function.
--   
--   This function takes a ref on <i><tt>item</tt></i>.
--   
--   <i>Since: 2.44</i>
listStoreInsertSorted :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> CompareDataFunc -> m Word32

-- | Creates a new <a>ListStore</a> with items of type
--   <i><tt>itemType</tt></i>. <i><tt>itemType</tt></i> must be a subclass
--   of <a>Object</a>.
--   
--   <i>Since: 2.44</i>
listStoreNew :: (HasCallStack, MonadIO m) => GType -> m ListStore

-- | Removes the item from <i><tt>store</tt></i> that is at
--   <i><tt>position</tt></i>. <i><tt>position</tt></i> must be smaller
--   than the current length of the list.
--   
--   Use <a>listStoreSplice</a> to remove multiple items at the same time
--   efficiently.
--   
--   <i>Since: 2.44</i>
listStoreRemove :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> m ()

-- | Removes all items from <i><tt>store</tt></i>.
--   
--   <i>Since: 2.44</i>
listStoreRemoveAll :: (HasCallStack, MonadIO m, IsListStore a) => a -> m ()

-- | Sort the items in <i><tt>store</tt></i> according to
--   <i><tt>compareFunc</tt></i>.
--   
--   <i>Since: 2.46</i>
listStoreSort :: (HasCallStack, MonadIO m, IsListStore a) => a -> CompareDataFunc -> m ()

-- | Changes <i><tt>store</tt></i> by removing <i><tt>nRemovals</tt></i>
--   items and adding <i><tt>nAdditions</tt></i> items to it.
--   <i><tt>additions</tt></i> must contain <i><tt>nAdditions</tt></i>
--   items of type <a>ListStore:itemType</a>. <a>Nothing</a> is not
--   permitted.
--   
--   This function is more efficient than <a>listStoreInsert</a> and
--   <a>listStoreRemove</a>, because it only emits
--   <a>ListModel::itemsChanged</a> once for the change.
--   
--   This function takes a ref on each item in <i><tt>additions</tt></i>.
--   
--   The parameters <i><tt>position</tt></i> and <i><tt>nRemovals</tt></i>
--   must be correct (ie: <i><tt>position</tt></i> +
--   <i><tt>nRemovals</tt></i> must be less than or equal to the length of
--   the list at the time this function is called).
--   
--   <i>Since: 2.44</i>
listStoreSplice :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> Word32 -> [Object] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>item-type</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructListStoreItemType :: (IsListStore o, MonadIO m) => GType -> m (GValueConstruct o)

-- | Get the value of the “<tt>item-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> listStore #itemType
--   </pre>
getListStoreItemType :: (MonadIO m, IsListStore o) => o -> m GType

-- | Get the value of the “<tt>n-items</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> listStore #nItems
--   </pre>
getListStoreNItems :: (MonadIO m, IsListStore o) => o -> m Word32
instance GHC.Classes.Eq GI.Gio.Objects.ListStore.ListStore
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ListStore.ListStore
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ListStore.ListStore
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ListStore.ListStore)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ListStore.ListStore o) => GI.Gio.Objects.ListStore.IsListStore o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ListStore.ListStore
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ListStore.ListStore


-- | <a>MenuAttributeIter</a> is an opaque structure type. You must access
--   it using the functions below.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Objects.MenuAttributeIter

-- | Memory-managed wrapper type.
newtype MenuAttributeIter
MenuAttributeIter :: ManagedPtr MenuAttributeIter -> MenuAttributeIter

-- | Type class for types which can be safely cast to
--   <a>MenuAttributeIter</a>, for instance with
--   <a>toMenuAttributeIter</a>.
class (GObject o, IsDescendantOf MenuAttributeIter o) => IsMenuAttributeIter o

-- | Cast to <a>MenuAttributeIter</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toMenuAttributeIter :: (MonadIO m, IsMenuAttributeIter o) => o -> m MenuAttributeIter

-- | Gets the name of the attribute at the current iterator position, as a
--   string.
--   
--   The iterator is not advanced.
--   
--   <i>Since: 2.32</i>
menuAttributeIterGetName :: (HasCallStack, MonadIO m, IsMenuAttributeIter a) => a -> m Text

-- | This function combines <a>menuAttributeIterNext</a> with
--   <a>menuAttributeIterGetName</a> and <a>menuAttributeIterGetValue</a>.
--   
--   First the iterator is advanced to the next (possibly first) attribute.
--   If that fails, then <a>False</a> is returned and there are no other
--   effects.
--   
--   If successful, <i><tt>name</tt></i> and <i><tt>value</tt></i> are set
--   to the name and value of the attribute that has just been advanced to.
--   At this point, <a>menuAttributeIterGetName</a> and
--   <a>menuAttributeIterGetValue</a> will return the same values again.
--   
--   The value returned in <i><tt>name</tt></i> remains valid for as long
--   as the iterator remains at the current position. The value returned in
--   <i><tt>value</tt></i> must be unreffed using <a>variantUnref</a> when
--   it is no longer in use.
--   
--   <i>Since: 2.32</i>
menuAttributeIterGetNext :: (HasCallStack, MonadIO m, IsMenuAttributeIter a) => a -> m (Bool, Text, GVariant)

-- | Gets the value of the attribute at the current iterator position.
--   
--   The iterator is not advanced.
--   
--   <i>Since: 2.32</i>
menuAttributeIterGetValue :: (HasCallStack, MonadIO m, IsMenuAttributeIter a) => a -> m GVariant

-- | Attempts to advance the iterator to the next (possibly first)
--   attribute.
--   
--   <a>True</a> is returned on success, or <a>False</a> if there are no
--   more attributes.
--   
--   You must call this function when you first acquire the iterator to
--   advance it to the first attribute (and determine if the first
--   attribute exists at all).
--   
--   <i>Since: 2.32</i>
menuAttributeIterNext :: (HasCallStack, MonadIO m, IsMenuAttributeIter a) => a -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter o) => GI.Gio.Objects.MenuAttributeIter.IsMenuAttributeIter o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter


-- | <tt>GMenuModel</tt> represents the contents of a menu — an ordered
--   list of menu items. The items are associated with actions, which can
--   be activated through them. Items can be grouped in sections, and may
--   have submenus associated with them. Both items and sections usually
--   have some representation data, such as labels or icons. The type of
--   the associated action (ie whether it is stateful, and what kind of
--   state it has) can influence the representation of the item.
--   
--   The conceptual model of menus in <tt>GMenuModel</tt> is hierarchical:
--   sections and submenus are again represented by <tt>GMenuModel</tt>s.
--   Menus themselves do not define their own roles. Rather, the role of a
--   particular <tt>GMenuModel</tt> is defined by the item that references
--   it (or, in the case of the ‘root’ menu, is defined by the context in
--   which it is used).
--   
--   As an example, consider the visible portions of this menu:
--   
--   <h2>An example menu</h2>
--   
--   
--   While this kind of deeply nested menu is no longer considered good UI
--   practice, it serves as a good example of the concepts in
--   <tt>GMenuModel</tt>. There are 8 ‘menus’ visible in the screenshot:
--   one menubar, two submenus and 5 sections:
--   
--   <ul>
--   <li>the toplevel menubar (containing 4 items)</li>
--   <li>the View submenu (containing 3 sections)</li>
--   <li>the first section of the View submenu (containing 2 items)</li>
--   <li>the second section of the View submenu (containing 1 item)</li>
--   <li>the final section of the View submenu (containing 1 item)</li>
--   <li>the Highlight Mode submenu (containing 2 sections)</li>
--   <li>the Sources section (containing 2 items)</li>
--   <li>the Markup section (containing 2 items)</li>
--   </ul>
--   
--   The <a>example</a> illustrates the conceptual connection between these
--   8 menus. Each large block in the figure represents a menu and the
--   smaller blocks within the large block represent items in that menu.
--   Some items contain references to other menus.
--   
--   <h2>A menu example</h2>
--   
--   &lt;picture&gt; &lt;source srcset="menu-model-dark.svg"
--   media="(prefers-color-scheme: dark)"&gt; &lt;img
--   src="menu-model-light.svg" alt="menu model"&gt; &lt;/picture&gt;
--   
--   Notice that the separators visible in the <a>example</a> appear
--   nowhere in the <a>menu model</a>. This is because separators are not
--   explicitly represented in the menu model. Instead, a separator is
--   inserted between any two non-empty sections of a menu. Section items
--   can have labels just like any other item. In that case, a display
--   system may show a section header instead of a separator.
--   
--   The motivation for this abstract model of application controls is that
--   modern user interfaces tend to make these controls available outside
--   the application. Examples include global menus, jumplists, dash
--   boards, etc. To support such uses, it is necessary to ‘export’
--   information about actions and their representation in menus, which is
--   exactly what the action group exporter and the menu model exporter do
--   for <a>ActionGroup</a> and <a>MenuModel</a>. The client-side
--   counterparts to make use of the exported information are
--   <a>DBusActionGroup</a> and <a>DBusMenuModel</a>.
--   
--   The API of <tt>GMenuModel</tt> is very generic, with iterators for the
--   attributes and links of an item, see
--   <a>menuModelIterateItemAttributes</a> and
--   <a>menuModelIterateItemLinks</a>. The ‘standard’ attributes and link
--   types have predefined names: <tt>G_MENU_ATTRIBUTE_LABEL</tt>,
--   <tt>G_MENU_ATTRIBUTE_ACTION</tt>, <tt>G_MENU_ATTRIBUTE_TARGET</tt>,
--   <tt>G_MENU_LINK_SECTION</tt> and <tt>G_MENU_LINK_SUBMENU</tt>.
--   
--   Items in a <tt>GMenuModel</tt> represent active controls if they refer
--   to an action that can get activated when the user interacts with the
--   menu item. The reference to the action is encoded by the string ID in
--   the <tt>G_MENU_ATTRIBUTE_ACTION</tt> attribute. An action ID uniquely
--   identifies an action in an action group. Which action group(s) provide
--   actions depends on the context in which the menu model is used. E.g.
--   when the model is exported as the application menu of a
--   <a>`GtkApplication`</a>, actions can be application-wide or
--   window-specific (and thus come from two different action groups). By
--   convention, the application-wide actions have names that start with
--   <tt>app.</tt>, while the names of window-specific actions start with
--   <tt>win.</tt>.
--   
--   While a wide variety of stateful actions is possible, the following is
--   the minimum that is expected to be supported by all users of exported
--   menu information: * an action with no parameter type and no state * an
--   action with no parameter type and boolean state * an action with
--   string parameter type and string state
--   
--   <h2>Stateless</h2>
--   
--   A stateless action typically corresponds to an ordinary menu item.
--   
--   Selecting such a menu item will activate the action (with no
--   parameter).
--   
--   <h2>Boolean State</h2>
--   
--   An action with a boolean state will most typically be used with a
--   ‘toggle’ or ‘switch’ menu item. The state can be set directly, but
--   activating the action (with no parameter) results in the state being
--   toggled.
--   
--   Selecting a toggle menu item will activate the action. The menu item
--   should be rendered as ‘checked’ when the state is true.
--   
--   <h2>String Parameter and State</h2>
--   
--   Actions with string parameters and state will most typically be used
--   to represent an enumerated choice over the items available for a group
--   of radio menu items. Activating the action with a string parameter is
--   equivalent to setting that parameter as the state.
--   
--   Radio menu items, in addition to being associated with the action,
--   will have a target value. Selecting that menu item will result in
--   activation of the action with the target value as the parameter. The
--   menu item should be rendered as ‘selected’ when the state of the
--   action is equal to the target value of the menu item.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Objects.MenuModel

-- | Memory-managed wrapper type.
newtype MenuModel
MenuModel :: ManagedPtr MenuModel -> MenuModel

-- | Type class for types which can be safely cast to <a>MenuModel</a>, for
--   instance with <a>toMenuModel</a>.
class (GObject o, IsDescendantOf MenuModel o) => IsMenuModel o

-- | Cast to <a>MenuModel</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toMenuModel :: (MonadIO m, IsMenuModel o) => o -> m MenuModel

-- | Queries the item at position <i><tt>itemIndex</tt></i> in
--   <i><tt>model</tt></i> for the attribute specified by
--   <i><tt>attribute</tt></i>.
--   
--   If <i><tt>expectedType</tt></i> is non-<a>Nothing</a> then it
--   specifies the expected type of the attribute. If it is <a>Nothing</a>
--   then any type will be accepted.
--   
--   If the attribute exists and matches <i><tt>expectedType</tt></i> (or
--   if the expected type is unspecified) then the value is returned.
--   
--   If the attribute does not exist, or does not match the expected type
--   then <a>Nothing</a> is returned.
--   
--   <i>Since: 2.32</i>
menuModelGetItemAttributeValue :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> Int32 -> Text -> Maybe VariantType -> m (Maybe GVariant)

-- | Queries the item at position <i><tt>itemIndex</tt></i> in
--   <i><tt>model</tt></i> for the link specified by <i><tt>link</tt></i>.
--   
--   If the link exists, the linked <a>MenuModel</a> is returned. If the
--   link does not exist, <a>Nothing</a> is returned.
--   
--   <i>Since: 2.32</i>
menuModelGetItemLink :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> Int32 -> Text -> m (Maybe MenuModel)

-- | Query the number of items in <i><tt>model</tt></i>.
--   
--   <i>Since: 2.32</i>
menuModelGetNItems :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> m Int32

-- | Queries if <i><tt>model</tt></i> is mutable.
--   
--   An immutable <a>MenuModel</a> will never emit the
--   <a>MenuModel::itemsChanged</a> signal. Consumers of the model may make
--   optimisations accordingly.
--   
--   <i>Since: 2.32</i>
menuModelIsMutable :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> m Bool

-- | Requests emission of the <a>MenuModel::itemsChanged</a> signal on
--   <i><tt>model</tt></i>.
--   
--   This function should never be called except by <a>MenuModel</a>
--   subclasses. Any other calls to this function will very likely lead to
--   a violation of the interface of the model.
--   
--   The implementation should update its internal representation of the
--   menu before emitting the signal. The implementation should further
--   expect to receive queries about the new state of the menu (and
--   particularly added menu items) while signal handlers are running.
--   
--   The implementation must dispatch this call directly from a mainloop
--   entry and not in response to calls -- particularly those from the
--   <a>MenuModel</a> API. Said another way: the menu must not change while
--   user code is running without returning to the mainloop.
--   
--   <i>Since: 2.32</i>
menuModelItemsChanged :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> Int32 -> Int32 -> Int32 -> m ()

-- | Creates a <a>MenuAttributeIter</a> to iterate over the attributes of
--   the item at position <i><tt>itemIndex</tt></i> in
--   <i><tt>model</tt></i>.
--   
--   You must free the iterator with <a>objectUnref</a> when you are done.
--   
--   <i>Since: 2.32</i>
menuModelIterateItemAttributes :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> Int32 -> m MenuAttributeIter

-- | Creates a <a>MenuLinkIter</a> to iterate over the links of the item at
--   position <i><tt>itemIndex</tt></i> in <i><tt>model</tt></i>.
--   
--   You must free the iterator with <a>objectUnref</a> when you are done.
--   
--   <i>Since: 2.32</i>
menuModelIterateItemLinks :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> Int32 -> m MenuLinkIter

-- | Emitted when a change has occurred to the menu.
--   
--   The only changes that can occur to a menu is that items are removed or
--   added. Items may not change (except by being removed and added back in
--   the same location). This signal is capable of describing both of those
--   changes (at the same time).
--   
--   The signal means that starting at the index <i><tt>position</tt></i>,
--   <i><tt>removed</tt></i> items were removed and <i><tt>added</tt></i>
--   items were added in their place. If <i><tt>removed</tt></i> is zero
--   then only items were added. If <i><tt>added</tt></i> is zero then only
--   items were removed.
--   
--   As an example, if the menu contains items a, b, c, d (in that order)
--   and the signal (2, 1, 3) occurs then the new composition of the menu
--   will be a, b, _, _, _, d (with each _ representing some new item).
--   
--   Signal handlers may query the model (particularly the added items) and
--   expect to see the results of the modification that is being reported.
--   The signal is emitted after the modification.
type MenuModelItemsChangedCallback = Int32 -> Int32 -> Int32 -> IO ()

-- | Connect a signal handler for the <a>itemsChanged</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> menuModel #itemsChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMenuModelItemsChanged :: (IsMenuModel a, MonadIO m) => a -> ((?self :: a) => MenuModelItemsChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>itemsChanged</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> menuModel #itemsChanged callback
--   </pre>
onMenuModelItemsChanged :: (IsMenuModel a, MonadIO m) => a -> ((?self :: a) => MenuModelItemsChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.MenuModel.MenuModel
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MenuModel.MenuModel
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MenuModel.MenuModel
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.MenuModel.MenuModel)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.MenuModel.MenuModel o) => GI.Gio.Objects.MenuModel.IsMenuModel o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.MenuModel.MenuModel
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.MenuModel.MenuModel


-- | <a>MenuLinkIter</a> is an opaque structure type. You must access it
--   using the functions below.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Objects.MenuLinkIter

-- | Memory-managed wrapper type.
newtype MenuLinkIter
MenuLinkIter :: ManagedPtr MenuLinkIter -> MenuLinkIter

-- | Type class for types which can be safely cast to <a>MenuLinkIter</a>,
--   for instance with <a>toMenuLinkIter</a>.
class (GObject o, IsDescendantOf MenuLinkIter o) => IsMenuLinkIter o

-- | Cast to <a>MenuLinkIter</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toMenuLinkIter :: (MonadIO m, IsMenuLinkIter o) => o -> m MenuLinkIter

-- | Gets the name of the link at the current iterator position.
--   
--   The iterator is not advanced.
--   
--   <i>Since: 2.32</i>
menuLinkIterGetName :: (HasCallStack, MonadIO m, IsMenuLinkIter a) => a -> m Text

-- | This function combines <a>menuLinkIterNext</a> with
--   <a>menuLinkIterGetName</a> and <a>menuLinkIterGetValue</a>.
--   
--   First the iterator is advanced to the next (possibly first) link. If
--   that fails, then <a>False</a> is returned and there are no other
--   effects.
--   
--   If successful, <i><tt>outLink</tt></i> and <i><tt>value</tt></i> are
--   set to the name and <a>MenuModel</a> of the link that has just been
--   advanced to. At this point, <a>menuLinkIterGetName</a> and
--   <a>menuLinkIterGetValue</a> will return the same values again.
--   
--   The value returned in <i><tt>outLink</tt></i> remains valid for as
--   long as the iterator remains at the current position. The value
--   returned in <i><tt>value</tt></i> must be unreffed using
--   <a>objectUnref</a> when it is no longer in use.
--   
--   <i>Since: 2.32</i>
menuLinkIterGetNext :: (HasCallStack, MonadIO m, IsMenuLinkIter a) => a -> m (Bool, Text, MenuModel)

-- | Gets the linked <a>MenuModel</a> at the current iterator position.
--   
--   The iterator is not advanced.
--   
--   <i>Since: 2.32</i>
menuLinkIterGetValue :: (HasCallStack, MonadIO m, IsMenuLinkIter a) => a -> m MenuModel

-- | Attempts to advance the iterator to the next (possibly first) link.
--   
--   <a>True</a> is returned on success, or <a>False</a> if there are no
--   more links.
--   
--   You must call this function when you first acquire the iterator to
--   advance it to the first link (and determine if the first link exists
--   at all).
--   
--   <i>Since: 2.32</i>
menuLinkIterNext :: (HasCallStack, MonadIO m, IsMenuLinkIter a) => a -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.MenuLinkIter.MenuLinkIter
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MenuLinkIter.MenuLinkIter
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MenuLinkIter.MenuLinkIter
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.MenuLinkIter.MenuLinkIter)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.MenuLinkIter.MenuLinkIter o) => GI.Gio.Objects.MenuLinkIter.IsMenuLinkIter o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.MenuLinkIter.MenuLinkIter
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.MenuLinkIter.MenuLinkIter


-- | <a>MenuItem</a> is an opaque structure type. You must access it using
--   the functions below.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Objects.MenuItem

-- | Memory-managed wrapper type.
newtype MenuItem
MenuItem :: ManagedPtr MenuItem -> MenuItem

-- | Type class for types which can be safely cast to <a>MenuItem</a>, for
--   instance with <a>toMenuItem</a>.
class (GObject o, IsDescendantOf MenuItem o) => IsMenuItem o

-- | Cast to <a>MenuItem</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toMenuItem :: (MonadIO m, IsMenuItem o) => o -> m MenuItem

-- | Queries the named <i><tt>attribute</tt></i> on
--   <i><tt>menuItem</tt></i>.
--   
--   If <i><tt>expectedType</tt></i> is specified and the attribute does
--   not have this type, <a>Nothing</a> is returned. <a>Nothing</a> is also
--   returned if the attribute simply does not exist.
--   
--   <i>Since: 2.34</i>
menuItemGetAttributeValue :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> Maybe VariantType -> m (Maybe GVariant)

-- | Queries the named <i><tt>link</tt></i> on <i><tt>menuItem</tt></i>.
--   
--   <i>Since: 2.34</i>
menuItemGetLink :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> m (Maybe MenuModel)

-- | Creates a new <a>MenuItem</a>.
--   
--   If <i><tt>label</tt></i> is non-<a>Nothing</a> it is used to set the
--   "label" attribute of the new item.
--   
--   If <i><tt>detailedAction</tt></i> is non-<a>Nothing</a> it is used to
--   set the "action" and possibly the "target" attribute of the new item.
--   See <a>menuItemSetDetailedAction</a> for more information.
--   
--   <i>Since: 2.32</i>
menuItemNew :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> m MenuItem

-- | Creates a <a>MenuItem</a> as an exact copy of an existing menu item in
--   a <a>MenuModel</a>.
--   
--   <i><tt>itemIndex</tt></i> must be valid (ie: be sure to call
--   <a>menuModelGetNItems</a> first).
--   
--   <i>Since: 2.34</i>
menuItemNewFromModel :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> Int32 -> m MenuItem

-- | Creates a new <a>MenuItem</a> representing a section.
--   
--   This is a convenience API around <a>menuItemNew</a> and
--   <a>menuItemSetSection</a>.
--   
--   The effect of having one menu appear as a section of another is
--   exactly as it sounds: the items from <i><tt>section</tt></i> become a
--   direct part of the menu that <i><tt>menuItem</tt></i> is added to.
--   
--   Visual separation is typically displayed between two non-empty
--   sections. If <i><tt>label</tt></i> is non-<a>Nothing</a> then it will
--   be incorporated into this visual indication. This allows for labeled
--   subsections of a menu.
--   
--   As a simple example, consider a typical "Edit" menu from a simple
--   program. It probably contains an "Undo" and "Redo" item, followed by a
--   separator, followed by "Cut", "Copy" and "Paste".
--   
--   This would be accomplished by creating three <a>Menu</a> instances.
--   The first would be populated with the "Undo" and "Redo" items, and the
--   second with the "Cut", "Copy" and "Paste" items. The first and second
--   menus would then be added as submenus of the third. In XML format,
--   this would look something like the following:
--   
--   <pre>
--   &lt;menu id='edit-menu'&gt;
--     &lt;section&gt;
--       &lt;item label='Undo'/&gt;
--       &lt;item label='Redo'/&gt;
--     &lt;/section&gt;
--     &lt;section&gt;
--       &lt;item label='Cut'/&gt;
--       &lt;item label='Copy'/&gt;
--       &lt;item label='Paste'/&gt;
--     &lt;/section&gt;
--   &lt;/menu&gt;
--   </pre>
--   
--   The following example is exactly equivalent. It is more illustrative
--   of the exact relationship between the menus and items (keeping in mind
--   that the 'link' element defines a new menu that is linked to the
--   containing one). The style of the second example is more verbose and
--   difficult to read (and therefore not recommended except for the
--   purpose of understanding what is really going on).
--   
--   <pre>
--   &lt;menu id='edit-menu'&gt;
--     &lt;item&gt;
--       &lt;link name='section'&gt;
--         &lt;item label='Undo'/&gt;
--         &lt;item label='Redo'/&gt;
--       &lt;/link&gt;
--     &lt;/item&gt;
--     &lt;item&gt;
--       &lt;link name='section'&gt;
--         &lt;item label='Cut'/&gt;
--         &lt;item label='Copy'/&gt;
--         &lt;item label='Paste'/&gt;
--       &lt;/link&gt;
--     &lt;/item&gt;
--   &lt;/menu&gt;
--   </pre>
--   
--   <i>Since: 2.32</i>
menuItemNewSection :: (HasCallStack, MonadIO m, IsMenuModel a) => Maybe Text -> a -> m MenuItem

-- | Creates a new <a>MenuItem</a> representing a submenu.
--   
--   This is a convenience API around <a>menuItemNew</a> and
--   <a>menuItemSetSubmenu</a>.
--   
--   <i>Since: 2.32</i>
menuItemNewSubmenu :: (HasCallStack, MonadIO m, IsMenuModel a) => Maybe Text -> a -> m MenuItem

-- | Sets or unsets the "action" and "target" attributes of
--   <i><tt>menuItem</tt></i>.
--   
--   If <i><tt>action</tt></i> is <a>Nothing</a> then both the "action" and
--   "target" attributes are unset (and <i><tt>targetValue</tt></i> is
--   ignored).
--   
--   If <i><tt>action</tt></i> is non-<a>Nothing</a> then the "action"
--   attribute is set. The "target" attribute is then set to the value of
--   <i><tt>targetValue</tt></i> if it is non-<a>Nothing</a> or unset
--   otherwise.
--   
--   Normal menu items (ie: not submenu, section or other custom item
--   types) are expected to have the "action" attribute set to identify the
--   action that they are associated with. The state type of the action
--   help to determine the disposition of the menu item. See <a>Action</a>
--   and <a>ActionGroup</a> for an overview of actions.
--   
--   In general, clicking on the menu item will result in activation of the
--   named action with the "target" attribute given as the parameter to the
--   action invocation. If the "target" attribute is not set then the
--   action is invoked with no parameter.
--   
--   If the action has no state then the menu item is usually drawn as a
--   plain menu item (ie: with no additional decoration).
--   
--   If the action has a boolean state then the menu item is usually drawn
--   as a toggle menu item (ie: with a checkmark or equivalent indication).
--   The item should be marked as 'toggled' or 'checked' when the boolean
--   state is <a>True</a>.
--   
--   If the action has a string state then the menu item is usually drawn
--   as a radio menu item (ie: with a radio bullet or equivalent
--   indication). The item should be marked as 'selected' when the string
--   state is equal to the value of the <i><tt>target</tt></i> property.
--   
--   See <tt><i>g_menu_item_set_action_and_target()</i></tt> or
--   <a>menuItemSetDetailedAction</a> for two equivalent calls that are
--   probably more convenient for most uses.
--   
--   <i>Since: 2.32</i>
menuItemSetActionAndTargetValue :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Maybe Text -> Maybe GVariant -> m ()

-- | Sets or unsets an attribute on <i><tt>menuItem</tt></i>.
--   
--   The attribute to set or unset is specified by
--   <i><tt>attribute</tt></i>. This can be one of the standard attribute
--   names <a>MENU_ATTRIBUTE_LABEL</a>, <a>MENU_ATTRIBUTE_ACTION</a>,
--   <a>MENU_ATTRIBUTE_TARGET</a>, or a custom attribute name. Attribute
--   names are restricted to lowercase characters, numbers and '-'.
--   Furthermore, the names must begin with a lowercase character, must not
--   end with a '-', and must not contain consecutive dashes.
--   
--   must consist only of lowercase ASCII characters, digits and '-'.
--   
--   If <i><tt>value</tt></i> is non-<a>Nothing</a> then it is used as the
--   new value for the attribute. If <i><tt>value</tt></i> is
--   <a>Nothing</a> then the attribute is unset. If the
--   <i><tt>value</tt></i> <a>GVariant</a> is floating, it is consumed.
--   
--   See also <tt><i>g_menu_item_set_attribute()</i></tt> for a more
--   convenient way to do the same.
--   
--   <i>Since: 2.32</i>
menuItemSetAttributeValue :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> Maybe GVariant -> m ()

-- | Sets the "action" and possibly the "target" attribute of
--   <i><tt>menuItem</tt></i>.
--   
--   The format of <i><tt>detailedAction</tt></i> is the same format parsed
--   by <a>actionParseDetailedName</a>.
--   
--   See <tt><i>g_menu_item_set_action_and_target()</i></tt> or
--   <a>menuItemSetActionAndTargetValue</a> for more flexible (but slightly
--   less convenient) alternatives.
--   
--   See also <a>menuItemSetActionAndTargetValue</a> for a description of
--   the semantics of the action and target attributes.
--   
--   <i>Since: 2.32</i>
menuItemSetDetailedAction :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> m ()

-- | Sets (or unsets) the icon on <i><tt>menuItem</tt></i>.
--   
--   This call is the same as calling <a>iconSerialize</a> and using the
--   result as the value to <a>menuItemSetAttributeValue</a> for
--   <a>MENU_ATTRIBUTE_ICON</a>.
--   
--   This API is only intended for use with "noun" menu items; things like
--   bookmarks or applications in an "Open With" menu. Don't use it on menu
--   items corresponding to verbs (eg: stock icons for 'Save' or 'Quit').
--   
--   If <i><tt>icon</tt></i> is <a>Nothing</a> then the icon is unset.
--   
--   <i>Since: 2.38</i>
menuItemSetIcon :: (HasCallStack, MonadIO m, IsMenuItem a, IsIcon b) => a -> b -> m ()

-- | Sets or unsets the "label" attribute of <i><tt>menuItem</tt></i>.
--   
--   If <i><tt>label</tt></i> is non-<a>Nothing</a> it is used as the label
--   for the menu item. If it is <a>Nothing</a> then the label attribute is
--   unset.
--   
--   <i>Since: 2.32</i>
menuItemSetLabel :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Maybe Text -> m ()

-- | Creates a link from <i><tt>menuItem</tt></i> to <i><tt>model</tt></i>
--   if non-<a>Nothing</a>, or unsets it.
--   
--   Links are used to establish a relationship between a particular menu
--   item and another menu. For example, <a>MENU_LINK_SUBMENU</a> is used
--   to associate a submenu with a particular menu item, and
--   <a>MENU_LINK_SECTION</a> is used to create a section. Other types of
--   link can be used, but there is no guarantee that clients will be able
--   to make sense of them. Link types are restricted to lowercase
--   characters, numbers and '-'. Furthermore, the names must begin with a
--   lowercase character, must not end with a '-', and must not contain
--   consecutive dashes.
--   
--   <i>Since: 2.32</i>
menuItemSetLink :: (HasCallStack, MonadIO m, IsMenuItem a, IsMenuModel b) => a -> Text -> Maybe b -> m ()

-- | Sets or unsets the "section" link of <i><tt>menuItem</tt></i> to
--   <i><tt>section</tt></i>.
--   
--   The effect of having one menu appear as a section of another is
--   exactly as it sounds: the items from <i><tt>section</tt></i> become a
--   direct part of the menu that <i><tt>menuItem</tt></i> is added to. See
--   <a>menuItemNewSection</a> for more information about what it means for
--   a menu item to be a section.
--   
--   <i>Since: 2.32</i>
menuItemSetSection :: (HasCallStack, MonadIO m, IsMenuItem a, IsMenuModel b) => a -> Maybe b -> m ()

-- | Sets or unsets the "submenu" link of <i><tt>menuItem</tt></i> to
--   <i><tt>submenu</tt></i>.
--   
--   If <i><tt>submenu</tt></i> is non-<a>Nothing</a>, it is linked to. If
--   it is <a>Nothing</a> then the link is unset.
--   
--   The effect of having one menu appear as a submenu of another is
--   exactly as it sounds.
--   
--   <i>Since: 2.32</i>
menuItemSetSubmenu :: (HasCallStack, MonadIO m, IsMenuItem a, IsMenuModel b) => a -> Maybe b -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.MenuItem.MenuItem
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MenuItem.MenuItem
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MenuItem.MenuItem
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.MenuItem.MenuItem)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.MenuItem.MenuItem o) => GI.Gio.Objects.MenuItem.IsMenuItem o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.MenuItem.MenuItem
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.MenuItem.MenuItem


-- | <tt>GMenu</tt> is a simple implementation of <a>MenuModel</a>. You
--   populate a <tt>GMenu</tt> by adding <a>MenuItem</a> instances to it.
--   
--   There are some convenience functions to allow you to directly add
--   items (avoiding <a>MenuItem</a>) for the common cases. To add a
--   regular item, use <a>menuInsert</a>. To add a section, use
--   <a>menuInsertSection</a>. To add a submenu, use
--   <a>menuInsertSubmenu</a>.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Objects.Menu

-- | Memory-managed wrapper type.
newtype Menu
Menu :: ManagedPtr Menu -> Menu

-- | Type class for types which can be safely cast to <a>Menu</a>, for
--   instance with <a>toMenu</a>.
class (GObject o, IsDescendantOf Menu o) => IsMenu o

-- | Cast to <a>Menu</a>, for types for which this is known to be safe. For
--   general casts, use <a>castTo</a>.
toMenu :: (MonadIO m, IsMenu o) => o -> m Menu

-- | Convenience function for appending a normal menu item to the end of
--   <i><tt>menu</tt></i>. Combine <a>menuItemNew</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuAppend :: (HasCallStack, MonadIO m, IsMenu a) => a -> Maybe Text -> Maybe Text -> m ()

-- | Appends <i><tt>item</tt></i> to the end of <i><tt>menu</tt></i>.
--   
--   See <a>menuInsertItem</a> for more information.
--   
--   <i>Since: 2.32</i>
menuAppendItem :: (HasCallStack, MonadIO m, IsMenu a, IsMenuItem b) => a -> b -> m ()

-- | Convenience function for appending a section menu item to the end of
--   <i><tt>menu</tt></i>. Combine <a>menuItemNewSection</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuAppendSection :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Maybe Text -> b -> m ()

-- | Convenience function for appending a submenu menu item to the end of
--   <i><tt>menu</tt></i>. Combine <a>menuItemNewSubmenu</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuAppendSubmenu :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Maybe Text -> b -> m ()

-- | Marks <i><tt>menu</tt></i> as frozen.
--   
--   After the menu is frozen, it is an error to attempt to make any
--   changes to it. In effect this means that the <a>Menu</a> API must no
--   longer be used.
--   
--   This function causes <a>menuModelIsMutable</a> to begin returning
--   <a>False</a>, which has some positive performance implications.
--   
--   <i>Since: 2.32</i>
menuFreeze :: (HasCallStack, MonadIO m, IsMenu a) => a -> m ()

-- | Convenience function for inserting a normal menu item into
--   <i><tt>menu</tt></i>. Combine <a>menuItemNew</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuInsert :: (HasCallStack, MonadIO m, IsMenu a) => a -> Int32 -> Maybe Text -> Maybe Text -> m ()

-- | Inserts <i><tt>item</tt></i> into <i><tt>menu</tt></i>.
--   
--   The "insertion" is actually done by copying all of the attribute and
--   link values of <i><tt>item</tt></i> and using them to form a new item
--   within <i><tt>menu</tt></i>. As such, <i><tt>item</tt></i> itself is
--   not really inserted, but rather, a menu item that is exactly the same
--   as the one presently described by <i><tt>item</tt></i>.
--   
--   This means that <i><tt>item</tt></i> is essentially useless after the
--   insertion occurs. Any changes you make to it are ignored unless it is
--   inserted again (at which point its updated values will be copied).
--   
--   You should probably just free <i><tt>item</tt></i> once you're done.
--   
--   There are many convenience functions to take care of common cases. See
--   <a>menuInsert</a>, <a>menuInsertSection</a> and
--   <a>menuInsertSubmenu</a> as well as "prepend" and "append" variants of
--   each of these functions.
--   
--   <i>Since: 2.32</i>
menuInsertItem :: (HasCallStack, MonadIO m, IsMenu a, IsMenuItem b) => a -> Int32 -> b -> m ()

-- | Convenience function for inserting a section menu item into
--   <i><tt>menu</tt></i>. Combine <a>menuItemNewSection</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuInsertSection :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Int32 -> Maybe Text -> b -> m ()

-- | Convenience function for inserting a submenu menu item into
--   <i><tt>menu</tt></i>. Combine <a>menuItemNewSubmenu</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuInsertSubmenu :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Int32 -> Maybe Text -> b -> m ()

-- | Creates a new <a>Menu</a>.
--   
--   The new menu has no items.
--   
--   <i>Since: 2.32</i>
menuNew :: (HasCallStack, MonadIO m) => m Menu

-- | Convenience function for prepending a normal menu item to the start of
--   <i><tt>menu</tt></i>. Combine <a>menuItemNew</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuPrepend :: (HasCallStack, MonadIO m, IsMenu a) => a -> Maybe Text -> Maybe Text -> m ()

-- | Prepends <i><tt>item</tt></i> to the start of <i><tt>menu</tt></i>.
--   
--   See <a>menuInsertItem</a> for more information.
--   
--   <i>Since: 2.32</i>
menuPrependItem :: (HasCallStack, MonadIO m, IsMenu a, IsMenuItem b) => a -> b -> m ()

-- | Convenience function for prepending a section menu item to the start
--   of <i><tt>menu</tt></i>. Combine <a>menuItemNewSection</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuPrependSection :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Maybe Text -> b -> m ()

-- | Convenience function for prepending a submenu menu item to the start
--   of <i><tt>menu</tt></i>. Combine <a>menuItemNewSubmenu</a> and
--   <a>menuInsertItem</a> for a more flexible alternative.
--   
--   <i>Since: 2.32</i>
menuPrependSubmenu :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Maybe Text -> b -> m ()

-- | Removes an item from the menu.
--   
--   <i><tt>position</tt></i> gives the index of the item to remove.
--   
--   It is an error if position is not in range the range from 0 to one
--   less than the number of items in the menu.
--   
--   It is not possible to remove items by identity since items are added
--   to the menu simply by copying their links and attributes (ie: identity
--   of the item itself is not preserved).
--   
--   <i>Since: 2.32</i>
menuRemove :: (HasCallStack, MonadIO m, IsMenu a) => a -> Int32 -> m ()

-- | Removes all items in the menu.
--   
--   <i>Since: 2.38</i>
menuRemoveAll :: (HasCallStack, MonadIO m, IsMenu a) => a -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.Menu.Menu
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Menu.Menu
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Menu.Menu
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Menu.Menu)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Menu.Menu o) => GI.Gio.Objects.Menu.IsMenu o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Menu.Menu
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Menu.Menu


-- | <tt>GMountOperation</tt> provides a mechanism for interacting with the
--   user. It can be used for authenticating mountable operations, such as
--   loop mounting files, hard drive partitions or server locations. It can
--   also be used to ask the user questions or show a list of applications
--   preventing unmount or eject operations from completing.
--   
--   Note that <tt>GMountOperation</tt> is used for more than just
--   <a>Mount</a> objects – for example it is also used in
--   <a>driveStart</a> and <a>driveStop</a>.
--   
--   Users should instantiate a subclass of this that implements all the
--   various callbacks to show the required dialogs, such as
--   <a>`GtkMountOperation`</a>. If no user interaction is desired (for
--   example when automounting filesystems at login time), usually
--   <tt>NULL</tt> can be passed, see each method taking a
--   <tt>GMountOperation</tt> for details.
--   
--   Throughout the API, the term ‘TCRYPT’ is used to mean ‘compatible with
--   TrueCrypt and VeraCrypt’. <a>TrueCrypt</a> is a discontinued system
--   for encrypting file containers, partitions or whole disks, typically
--   used with Windows. <a>VeraCrypt</a> is a maintained fork of TrueCrypt
--   with various improvements and auditing fixes.
module GI.Gio.Objects.MountOperation

-- | Memory-managed wrapper type.
newtype MountOperation
MountOperation :: ManagedPtr MountOperation -> MountOperation

-- | Type class for types which can be safely cast to
--   <a>MountOperation</a>, for instance with <a>toMountOperation</a>.
class (GObject o, IsDescendantOf MountOperation o) => IsMountOperation o

-- | Cast to <a>MountOperation</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toMountOperation :: (MonadIO m, IsMountOperation o) => o -> m MountOperation

-- | Check to see whether the mount operation is being used for an
--   anonymous user.
mountOperationGetAnonymous :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool

-- | Gets a choice from the mount operation.
mountOperationGetChoice :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Int32

-- | Gets the domain of the mount operation.
mountOperationGetDomain :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m (Maybe Text)

-- | Check to see whether the mount operation is being used for a TCRYPT
--   hidden volume.
--   
--   <i>Since: 2.58</i>
mountOperationGetIsTcryptHiddenVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool

-- | Check to see whether the mount operation is being used for a TCRYPT
--   system volume.
--   
--   <i>Since: 2.58</i>
mountOperationGetIsTcryptSystemVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool

-- | Gets a password from the mount operation.
mountOperationGetPassword :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m (Maybe Text)

-- | Gets the state of saving passwords for the mount operation.
mountOperationGetPasswordSave :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m PasswordSave

-- | Gets a PIM from the mount operation.
--   
--   <i>Since: 2.58</i>
mountOperationGetPim :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Word32

-- | Get the user name from the mount operation.
mountOperationGetUsername :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m (Maybe Text)

-- | Creates a new mount operation.
mountOperationNew :: (HasCallStack, MonadIO m) => m MountOperation

-- | Emits the <a>MountOperation::reply</a> signal.
mountOperationReply :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> MountOperationResult -> m ()

-- | Sets the mount operation to use an anonymous user if
--   <i><tt>anonymous</tt></i> is <a>True</a>.
mountOperationSetAnonymous :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m ()

-- | Sets a default choice for the mount operation.
mountOperationSetChoice :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Int32 -> m ()

-- | Sets the mount operation's domain.
mountOperationSetDomain :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Maybe Text -> m ()

-- | Sets the mount operation to use a hidden volume if
--   <i><tt>hiddenVolume</tt></i> is <a>True</a>.
--   
--   <i>Since: 2.58</i>
mountOperationSetIsTcryptHiddenVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m ()

-- | Sets the mount operation to use a system volume if
--   <i><tt>systemVolume</tt></i> is <a>True</a>.
--   
--   <i>Since: 2.58</i>
mountOperationSetIsTcryptSystemVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m ()

-- | Sets the mount operation's password to <i><tt>password</tt></i>.
mountOperationSetPassword :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Maybe Text -> m ()

-- | Sets the state of saving passwords for the mount operation.
mountOperationSetPasswordSave :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> PasswordSave -> m ()

-- | Sets the mount operation's PIM to <i><tt>pim</tt></i>.
--   
--   <i>Since: 2.58</i>
mountOperationSetPim :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Word32 -> m ()

-- | Sets the user name within <i><tt>op</tt></i> to
--   <i><tt>username</tt></i>.
mountOperationSetUsername :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Maybe Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>anonymous</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructMountOperationAnonymous :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>anonymous</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #anonymous
--   </pre>
getMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> m Bool

-- | Set the value of the “<tt>anonymous</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #anonymous <a>:=</a> value ]
--   </pre>
setMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>choice</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructMountOperationChoice :: (IsMountOperation o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>choice</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #choice
--   </pre>
getMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> m Int32

-- | Set the value of the “<tt>choice</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #choice <a>:=</a> value ]
--   </pre>
setMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> Int32 -> m ()

-- | Set the value of the “<tt>domain</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #domain
--   </pre>
clearMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>domain</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructMountOperationDomain :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>domain</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #domain
--   </pre>
getMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>domain</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #domain <a>:=</a> value ]
--   </pre>
setMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>is-tcrypt-hidden-volume</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructMountOperationIsTcryptHiddenVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>is-tcrypt-hidden-volume</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #isTcryptHiddenVolume
--   </pre>
getMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool

-- | Set the value of the “<tt>is-tcrypt-hidden-volume</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #isTcryptHiddenVolume <a>:=</a> value ]
--   </pre>
setMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>is-tcrypt-system-volume</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructMountOperationIsTcryptSystemVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>is-tcrypt-system-volume</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #isTcryptSystemVolume
--   </pre>
getMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool

-- | Set the value of the “<tt>is-tcrypt-system-volume</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #isTcryptSystemVolume <a>:=</a> value ]
--   </pre>
setMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m ()

-- | Set the value of the “<tt>password</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #password
--   </pre>
clearMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>password</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructMountOperationPassword :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>password</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #password
--   </pre>
getMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>password</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #password <a>:=</a> value ]
--   </pre>
setMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>password-save</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructMountOperationPasswordSave :: (IsMountOperation o, MonadIO m) => PasswordSave -> m (GValueConstruct o)

-- | Get the value of the “<tt>password-save</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #passwordSave
--   </pre>
getMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> m PasswordSave

-- | Set the value of the “<tt>password-save</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #passwordSave <a>:=</a> value ]
--   </pre>
setMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> PasswordSave -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>pim</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructMountOperationPim :: (IsMountOperation o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>pim</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #pim
--   </pre>
getMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> m Word32

-- | Set the value of the “<tt>pim</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #pim <a>:=</a> value ]
--   </pre>
setMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> Word32 -> m ()

-- | Set the value of the “<tt>username</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #username
--   </pre>
clearMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>username</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructMountOperationUsername :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>username</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> mountOperation #username
--   </pre>
getMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>username</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> mountOperation [ #username <a>:=</a> value ]
--   </pre>
setMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()

-- | Emitted by the backend when e.g. a device becomes unavailable while a
--   mount operation is in progress.
--   
--   Implementations of GMountOperation should handle this signal by
--   dismissing open password dialogs.
--   
--   <i>Since: 2.20</i>
type MountOperationAbortedCallback = IO ()

-- | Connect a signal handler for the <a>aborted</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> mountOperation #aborted callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAbortedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>aborted</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> mountOperation #aborted callback
--   </pre>
onMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAbortedCallback) -> m SignalHandlerId

-- | Emitted when a mount operation asks the user for a password.
--   
--   If the message contains a line break, the first line should be
--   presented as a heading. For example, it may be used as the primary
--   text in a <tt><i>GtkMessageDialog</i></tt>.
type MountOperationAskPasswordCallback = Text -> Text -> Text -> [AskPasswordFlags] -> IO ()

-- | Connect a signal handler for the <a>askPassword</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> mountOperation #askPassword callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskPasswordCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>askPassword</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> mountOperation #askPassword callback
--   </pre>
onMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskPasswordCallback) -> m SignalHandlerId

-- | Emitted when asking the user a question and gives a list of choices
--   for the user to choose from.
--   
--   If the message contains a line break, the first line should be
--   presented as a heading. For example, it may be used as the primary
--   text in a <tt><i>GtkMessageDialog</i></tt>.
type MountOperationAskQuestionCallback = Text -> [Text] -> IO ()

-- | Connect a signal handler for the <a>askQuestion</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> mountOperation #askQuestion callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskQuestionCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>askQuestion</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> mountOperation #askQuestion callback
--   </pre>
onMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskQuestionCallback) -> m SignalHandlerId

-- | Emitted when the user has replied to the mount operation.
type MountOperationReplyCallback = MountOperationResult -> IO ()

-- | Connect a signal handler for the <a>reply</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> mountOperation #reply callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationReplyCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>reply</a> signal, to be run before
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>on</a> mountOperation #reply callback
--   </pre>
onMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationReplyCallback) -> m SignalHandlerId

-- | Emitted when one or more processes are blocking an operation e.g.
--   unmounting/ejecting a <a>Mount</a> or stopping a <a>Drive</a>.
--   
--   Note that this signal may be emitted several times to update the list
--   of blocking processes as processes close files. The application should
--   only respond with <a>mountOperationReply</a> to the latest signal
--   (setting <a>MountOperation:choice</a> to the choice the user made).
--   
--   If the message contains a line break, the first line should be
--   presented as a heading. For example, it may be used as the primary
--   text in a <tt><i>GtkMessageDialog</i></tt>.
--   
--   <i>Since: 2.22</i>
type MountOperationShowProcessesCallback = Text -> [Int32] -> [Text] -> IO ()

-- | Connect a signal handler for the <a>showProcesses</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> mountOperation #showProcesses callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowProcessesCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>showProcesses</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> mountOperation #showProcesses callback
--   </pre>
onMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowProcessesCallback) -> m SignalHandlerId

-- | Emitted when an unmount operation has been busy for more than some
--   time (typically 1.5 seconds).
--   
--   When unmounting or ejecting a volume, the kernel might need to flush
--   pending data in its buffers to the volume stable storage, and this
--   operation can take a considerable amount of time. This signal may be
--   emitted several times as long as the unmount operation is outstanding,
--   and then one last time when the operation is completed, with
--   <i><tt>bytesLeft</tt></i> set to zero.
--   
--   Implementations of GMountOperation should handle this signal by
--   showing an UI notification, and then dismiss it, or show another
--   notification of completion, when <i><tt>bytesLeft</tt></i> reaches
--   zero.
--   
--   If the message contains a line break, the first line should be
--   presented as a heading. For example, it may be used as the primary
--   text in a <tt><i>GtkMessageDialog</i></tt>.
--   
--   <i>Since: 2.34</i>
type MountOperationShowUnmountProgressCallback = Text -> Int64 -> Int64 -> IO ()

-- | Connect a signal handler for the <a>showUnmountProgress</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> mountOperation #showUnmountProgress callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowUnmountProgressCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>showUnmountProgress</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> mountOperation #showUnmountProgress callback
--   </pre>
onMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowUnmountProgressCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.MountOperation.MountOperation
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MountOperation.MountOperation
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MountOperation.MountOperation
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.MountOperation.MountOperation)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.MountOperation.MountOperation o) => GI.Gio.Objects.MountOperation.IsMountOperation o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.MountOperation.MountOperation
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.MountOperation.MountOperation


-- | <tt>GNotification</tt> is a mechanism for creating a notification to
--   be shown to the user — typically as a pop-up notification presented by
--   the desktop environment shell.
--   
--   The key difference between <tt>GNotification</tt> and other similar
--   APIs is that, if supported by the desktop environment, notifications
--   sent with <tt>GNotification</tt> will persist after the application
--   has exited, and even across system reboots.
--   
--   Since the user may click on a notification while the application is
--   not running, applications using <tt>GNotification</tt> should be able
--   to be started as a D-Bus service, using <a>Application</a>.
--   
--   In order for <tt>GNotification</tt> to work, the application must have
--   installed a <tt>.desktop</tt> file. For example:
--   
--   <pre>
--   [Desktop Entry]
--   Name=Test Application
--   Comment=Description of what Test Application does
--   Exec=gnome-test-application
--   Icon=org.gnome.TestApplication
--   Terminal=false
--   Type=Application
--   Categories=GNOME;GTK;TestApplication Category;
--   StartupNotify=true
--   DBusActivatable=true
--   X-GNOME-UsesNotifications=true
--   </pre>
--   
--   The <tt>X-GNOME-UsesNotifications</tt> key indicates to GNOME Control
--   Center that this application uses notifications, so it can be listed
--   in the Control Center’s ‘Notifications’ panel.
--   
--   The <tt>.desktop</tt> file must be named as
--   <tt>org.gnome.TestApplication.desktop</tt>, where
--   <tt>org.gnome.TestApplication</tt> is the ID passed to
--   <a>applicationNew</a>.
--   
--   User interaction with a notification (either the default action, or
--   buttons) must be associated with actions on the application (ie:
--   <tt>app.</tt> actions). It is not possible to route user interaction
--   through the notification itself, because the object will not exist if
--   the application is autostarted as a result of a notification being
--   clicked.
--   
--   A notification can be sent with <a>applicationSendNotification</a>.
--   
--   In Windows, notification actions are unsupported, when sending the
--   notification a warning will be printed if a default action or action
--   buttons were added.
--   
--   <i>Since: 2.40</i>
module GI.Gio.Objects.Notification

-- | Memory-managed wrapper type.
newtype Notification
Notification :: ManagedPtr Notification -> Notification

-- | Type class for types which can be safely cast to <a>Notification</a>,
--   for instance with <a>toNotification</a>.
class (GObject o, IsDescendantOf Notification o) => IsNotification o

-- | Cast to <a>Notification</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toNotification :: (MonadIO m, IsNotification o) => o -> m Notification

-- | Adds a button to <i><tt>notification</tt></i> that activates the
--   action in <i><tt>detailedAction</tt></i> when clicked. That action
--   must be an application-wide action (starting with "app."). If
--   <i><tt>detailedAction</tt></i> contains a target, the action will be
--   activated with that target as its parameter.
--   
--   See <a>actionParseDetailedName</a> for a description of the format for
--   <i><tt>detailedAction</tt></i>.
--   
--   <i>Since: 2.40</i>
notificationAddButton :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> m ()

-- | Adds a button to <i><tt>notification</tt></i> that activates
--   <i><tt>action</tt></i> when clicked. <i><tt>action</tt></i> must be an
--   application-wide action (it must start with "app.").
--   
--   If <i><tt>target</tt></i> is non-<a>Nothing</a>,
--   <i><tt>action</tt></i> will be activated with <i><tt>target</tt></i>
--   as its parameter.
--   
--   <i>Since: 2.40</i>
notificationAddButtonWithTarget :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> Maybe GVariant -> m ()

-- | Creates a new <a>Notification</a> with <i><tt>title</tt></i> as its
--   title.
--   
--   After populating <i><tt>notification</tt></i> with more details, it
--   can be sent to the desktop shell with
--   <a>applicationSendNotification</a>. Changing any properties after this
--   call will not have any effect until resending
--   <i><tt>notification</tt></i>.
--   
--   <i>Since: 2.40</i>
notificationNew :: (HasCallStack, MonadIO m) => Text -> m Notification

-- | Sets the body of <i><tt>notification</tt></i> to <i><tt>body</tt></i>.
--   
--   <i>Since: 2.40</i>
notificationSetBody :: (HasCallStack, MonadIO m, IsNotification a) => a -> Maybe Text -> m ()

-- | Sets the type of <i><tt>notification</tt></i> to
--   <i><tt>category</tt></i>. Categories have a main type like
--   <tt>email</tt>, <tt>im</tt> or <tt>device</tt> and can have a detail
--   separated by a <tt>.</tt>, e.g. <tt>im.received</tt> or
--   <tt>email.arrived</tt>. Setting the category helps the notification
--   server to select proper feedback to the user.
--   
--   Standard categories are <a>listed in the specification</a>.
--   
--   <i>Since: 2.70</i>
notificationSetCategory :: (HasCallStack, MonadIO m, IsNotification a) => a -> Maybe Text -> m ()

-- | Sets the default action of <i><tt>notification</tt></i> to
--   <i><tt>detailedAction</tt></i>. This action is activated when the
--   notification is clicked on.
--   
--   The action in <i><tt>detailedAction</tt></i> must be an
--   application-wide action (it must start with "app."). If
--   <i><tt>detailedAction</tt></i> contains a target, the given action
--   will be activated with that target as its parameter. See
--   <a>actionParseDetailedName</a> for a description of the format for
--   <i><tt>detailedAction</tt></i>.
--   
--   When no default action is set, the application that the notification
--   was sent on is activated.
--   
--   <i>Since: 2.40</i>
notificationSetDefaultAction :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()

-- | Sets the default action of <i><tt>notification</tt></i> to
--   <i><tt>action</tt></i>. This action is activated when the notification
--   is clicked on. It must be an application-wide action (start with
--   "app.").
--   
--   If <i><tt>target</tt></i> is non-<a>Nothing</a>,
--   <i><tt>action</tt></i> will be activated with <i><tt>target</tt></i>
--   as its parameter. If <i><tt>target</tt></i> is floating, it will be
--   consumed.
--   
--   When no default action is set, the application that the notification
--   was sent on is activated.
--   
--   <i>Since: 2.40</i>
notificationSetDefaultActionAndTarget :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe GVariant -> m ()

-- | Sets the icon of <i><tt>notification</tt></i> to <i><tt>icon</tt></i>.
--   
--   <i>Since: 2.40</i>
notificationSetIcon :: (HasCallStack, MonadIO m, IsNotification a, IsIcon b) => a -> b -> m ()

-- | Sets the priority of <i><tt>notification</tt></i> to
--   <i><tt>priority</tt></i>. See <a>NotificationPriority</a> for possible
--   values.
notificationSetPriority :: (HasCallStack, MonadIO m, IsNotification a) => a -> NotificationPriority -> m ()

-- | Sets the title of <i><tt>notification</tt></i> to
--   <i><tt>title</tt></i>.
--   
--   <i>Since: 2.40</i>
notificationSetTitle :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()

-- | Deprecated in favor of <a>notificationSetPriority</a>.
--   
--   <i>Since: 2.40</i>

-- | <i>Deprecated: (Since version 2.42)Since 2.42, this has been
--   deprecated in favour of<a>notificationSetPriority</a>.</i>
notificationSetUrgent :: (HasCallStack, MonadIO m, IsNotification a) => a -> Bool -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.Notification.Notification
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Notification.Notification
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Notification.Notification
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Notification.Notification)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Notification.Notification o) => GI.Gio.Objects.Notification.IsNotification o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Notification.Notification
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Notification.Notification


-- | A <tt>GPropertyAction</tt> is a way to get a <a>Action</a> with a
--   state value reflecting and controlling the value of a <a>Object</a>
--   property.
--   
--   The state of the action will correspond to the value of the property.
--   Changing it will change the property (assuming the requested value
--   matches the requirements as specified in the
--   [type<i><tt>gObject</tt></i>.ParamSpec]).
--   
--   Only the most common types are presently supported. Booleans are
--   mapped to booleans, strings to strings, signed/unsigned integers to
--   int32/uint32 and floats and doubles to doubles.
--   
--   If the property is an enum then the state will be string-typed and
--   conversion will automatically be performed between the enum value and
--   ‘nick’ string as per the [type<i><tt>gObject</tt></i>.EnumValue]
--   table.
--   
--   Flags types are not currently supported.
--   
--   Properties of object types, boxed types and pointer types are not
--   supported and probably never will be.
--   
--   Properties of [type<i><tt>gLib</tt></i>.Variant] types are not
--   currently supported.
--   
--   If the property is boolean-valued then the action will have a
--   <tt>NULL</tt> parameter type, and activating the action (with no
--   parameter) will toggle the value of the property.
--   
--   In all other cases, the parameter type will correspond to the type of
--   the property.
--   
--   The general idea here is to reduce the number of locations where a
--   particular piece of state is kept (and therefore has to be
--   synchronised between). <tt>GPropertyAction</tt> does not have a
--   separate state that is kept in sync with the property value — its
--   state is the property value.
--   
--   For example, it might be useful to create a <a>Action</a>
--   corresponding to the <tt>visible-child-name</tt> property of a
--   <a>`GtkStack`</a> so that the current page can be switched from a
--   menu. The active radio indication in the menu is then directly
--   determined from the active page of the <tt>GtkStack</tt>.
--   
--   An anti-example would be binding the <tt>active-id</tt> property on a
--   <a>`GtkComboBox`</a>. This is because the state of the combo box
--   itself is probably uninteresting and is actually being used to control
--   something else.
--   
--   Another anti-example would be to bind to the
--   <tt>visible-child-name</tt> property of a <a>`GtkStack`</a> if this
--   value is actually stored in <a>Settings</a>. In that case, the real
--   source of the value is* <a>Settings</a>. If you want a <a>Action</a>
--   to control a setting stored in <a>Settings</a>, see
--   <a>settingsCreateAction</a> instead, and possibly combine its use with
--   <a>settingsBind</a>.
--   
--   <i>Since: 2.38</i>
module GI.Gio.Objects.PropertyAction

-- | Memory-managed wrapper type.
newtype PropertyAction
PropertyAction :: ManagedPtr PropertyAction -> PropertyAction

-- | Type class for types which can be safely cast to
--   <a>PropertyAction</a>, for instance with <a>toPropertyAction</a>.
class (GObject o, IsDescendantOf PropertyAction o) => IsPropertyAction o

-- | Cast to <a>PropertyAction</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toPropertyAction :: (MonadIO m, IsPropertyAction o) => o -> m PropertyAction

-- | Creates a <a>Action</a> corresponding to the value of property
--   <i><tt>propertyName</tt></i> on <i><tt>object</tt></i>.
--   
--   The property must be existent and readable and writable (and not
--   construct-only).
--   
--   This function takes a reference on <i><tt>object</tt></i> and doesn't
--   release it until the action is destroyed.
--   
--   <i>Since: 2.38</i>
propertyActionNew :: (HasCallStack, MonadIO m, IsObject a) => Text -> a -> Text -> m PropertyAction

-- | Get the value of the “<tt>enabled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> propertyAction #enabled
--   </pre>
getPropertyActionEnabled :: (MonadIO m, IsPropertyAction o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>invert-boolean</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructPropertyActionInvertBoolean :: (IsPropertyAction o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>invert-boolean</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> propertyAction #invertBoolean
--   </pre>
getPropertyActionInvertBoolean :: (MonadIO m, IsPropertyAction o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>name</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructPropertyActionName :: (IsPropertyAction o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>name</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> propertyAction #name
--   </pre>
getPropertyActionName :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>object</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructPropertyActionObject :: (IsPropertyAction o, MonadIO m, IsObject a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>parameter-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> propertyAction #parameterType
--   </pre>
getPropertyActionParameterType :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe VariantType)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>property-name</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructPropertyActionPropertyName :: (IsPropertyAction o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>state</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> propertyAction #state
--   </pre>
getPropertyActionState :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe GVariant)

-- | Get the value of the “<tt>state-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> propertyAction #stateType
--   </pre>
getPropertyActionStateType :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe VariantType)
instance GHC.Classes.Eq GI.Gio.Objects.PropertyAction.PropertyAction
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.PropertyAction.PropertyAction
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.PropertyAction.PropertyAction
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.PropertyAction.PropertyAction)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.PropertyAction.PropertyAction o) => GI.Gio.Objects.PropertyAction.IsPropertyAction o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.PropertyAction.PropertyAction
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.PropertyAction.PropertyAction


-- | The <tt>GSettingsBackend</tt> interface defines a generic interface
--   for non-strictly-typed data that is stored in a hierarchy. To
--   implement an alternative storage backend for <a>Settings</a>, you need
--   to implement the <tt>GSettingsBackend</tt> interface and then make it
--   implement the extension point
--   <tt>G_SETTINGS_BACKEND_EXTENSION_POINT_NAME</tt>.
--   
--   The interface defines methods for reading and writing values, a method
--   for determining if writing of certain values will fail (lockdown) and
--   a change notification mechanism.
--   
--   The semantics of the interface are very precisely defined and
--   implementations must carefully adhere to the expectations of callers
--   that are documented on each of the interface methods.
--   
--   Some of the <tt>GSettingsBackend</tt> functions accept or return a
--   <a>Tree</a>. These trees always have strings as keys and
--   <a>GVariant</a> as values.
--   
--   The <tt>GSettingsBackend</tt> API is exported to allow third-party
--   implementations, but does not carry the same stability guarantees as
--   the public GIO API. For this reason, you have to define the C
--   preprocessor symbol <tt>G_SETTINGS_ENABLE_BACKEND</tt> before
--   including <tt>gio/gsettingsbackend.h</tt>.
module GI.Gio.Objects.SettingsBackend

-- | Memory-managed wrapper type.
newtype SettingsBackend
SettingsBackend :: ManagedPtr SettingsBackend -> SettingsBackend

-- | Type class for types which can be safely cast to
--   <a>SettingsBackend</a>, for instance with <a>toSettingsBackend</a>.
class (GObject o, IsDescendantOf SettingsBackend o) => IsSettingsBackend o

-- | Cast to <a>SettingsBackend</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toSettingsBackend :: (MonadIO m, IsSettingsBackend o) => o -> m SettingsBackend

-- | Signals that a single key has possibly changed. Backend
--   implementations should call this if a key has possibly changed its
--   value.
--   
--   <i><tt>key</tt></i> must be a valid key (ie starting with a slash, not
--   containing '//', and not ending with a slash).
--   
--   The implementation must call this function during any call to
--   <tt><i>g_settings_backend_write()</i></tt>, before the call returns
--   (except in the case that no keys are actually changed and it cares to
--   detect this fact). It may not rely on the existence of a mainloop for
--   dispatching the signal later.
--   
--   The implementation may call this function at any other time it likes
--   in response to other events (such as changes occurring outside of the
--   program). These calls may originate from a mainloop or may originate
--   in response to any other action (including from calls to
--   <tt><i>g_settings_backend_write()</i></tt>).
--   
--   In the case that this call is in response to a call to
--   <tt><i>g_settings_backend_write()</i></tt> then
--   <i><tt>originTag</tt></i> must be set to the same value that was
--   passed to that call.
--   
--   <i>Since: 2.26</i>
settingsBackendChanged :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Text -> Ptr () -> m ()

-- | This call is a convenience wrapper. It gets the list of changes from
--   <i><tt>tree</tt></i>, computes the longest common prefix and calls
--   <a>settingsBackendChanged</a>.
--   
--   <i>Since: 2.26</i>
settingsBackendChangedTree :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Tree -> Ptr () -> m ()

-- | Returns the default <a>SettingsBackend</a>. It is possible to override
--   the default by setting the <tt>GSETTINGS_BACKEND</tt> environment
--   variable to the name of a settings backend.
--   
--   The user gets a reference to the backend.
--   
--   <i>Since: 2.28</i>
settingsBackendGetDefault :: (HasCallStack, MonadIO m) => m SettingsBackend

-- | Signals that a list of keys have possibly changed. Backend
--   implementations should call this if keys have possibly changed their
--   values.
--   
--   <i><tt>path</tt></i> must be a valid path (ie starting and ending with
--   a slash and not containing '//'). Each string in <i><tt>items</tt></i>
--   must form a valid key name when <i><tt>path</tt></i> is prefixed to it
--   (ie: each item must not start or end with '/' and must not contain
--   '//').
--   
--   The meaning of this signal is that any of the key names resulting from
--   the concatenation of <i><tt>path</tt></i> with each item in
--   <i><tt>items</tt></i> may have changed.
--   
--   The same rules for when notifications must occur apply as per
--   <a>settingsBackendChanged</a>. These two calls can be used
--   interchangeably if exactly one item has changed (although in that case
--   <a>settingsBackendChanged</a> is definitely preferred).
--   
--   For efficiency reasons, the implementation should strive for
--   <i><tt>path</tt></i> to be as long as possible (ie: the longest common
--   prefix of all of the keys that were changed) but this is not strictly
--   required.
--   
--   <i>Since: 2.26</i>
settingsBackendKeysChanged :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Text -> [Text] -> Ptr () -> m ()

-- | Signals that all keys below a given path may have possibly changed.
--   Backend implementations should call this if an entire path of keys
--   have possibly changed their values.
--   
--   <i><tt>path</tt></i> must be a valid path (ie starting and ending with
--   a slash and not containing '//').
--   
--   The meaning of this signal is that any of the key which has a name
--   starting with <i><tt>path</tt></i> may have changed.
--   
--   The same rules for when notifications must occur apply as per
--   <a>settingsBackendChanged</a>. This call might be an appropriate
--   reasponse to a 'reset' call but implementations are also free to
--   explicitly list the keys that were affected by that call if they can
--   easily do so.
--   
--   For efficiency reasons, the implementation should strive for
--   <i><tt>path</tt></i> to be as long as possible (ie: the longest common
--   prefix of all of the keys that were changed) but this is not strictly
--   required. As an example, if this function is called with the path of
--   "/" then every single key in the application will be notified of a
--   possible change.
--   
--   <i>Since: 2.26</i>
settingsBackendPathChanged :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Text -> Ptr () -> m ()

-- | Signals that the writability of all keys below a given path may have
--   changed.
--   
--   Since GSettings performs no locking operations for itself, this call
--   will always be made in response to external events.
--   
--   <i>Since: 2.26</i>
settingsBackendPathWritableChanged :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Text -> m ()

-- | Signals that the writability of a single key has possibly changed.
--   
--   Since GSettings performs no locking operations for itself, this call
--   will always be made in response to external events.
--   
--   <i>Since: 2.26</i>
settingsBackendWritableChanged :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Text -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.SettingsBackend.SettingsBackend
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SettingsBackend.SettingsBackend
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SettingsBackend.SettingsBackend
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SettingsBackend.SettingsBackend)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SettingsBackend.SettingsBackend o) => GI.Gio.Objects.SettingsBackend.IsSettingsBackend o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SettingsBackend.SettingsBackend
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SettingsBackend.SettingsBackend


-- | A <tt>GSimpleAction</tt> is the obvious simple implementation of the
--   <a>Action</a> interface. This is the easiest way to create an action
--   for purposes of adding it to a <a>SimpleActionGroup</a>.
module GI.Gio.Objects.SimpleAction

-- | Memory-managed wrapper type.
newtype SimpleAction
SimpleAction :: ManagedPtr SimpleAction -> SimpleAction

-- | Type class for types which can be safely cast to <a>SimpleAction</a>,
--   for instance with <a>toSimpleAction</a>.
class (GObject o, IsDescendantOf SimpleAction o) => IsSimpleAction o

-- | Cast to <a>SimpleAction</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toSimpleAction :: (MonadIO m, IsSimpleAction o) => o -> m SimpleAction

-- | Creates a new action.
--   
--   The created action is stateless. See <a>simpleActionNewStateful</a> to
--   create an action that has state.
--   
--   <i>Since: 2.28</i>
simpleActionNew :: (HasCallStack, MonadIO m) => Text -> Maybe VariantType -> m SimpleAction

-- | Creates a new stateful action.
--   
--   All future state values must have the same <a>VariantType</a> as the
--   initial <i><tt>state</tt></i>.
--   
--   If the <i><tt>state</tt></i> <a>GVariant</a> is floating, it is
--   consumed.
--   
--   <i>Since: 2.28</i>
simpleActionNewStateful :: (HasCallStack, MonadIO m) => Text -> Maybe VariantType -> GVariant -> m SimpleAction

-- | Sets the action as enabled or not.
--   
--   An action must be enabled in order to be activated or in order to have
--   its state changed from outside callers.
--   
--   This should only be called by the implementor of the action. Users of
--   the action should not attempt to modify its enabled flag.
--   
--   <i>Since: 2.28</i>
simpleActionSetEnabled :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> Bool -> m ()

-- | Sets the state of the action.
--   
--   This directly updates the 'state' property to the given value.
--   
--   This should only be called by the implementor of the action. Users of
--   the action should not attempt to directly modify the 'state' property.
--   Instead, they should call <a>actionChangeState</a> to request the
--   change.
--   
--   If the <i><tt>value</tt></i> GVariant is floating, it is consumed.
--   
--   <i>Since: 2.30</i>
simpleActionSetState :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> GVariant -> m ()

-- | Sets the state hint for the action.
--   
--   See <a>actionGetStateHint</a> for more information about action state
--   hints.
--   
--   <i>Since: 2.44</i>
simpleActionSetStateHint :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> Maybe GVariant -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>enabled</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSimpleActionEnabled :: (IsSimpleAction o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>enabled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleAction #enabled
--   </pre>
getSimpleActionEnabled :: (MonadIO m, IsSimpleAction o) => o -> m Bool

-- | Set the value of the “<tt>enabled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> simpleAction [ #enabled <a>:=</a> value ]
--   </pre>
setSimpleActionEnabled :: (MonadIO m, IsSimpleAction o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>name</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSimpleActionName :: (IsSimpleAction o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>name</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleAction #name
--   </pre>
getSimpleActionName :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>parameter-type</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructSimpleActionParameterType :: (IsSimpleAction o, MonadIO m) => VariantType -> m (GValueConstruct o)

-- | Get the value of the “<tt>parameter-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleAction #parameterType
--   </pre>
getSimpleActionParameterType :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe VariantType)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>state</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSimpleActionState :: (IsSimpleAction o, MonadIO m) => GVariant -> m (GValueConstruct o)

-- | Get the value of the “<tt>state</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleAction #state
--   </pre>
getSimpleActionState :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe GVariant)

-- | Set the value of the “<tt>state</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> simpleAction [ #state <a>:=</a> value ]
--   </pre>
setSimpleActionState :: (MonadIO m, IsSimpleAction o) => o -> GVariant -> m ()

-- | Get the value of the “<tt>state-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleAction #stateType
--   </pre>
getSimpleActionStateType :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe VariantType)

-- | Indicates that the action was just activated.
--   
--   <i><tt>parameter</tt></i> will always be of the expected type, i.e.
--   the parameter type specified when the action was created. If an
--   incorrect type is given when activating the action, this signal is not
--   emitted.
--   
--   Since GLib 2.40, if no handler is connected to this signal then the
--   default behaviour for boolean-stated actions with a <a>Nothing</a>
--   parameter type is to toggle them via the
--   <a>SimpleAction::changeState</a> signal. For stateful actions where
--   the state type is equal to the parameter type, the default is to
--   forward them directly to <a>SimpleAction::changeState</a>. This should
--   allow almost all users of <a>SimpleAction</a> to connect only one
--   handler or the other.
--   
--   <i>Since: 2.28</i>
type SimpleActionActivateCallback = Maybe GVariant -> IO ()

-- | Connect a signal handler for the <a>activate</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> simpleAction #activate callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSimpleActionActivate :: (IsSimpleAction a, MonadIO m) => a -> ((?self :: a) => SimpleActionActivateCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>activate</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> simpleAction #activate callback
--   </pre>
onSimpleActionActivate :: (IsSimpleAction a, MonadIO m) => a -> ((?self :: a) => SimpleActionActivateCallback) -> m SignalHandlerId

-- | Indicates that the action just received a request to change its state.
--   
--   <i><tt>value</tt></i> will always be of the correct state type, i.e.
--   the type of the initial state passed to
--   <a>simpleActionNewStateful</a>. If an incorrect type is given when
--   requesting to change the state, this signal is not emitted.
--   
--   If no handler is connected to this signal then the default behaviour
--   is to call <a>simpleActionSetState</a> to set the state to the
--   requested value. If you connect a signal handler then no default
--   action is taken. If the state should change then you must call
--   <a>simpleActionSetState</a> from the handler.
--   
--   An example of a 'change-state' handler:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   static void
--   change_volume_state (GSimpleAction *action,
--                        GVariant      *value,
--                        gpointer       user_data)
--   {
--     gint requested;
--   
--     requested = g_variant_get_int32 (value);
--   
--     // Volume only goes from 0 to 10
--     if (0 &lt;= requested &amp;&amp; requested &lt;= 10)
--       g_simple_action_set_state (action, value);
--   }
--   </pre>
--   
--   The handler need not set the state to the requested value. It could
--   set it to any value at all, or take some other action.
--   
--   <i>Since: 2.30</i>
type SimpleActionChangeStateCallback = Maybe GVariant -> IO ()

-- | Connect a signal handler for the <a>changeState</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> simpleAction #changeState callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSimpleActionChangeState :: (IsSimpleAction a, MonadIO m) => a -> ((?self :: a) => SimpleActionChangeStateCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changeState</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> simpleAction #changeState callback
--   </pre>
onSimpleActionChangeState :: (IsSimpleAction a, MonadIO m) => a -> ((?self :: a) => SimpleActionChangeStateCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.SimpleAction.SimpleAction
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleAction.SimpleAction
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleAction.SimpleAction
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SimpleAction.SimpleAction)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SimpleAction.SimpleAction o) => GI.Gio.Objects.SimpleAction.IsSimpleAction o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SimpleAction.SimpleAction
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SimpleAction.SimpleAction


-- | A <tt>GSocketControlMessage</tt> is a special-purpose utility message
--   that can be sent to or received from a <a>Socket</a>. These types of
--   messages are often called ‘ancillary data’.
--   
--   The message can represent some sort of special instruction to or
--   information from the socket or can represent a special kind of
--   transfer to the peer (for example, sending a file descriptor over a
--   UNIX socket).
--   
--   These messages are sent with <a>socketSendMessage</a> and received
--   with <a>socketReceiveMessage</a>.
--   
--   To extend the set of control messages that can be sent, subclass this
--   class and override the <tt>get_size</tt>, <tt>get_level</tt>,
--   <tt>get_type</tt> and <tt>serialize</tt> methods.
--   
--   To extend the set of control messages that can be received, subclass
--   this class and implement the <tt>deserialize</tt> method. Also, make
--   sure your class is registered with the
--   [type<i><tt>gObject</tt></i>.Type] type system before calling
--   <a>socketReceiveMessage</a> to read such a message.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.SocketControlMessage

-- | Memory-managed wrapper type.
newtype SocketControlMessage
SocketControlMessage :: ManagedPtr SocketControlMessage -> SocketControlMessage

-- | Type class for types which can be safely cast to
--   <a>SocketControlMessage</a>, for instance with
--   <a>toSocketControlMessage</a>.
class (GObject o, IsDescendantOf SocketControlMessage o) => IsSocketControlMessage o

-- | Cast to <a>SocketControlMessage</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toSocketControlMessage :: (MonadIO m, IsSocketControlMessage o) => o -> m SocketControlMessage

-- | Tries to deserialize a socket control message of a given
--   <i><tt>level</tt></i> and <i><tt>type</tt></i>. This will ask all
--   known (to GType) subclasses of <a>SocketControlMessage</a> if they can
--   understand this kind of message and if so deserialize it into a
--   <a>SocketControlMessage</a>.
--   
--   If there is no implementation for this kind of control message,
--   <a>Nothing</a> will be returned.
--   
--   <i>Since: 2.22</i>
socketControlMessageDeserialize :: (HasCallStack, MonadIO m) => Int32 -> Int32 -> ByteString -> m (Maybe SocketControlMessage)

-- | Returns the "level" (i.e. the originating protocol) of the control
--   message. This is often SOL_SOCKET.
--   
--   <i>Since: 2.22</i>
socketControlMessageGetLevel :: (HasCallStack, MonadIO m, IsSocketControlMessage a) => a -> m Int32

-- | Returns the protocol specific type of the control message. For
--   instance, for UNIX fd passing this would be SCM_RIGHTS.
--   
--   <i>Since: 2.22</i>
socketControlMessageGetMsgType :: (HasCallStack, MonadIO m, IsSocketControlMessage a) => a -> m Int32

-- | Returns the space required for the control message, not including
--   headers or alignment.
--   
--   <i>Since: 2.22</i>
socketControlMessageGetSize :: (HasCallStack, MonadIO m, IsSocketControlMessage a) => a -> m CSize

-- | Converts the data in the message to bytes placed in the message.
--   
--   <i><tt>data</tt></i> is guaranteed to have enough space to fit the
--   size returned by <a>socketControlMessageGetSize</a> on this object.
--   
--   <i>Since: 2.22</i>
socketControlMessageSerialize :: (HasCallStack, MonadIO m, IsSocketControlMessage a) => a -> Ptr () -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.SocketControlMessage.SocketControlMessage
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketControlMessage.SocketControlMessage
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketControlMessage.SocketControlMessage
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SocketControlMessage.SocketControlMessage)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SocketControlMessage.SocketControlMessage o) => GI.Gio.Objects.SocketControlMessage.IsSocketControlMessage o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SocketControlMessage.SocketControlMessage
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SocketControlMessage.SocketControlMessage


-- | A helper class for testing code which uses D-Bus without touching the
--   user’s session bus.
--   
--   Note that <tt>GTestDBus</tt> modifies the user’s environment, calling
--   <a>`setenv()`</a>). This is not thread-safe, so all <tt>GTestDBus</tt>
--   calls should be completed before threads are spawned, or should have
--   appropriate locking to ensure no access conflicts to environment
--   variables shared between <tt>GTestDBus</tt> and other threads.
--   
--   <h2>Creating unit tests using <tt>GTestDBus</tt></h2>
--   
--   Testing of D-Bus services can be tricky because normally we only ever
--   run D-Bus services over an existing instance of the D-Bus daemon thus
--   we usually don’t activate D-Bus services that are not yet installed
--   into the target system. The <tt>GTestDBus</tt> object makes this
--   easier for us by taking care of the lower level tasks such as running
--   a private D-Bus daemon and looking up uninstalled services in
--   customizable locations, typically in your source code tree.
--   
--   The first thing you will need is a separate service description file
--   for the D-Bus daemon. Typically a <tt>services</tt> subdirectory of
--   your <tt>tests</tt> directory is a good place to put this file.
--   
--   The service file should list your service along with an absolute path
--   to the uninstalled service executable in your source tree. Using
--   autotools we would achieve this by adding a file such as
--   <tt>my-server.service.in</tt> in the services directory and have it
--   processed by configure.
--   
--   <pre>
--   [D-BUS Service]
--   Name=org.gtk.GDBus.Examples.ObjectManager
--   Exec=@abs_top_builddir@/gio/tests/gdbus-example-objectmanager-server
--   </pre>
--   
--   You will also need to indicate this service directory in your test
--   fixtures, so you will need to pass the path while compiling your test
--   cases. Typically this is done with autotools with an added
--   preprocessor flag specified to compile your tests such as:
--   
--   <pre>
--   -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\"
--   </pre>
--   
--   Once you have a service definition file which is local to your source
--   tree, you can proceed to set up a GTest fixture using the
--   <tt>GTestDBus</tt> scaffolding.
--   
--   An example of a test fixture for D-Bus services can be found here:
--   <a>gdbus-test-fixture.c</a>
--   
--   Note that these examples only deal with isolating the D-Bus aspect of
--   your service. To successfully run isolated unit tests on your service
--   you may need some additional modifications to your test case fixture.
--   For example; if your service uses <a>Settings</a> and installs a
--   schema then it is important that your test service not load the schema
--   in the ordinary installed location (chances are that your service and
--   schema files are not yet installed, or worse; there is an older
--   version of the schema file sitting in the install location).
--   
--   Most of the time we can work around these obstacles using the
--   environment. Since the environment is inherited by the D-Bus daemon
--   created by <tt>GTestDBus</tt> and then in turn inherited by any
--   services the D-Bus daemon activates, using the setup routine for your
--   fixture is a practical place to help sandbox your runtime environment.
--   For the rather typical GSettings case we can work around this by
--   setting <tt>GSETTINGS_SCHEMA_DIR</tt> to the in tree directory holding
--   your schemas in the above <tt>fixture_setup()</tt> routine.
--   
--   The GSettings schemas need to be locally pre-compiled for this to
--   work. This can be achieved by compiling the schemas locally as a step
--   before running test cases, an autotools setup might do the following
--   in the directory holding schemas:
--   
--   <pre>
--   all-am:
--           $(GLIB_COMPILE_SCHEMAS) .
--   
--   CLEANFILES += gschemas.compiled
--   </pre>
--   
--   <i>Since: 2.34</i>
module GI.Gio.Objects.TestDBus

-- | Memory-managed wrapper type.
newtype TestDBus
TestDBus :: ManagedPtr TestDBus -> TestDBus

-- | Type class for types which can be safely cast to <a>TestDBus</a>, for
--   instance with <a>toTestDBus</a>.
class (GObject o, IsDescendantOf TestDBus o) => IsTestDBus o

-- | Cast to <a>TestDBus</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toTestDBus :: (MonadIO m, IsTestDBus o) => o -> m TestDBus

-- | Add a path where dbus-daemon will look up .service files. This can't
--   be called after <a>testDBusUp</a>.
testDBusAddServiceDir :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> Text -> m ()

-- | Stop the session bus started by <a>testDBusUp</a>.
--   
--   This will wait for the singleton returned by <a>busGet</a> or
--   <a>busGetSync</a> to be destroyed. This is done to ensure that the
--   next unit test won't get a leaked singleton from this test.
testDBusDown :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m ()

-- | Get the address on which dbus-daemon is running. If <a>testDBusUp</a>
--   has not been called yet, <a>Nothing</a> is returned. This can be used
--   with <a>dBusConnectionNewForAddress</a>.
testDBusGetBusAddress :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m (Maybe Text)

-- | Get the flags of the <a>TestDBus</a> object.
testDBusGetFlags :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m [TestDBusFlags]

-- | Create a new <a>TestDBus</a> object.
testDBusNew :: (HasCallStack, MonadIO m) => [TestDBusFlags] -> m TestDBus

-- | Stop the session bus started by <a>testDBusUp</a>.
--   
--   Unlike <a>testDBusDown</a>, this won't verify the
--   <a>DBusConnection</a> singleton returned by <a>busGet</a> or
--   <a>busGetSync</a> is destroyed. Unit tests wanting to verify behaviour
--   after the session bus has been stopped can use this function but
--   should still call <a>testDBusDown</a> when done.
testDBusStop :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m ()

-- | Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the
--   test won't use user's session bus.
--   
--   This is useful for unit tests that want to verify behaviour when no
--   session bus is running. It is not necessary to call this if unit test
--   already calls <a>testDBusUp</a> before acquiring the session bus.
testDBusUnset :: (HasCallStack, MonadIO m) => m ()

-- | Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After
--   this call, it is safe for unit tests to start sending messages on the
--   session bus.
--   
--   If this function is called from setup callback of
--   <tt><i>g_test_add()</i></tt>, <a>testDBusDown</a> must be called in
--   its teardown callback.
--   
--   If this function is called from unit test's <tt><i>main()</i></tt>,
--   then <a>testDBusDown</a> must be called after <a>testRun</a>.
testDBusUp :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructTestDBusFlags :: (IsTestDBus o, MonadIO m) => [TestDBusFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> testDBus #flags
--   </pre>
getTestDBusFlags :: (MonadIO m, IsTestDBus o) => o -> m [TestDBusFlags]
instance GHC.Classes.Eq GI.Gio.Objects.TestDBus.TestDBus
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TestDBus.TestDBus
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TestDBus.TestDBus
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TestDBus.TestDBus)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TestDBus.TestDBus o) => GI.Gio.Objects.TestDBus.IsTestDBus o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TestDBus.TestDBus
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TestDBus.TestDBus


-- | <tt>GThemedIcon</tt> is an implementation of <a>Icon</a> that supports
--   icon themes.
--   
--   <tt>GThemedIcon</tt> contains a list of all of the icons present in an
--   icon theme, so that icons can be looked up quickly.
--   <tt>GThemedIcon</tt> does not provide actual pixmaps for icons, just
--   the icon names. Ideally something like
--   <tt><i>Gtk.IconTheme.choose_icon()</i></tt> should be used to resolve
--   the list of names so that fallback icons work nicely with themes that
--   inherit other themes.
module GI.Gio.Objects.ThemedIcon

-- | Memory-managed wrapper type.
newtype ThemedIcon
ThemedIcon :: ManagedPtr ThemedIcon -> ThemedIcon

-- | Type class for types which can be safely cast to <a>ThemedIcon</a>,
--   for instance with <a>toThemedIcon</a>.
class (GObject o, IsDescendantOf ThemedIcon o) => IsThemedIcon o

-- | Cast to <a>ThemedIcon</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toThemedIcon :: (MonadIO m, IsThemedIcon o) => o -> m ThemedIcon

-- | Append a name to the list of icons from within <i><tt>icon</tt></i>.
--   
--   Note that doing so invalidates the hash computed by prior calls to
--   <a>iconHash</a>.
themedIconAppendName :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> Text -> m ()

-- | Gets the names of icons from within <i><tt>icon</tt></i>.
themedIconGetNames :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> m [Text]

-- | Creates a new themed icon for <i><tt>iconname</tt></i>.
themedIconNew :: (HasCallStack, MonadIO m) => Text -> m ThemedIcon

-- | Creates a new themed icon for <i><tt>iconnames</tt></i>.
themedIconNewFromNames :: (HasCallStack, MonadIO m) => [Text] -> m ThemedIcon

-- | Creates a new themed icon for <i><tt>iconname</tt></i>, and all the
--   names that can be created by shortening <i><tt>iconname</tt></i> at
--   '-' characters.
--   
--   In the following example, <i><tt>icon1</tt></i> and
--   <i><tt>icon2</tt></i> are equivalent:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   const char *names[] = {
--     "gnome-dev-cdrom-audio",
--     "gnome-dev-cdrom",
--     "gnome-dev",
--     "gnome"
--   };
--   
--   icon1 = g_themed_icon_new_from_names (names, 4);
--   icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
--   </pre>
themedIconNewWithDefaultFallbacks :: (HasCallStack, MonadIO m) => Text -> m ThemedIcon

-- | Prepend a name to the list of icons from within <i><tt>icon</tt></i>.
--   
--   Note that doing so invalidates the hash computed by prior calls to
--   <a>iconHash</a>.
--   
--   <i>Since: 2.18</i>
themedIconPrependName :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>name</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructThemedIconName :: (IsThemedIcon o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>names</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructThemedIconNames :: (IsThemedIcon o, MonadIO m) => [Text] -> m (GValueConstruct o)

-- | Get the value of the “<tt>names</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> themedIcon #names
--   </pre>
getThemedIconNames :: (MonadIO m, IsThemedIcon o) => o -> m [Text]

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>use-default-fallbacks</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructThemedIconUseDefaultFallbacks :: (IsThemedIcon o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>use-default-fallbacks</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> themedIcon #useDefaultFallbacks
--   </pre>
getThemedIconUseDefaultFallbacks :: (MonadIO m, IsThemedIcon o) => o -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.ThemedIcon.ThemedIcon
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ThemedIcon.ThemedIcon
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ThemedIcon.ThemedIcon
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ThemedIcon.ThemedIcon)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ThemedIcon.ThemedIcon o) => GI.Gio.Objects.ThemedIcon.IsThemedIcon o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ThemedIcon.ThemedIcon
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ThemedIcon.ThemedIcon


-- | An abstract interface representing a password used in TLS. Often used
--   in user interaction such as unlocking a key storage token.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.TlsPassword

-- | Memory-managed wrapper type.
newtype TlsPassword
TlsPassword :: ManagedPtr TlsPassword -> TlsPassword

-- | Type class for types which can be safely cast to <a>TlsPassword</a>,
--   for instance with <a>toTlsPassword</a>.
class (GObject o, IsDescendantOf TlsPassword o) => IsTlsPassword o

-- | Cast to <a>TlsPassword</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toTlsPassword :: (MonadIO m, IsTlsPassword o) => o -> m TlsPassword

-- | Get a description string about what the password will be used for.
--   
--   <i>Since: 2.30</i>
tlsPasswordGetDescription :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m Text

-- | Get flags about the password.
--   
--   <i>Since: 2.30</i>
tlsPasswordGetFlags :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m [TlsPasswordFlags]

-- | Get a user readable translated warning. Usually this warning is a
--   representation of the password flags returned from
--   <a>tlsPasswordGetFlags</a>.
--   
--   <i>Since: 2.30</i>
tlsPasswordGetWarning :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m Text

-- | Create a new <a>TlsPassword</a> object.
tlsPasswordNew :: (HasCallStack, MonadIO m) => [TlsPasswordFlags] -> Text -> m TlsPassword

-- | Set a description string about what the password will be used for.
--   
--   <i>Since: 2.30</i>
tlsPasswordSetDescription :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> Text -> m ()

-- | Set flags about the password.
--   
--   <i>Since: 2.30</i>
tlsPasswordSetFlags :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> [TlsPasswordFlags] -> m ()

-- | Set the value for this password. The <i><tt>value</tt></i> will be
--   copied by the password object.
--   
--   Specify the <i><tt>length</tt></i>, for a non-nul-terminated password.
--   Pass -1 as <i><tt>length</tt></i> if using a nul-terminated password,
--   and <i><tt>length</tt></i> will be calculated automatically. (Note
--   that the terminating nul is not considered part of the password in
--   this case.)
--   
--   <i>Since: 2.30</i>
tlsPasswordSetValue :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> ByteString -> m ()

-- | Provide the value for this password.
--   
--   The <i><tt>value</tt></i> will be owned by the password object, and
--   later freed using the <i><tt>destroy</tt></i> function callback.
--   
--   Specify the <i><tt>length</tt></i>, for a non-nul-terminated password.
--   Pass -1 as <i><tt>length</tt></i> if using a nul-terminated password,
--   and <i><tt>length</tt></i> will be calculated automatically. (Note
--   that the terminating nul is not considered part of the password in
--   this case.)
--   
--   <i>Since: 2.30</i>
tlsPasswordSetValueFull :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> ByteString -> Maybe DestroyNotify -> m ()

-- | Set a user readable translated warning. Usually this warning is a
--   representation of the password flags returned from
--   <a>tlsPasswordGetFlags</a>.
--   
--   <i>Since: 2.30</i>
tlsPasswordSetWarning :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>description</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructTlsPasswordDescription :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>description</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsPassword #description
--   </pre>
getTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> m Text

-- | Set the value of the “<tt>description</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsPassword [ #description <a>:=</a> value ]
--   </pre>
setTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructTlsPasswordFlags :: (IsTlsPassword o, MonadIO m) => [TlsPasswordFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsPassword #flags
--   </pre>
getTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> m [TlsPasswordFlags]

-- | Set the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsPassword [ #flags <a>:=</a> value ]
--   </pre>
setTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> [TlsPasswordFlags] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>warning</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructTlsPasswordWarning :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>warning</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsPassword #warning
--   </pre>
getTlsPasswordWarning :: (MonadIO m, IsTlsPassword o) => o -> m Text

-- | Set the value of the “<tt>warning</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsPassword [ #warning <a>:=</a> value ]
--   </pre>
setTlsPasswordWarning :: (MonadIO m, IsTlsPassword o) => o -> Text -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.TlsPassword.TlsPassword
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TlsPassword.TlsPassword
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsPassword.TlsPassword
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TlsPassword.TlsPassword)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TlsPassword.TlsPassword o) => GI.Gio.Objects.TlsPassword.IsTlsPassword o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TlsPassword.TlsPassword
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TlsPassword.TlsPassword


-- | This <a>SocketControlMessage</a> contains a <a>Credentials</a>
--   instance. It may be sent using <a>socketSendMessage</a> and received
--   using <a>socketReceiveMessage</a> over UNIX sockets (ie: sockets in
--   the <tt>G_SOCKET_FAMILY_UNIX</tt> family).
--   
--   For an easier way to send and receive credentials over stream-oriented
--   UNIX sockets, see <a>unixConnectionSendCredentials</a> and
--   <a>unixConnectionReceiveCredentials</a>. To receive credentials of a
--   foreign process connected to a socket, use
--   <a>socketGetCredentials</a>.
--   
--   Since GLib 2.72, <tt>GUnixCredentialMessage</tt> is available on all
--   platforms. It requires underlying system support (such as Windows 10
--   with <tt>AF_UNIX</tt>) at run time.
--   
--   Before GLib 2.72, <tt>&lt;gio/gunixcredentialsmessage.h&gt;</tt>
--   belonged to the UNIX-specific GIO interfaces, thus you had to use the
--   <tt>gio-unix-2.0.pc</tt> pkg-config file when using it. This is no
--   longer necessary since GLib 2.72.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.UnixCredentialsMessage

-- | Memory-managed wrapper type.
newtype UnixCredentialsMessage
UnixCredentialsMessage :: ManagedPtr UnixCredentialsMessage -> UnixCredentialsMessage

-- | Type class for types which can be safely cast to
--   <a>UnixCredentialsMessage</a>, for instance with
--   <a>toUnixCredentialsMessage</a>.
class (GObject o, IsDescendantOf UnixCredentialsMessage o) => IsUnixCredentialsMessage o

-- | Cast to <a>UnixCredentialsMessage</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toUnixCredentialsMessage :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m UnixCredentialsMessage

-- | Gets the credentials stored in <i><tt>message</tt></i>.
--   
--   <i>Since: 2.26</i>
unixCredentialsMessageGetCredentials :: (HasCallStack, MonadIO m, IsUnixCredentialsMessage a) => a -> m Credentials

-- | Checks if passing <a>Credentials</a> on a <a>Socket</a> is supported
--   on this platform.
--   
--   <i>Since: 2.26</i>
unixCredentialsMessageIsSupported :: (HasCallStack, MonadIO m) => m Bool

-- | Creates a new <a>UnixCredentialsMessage</a> with credentials matching
--   the current processes.
--   
--   <i>Since: 2.26</i>
unixCredentialsMessageNew :: (HasCallStack, MonadIO m) => m UnixCredentialsMessage

-- | Creates a new <a>UnixCredentialsMessage</a> holding
--   <i><tt>credentials</tt></i>.
--   
--   <i>Since: 2.26</i>
unixCredentialsMessageNewWithCredentials :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m UnixCredentialsMessage

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>credentials</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructUnixCredentialsMessageCredentials :: (IsUnixCredentialsMessage o, MonadIO m, IsCredentials a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>credentials</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> unixCredentialsMessage #credentials
--   </pre>
getUnixCredentialsMessageCredentials :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m Credentials
instance GHC.Classes.Eq GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage o) => GI.Gio.Objects.UnixCredentialsMessage.IsUnixCredentialsMessage o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage


-- | A <tt>GUnixFDList</tt> contains a list of file descriptors. It owns
--   the file descriptors that it contains, closing them when finalized.
--   
--   It may be wrapped in a <a>`GUnixFDMessage`</a> and sent over a
--   <a>Socket</a> in the <tt>G_SOCKET_FAMILY_UNIX</tt> family by using
--   <a>socketSendMessage</a> and received using
--   <a>socketReceiveMessage</a>.
--   
--   Before 2.74, <tt>&lt;gio/gunixfdlist.h&gt;</tt> belonged to the
--   UNIX-specific GIO interfaces, thus you had to use the
--   <tt>gio-unix-2.0.pc</tt> pkg-config file when using it.
--   
--   Since 2.74, the API is available for Windows.
module GI.Gio.Objects.UnixFDList

-- | Memory-managed wrapper type.
newtype UnixFDList
UnixFDList :: ManagedPtr UnixFDList -> UnixFDList

-- | Type class for types which can be safely cast to <a>UnixFDList</a>,
--   for instance with <a>toUnixFDList</a>.
class (GObject o, IsDescendantOf UnixFDList o) => IsUnixFDList o

-- | Cast to <a>UnixFDList</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toUnixFDList :: (MonadIO m, IsUnixFDList o) => o -> m UnixFDList

-- | Adds a file descriptor to <i><tt>list</tt></i>.
--   
--   The file descriptor is duplicated using <tt><i>dup()</i></tt>. You
--   keep your copy of the descriptor and the copy contained in
--   <i><tt>list</tt></i> will be closed when <i><tt>list</tt></i> is
--   finalized.
--   
--   A possible cause of failure is exceeding the per-process or
--   system-wide file descriptor limit.
--   
--   The index of the file descriptor in the list is returned. If you use
--   this index with <a>unixFDListGet</a> then you will receive back a
--   duplicated copy of the same file descriptor.
--   
--   <i>Since: 2.24</i>
unixFDListAppend :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> Int32 -> m Int32

-- | Gets a file descriptor out of <i><tt>list</tt></i>.
--   
--   <i><tt>index_</tt></i> specifies the index of the file descriptor to
--   get. It is a programmer error for <i><tt>index_</tt></i> to be out of
--   range; see <a>unixFDListGetLength</a>.
--   
--   The file descriptor is duplicated using <tt><i>dup()</i></tt> and set
--   as close-on-exec before being returned. You must call
--   <tt><i>close()</i></tt> on it when you are done.
--   
--   A possible cause of failure is exceeding the per-process or
--   system-wide file descriptor limit.
--   
--   <i>Since: 2.24</i>
unixFDListGet :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> Int32 -> m Int32

-- | Gets the length of <i><tt>list</tt></i> (ie: the number of file
--   descriptors contained within).
--   
--   <i>Since: 2.24</i>
unixFDListGetLength :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> m Int32

-- | Creates a new <a>UnixFDList</a> containing no file descriptors.
--   
--   <i>Since: 2.24</i>
unixFDListNew :: (HasCallStack, MonadIO m) => m UnixFDList

-- | Creates a new <a>UnixFDList</a> containing the file descriptors given
--   in <i><tt>fds</tt></i>. The file descriptors become the property of
--   the new list and may no longer be used by the caller. The array itself
--   is owned by the caller.
--   
--   Each file descriptor in the array should be set to close-on-exec.
--   
--   If <i><tt>nFds</tt></i> is -1 then <i><tt>fds</tt></i> must be
--   terminated with -1.
--   
--   <i>Since: 2.24</i>
unixFDListNewFromArray :: (HasCallStack, MonadIO m) => [Int32] -> m UnixFDList

-- | Returns the array of file descriptors that is contained in this
--   object.
--   
--   After this call, the descriptors remain the property of
--   <i><tt>list</tt></i>. The caller must not close them and must not free
--   the array. The array is valid only until <i><tt>list</tt></i> is
--   changed in any way.
--   
--   If <i><tt>length</tt></i> is non-<a>Nothing</a> then it is set to the
--   number of file descriptors in the returned array. The returned array
--   is also terminated with -1.
--   
--   This function never returns <a>Nothing</a>. In case there are no file
--   descriptors contained in <i><tt>list</tt></i>, an empty array is
--   returned.
--   
--   <i>Since: 2.24</i>
unixFDListPeekFds :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> m [Int32]

-- | Returns the array of file descriptors that is contained in this
--   object.
--   
--   After this call, the descriptors are no longer contained in
--   <i><tt>list</tt></i>. Further calls will return an empty list (unless
--   more descriptors have been added).
--   
--   The return result of this function must be freed with <a>free</a>. The
--   caller is also responsible for closing all of the file descriptors.
--   The file descriptors in the array are set to close-on-exec.
--   
--   If <i><tt>length</tt></i> is non-<a>Nothing</a> then it is set to the
--   number of file descriptors in the returned array. The returned array
--   is also terminated with -1.
--   
--   This function never returns <a>Nothing</a>. In case there are no file
--   descriptors contained in <i><tt>list</tt></i>, an empty array is
--   returned.
--   
--   <i>Since: 2.24</i>
unixFDListStealFds :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> m [Int32]
instance GHC.Classes.Eq GI.Gio.Objects.UnixFDList.UnixFDList
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixFDList.UnixFDList
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixFDList.UnixFDList
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.UnixFDList.UnixFDList)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixFDList.UnixFDList o) => GI.Gio.Objects.UnixFDList.IsUnixFDList o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixFDList.UnixFDList
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixFDList.UnixFDList


-- | A type for representing D-Bus messages that can be sent or received on
--   a <a>DBusConnection</a>.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.DBusMessage

-- | Memory-managed wrapper type.
newtype DBusMessage
DBusMessage :: ManagedPtr DBusMessage -> DBusMessage

-- | Type class for types which can be safely cast to <a>DBusMessage</a>,
--   for instance with <a>toDBusMessage</a>.
class (GObject o, IsDescendantOf DBusMessage o) => IsDBusMessage o

-- | Cast to <a>DBusMessage</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDBusMessage :: (MonadIO m, IsDBusMessage o) => o -> m DBusMessage

-- | Utility function to calculate how many bytes are needed to completely
--   deserialize the D-Bus message stored at <i><tt>blob</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageBytesNeeded :: (HasCallStack, MonadIO m) => ByteString -> m Int64

-- | Copies <i><tt>message</tt></i>. The copy is a deep copy and the
--   returned <a>DBusMessage</a> is completely identical except that it is
--   guaranteed to not be locked.
--   
--   This operation can fail if e.g. <i><tt>message</tt></i> contains file
--   descriptors and the per-process or system-wide open files limit is
--   reached.
--   
--   <i>Since: 2.26</i>
dBusMessageCopy :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessage

-- | Convenience to get the first item in the body of
--   <i><tt>message</tt></i>.
--   
--   See <a>dBusMessageGetArg0Path</a> for returning object-path-typed arg0
--   values.
--   
--   <i>Since: 2.26</i>
dBusMessageGetArg0 :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Convenience to get the first item in the body of
--   <i><tt>message</tt></i>.
--   
--   See <a>dBusMessageGetArg0</a> for returning string-typed arg0 values.
--   
--   <i>Since: 2.80</i>
dBusMessageGetArg0Path :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Gets the body of a message.
--   
--   <i>Since: 2.26</i>
dBusMessageGetBody :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe GVariant)

-- | Gets the byte order of <i><tt>message</tt></i>.
dBusMessageGetByteOrder :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessageByteOrder

-- | Convenience getter for the <a>DBusMessageHeaderFieldDestination</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetDestination :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Convenience getter for the <a>DBusMessageHeaderFieldErrorName</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Gets the flags for <i><tt>message</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageGetFlags :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m [DBusMessageFlags]

-- | Gets a header field on <i><tt>message</tt></i>.
--   
--   The caller is responsible for checking the type of the returned
--   <a>GVariant</a> matches what is expected.
--   
--   <i>Since: 2.26</i>
dBusMessageGetHeader :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageHeaderField -> m (Maybe GVariant)

-- | Gets an array of all header fields on <i><tt>message</tt></i> that are
--   set.
--   
--   <i>Since: 2.26</i>
dBusMessageGetHeaderFields :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m ByteString

-- | Convenience getter for the <a>DBusMessageHeaderFieldInterface</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetInterface :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Checks whether <i><tt>message</tt></i> is locked. To monitor changes
--   to this value, connect to the <a>Object::notify</a> signal to listen
--   for changes on the <a>DBusMessage:locked</a> property.
--   
--   <i>Since: 2.26</i>
dBusMessageGetLocked :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Bool

-- | Convenience getter for the <a>DBusMessageHeaderFieldMember</a> header
--   field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetMember :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Gets the type of <i><tt>message</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageGetMessageType :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessageType

-- | Convenience getter for the <a>DBusMessageHeaderFieldNumUnixFds</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetNumUnixFds :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32

-- | Convenience getter for the <a>DBusMessageHeaderFieldPath</a> header
--   field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetPath :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Convenience getter for the <a>DBusMessageHeaderFieldReplySerial</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetReplySerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32

-- | Convenience getter for the <a>DBusMessageHeaderFieldSender</a> header
--   field.
--   
--   <i>Since: 2.26</i>
dBusMessageGetSender :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text)

-- | Gets the serial for <i><tt>message</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageGetSerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32

-- | Convenience getter for the <a>DBusMessageHeaderFieldSignature</a>
--   header field.
--   
--   This will always be non-<a>Nothing</a>, but may be an empty string.
--   
--   <i>Since: 2.26</i>
dBusMessageGetSignature :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text

-- | Gets the UNIX file descriptors associated with
--   <i><tt>message</tt></i>, if any.
--   
--   This method is only available on UNIX.
--   
--   The file descriptors normally correspond to
--   <tt><i>G_VARIANT_TYPE_HANDLE</i></tt> values in the body of the
--   message. For example, if <a>variantGetHandle</a> returns 5, that is
--   intended to be a reference to the file descriptor that can be accessed
--   by <tt>g_unix_fd_list_get (list, 5, ...)</tt>.
--   
--   <i>Since: 2.26</i>
dBusMessageGetUnixFdList :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe UnixFDList)

-- | If <i><tt>message</tt></i> is locked, does nothing. Otherwise locks
--   the message.
--   
--   <i>Since: 2.26</i>
dBusMessageLock :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m ()

-- | Creates a new empty <a>DBusMessage</a>.
--   
--   <i>Since: 2.26</i>
dBusMessageNew :: (HasCallStack, MonadIO m) => m DBusMessage

-- | Creates a new <a>DBusMessage</a> from the data stored at
--   <i><tt>blob</tt></i>. The byte order that the message was in can be
--   retrieved using <a>dBusMessageGetByteOrder</a>.
--   
--   If the <i><tt>blob</tt></i> cannot be parsed, contains invalid fields,
--   or contains invalid headers, <a>IOErrorEnumInvalidArgument</a> will be
--   returned.
--   
--   <i>Since: 2.26</i>
dBusMessageNewFromBlob :: (HasCallStack, MonadIO m) => ByteString -> [DBusCapabilityFlags] -> m DBusMessage

-- | Creates a new <a>DBusMessage</a> for a method call.
--   
--   <i>Since: 2.26</i>
dBusMessageNewMethodCall :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Maybe Text -> Text -> m DBusMessage

-- | Creates a new <a>DBusMessage</a> that is an error reply to
--   <i><tt>methodCallMessage</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageNewMethodErrorLiteral :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> Text -> m DBusMessage

-- | Creates a new <a>DBusMessage</a> that is a reply to
--   <i><tt>methodCallMessage</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageNewMethodReply :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessage

-- | Creates a new <a>DBusMessage</a> for a signal emission.
--   
--   <i>Since: 2.26</i>
dBusMessageNewSignal :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> m DBusMessage

-- | Produces a human-readable multi-line description of
--   <i><tt>message</tt></i>.
--   
--   The contents of the description has no ABI guarantees, the contents
--   and formatting is subject to change at any time. Typical output looks
--   something like this:
--   
--   <pre>
--   Flags:   none
--   Version: 0
--   Serial:  4
--   Headers:
--     path -&gt; objectpath '/org/gtk/GDBus/TestObject'
--     interface -&gt; 'org.gtk.GDBus.TestInterface'
--     member -&gt; 'GimmeStdout'
--     destination -&gt; ':1.146'
--   Body: ()
--   UNIX File Descriptors:
--     (none)
--   </pre>
--   
--   or
--   
--   <pre>
--   Flags:   no-reply-expected
--   Version: 0
--   Serial:  477
--   Headers:
--     reply-serial -&gt; uint32 4
--     destination -&gt; ':1.159'
--     sender -&gt; ':1.146'
--     num-unix-fds -&gt; uint32 1
--   Body: ()
--   UNIX File Descriptors:
--     fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
--   </pre>
--   
--   <i>Since: 2.26</i>
dBusMessagePrint :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m Text

-- | Sets the body <i><tt>message</tt></i>. As a side-effect the
--   <a>DBusMessageHeaderFieldSignature</a> header field is set to the type
--   string of <i><tt>body</tt></i> (or cleared if <i><tt>body</tt></i> is
--   <a>Nothing</a>).
--   
--   If <i><tt>body</tt></i> is floating, <i><tt>message</tt></i> assumes
--   ownership of <i><tt>body</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageSetBody :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> GVariant -> m ()

-- | Sets the byte order of <i><tt>message</tt></i>.
dBusMessageSetByteOrder :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageByteOrder -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldDestination</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetDestination :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldErrorName</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => Maybe a -> Text -> m ()

-- | Sets the flags to set on <i><tt>message</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageSetFlags :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> [DBusMessageFlags] -> m ()

-- | Sets a header field on <i><tt>message</tt></i>.
--   
--   If <i><tt>value</tt></i> is floating, <i><tt>message</tt></i> assumes
--   ownership of <i><tt>value</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageSetHeader :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageHeaderField -> Maybe GVariant -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldInterface</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetInterface :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldMember</a> header
--   field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetMember :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m ()

-- | Sets <i><tt>message</tt></i> to be of <i><tt>type</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMessageSetMessageType :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageType -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldNumUnixFds</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetNumUnixFds :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldPath</a> header
--   field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetPath :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldReplySerial</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetReplySerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldSender</a> header
--   field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetSender :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m ()

-- | Sets the serial for <i><tt>message</tt></i>.
--   
--   The <a>D-Bus specification</a> does not allow the
--   <i><tt>serial</tt></i> to be zero.
--   
--   <i>Since: 2.26</i>
dBusMessageSetSerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m ()

-- | Convenience setter for the <a>DBusMessageHeaderFieldSignature</a>
--   header field.
--   
--   <i>Since: 2.26</i>
dBusMessageSetSignature :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m ()

-- | Sets the UNIX file descriptors associated with
--   <i><tt>message</tt></i>. As a side-effect the
--   <a>DBusMessageHeaderFieldNumUnixFds</a> header field is set to the
--   number of fds in <i><tt>fdList</tt></i> (or cleared if
--   <i><tt>fdList</tt></i> is <a>Nothing</a>).
--   
--   This method is only available on UNIX.
--   
--   When designing D-Bus APIs that are intended to be interoperable,
--   please note that non-GDBus implementations of D-Bus can usually only
--   access file descriptors if they are referenced by a value of type
--   <tt><i>G_VARIANT_TYPE_HANDLE</i></tt> in the body of the message.
--   
--   <i>Since: 2.26</i>
dBusMessageSetUnixFdList :: (HasCallStack, MonadIO m, IsDBusMessage a, IsUnixFDList b) => a -> Maybe b -> m ()

-- | Serializes <i><tt>message</tt></i> to a blob. The byte order returned
--   by <a>dBusMessageGetByteOrder</a> will be used.
--   
--   <i>Since: 2.26</i>
dBusMessageToBlob :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> [DBusCapabilityFlags] -> m ByteString

-- | If <i><tt>message</tt></i> is not of type <a>DBusMessageTypeError</a>
--   does nothing and returns <a>False</a>.
--   
--   Otherwise this method encodes the error in <i><tt>message</tt></i> as
--   a <a>GError</a> using <tt><i>g_dbus_error_set_dbus_error()</i></tt>
--   using the information in the <a>DBusMessageHeaderFieldErrorName</a>
--   header field of <i><tt>message</tt></i> as well as the first string
--   item in <i><tt>message</tt></i>'s body.
--   
--   <i>Since: 2.26</i>
dBusMessageToGerror :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m ()

-- | Get the value of the “<tt>locked</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusMessage #locked
--   </pre>
getDBusMessageLocked :: (MonadIO m, IsDBusMessage o) => o -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.DBusMessage.DBusMessage
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusMessage.DBusMessage
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusMessage.DBusMessage
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusMessage.DBusMessage o) => GI.Gio.Objects.DBusMessage.IsDBusMessage o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusMessage.DBusMessage)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusMessage.DBusMessage
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusMessage.DBusMessage


-- | Information about an annotation.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusAnnotationInfo

-- | Memory-managed wrapper type.
newtype DBusAnnotationInfo
DBusAnnotationInfo :: ManagedPtr DBusAnnotationInfo -> DBusAnnotationInfo

-- | Construct a <a>DBusAnnotationInfo</a> struct initialized to zero.
newZeroDBusAnnotationInfo :: MonadIO m => m DBusAnnotationInfo

-- | Looks up the value of an annotation.
--   
--   The cost of this function is O(n) in number of annotations.
--   
--   <i>Since: 2.26</i>
dBusAnnotationInfoLookup :: (HasCallStack, MonadIO m) => Maybe [DBusAnnotationInfo] -> Text -> m (Maybe Text)

-- | If <i><tt>info</tt></i> is statically allocated does nothing.
--   Otherwise increases the reference count.
--   
--   <i>Since: 2.26</i>
dBusAnnotationInfoRef :: (HasCallStack, MonadIO m) => DBusAnnotationInfo -> m DBusAnnotationInfo

-- | If <i><tt>info</tt></i> is statically allocated, does nothing.
--   Otherwise decreases the reference count of <i><tt>info</tt></i>. When
--   its reference count drops to 0, the memory used is freed.
--   
--   <i>Since: 2.26</i>
dBusAnnotationInfoUnref :: (HasCallStack, MonadIO m) => DBusAnnotationInfo -> m ()

-- | Set the value of the “<tt>annotations</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #annotations
--   </pre>
clearDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> m ()

-- | Get the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusAnnotationInfo #annotations
--   </pre>
getDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> m (Maybe [DBusAnnotationInfo])

-- | Set the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusAnnotationInfo [ #annotations <a>:=</a> value ]
--   </pre>
setDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()

-- | Set the value of the “<tt>key</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #key
--   </pre>
clearDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m ()

-- | Get the value of the “<tt>key</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusAnnotationInfo #key
--   </pre>
getDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text)

-- | Set the value of the “<tt>key</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusAnnotationInfo [ #key <a>:=</a> value ]
--   </pre>
setDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> CString -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusAnnotationInfo #refCount
--   </pre>
getDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> m Int32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusAnnotationInfo [ #refCount <a>:=</a> value ]
--   </pre>
setDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> Int32 -> m ()

-- | Set the value of the “<tt>value</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #value
--   </pre>
clearDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m ()

-- | Get the value of the “<tt>value</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusAnnotationInfo #value
--   </pre>
getDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text)

-- | Set the value of the “<tt>value</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusAnnotationInfo [ #value <a>:=</a> value ]
--   </pre>
setDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> CString -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo


-- | Information about an argument for a method or a signal.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusArgInfo

-- | Memory-managed wrapper type.
newtype DBusArgInfo
DBusArgInfo :: ManagedPtr DBusArgInfo -> DBusArgInfo

-- | Construct a <a>DBusArgInfo</a> struct initialized to zero.
newZeroDBusArgInfo :: MonadIO m => m DBusArgInfo

-- | If <i><tt>info</tt></i> is statically allocated does nothing.
--   Otherwise increases the reference count.
--   
--   <i>Since: 2.26</i>
dBusArgInfoRef :: (HasCallStack, MonadIO m) => DBusArgInfo -> m DBusArgInfo

-- | If <i><tt>info</tt></i> is statically allocated, does nothing.
--   Otherwise decreases the reference count of <i><tt>info</tt></i>. When
--   its reference count drops to 0, the memory used is freed.
--   
--   <i>Since: 2.26</i>
dBusArgInfoUnref :: (HasCallStack, MonadIO m) => DBusArgInfo -> m ()

-- | Set the value of the “<tt>annotations</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #annotations
--   </pre>
clearDBusArgInfoAnnotations :: MonadIO m => DBusArgInfo -> m ()

-- | Get the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusArgInfo #annotations
--   </pre>
getDBusArgInfoAnnotations :: MonadIO m => DBusArgInfo -> m (Maybe [DBusAnnotationInfo])

-- | Set the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusArgInfo [ #annotations <a>:=</a> value ]
--   </pre>
setDBusArgInfoAnnotations :: MonadIO m => DBusArgInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()

-- | Set the value of the “<tt>name</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #name
--   </pre>
clearDBusArgInfoName :: MonadIO m => DBusArgInfo -> m ()

-- | Get the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusArgInfo #name
--   </pre>
getDBusArgInfoName :: MonadIO m => DBusArgInfo -> m (Maybe Text)

-- | Set the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusArgInfo [ #name <a>:=</a> value ]
--   </pre>
setDBusArgInfoName :: MonadIO m => DBusArgInfo -> CString -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusArgInfo #refCount
--   </pre>
getDBusArgInfoRefCount :: MonadIO m => DBusArgInfo -> m Int32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusArgInfo [ #refCount <a>:=</a> value ]
--   </pre>
setDBusArgInfoRefCount :: MonadIO m => DBusArgInfo -> Int32 -> m ()

-- | Set the value of the “<tt>signature</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #signature
--   </pre>
clearDBusArgInfoSignature :: MonadIO m => DBusArgInfo -> m ()

-- | Get the value of the “<tt>signature</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusArgInfo #signature
--   </pre>
getDBusArgInfoSignature :: MonadIO m => DBusArgInfo -> m (Maybe Text)

-- | Set the value of the “<tt>signature</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusArgInfo [ #signature <a>:=</a> value ]
--   </pre>
setDBusArgInfoSignature :: MonadIO m => DBusArgInfo -> CString -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusArgInfo.DBusArgInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusArgInfo.DBusArgInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.DBusArgInfo.DBusArgInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.DBusArgInfo.DBusArgInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.DBusArgInfo.DBusArgInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusArgInfo.DBusArgInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.DBusArgInfo.DBusArgInfo


-- | Struct used in
--   <a>DBusError</a>.<tt><i>register_error_domain</i></tt>().
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusErrorEntry

-- | Memory-managed wrapper type.
newtype DBusErrorEntry
DBusErrorEntry :: ManagedPtr DBusErrorEntry -> DBusErrorEntry

-- | Construct a <a>DBusErrorEntry</a> struct initialized to zero.
newZeroDBusErrorEntry :: MonadIO m => m DBusErrorEntry

-- | Set the value of the “<tt>dbus_error_name</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #dbusErrorName
--   </pre>
clearDBusErrorEntryDbusErrorName :: MonadIO m => DBusErrorEntry -> m ()

-- | Get the value of the “<tt>dbus_error_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusErrorEntry #dbusErrorName
--   </pre>
getDBusErrorEntryDbusErrorName :: MonadIO m => DBusErrorEntry -> m (Maybe Text)

-- | Set the value of the “<tt>dbus_error_name</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusErrorEntry [ #dbusErrorName <a>:=</a> value ]
--   </pre>
setDBusErrorEntryDbusErrorName :: MonadIO m => DBusErrorEntry -> CString -> m ()

-- | Get the value of the “<tt>error_code</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusErrorEntry #errorCode
--   </pre>
getDBusErrorEntryErrorCode :: MonadIO m => DBusErrorEntry -> m Int32

-- | Set the value of the “<tt>error_code</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusErrorEntry [ #errorCode <a>:=</a> value ]
--   </pre>
setDBusErrorEntryErrorCode :: MonadIO m => DBusErrorEntry -> Int32 -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.DBusErrorEntry.DBusErrorEntry
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.DBusErrorEntry.DBusErrorEntry
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusErrorEntry.DBusErrorEntry tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusErrorEntry.DBusErrorEntry
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusErrorEntry.DBusErrorEntry


-- | Information about a method on a D-Bus interface.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusMethodInfo

-- | Memory-managed wrapper type.
newtype DBusMethodInfo
DBusMethodInfo :: ManagedPtr DBusMethodInfo -> DBusMethodInfo

-- | Construct a <a>DBusMethodInfo</a> struct initialized to zero.
newZeroDBusMethodInfo :: MonadIO m => m DBusMethodInfo

-- | If <i><tt>info</tt></i> is statically allocated does nothing.
--   Otherwise increases the reference count.
--   
--   <i>Since: 2.26</i>
dBusMethodInfoRef :: (HasCallStack, MonadIO m) => DBusMethodInfo -> m DBusMethodInfo

-- | If <i><tt>info</tt></i> is statically allocated, does nothing.
--   Otherwise decreases the reference count of <i><tt>info</tt></i>. When
--   its reference count drops to 0, the memory used is freed.
--   
--   <i>Since: 2.26</i>
dBusMethodInfoUnref :: (HasCallStack, MonadIO m) => DBusMethodInfo -> m ()

-- | Set the value of the “<tt>annotations</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #annotations
--   </pre>
clearDBusMethodInfoAnnotations :: MonadIO m => DBusMethodInfo -> m ()

-- | Get the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusMethodInfo #annotations
--   </pre>
getDBusMethodInfoAnnotations :: MonadIO m => DBusMethodInfo -> m (Maybe [DBusAnnotationInfo])

-- | Set the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusMethodInfo [ #annotations <a>:=</a> value ]
--   </pre>
setDBusMethodInfoAnnotations :: MonadIO m => DBusMethodInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()

-- | Set the value of the “<tt>in_args</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #inArgs
--   </pre>
clearDBusMethodInfoInArgs :: MonadIO m => DBusMethodInfo -> m ()

-- | Get the value of the “<tt>in_args</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusMethodInfo #inArgs
--   </pre>
getDBusMethodInfoInArgs :: MonadIO m => DBusMethodInfo -> m (Maybe [DBusArgInfo])

-- | Set the value of the “<tt>in_args</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusMethodInfo [ #inArgs <a>:=</a> value ]
--   </pre>
setDBusMethodInfoInArgs :: MonadIO m => DBusMethodInfo -> Ptr (Ptr DBusArgInfo) -> m ()

-- | Set the value of the “<tt>name</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #name
--   </pre>
clearDBusMethodInfoName :: MonadIO m => DBusMethodInfo -> m ()

-- | Get the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusMethodInfo #name
--   </pre>
getDBusMethodInfoName :: MonadIO m => DBusMethodInfo -> m (Maybe Text)

-- | Set the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusMethodInfo [ #name <a>:=</a> value ]
--   </pre>
setDBusMethodInfoName :: MonadIO m => DBusMethodInfo -> CString -> m ()

-- | Set the value of the “<tt>out_args</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #outArgs
--   </pre>
clearDBusMethodInfoOutArgs :: MonadIO m => DBusMethodInfo -> m ()

-- | Get the value of the “<tt>out_args</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusMethodInfo #outArgs
--   </pre>
getDBusMethodInfoOutArgs :: MonadIO m => DBusMethodInfo -> m (Maybe [DBusArgInfo])

-- | Set the value of the “<tt>out_args</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusMethodInfo [ #outArgs <a>:=</a> value ]
--   </pre>
setDBusMethodInfoOutArgs :: MonadIO m => DBusMethodInfo -> Ptr (Ptr DBusArgInfo) -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusMethodInfo #refCount
--   </pre>
getDBusMethodInfoRefCount :: MonadIO m => DBusMethodInfo -> m Int32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusMethodInfo [ #refCount <a>:=</a> value ]
--   </pre>
setDBusMethodInfoRefCount :: MonadIO m => DBusMethodInfo -> Int32 -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo


-- | Information about a D-Bus property on a D-Bus interface.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusPropertyInfo

-- | Memory-managed wrapper type.
newtype DBusPropertyInfo
DBusPropertyInfo :: ManagedPtr DBusPropertyInfo -> DBusPropertyInfo

-- | Construct a <a>DBusPropertyInfo</a> struct initialized to zero.
newZeroDBusPropertyInfo :: MonadIO m => m DBusPropertyInfo

-- | If <i><tt>info</tt></i> is statically allocated does nothing.
--   Otherwise increases the reference count.
--   
--   <i>Since: 2.26</i>
dBusPropertyInfoRef :: (HasCallStack, MonadIO m) => DBusPropertyInfo -> m DBusPropertyInfo

-- | If <i><tt>info</tt></i> is statically allocated, does nothing.
--   Otherwise decreases the reference count of <i><tt>info</tt></i>. When
--   its reference count drops to 0, the memory used is freed.
--   
--   <i>Since: 2.26</i>
dBusPropertyInfoUnref :: (HasCallStack, MonadIO m) => DBusPropertyInfo -> m ()

-- | Set the value of the “<tt>annotations</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #annotations
--   </pre>
clearDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> m ()

-- | Get the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusPropertyInfo #annotations
--   </pre>
getDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> m (Maybe [DBusAnnotationInfo])

-- | Set the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusPropertyInfo [ #annotations <a>:=</a> value ]
--   </pre>
setDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()

-- | Get the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusPropertyInfo #flags
--   </pre>
getDBusPropertyInfoFlags :: MonadIO m => DBusPropertyInfo -> m [DBusPropertyInfoFlags]

-- | Set the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusPropertyInfo [ #flags <a>:=</a> value ]
--   </pre>
setDBusPropertyInfoFlags :: MonadIO m => DBusPropertyInfo -> [DBusPropertyInfoFlags] -> m ()

-- | Set the value of the “<tt>name</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #name
--   </pre>
clearDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> m ()

-- | Get the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusPropertyInfo #name
--   </pre>
getDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> m (Maybe Text)

-- | Set the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusPropertyInfo [ #name <a>:=</a> value ]
--   </pre>
setDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> CString -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusPropertyInfo #refCount
--   </pre>
getDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> m Int32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusPropertyInfo [ #refCount <a>:=</a> value ]
--   </pre>
setDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> Int32 -> m ()

-- | Set the value of the “<tt>signature</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #signature
--   </pre>
clearDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> m ()

-- | Get the value of the “<tt>signature</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusPropertyInfo #signature
--   </pre>
getDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> m (Maybe Text)

-- | Set the value of the “<tt>signature</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusPropertyInfo [ #signature <a>:=</a> value ]
--   </pre>
setDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> CString -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo


-- | Information about a signal on a D-Bus interface.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusSignalInfo

-- | Memory-managed wrapper type.
newtype DBusSignalInfo
DBusSignalInfo :: ManagedPtr DBusSignalInfo -> DBusSignalInfo

-- | Construct a <a>DBusSignalInfo</a> struct initialized to zero.
newZeroDBusSignalInfo :: MonadIO m => m DBusSignalInfo

-- | If <i><tt>info</tt></i> is statically allocated does nothing.
--   Otherwise increases the reference count.
--   
--   <i>Since: 2.26</i>
dBusSignalInfoRef :: (HasCallStack, MonadIO m) => DBusSignalInfo -> m DBusSignalInfo

-- | If <i><tt>info</tt></i> is statically allocated, does nothing.
--   Otherwise decreases the reference count of <i><tt>info</tt></i>. When
--   its reference count drops to 0, the memory used is freed.
--   
--   <i>Since: 2.26</i>
dBusSignalInfoUnref :: (HasCallStack, MonadIO m) => DBusSignalInfo -> m ()

-- | Set the value of the “<tt>annotations</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #annotations
--   </pre>
clearDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> m ()

-- | Get the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusSignalInfo #annotations
--   </pre>
getDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> m (Maybe [DBusAnnotationInfo])

-- | Set the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusSignalInfo [ #annotations <a>:=</a> value ]
--   </pre>
setDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()

-- | Set the value of the “<tt>args</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #args
--   </pre>
clearDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> m ()

-- | Get the value of the “<tt>args</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusSignalInfo #args
--   </pre>
getDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> m (Maybe [DBusArgInfo])

-- | Set the value of the “<tt>args</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusSignalInfo [ #args <a>:=</a> value ]
--   </pre>
setDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> Ptr (Ptr DBusArgInfo) -> m ()

-- | Set the value of the “<tt>name</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #name
--   </pre>
clearDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> m ()

-- | Get the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusSignalInfo #name
--   </pre>
getDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> m (Maybe Text)

-- | Set the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusSignalInfo [ #name <a>:=</a> value ]
--   </pre>
setDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> CString -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusSignalInfo #refCount
--   </pre>
getDBusSignalInfoRefCount :: MonadIO m => DBusSignalInfo -> m Int32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusSignalInfo [ #refCount <a>:=</a> value ]
--   </pre>
setDBusSignalInfoRefCount :: MonadIO m => DBusSignalInfo -> Int32 -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo


-- | Information about nodes in a remote object hierarchy.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusNodeInfo

-- | Memory-managed wrapper type.
newtype DBusNodeInfo
DBusNodeInfo :: ManagedPtr DBusNodeInfo -> DBusNodeInfo

-- | Construct a <a>DBusNodeInfo</a> struct initialized to zero.
newZeroDBusNodeInfo :: MonadIO m => m DBusNodeInfo

-- | Appends an XML representation of <i><tt>info</tt></i> (and its
--   children) to <i><tt>stringBuilder</tt></i>.
--   
--   This function is typically used for generating introspection XML
--   documents at run-time for handling the
--   <tt>org.freedesktop.DBus.Introspectable.Introspect</tt> method.
--   
--   <i>Since: 2.26</i>
dBusNodeInfoGenerateXml :: (HasCallStack, MonadIO m) => DBusNodeInfo -> Word32 -> String -> m ()

-- | Looks up information about an interface.
--   
--   The cost of this function is O(n) in number of interfaces.
--   
--   <i>Since: 2.26</i>
dBusNodeInfoLookupInterface :: (HasCallStack, MonadIO m) => DBusNodeInfo -> Text -> m (Maybe DBusInterfaceInfo)

-- | Parses <i><tt>xmlData</tt></i> and returns a <a>DBusNodeInfo</a>
--   representing the data.
--   
--   The introspection XML must contain exactly one top-level
--   <tt>&lt;node&gt;</tt> element.
--   
--   Note that this routine is using a <a>GMarkup</a>-based parser that
--   only accepts a subset of valid XML documents.
--   
--   <i>Since: 2.26</i>
dBusNodeInfoNewForXml :: (HasCallStack, MonadIO m) => Text -> m DBusNodeInfo

-- | If <i><tt>info</tt></i> is statically allocated does nothing.
--   Otherwise increases the reference count.
--   
--   <i>Since: 2.26</i>
dBusNodeInfoRef :: (HasCallStack, MonadIO m) => DBusNodeInfo -> m DBusNodeInfo

-- | If <i><tt>info</tt></i> is statically allocated, does nothing.
--   Otherwise decreases the reference count of <i><tt>info</tt></i>. When
--   its reference count drops to 0, the memory used is freed.
--   
--   <i>Since: 2.26</i>
dBusNodeInfoUnref :: (HasCallStack, MonadIO m) => DBusNodeInfo -> m ()

-- | Set the value of the “<tt>annotations</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #annotations
--   </pre>
clearDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> m ()

-- | Get the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusNodeInfo #annotations
--   </pre>
getDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> m (Maybe [DBusAnnotationInfo])

-- | Set the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusNodeInfo [ #annotations <a>:=</a> value ]
--   </pre>
setDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()

-- | Set the value of the “<tt>interfaces</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #interfaces
--   </pre>
clearDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> m ()

-- | Get the value of the “<tt>interfaces</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusNodeInfo #interfaces
--   </pre>
getDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> m (Maybe [DBusInterfaceInfo])

-- | Set the value of the “<tt>interfaces</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusNodeInfo [ #interfaces <a>:=</a> value ]
--   </pre>
setDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> Ptr (Ptr DBusInterfaceInfo) -> m ()

-- | Set the value of the “<tt>nodes</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #nodes
--   </pre>
clearDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> m ()

-- | Get the value of the “<tt>nodes</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusNodeInfo #nodes
--   </pre>
getDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> m (Maybe [DBusNodeInfo])

-- | Set the value of the “<tt>nodes</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusNodeInfo [ #nodes <a>:=</a> value ]
--   </pre>
setDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> Ptr (Ptr DBusNodeInfo) -> m ()

-- | Set the value of the “<tt>path</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #path
--   </pre>
clearDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> m ()

-- | Get the value of the “<tt>path</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusNodeInfo #path
--   </pre>
getDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> m (Maybe Text)

-- | Set the value of the “<tt>path</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusNodeInfo [ #path <a>:=</a> value ]
--   </pre>
setDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> CString -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusNodeInfo #refCount
--   </pre>
getDBusNodeInfoRefCount :: MonadIO m => DBusNodeInfo -> m Int32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusNodeInfo [ #refCount <a>:=</a> value ]
--   </pre>
setDBusNodeInfoRefCount :: MonadIO m => DBusNodeInfo -> Int32 -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo


-- | Information about a D-Bus interface.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusInterfaceInfo

-- | Memory-managed wrapper type.
newtype DBusInterfaceInfo
DBusInterfaceInfo :: ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo

-- | Construct a <a>DBusInterfaceInfo</a> struct initialized to zero.
newZeroDBusInterfaceInfo :: MonadIO m => m DBusInterfaceInfo

-- | Builds a lookup-cache to speed up
--   <a>dBusInterfaceInfoLookupMethod</a>,
--   <a>dBusInterfaceInfoLookupSignal</a> and
--   <a>dBusInterfaceInfoLookupProperty</a>.
--   
--   If this has already been called with <i><tt>info</tt></i>, the
--   existing cache is used and its use count is increased.
--   
--   Note that <i><tt>info</tt></i> cannot be modified until
--   <a>dBusInterfaceInfoCacheRelease</a> is called.
--   
--   <i>Since: 2.30</i>
dBusInterfaceInfoCacheBuild :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m ()

-- | Decrements the usage count for the cache for <i><tt>info</tt></i>
--   built by <a>dBusInterfaceInfoCacheBuild</a> (if any) and frees the
--   resources used by the cache if the usage count drops to zero.
--   
--   <i>Since: 2.30</i>
dBusInterfaceInfoCacheRelease :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m ()

-- | Appends an XML representation of <i><tt>info</tt></i> (and its
--   children) to <i><tt>stringBuilder</tt></i>.
--   
--   This function is typically used for generating introspection XML
--   documents at run-time for handling the
--   <tt>org.freedesktop.DBus.Introspectable.Introspect</tt> method.
--   
--   <i>Since: 2.26</i>
dBusInterfaceInfoGenerateXml :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Word32 -> String -> m ()

-- | Looks up information about a method.
--   
--   The cost of this function is O(n) in number of methods unless
--   <a>dBusInterfaceInfoCacheBuild</a> has been used on
--   <i><tt>info</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusInterfaceInfoLookupMethod :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Text -> m (Maybe DBusMethodInfo)

-- | Looks up information about a property.
--   
--   The cost of this function is O(n) in number of properties unless
--   <a>dBusInterfaceInfoCacheBuild</a> has been used on
--   <i><tt>info</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusInterfaceInfoLookupProperty :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Text -> m (Maybe DBusPropertyInfo)

-- | Looks up information about a signal.
--   
--   The cost of this function is O(n) in number of signals unless
--   <a>dBusInterfaceInfoCacheBuild</a> has been used on
--   <i><tt>info</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusInterfaceInfoLookupSignal :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Text -> m (Maybe DBusSignalInfo)

-- | If <i><tt>info</tt></i> is statically allocated does nothing.
--   Otherwise increases the reference count.
--   
--   <i>Since: 2.26</i>
dBusInterfaceInfoRef :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m DBusInterfaceInfo

-- | If <i><tt>info</tt></i> is statically allocated, does nothing.
--   Otherwise decreases the reference count of <i><tt>info</tt></i>. When
--   its reference count drops to 0, the memory used is freed.
--   
--   <i>Since: 2.26</i>
dBusInterfaceInfoUnref :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m ()

-- | Set the value of the “<tt>annotations</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #annotations
--   </pre>
clearDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m ()

-- | Get the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceInfo #annotations
--   </pre>
getDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusAnnotationInfo])

-- | Set the value of the “<tt>annotations</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceInfo [ #annotations <a>:=</a> value ]
--   </pre>
setDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusAnnotationInfo) -> m ()

-- | Set the value of the “<tt>methods</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #methods
--   </pre>
clearDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m ()

-- | Get the value of the “<tt>methods</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceInfo #methods
--   </pre>
getDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusMethodInfo])

-- | Set the value of the “<tt>methods</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceInfo [ #methods <a>:=</a> value ]
--   </pre>
setDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusMethodInfo) -> m ()

-- | Set the value of the “<tt>name</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #name
--   </pre>
clearDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m ()

-- | Get the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceInfo #name
--   </pre>
getDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m (Maybe Text)

-- | Set the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceInfo [ #name <a>:=</a> value ]
--   </pre>
setDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> CString -> m ()

-- | Set the value of the “<tt>properties</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #properties
--   </pre>
clearDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m ()

-- | Get the value of the “<tt>properties</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceInfo #properties
--   </pre>
getDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusPropertyInfo])

-- | Set the value of the “<tt>properties</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceInfo [ #properties <a>:=</a> value ]
--   </pre>
setDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusPropertyInfo) -> m ()

-- | Get the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceInfo #refCount
--   </pre>
getDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> m Int32

-- | Set the value of the “<tt>ref_count</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceInfo [ #refCount <a>:=</a> value ]
--   </pre>
setDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> Int32 -> m ()

-- | Set the value of the “<tt>signals</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #signals
--   </pre>
clearDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m ()

-- | Get the value of the “<tt>signals</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceInfo #signals
--   </pre>
getDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusSignalInfo])

-- | Set the value of the “<tt>signals</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceInfo [ #signals <a>:=</a> value ]
--   </pre>
setDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusSignalInfo) -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo


-- | The <tt>GDBusObjectManager</tt> type is the base type for service- and
--   client-side implementations of the standardized
--   <a>`org.freedesktop.DBus.ObjectManager`</a> interface.
--   
--   See <a>DBusObjectManagerClient</a> for the client-side implementation
--   and <a>DBusObjectManagerServer</a> for the service-side
--   implementation.
module GI.Gio.Interfaces.DBusObjectManager

-- | Memory-managed wrapper type.
newtype DBusObjectManager
DBusObjectManager :: ManagedPtr DBusObjectManager -> DBusObjectManager

-- | Type class for types which can be safely cast to
--   <a>DBusObjectManager</a>, for instance with
--   <a>toDBusObjectManager</a>.
class (GObject o, IsDescendantOf DBusObjectManager o) => IsDBusObjectManager o

-- | Cast to <a>DBusObjectManager</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toDBusObjectManager :: (MonadIO m, IsDBusObjectManager o) => o -> m DBusObjectManager

-- | Gets the interface proxy for <i><tt>interfaceName</tt></i> at
--   <i><tt>objectPath</tt></i>, if any.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerGetInterface :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> Text -> m (Maybe DBusInterface)

-- | Gets the <a>DBusObject</a> at <i><tt>objectPath</tt></i>, if any.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerGetObject :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> m (Maybe DBusObject)

-- | Gets the object path that <i><tt>manager</tt></i> is for.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m Text

-- | Gets all <a>DBusObject</a> objects known to <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerGetObjects :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m [DBusObject]

-- | Emitted when <i><tt>interface</tt></i> is added to
--   <i><tt>object</tt></i>.
--   
--   This signal exists purely as a convenience to avoid having to connect
--   signals to all objects managed by <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
type DBusObjectManagerInterfaceAddedCallback = DBusObject -> DBusInterface -> IO ()

-- | Connect a signal handler for the <a>interfaceAdded</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusObjectManager #interfaceAdded callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>interfaceAdded</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObjectManager #interfaceAdded callback
--   </pre>
onDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId

-- | Emitted when <i><tt>interface</tt></i> has been removed from
--   <i><tt>object</tt></i>.
--   
--   This signal exists purely as a convenience to avoid having to connect
--   signals to all objects managed by <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
type DBusObjectManagerInterfaceRemovedCallback = DBusObject -> DBusInterface -> IO ()

-- | Connect a signal handler for the <a>interfaceRemoved</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusObjectManager #interfaceRemoved callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>interfaceRemoved</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObjectManager #interfaceRemoved callback
--   </pre>
onDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId

-- | Emitted when <i><tt>object</tt></i> is added to
--   <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
type DBusObjectManagerObjectAddedCallback = DBusObject -> IO ()

-- | Connect a signal handler for the <a>objectAdded</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> dBusObjectManager #objectAdded callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>objectAdded</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObjectManager #objectAdded callback
--   </pre>
onDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId

-- | Emitted when <i><tt>object</tt></i> is removed from
--   <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
type DBusObjectManagerObjectRemovedCallback = DBusObject -> IO ()

-- | Connect a signal handler for the <a>objectRemoved</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusObjectManager #objectRemoved callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>objectRemoved</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObjectManager #objectRemoved callback
--   </pre>
onDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager o) => GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager


-- | The <tt>GDBusObject</tt> type is the base type for D-Bus objects on
--   both the service side (see <a>DBusObjectSkeleton</a>) and the client
--   side (see <a>DBusObjectProxy</a>). It is essentially just a container
--   of interfaces.
module GI.Gio.Interfaces.DBusObject

-- | Memory-managed wrapper type.
newtype DBusObject
DBusObject :: ManagedPtr DBusObject -> DBusObject

-- | Type class for types which can be safely cast to <a>DBusObject</a>,
--   for instance with <a>toDBusObject</a>.
class (GObject o, IsDescendantOf DBusObject o) => IsDBusObject o

-- | Cast to <a>DBusObject</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDBusObject :: (MonadIO m, IsDBusObject o) => o -> m DBusObject

-- | Gets the D-Bus interface with name <i><tt>interfaceName</tt></i>
--   associated with <i><tt>object</tt></i>, if any.
--   
--   <i>Since: 2.30</i>
dBusObjectGetInterface :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> Text -> m (Maybe DBusInterface)

-- | Gets the D-Bus interfaces associated with <i><tt>object</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectGetInterfaces :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m [DBusInterface]

-- | Gets the object path for <i><tt>object</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m Text

-- | Emitted when <i><tt>interface</tt></i> is added to
--   <i><tt>object</tt></i>.
--   
--   <i>Since: 2.30</i>
type DBusObjectInterfaceAddedCallback = DBusInterface -> IO ()

-- | Connect a signal handler for the <a>interfaceAdded</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusObject #interfaceAdded callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>interfaceAdded</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObject #interfaceAdded callback
--   </pre>
onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId

-- | Emitted when <i><tt>interface</tt></i> is removed from
--   <i><tt>object</tt></i>.
--   
--   <i>Since: 2.30</i>
type DBusObjectInterfaceRemovedCallback = DBusInterface -> IO ()

-- | Connect a signal handler for the <a>interfaceRemoved</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusObject #interfaceRemoved callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>interfaceRemoved</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObject #interfaceRemoved callback
--   </pre>
onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.DBusObject.DBusObject
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DBusObject.DBusObject
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DBusObject.DBusObject
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DBusObject.DBusObject o) => GI.Gio.Interfaces.DBusObject.IsDBusObject o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DBusObject.DBusObject)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DBusObject.DBusObject
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DBusObject.DBusObject


-- | Base type for D-Bus interfaces.
--   
--   The <tt>GDBusInterface</tt> type is the base type for D-Bus interfaces
--   both on the service side (see <a>DBusInterfaceSkeleton</a>) and client
--   side (see <a>DBusProxy</a>).
--   
--   <i>Since: 2.30</i>
module GI.Gio.Interfaces.DBusInterface

-- | Memory-managed wrapper type.
newtype DBusInterface
DBusInterface :: ManagedPtr DBusInterface -> DBusInterface

-- | Type class for types which can be safely cast to <a>DBusInterface</a>,
--   for instance with <a>toDBusInterface</a>.
class (GObject o, IsDescendantOf DBusInterface o) => IsDBusInterface o

-- | Cast to <a>DBusInterface</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDBusInterface :: (MonadIO m, IsDBusInterface o) => o -> m DBusInterface

-- | Gets D-Bus introspection information for the D-Bus interface
--   implemented by <i><tt>interface_</tt></i>.
--   
--   This can return <a>Nothing</a> if no <a>DBusInterfaceInfo</a> was
--   provided during construction of <i><tt>interface_</tt></i> and is also
--   not made available otherwise. For example, <a>DBusProxy</a> implements
--   <a>DBusInterface</a> but allows for a <a>Nothing</a>
--   <a>DBusInterfaceInfo</a>.
--   
--   <i>Since: 2.30</i>
dBusInterfaceGetInfo :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m (Maybe DBusInterfaceInfo)

-- | Gets the <a>DBusObject</a> that <i><tt>interface_</tt></i> belongs to,
--   if any.
--   
--   <i>Since: 2.32</i>
dBusInterfaceGetObject :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m (Maybe DBusObject)

-- | Sets the <a>DBusObject</a> for <i><tt>interface_</tt></i> to
--   <i><tt>object</tt></i>.
--   
--   Note that <i><tt>interface_</tt></i> will hold a weak reference to
--   <i><tt>object</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSetObject :: (HasCallStack, MonadIO m, IsDBusInterface a, IsDBusObject b) => a -> Maybe b -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.DBusInterface.DBusInterface
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DBusInterface.DBusInterface
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DBusInterface.DBusInterface
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DBusInterface.DBusInterface o) => GI.Gio.Interfaces.DBusInterface.IsDBusInterface o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DBusInterface.DBusInterface)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DBusInterface.DBusInterface
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DBusInterface.DBusInterface


-- | Information about a specific attribute.
module GI.Gio.Structs.FileAttributeInfo

-- | Memory-managed wrapper type.
newtype FileAttributeInfo
FileAttributeInfo :: ManagedPtr FileAttributeInfo -> FileAttributeInfo

-- | Construct a <a>FileAttributeInfo</a> struct initialized to zero.
newZeroFileAttributeInfo :: MonadIO m => m FileAttributeInfo

-- | Get the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileAttributeInfo #flags
--   </pre>
getFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> m [FileAttributeInfoFlags]

-- | Set the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> fileAttributeInfo [ #flags <a>:=</a> value ]
--   </pre>
setFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> [FileAttributeInfoFlags] -> m ()

-- | Set the value of the “<tt>name</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #name
--   </pre>
clearFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m ()

-- | Get the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileAttributeInfo #name
--   </pre>
getFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m (Maybe Text)

-- | Set the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> fileAttributeInfo [ #name <a>:=</a> value ]
--   </pre>
setFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> CString -> m ()

-- | Get the value of the “<tt>type</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileAttributeInfo #type
--   </pre>
getFileAttributeInfoType :: MonadIO m => FileAttributeInfo -> m FileAttributeType

-- | Set the value of the “<tt>type</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> fileAttributeInfo [ #type <a>:=</a> value ]
--   </pre>
setFileAttributeInfoType :: MonadIO m => FileAttributeInfo -> FileAttributeType -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo tag
instance GHC.Classes.Eq GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo


-- | Acts as a lightweight registry for possible valid file attributes. The
--   registry stores Key-Value pair formats as
--   <tt><i>GFileAttributeInfos</i></tt>.
module GI.Gio.Structs.FileAttributeInfoList

-- | Memory-managed wrapper type.
newtype FileAttributeInfoList
FileAttributeInfoList :: ManagedPtr FileAttributeInfoList -> FileAttributeInfoList

-- | Construct a <a>FileAttributeInfoList</a> struct initialized to zero.
newZeroFileAttributeInfoList :: MonadIO m => m FileAttributeInfoList

-- | Adds a new attribute with <i><tt>name</tt></i> to the
--   <i><tt>list</tt></i>, setting its <i><tt>type</tt></i> and
--   <i><tt>flags</tt></i>.
fileAttributeInfoListAdd :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> Text -> FileAttributeType -> [FileAttributeInfoFlags] -> m ()

-- | Makes a duplicate of a file attribute info list.
fileAttributeInfoListDup :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> m FileAttributeInfoList

-- | Gets the file attribute with the name <i><tt>name</tt></i> from
--   <i><tt>list</tt></i>.
fileAttributeInfoListLookup :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> Text -> m FileAttributeInfo

-- | Creates a new file attribute info list.
fileAttributeInfoListNew :: (HasCallStack, MonadIO m) => m FileAttributeInfoList

-- | References a file attribute info list.
fileAttributeInfoListRef :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> m FileAttributeInfoList

-- | Removes a reference from the given <i><tt>list</tt></i>. If the
--   reference count falls to zero, the <i><tt>list</tt></i> is deleted.
fileAttributeInfoListUnref :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> m ()

-- | Set the value of the “<tt>infos</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #infos
--   </pre>
clearFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m ()

-- | Get the value of the “<tt>infos</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileAttributeInfoList #infos
--   </pre>
getFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m (Maybe FileAttributeInfo)

-- | Set the value of the “<tt>infos</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> fileAttributeInfoList [ #infos <a>:=</a> value ]
--   </pre>
setFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> Ptr FileAttributeInfo -> m ()

-- | Get the value of the “<tt>n_infos</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileAttributeInfoList #nInfos
--   </pre>
getFileAttributeInfoListNInfos :: MonadIO m => FileAttributeInfoList -> m Int32

-- | Set the value of the “<tt>n_infos</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> fileAttributeInfoList [ #nInfos <a>:=</a> value ]
--   </pre>
setFileAttributeInfoListNInfos :: MonadIO m => FileAttributeInfoList -> Int32 -> m ()
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList tag
instance GHC.Classes.Eq GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList


-- | Determines if a string matches a file attribute.
module GI.Gio.Structs.FileAttributeMatcher

-- | Memory-managed wrapper type.
newtype FileAttributeMatcher
FileAttributeMatcher :: ManagedPtr FileAttributeMatcher -> FileAttributeMatcher

-- | Checks if the matcher will match all of the keys in a given namespace.
--   This will always return <a>True</a> if a wildcard character is in use
--   (e.g. if matcher was created with "standard::*" and <i><tt>ns</tt></i>
--   is "standard", or if matcher was created using "*" and namespace is
--   anything.)
--   
--   TODO: this is awkwardly worded.
fileAttributeMatcherEnumerateNamespace :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool

-- | Gets the next matched attribute from a <a>FileAttributeMatcher</a>.
fileAttributeMatcherEnumerateNext :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> m (Maybe Text)

-- | Checks if an attribute will be matched by an attribute matcher. If the
--   matcher was created with the "*" matching string, this function will
--   always return <a>True</a>.
fileAttributeMatcherMatches :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool

-- | Checks if an attribute matcher only matches a given attribute. Always
--   returns <a>False</a> if "*" was used when creating the matcher.
fileAttributeMatcherMatchesOnly :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool

-- | Creates a new file attribute matcher, which matches attributes against
--   a given string. <tt><i>GFileAttributeMatchers</i></tt> are reference
--   counted structures, and are created with a reference count of 1. If
--   the number of references falls to 0, the <a>FileAttributeMatcher</a>
--   is automatically destroyed.
--   
--   The <i><tt>attributes</tt></i> string should be formatted with
--   specific keys separated from namespaces with a double colon. Several
--   "namespace<a>key</a>" strings may be concatenated with a single comma
--   (e.g. "standard<a>type</a>,standard<a>isHidden</a>"). The wildcard "*"
--   may be used to match all keys and namespaces, or "namespace::*" will
--   match all keys in a given namespace.
--   
--   <h2>Examples of file attribute matcher strings and results</h2>
--   
--   <ul>
--   <li><tt>"*"</tt>: matches all attributes.</li>
--   <li><tt>"standard::is-hidden"</tt>: matches only the key is-hidden in
--   the standard namespace.</li>
--   <li><tt>"standard::type,unix::*"</tt>: matches the type key in the
--   standard namespace and all keys in the unix namespace.</li>
--   </ul>
fileAttributeMatcherNew :: (HasCallStack, MonadIO m) => Text -> m FileAttributeMatcher

-- | References a file attribute matcher.
fileAttributeMatcherRef :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> m FileAttributeMatcher

-- | Subtracts all attributes of <i><tt>subtract</tt></i> from
--   <i><tt>matcher</tt></i> and returns a matcher that supports those
--   attributes.
--   
--   Note that currently it is not possible to remove a single attribute
--   when the <i><tt>matcher</tt></i> matches the whole namespace - or
--   remove a namespace or attribute when the matcher matches everything.
--   This is a limitation of the current implementation, but may be fixed
--   in the future.
fileAttributeMatcherSubtract :: (HasCallStack, MonadIO m) => Maybe FileAttributeMatcher -> Maybe FileAttributeMatcher -> m (Maybe FileAttributeMatcher)

-- | Prints what the matcher is matching against. The format will be equal
--   to the format passed to <a>fileAttributeMatcherNew</a>. The output
--   however, might not be identical, as the matcher may decide to use a
--   different order or omit needless parts.
--   
--   <i>Since: 2.32</i>
fileAttributeMatcherToString :: (HasCallStack, MonadIO m) => Maybe FileAttributeMatcher -> m Text

-- | Unreferences <i><tt>matcher</tt></i>. If the reference count falls
--   below 1, the <i><tt>matcher</tt></i> is automatically freed.
fileAttributeMatcherUnref :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> m ()
instance GHC.Classes.Eq GI.Gio.Structs.FileAttributeMatcher.FileAttributeMatcher
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.FileAttributeMatcher.FileAttributeMatcher
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.FileAttributeMatcher.FileAttributeMatcher
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.FileAttributeMatcher.FileAttributeMatcher)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.FileAttributeMatcher.FileAttributeMatcher
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.FileAttributeMatcher.FileAttributeMatcher


-- | <tt>GZlibDecompressor</tt> is an implementation of <a>Converter</a>
--   that decompresses data compressed with zlib.
module GI.Gio.Objects.ZlibDecompressor

-- | Memory-managed wrapper type.
newtype ZlibDecompressor
ZlibDecompressor :: ManagedPtr ZlibDecompressor -> ZlibDecompressor

-- | Type class for types which can be safely cast to
--   <a>ZlibDecompressor</a>, for instance with <a>toZlibDecompressor</a>.
class (GObject o, IsDescendantOf ZlibDecompressor o) => IsZlibDecompressor o

-- | Cast to <a>ZlibDecompressor</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toZlibDecompressor :: (MonadIO m, IsZlibDecompressor o) => o -> m ZlibDecompressor

-- | Gets the <a>ZlibDecompressor:fileInfo</a> property.
--   
--   <i>Since: 2.26</i>
zlibDecompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibDecompressor a) => a -> m (Maybe FileInfo)

-- | Creates a new decompressor.
--   
--   <i>Since: 2.24</i>
zlibDecompressorNew :: (HasCallStack, MonadIO m) => ZlibCompressorFormat -> m ZlibDecompressor

-- | Get the value of the “<tt>file-info</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> zlibDecompressor #fileInfo
--   </pre>
getZlibDecompressorFileInfo :: (MonadIO m, IsZlibDecompressor o) => o -> m (Maybe FileInfo)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>format</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructZlibDecompressorFormat :: (IsZlibDecompressor o, MonadIO m) => ZlibCompressorFormat -> m (GValueConstruct o)

-- | Get the value of the “<tt>format</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> zlibDecompressor #format
--   </pre>
getZlibDecompressorFormat :: (MonadIO m, IsZlibDecompressor o) => o -> m ZlibCompressorFormat
instance GHC.Classes.Eq GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor o) => GI.Gio.Objects.ZlibDecompressor.IsZlibDecompressor o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor


-- | <tt>GZlibCompressor</tt> is an implementation of <a>Converter</a> that
--   compresses data using zlib.
module GI.Gio.Objects.ZlibCompressor

-- | Memory-managed wrapper type.
newtype ZlibCompressor
ZlibCompressor :: ManagedPtr ZlibCompressor -> ZlibCompressor

-- | Type class for types which can be safely cast to
--   <a>ZlibCompressor</a>, for instance with <a>toZlibCompressor</a>.
class (GObject o, IsDescendantOf ZlibCompressor o) => IsZlibCompressor o

-- | Cast to <a>ZlibCompressor</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toZlibCompressor :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressor

-- | Gets the <a>ZlibCompressor:fileInfo</a> property.
--   
--   <i>Since: 2.26</i>
zlibCompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> m (Maybe FileInfo)

-- | Gets the <a>ZlibCompressor:os</a> property.
--   
--   <i>Since: 2.86</i>
zlibCompressorGetOs :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> m Int32

-- | Creates a compressor.
--   
--   <i>Since: 2.24</i>
zlibCompressorNew :: (HasCallStack, MonadIO m) => ZlibCompressorFormat -> Int32 -> m ZlibCompressor

-- | Sets the <a>ZlibCompressor:fileInfo</a> property.
--   
--   Note: it is an error to call this function while a compression is in
--   progress; it may only be called immediately after creation of
--   <i><tt>compressor</tt></i>, or after resetting it with
--   <a>converterReset</a>.
--   
--   <i>Since: 2.26</i>
zlibCompressorSetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a, IsFileInfo b) => a -> Maybe b -> m ()

-- | Sets the <a>ZlibCompressor:os</a> property.
--   
--   Note: it is an error to call this function while a compression is in
--   progress; it may only be called immediately after creation of
--   <i><tt>compressor</tt></i>, or after resetting it with
--   <a>converterReset</a>.
--   
--   <i>Since: 2.86</i>
zlibCompressorSetOs :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> Int32 -> m ()

-- | Set the value of the “<tt>file-info</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #fileInfo
--   </pre>
clearZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>file-info</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructZlibCompressorFileInfo :: (IsZlibCompressor o, MonadIO m, IsFileInfo a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>file-info</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> zlibCompressor #fileInfo
--   </pre>
getZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m (Maybe FileInfo)

-- | Set the value of the “<tt>file-info</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> zlibCompressor [ #fileInfo <a>:=</a> value ]
--   </pre>
setZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o, IsFileInfo a) => o -> a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>format</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructZlibCompressorFormat :: (IsZlibCompressor o, MonadIO m) => ZlibCompressorFormat -> m (GValueConstruct o)

-- | Get the value of the “<tt>format</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> zlibCompressor #format
--   </pre>
getZlibCompressorFormat :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressorFormat

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>level</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructZlibCompressorLevel :: (IsZlibCompressor o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>level</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> zlibCompressor #level
--   </pre>
getZlibCompressorLevel :: (MonadIO m, IsZlibCompressor o) => o -> m Int32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>os</tt>” property. This is rarely needed directly, but it is used
--   by <a>new</a>.
constructZlibCompressorOs :: (IsZlibCompressor o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>os</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> zlibCompressor #os
--   </pre>
getZlibCompressorOs :: (MonadIO m, IsZlibCompressor o) => o -> m Int32

-- | Set the value of the “<tt>os</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> zlibCompressor [ #os <a>:=</a> value ]
--   </pre>
setZlibCompressorOs :: (MonadIO m, IsZlibCompressor o) => o -> Int32 -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ZlibCompressor.ZlibCompressor)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ZlibCompressor.ZlibCompressor o) => GI.Gio.Objects.ZlibCompressor.IsZlibCompressor o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ZlibCompressor.ZlibCompressor


-- | Stores information about a file system object referenced by a
--   <a>File</a>.
--   
--   Functionality for manipulating basic metadata for files.
--   <tt>GFileInfo</tt> implements methods for getting information that all
--   files should contain, and allows for manipulation of extended
--   attributes.
--   
--   See the <a>file attributes</a> document for more information on how
--   GIO handles file attributes.
--   
--   To obtain a <tt>GFileInfo</tt> for a <a>File</a>, use
--   <a>fileQueryInfo</a> (or its async variant). To obtain a
--   <tt>GFileInfo</tt> for a file input or output stream, use
--   <a>fileInputStreamQueryInfo</a> or <a>fileOutputStreamQueryInfo</a>
--   (or their async variants).
--   
--   To change the actual attributes of a file, you should then set the
--   attribute in the <tt>GFileInfo</tt> and call
--   <a>fileSetAttributesFromInfo</a> or <a>fileSetAttributesAsync</a> on a
--   <tt>GFile</tt>.
--   
--   However, not all attributes can be changed in the file. For instance,
--   the actual size of a file cannot be changed via
--   <a>fileInfoSetSize</a>. You may call
--   <a>fileQuerySettableAttributes</a> and
--   <a>fileQueryWritableNamespaces</a> to discover the settable attributes
--   of a particular file at runtime.
--   
--   The direct accessors, such as <a>fileInfoGetName</a>, are slightly
--   more optimized than the generic attribute accessors, such as
--   <a>fileInfoGetAttributeByteString</a>.This optimization will matter
--   only if calling the API in a tight loop.
--   
--   It is an error to call these accessors without specifying their
--   required file attributes when creating the <tt>GFileInfo</tt>. Use
--   <a>fileInfoHasAttribute</a> or <a>fileInfoListAttributes</a> to check
--   what attributes are specified for a <tt>GFileInfo</tt>.
--   
--   <a>FileAttributeMatcher</a> allows for searching through a
--   <tt>GFileInfo</tt> for attributes.
module GI.Gio.Objects.FileInfo

-- | Memory-managed wrapper type.
newtype FileInfo
FileInfo :: ManagedPtr FileInfo -> FileInfo

-- | Type class for types which can be safely cast to <a>FileInfo</a>, for
--   instance with <a>toFileInfo</a>.
class (GObject o, IsDescendantOf FileInfo o) => IsFileInfo o

-- | Cast to <a>FileInfo</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toFileInfo :: (MonadIO m, IsFileInfo o) => o -> m FileInfo

-- | Clears the status information from <i><tt>info</tt></i>.
fileInfoClearStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m ()

-- | First clears all of the <a>GFileAttribute</a> of
--   <i><tt>destInfo</tt></i>, and then copies all of the file attributes
--   from <i><tt>srcInfo</tt></i> to <i><tt>destInfo</tt></i>.
fileInfoCopyInto :: (HasCallStack, MonadIO m, IsFileInfo a, IsFileInfo b) => a -> b -> m ()

-- | Duplicates a file info structure.
fileInfoDup :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m FileInfo

-- | Gets the access time of the current <i><tt>info</tt></i> and returns
--   it as a <a>DateTime</a>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_TIME_ACCESS</a>. If
--   <a>FILE_ATTRIBUTE_TIME_ACCESS_USEC</a> is provided, the resulting
--   <a>DateTime</a> will additionally have microsecond precision.
--   
--   If nanosecond precision is needed,
--   <a>FILE_ATTRIBUTE_TIME_ACCESS_NSEC</a> must be queried separately
--   using <a>fileInfoGetAttributeUint32</a>.
--   
--   <i>Since: 2.70</i>
fileInfoGetAccessDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe DateTime)

-- | Gets the value of an attribute, formatted as a human readable string.
--   
--   This escapes things as needed to make the string valid UTF-8 and
--   readable by humans. It’s not meant to be a machine readable or
--   reversible escaping format.
--   
--   To format file name attributes of type
--   <a>FileAttributeTypeByteString</a> for output as UTF-8, use
--   <a>filenameToUtf8</a> instead:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   const char *trash_orig_path_byte_string;
--   g_autofree char *trash_orig_path_utf8 = NULL;
--   
--   trash_orig_path_byte_string = g_file_info_get_attribute_byte_string (info, G_FILE_ATTRIBUTE_TRASH_ORIG_PATH);
--   trash_orig_path_utf8 = g_filename_to_utf8 (trash_orig_path_byte_string, -1, NULL, NULL, NULL);
--   if (trash_orig_path_utf8 != NULL)
--     g_message ("Some larger UTF-8 string with filename embedded as %s", trash_orig_path_utf8);
--   </pre>
fileInfoGetAttributeAsString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Maybe Text)

-- | Gets the value of a boolean attribute. If the attribute does not
--   contain a boolean value, <a>False</a> will be returned.
fileInfoGetAttributeBoolean :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Bool

-- | Gets the value of a byte string attribute. If the attribute does not
--   contain a byte string, <a>Nothing</a> will be returned.
fileInfoGetAttributeByteString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Maybe Text)

-- | Gets the attribute type, value and status for an attribute key.
fileInfoGetAttributeData :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus)

-- | Gets the value of a byte string attribute as a file path.
--   
--   If the attribute does not contain a byte string, <tt>NULL</tt> will be
--   returned.
--   
--   This function is meant to be used by language bindings that have
--   specific handling for Unix paths.
--   
--   <i>Since: 2.78</i>
fileInfoGetAttributeFilePath :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Maybe [Char])

-- | Gets a signed 32-bit integer contained within the attribute. If the
--   attribute does not contain a signed 32-bit integer, or is invalid, 0
--   will be returned.
fileInfoGetAttributeInt32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Int32

-- | Gets a signed 64-bit integer contained within the attribute. If the
--   attribute does not contain a signed 64-bit integer, or is invalid, 0
--   will be returned.
fileInfoGetAttributeInt64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Int64

-- | Gets the value of a <a>Object</a> attribute. If the attribute does not
--   contain a <a>Object</a>, <a>Nothing</a> will be returned.
fileInfoGetAttributeObject :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Maybe Object)

-- | Gets the attribute status for an attribute key.
fileInfoGetAttributeStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m FileAttributeStatus

-- | Gets the value of a string attribute. If the attribute does not
--   contain a string, <a>Nothing</a> will be returned.
fileInfoGetAttributeString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Maybe Text)

-- | Gets the value of a stringv attribute. If the attribute does not
--   contain a stringv, <a>Nothing</a> will be returned.
--   
--   <i>Since: 2.22</i>
fileInfoGetAttributeStringv :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Maybe [Text])

-- | Gets the attribute type for an attribute key.
fileInfoGetAttributeType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m FileAttributeType

-- | Gets an unsigned 32-bit integer contained within the attribute. If the
--   attribute does not contain an unsigned 32-bit integer, or is invalid,
--   0 will be returned.
fileInfoGetAttributeUint32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Word32

-- | Gets a unsigned 64-bit integer contained within the attribute. If the
--   attribute does not contain an unsigned 64-bit integer, or is invalid,
--   0 will be returned.
fileInfoGetAttributeUint64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Word64

-- | Gets the file's content type.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</a>.
fileInfoGetContentType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe Text)

-- | Gets the creation time of the current <i><tt>info</tt></i> and returns
--   it as a <a>DateTime</a>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_TIME_CREATED</a>. If
--   <a>FILE_ATTRIBUTE_TIME_CREATED_USEC</a> is provided, the resulting
--   <a>DateTime</a> will additionally have microsecond precision.
--   
--   If nanosecond precision is needed,
--   <a>FILE_ATTRIBUTE_TIME_CREATED_NSEC</a> must be queried separately
--   using <a>fileInfoGetAttributeUint32</a>.
--   
--   <i>Since: 2.70</i>
fileInfoGetCreationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe DateTime)

-- | Returns the <a>DateTime</a> representing the deletion date of the
--   file, as available in <a>FILE_ATTRIBUTE_TRASH_DELETION_DATE</a>. If
--   the <a>FILE_ATTRIBUTE_TRASH_DELETION_DATE</a> attribute is unset,
--   <a>Nothing</a> is returned.
--   
--   <i>Since: 2.36</i>
fileInfoGetDeletionDate :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe DateTime)

-- | Gets a display name for a file. This is guaranteed to always be set.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</a>.
fileInfoGetDisplayName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text

-- | Gets the edit name for a file.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_EDIT_NAME</a>.
fileInfoGetEditName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text

-- | Gets the [entity
--   tag][iface<i><tt>gio</tt></i>.File<tt><i>entity</i></tt>-tags] for a
--   given <a>FileInfo</a>. See <a>FILE_ATTRIBUTE_ETAG_VALUE</a>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_ETAG_VALUE</a>.
fileInfoGetEtag :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe Text)

-- | Gets a file's type (whether it is a regular file, symlink, etc). This
--   is different from the file's content type, see
--   <a>fileInfoGetContentType</a>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_TYPE</a>.
fileInfoGetFileType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m FileType

-- | Gets the icon for a file.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_ICON</a>.
fileInfoGetIcon :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe Icon)

-- | Checks if a file is a backup file.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_IS_BACKUP</a>.
fileInfoGetIsBackup :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool

-- | Checks if a file is hidden.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</a>.
fileInfoGetIsHidden :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool

-- | Checks if a file is a symlink.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</a>.
fileInfoGetIsSymlink :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool

-- | Gets the modification time of the current <i><tt>info</tt></i> and
--   returns it as a <a>DateTime</a>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED</a>. If
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED_USEC</a> is provided, the resulting
--   <a>DateTime</a> will additionally have microsecond precision.
--   
--   If nanosecond precision is needed,
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED_NSEC</a> must be queried separately
--   using <a>fileInfoGetAttributeUint32</a>.
--   
--   <i>Since: 2.62</i>
fileInfoGetModificationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe DateTime)

-- | Gets the modification time of the current <i><tt>info</tt></i> and
--   sets it in <i><tt>result</tt></i>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED</a>. If
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED_USEC</a> is provided it will be used
--   too.

-- | <i>Deprecated: (Since version 2.62)Use
--   <a>fileInfoGetModificationDateTime</a> instead, as<a>TimeVal</a> is
--   deprecated due to the year 2038 problem.</i>
fileInfoGetModificationTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m TimeVal

-- | Gets the name for a file. This is guaranteed to always be set.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_NAME</a>.
fileInfoGetName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m [Char]

-- | Gets the file's size (in bytes). The size is retrieved through the
--   value of the <a>FILE_ATTRIBUTE_STANDARD_SIZE</a> attribute and is
--   converted from <tt><i>guint64</i></tt> to <tt><i>goffset</i></tt>
--   before returning the result.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_SIZE</a>.
fileInfoGetSize :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Int64

-- | Gets the value of the sort_order attribute from the <a>FileInfo</a>.
--   See <a>FILE_ATTRIBUTE_STANDARD_SORT_ORDER</a>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_SORT_ORDER</a>.
fileInfoGetSortOrder :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Int32

-- | Gets the symbolic icon for a file.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON</a>.
--   
--   <i>Since: 2.34</i>
fileInfoGetSymbolicIcon :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe Icon)

-- | Gets the symlink target for a given <a>FileInfo</a>.
--   
--   It is an error to call this if the <a>FileInfo</a> does not contain
--   <a>FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</a>.
fileInfoGetSymlinkTarget :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe [Char])

-- | Checks if a file info structure has an attribute named
--   <i><tt>attribute</tt></i>.
fileInfoHasAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Bool

-- | Checks if a file info structure has an attribute in the specified
--   <i><tt>nameSpace</tt></i>.
--   
--   <i>Since: 2.22</i>
fileInfoHasNamespace :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Bool

-- | Lists the file info structure's attributes.
fileInfoListAttributes :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Maybe Text -> m (Maybe [Text])

-- | Creates a new file info structure.
fileInfoNew :: (HasCallStack, MonadIO m) => m FileInfo

-- | Removes all cases of <i><tt>attribute</tt></i> from
--   <i><tt>info</tt></i> if it exists.
fileInfoRemoveAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()

-- | Sets the <a>FILE_ATTRIBUTE_TIME_ACCESS</a> and
--   <a>FILE_ATTRIBUTE_TIME_ACCESS_USEC</a> attributes in the file info to
--   the given date/time value.
--   
--   <a>FILE_ATTRIBUTE_TIME_ACCESS_NSEC</a> will be cleared.
--   
--   <i>Since: 2.70</i>
fileInfoSetAccessDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> DateTime -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given value, if
--   possible. To unset the attribute, use <a>FileAttributeTypeInvalid</a>
--   for <i><tt>type</tt></i>.
fileInfoSetAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> FileAttributeType -> Ptr () -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeBoolean :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Bool -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeByteString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Text -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
--   
--   This function is meant to be used by language bindings that have
--   specific handling for Unix paths.
--   
--   <i>Since: 2.78</i>
fileInfoSetAttributeFilePath :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> [Char] -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeInt32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Int32 -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeInt64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Int64 -> m ()

-- | Sets <i><tt>mask</tt></i> on <i><tt>info</tt></i> to match specific
--   attribute types.
fileInfoSetAttributeMask :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> FileAttributeMatcher -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeObject :: (HasCallStack, MonadIO m, IsFileInfo a, IsObject b) => a -> Text -> b -> m ()

-- | Sets the attribute status for an attribute key. This is only needed by
--   external code that implement <a>fileSetAttributesFromInfo</a> or
--   similar functions.
--   
--   The attribute must exist in <i><tt>info</tt></i> for this to work.
--   Otherwise <a>False</a> is returned and <i><tt>info</tt></i> is
--   unchanged.
--   
--   <i>Since: 2.22</i>
fileInfoSetAttributeStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> FileAttributeStatus -> m Bool

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Text -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
--   
--   Sinze: 2.22
fileInfoSetAttributeStringv :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> [Text] -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeUint32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Word32 -> m ()

-- | Sets the <i><tt>attribute</tt></i> to contain the given
--   <i><tt>attrValue</tt></i>, if possible.
fileInfoSetAttributeUint64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Word64 -> m ()

-- | Sets the content type attribute for a given <a>FileInfo</a>. See
--   <a>FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE</a>.
fileInfoSetContentType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()

-- | Sets the <a>FILE_ATTRIBUTE_TIME_CREATED</a> and
--   <a>FILE_ATTRIBUTE_TIME_CREATED_USEC</a> attributes in the file info to
--   the given date/time value.
--   
--   <a>FILE_ATTRIBUTE_TIME_CREATED_NSEC</a> will be cleared.
--   
--   <i>Since: 2.70</i>
fileInfoSetCreationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> DateTime -> m ()

-- | Sets the display name for the current <a>FileInfo</a>. See
--   <a>FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</a>.
fileInfoSetDisplayName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()

-- | Sets the edit name for the current file. See
--   <a>FILE_ATTRIBUTE_STANDARD_EDIT_NAME</a>.
fileInfoSetEditName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()

-- | Sets the file type in a <a>FileInfo</a> to <i><tt>type</tt></i>. See
--   <a>FILE_ATTRIBUTE_STANDARD_TYPE</a>.
fileInfoSetFileType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> FileType -> m ()

-- | Sets the icon for a given <a>FileInfo</a>. See
--   <a>FILE_ATTRIBUTE_STANDARD_ICON</a>.
fileInfoSetIcon :: (HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) => a -> b -> m ()

-- | Sets the "is_hidden" attribute in a <a>FileInfo</a> according to
--   <i><tt>isHidden</tt></i>. See
--   <a>FILE_ATTRIBUTE_STANDARD_IS_HIDDEN</a>.
fileInfoSetIsHidden :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Bool -> m ()

-- | Sets the "is_symlink" attribute in a <a>FileInfo</a> according to
--   <i><tt>isSymlink</tt></i>. See
--   <a>FILE_ATTRIBUTE_STANDARD_IS_SYMLINK</a>.
fileInfoSetIsSymlink :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Bool -> m ()

-- | Sets the <a>FILE_ATTRIBUTE_TIME_MODIFIED</a> and
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED_USEC</a> attributes in the file info
--   to the given date/time value.
--   
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED_NSEC</a> will be cleared.
--   
--   <i>Since: 2.62</i>
fileInfoSetModificationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> DateTime -> m ()

-- | Sets the <a>FILE_ATTRIBUTE_TIME_MODIFIED</a> and
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED_USEC</a> attributes in the file info
--   to the given time value.
--   
--   <a>FILE_ATTRIBUTE_TIME_MODIFIED_NSEC</a> will be cleared.

-- | <i>Deprecated: (Since version 2.62)Use
--   <a>fileInfoSetModificationDateTime</a> instead, as<a>TimeVal</a> is
--   deprecated due to the year 2038 problem.</i>
fileInfoSetModificationTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> TimeVal -> m ()

-- | Sets the name attribute for the current <a>FileInfo</a>. See
--   <a>FILE_ATTRIBUTE_STANDARD_NAME</a>.
fileInfoSetName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> [Char] -> m ()

-- | Sets the <a>FILE_ATTRIBUTE_STANDARD_SIZE</a> attribute in the file
--   info to the given size.
fileInfoSetSize :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Int64 -> m ()

-- | Sets the sort order attribute in the file info structure. See
--   <a>FILE_ATTRIBUTE_STANDARD_SORT_ORDER</a>.
fileInfoSetSortOrder :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Int32 -> m ()

-- | Sets the symbolic icon for a given <a>FileInfo</a>. See
--   <a>FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON</a>.
--   
--   <i>Since: 2.34</i>
fileInfoSetSymbolicIcon :: (HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) => a -> b -> m ()

-- | Sets the <a>FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET</a> attribute in
--   the file info to the given symlink target.
fileInfoSetSymlinkTarget :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> [Char] -> m ()

-- | Unsets a mask set by <a>fileInfoSetAttributeMask</a>, if one is set.
fileInfoUnsetAttributeMask :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.FileInfo.FileInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileInfo.FileInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileInfo.FileInfo
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FileInfo.FileInfo o) => GI.Gio.Objects.FileInfo.IsFileInfo o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FileInfo.FileInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FileInfo.FileInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FileInfo.FileInfo


-- | <a>IOExtension</a> is an opaque data structure and can only be
--   accessed using the following functions.
module GI.Gio.Structs.IOExtension

-- | Memory-managed wrapper type.
newtype IOExtension
IOExtension :: ManagedPtr IOExtension -> IOExtension

-- | Gets the name under which <i><tt>extension</tt></i> was registered.
--   
--   Note that the same type may be registered as extension for multiple
--   extension points, under different names.
iOExtensionGetName :: (HasCallStack, MonadIO m) => IOExtension -> m Text

-- | Gets the priority with which <i><tt>extension</tt></i> was registered.
iOExtensionGetPriority :: (HasCallStack, MonadIO m) => IOExtension -> m Int32

-- | Gets the type associated with <i><tt>extension</tt></i>.
iOExtensionGetType :: (HasCallStack, MonadIO m) => IOExtension -> m GType
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.IOExtension.IOExtension
instance GHC.Classes.Eq GI.Gio.Structs.IOExtension.IOExtension
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.IOExtension.IOExtension


-- | <tt>GIOExtensionPoint</tt> provides a mechanism for modules to extend
--   the functionality of the library or application that loaded it in an
--   organized fashion.
--   
--   An extension point is identified by a name, and it may optionally
--   require that any implementation must be of a certain type (or derived
--   thereof). Use <a>iOExtensionPointRegister</a> to register an extension
--   point, and <a>iOExtensionPointSetRequiredType</a> to set a required
--   type.
--   
--   A module can implement an extension point by specifying the
--   [type<i><tt>gObject</tt></i>.Type] that implements the functionality.
--   Additionally, each implementation of an extension point has a name,
--   and a priority. Use <a>iOExtensionPointImplement</a> to implement an
--   extension point.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   GIOExtensionPoint *ep;
--   
--   // Register an extension point
--   ep = g_io_extension_point_register ("my-extension-point");
--   g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
--   </pre>
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   // Implement an extension point
--   G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE)
--   g_io_extension_point_implement ("my-extension-point",
--                                   my_example_impl_get_type (),
--                                   "my-example",
--                                   10);
--   </pre>
--   
--   It is up to the code that registered the extension point how it uses
--   the implementations that have been associated with it. Depending on
--   the use case, it may use all implementations, or only the one with the
--   highest priority, or pick a specific one by name.
--   
--   To avoid opening all modules just to find out what extension points
--   they implement, GIO makes use of a caching mechanism, see
--   <a>gio-querymodules</a>. You are expected to run this command after
--   installing a GIO module.
--   
--   The <tt>GIO_EXTRA_MODULES</tt> environment variable can be used to
--   specify additional directories to automatically load modules from.
--   This environment variable has the same syntax as the <tt>PATH</tt>. If
--   two modules have the same base name in different directories, then the
--   latter one will be ignored. If additional directories are specified
--   GIO will load modules from the built-in directory last.
module GI.Gio.Structs.IOExtensionPoint

-- | Memory-managed wrapper type.
newtype IOExtensionPoint
IOExtensionPoint :: ManagedPtr IOExtensionPoint -> IOExtensionPoint

-- | Finds a <a>IOExtension</a> for an extension point by name.
iOExtensionPointGetExtensionByName :: (HasCallStack, MonadIO m) => IOExtensionPoint -> Text -> m IOExtension

-- | Gets a list of all extensions that implement this extension point. The
--   list is sorted by priority, beginning with the highest priority.
iOExtensionPointGetExtensions :: (HasCallStack, MonadIO m) => IOExtensionPoint -> m [IOExtension]

-- | Gets the required type for <i><tt>extensionPoint</tt></i>.
iOExtensionPointGetRequiredType :: (HasCallStack, MonadIO m) => IOExtensionPoint -> m GType

-- | Registers <i><tt>type</tt></i> as extension for the extension point
--   with name <i><tt>extensionPointName</tt></i>.
--   
--   If <i><tt>type</tt></i> has already been registered as an extension
--   for this extension point, the existing <a>IOExtension</a> object is
--   returned.
iOExtensionPointImplement :: (HasCallStack, MonadIO m) => Text -> GType -> Text -> Int32 -> m IOExtension

-- | Looks up an existing extension point.
iOExtensionPointLookup :: (HasCallStack, MonadIO m) => Text -> m IOExtensionPoint

-- | Registers an extension point.
iOExtensionPointRegister :: (HasCallStack, MonadIO m) => Text -> m IOExtensionPoint

-- | Sets the required type for <i><tt>extensionPoint</tt></i> to
--   <i><tt>type</tt></i>. All implementations must henceforth have this
--   type.
iOExtensionPointSetRequiredType :: (HasCallStack, MonadIO m) => IOExtensionPoint -> GType -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint
instance GHC.Classes.Eq GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint


-- | Represents a scope for loading IO modules. A scope can be used for
--   blocking duplicate modules, or blocking a module you don't want to
--   load.
--   
--   The scope can be used with
--   <tt><i>g_io_modules_load_all_in_directory_with_scope()</i></tt> or
--   <a>ioModulesScanAllInDirectoryWithScope</a>.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Structs.IOModuleScope

-- | Memory-managed wrapper type.
newtype IOModuleScope
IOModuleScope :: ManagedPtr IOModuleScope -> IOModuleScope

-- | Block modules with the given <i><tt>basename</tt></i> from being
--   loaded when this scope is used with
--   <a>ioModulesScanAllInDirectoryWithScope</a> or
--   <tt><i>g_io_modules_load_all_in_directory_with_scope()</i></tt>.
--   
--   <i>Since: 2.30</i>
iOModuleScopeBlock :: (HasCallStack, MonadIO m) => IOModuleScope -> Text -> m ()

-- | Free a module scope.
--   
--   <i>Since: 2.30</i>
iOModuleScopeFree :: (HasCallStack, MonadIO m) => IOModuleScope -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.IOModuleScope.IOModuleScope
instance GHC.Classes.Eq GI.Gio.Structs.IOModuleScope.IOModuleScope
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.IOModuleScope.IOModuleScope


-- | Opaque class for defining and scheduling IO jobs.
module GI.Gio.Structs.IOSchedulerJob

-- | Memory-managed wrapper type.
newtype IOSchedulerJob
IOSchedulerJob :: ManagedPtr IOSchedulerJob -> IOSchedulerJob

-- | Used from an I/O job to send a callback to be run in the thread that
--   the job was started from, waiting for the result (and thus blocking
--   the I/O job).

-- | <i>Deprecated: (Since version 2.36)Use
--   <tt><i>g_main_context_invoke()</i></tt>.</i>
iOSchedulerJobSendToMainloop :: (HasCallStack, MonadIO m) => IOSchedulerJob -> SourceFunc -> m Bool

-- | Used from an I/O job to send a callback to be run asynchronously in
--   the thread that the job was started from. The callback will be run
--   when the main loop is available, but at that time the I/O job might
--   have finished. The return value from the callback is ignored.
--   
--   Note that if you are passing the <i><tt>userData</tt></i> from
--   <a>ioSchedulerPushJob</a> on to this function you have to ensure that
--   it is not freed before <i><tt>func</tt></i> is called, either by
--   passing <a>Nothing</a> as <i><tt>notify</tt></i> to
--   <a>ioSchedulerPushJob</a> or by using refcounting for
--   <i><tt>userData</tt></i>.

-- | <i>Deprecated: (Since version 2.36)Use
--   <tt><i>g_main_context_invoke()</i></tt>.</i>
iOSchedulerJobSendToMainloopAsync :: (HasCallStack, MonadIO m) => IOSchedulerJob -> SourceFunc -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob
instance GHC.Classes.Eq GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob


-- | <i>No description available in the introspection data.</i>
module GI.Gio.Structs.IOStreamAdapter

-- | Memory-managed wrapper type.
newtype IOStreamAdapter
IOStreamAdapter :: ManagedPtr IOStreamAdapter -> IOStreamAdapter
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter
instance GHC.Classes.Eq GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter


-- | Structure used for scatter/gather data input. You generally pass in an
--   array of <tt><i>GInputVectors</i></tt> and the operation will store
--   the read data starting in the first buffer, switching to the next as
--   needed.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Structs.InputVector

-- | Memory-managed wrapper type.
newtype InputVector
InputVector :: ManagedPtr InputVector -> InputVector

-- | Construct a <a>InputVector</a> struct initialized to zero.
newZeroInputVector :: MonadIO m => m InputVector

-- | Set the value of the “<tt>buffer</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #buffer
--   </pre>
clearInputVectorBuffer :: MonadIO m => InputVector -> m ()

-- | Get the value of the “<tt>buffer</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputVector #buffer
--   </pre>
getInputVectorBuffer :: MonadIO m => InputVector -> m (Ptr ())

-- | Set the value of the “<tt>buffer</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputVector [ #buffer <a>:=</a> value ]
--   </pre>
setInputVectorBuffer :: MonadIO m => InputVector -> Ptr () -> m ()

-- | Get the value of the “<tt>size</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputVector #size
--   </pre>
getInputVectorSize :: MonadIO m => InputVector -> m CSize

-- | Set the value of the “<tt>size</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputVector [ #size <a>:=</a> value ]
--   </pre>
setInputVectorSize :: MonadIO m => InputVector -> CSize -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.InputVector.InputVector
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.InputVector.InputVector
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.InputVector.InputVector tag
instance GHC.Classes.Eq GI.Gio.Structs.InputVector.InputVector
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.InputVector.InputVector


-- | Structure used for scatter/gather data output. You generally pass in
--   an array of <tt><i>GOutputVectors</i></tt> and the operation will use
--   all the buffers as if they were one buffer.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Structs.OutputVector

-- | Memory-managed wrapper type.
newtype OutputVector
OutputVector :: ManagedPtr OutputVector -> OutputVector

-- | Construct a <a>OutputVector</a> struct initialized to zero.
newZeroOutputVector :: MonadIO m => m OutputVector

-- | Set the value of the “<tt>buffer</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #buffer
--   </pre>
clearOutputVectorBuffer :: MonadIO m => OutputVector -> m ()

-- | Get the value of the “<tt>buffer</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> outputVector #buffer
--   </pre>
getOutputVectorBuffer :: MonadIO m => OutputVector -> m (Ptr ())

-- | Set the value of the “<tt>buffer</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> outputVector [ #buffer <a>:=</a> value ]
--   </pre>
setOutputVectorBuffer :: MonadIO m => OutputVector -> Ptr () -> m ()

-- | Get the value of the “<tt>size</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> outputVector #size
--   </pre>
getOutputVectorSize :: MonadIO m => OutputVector -> m CSize

-- | Set the value of the “<tt>size</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> outputVector [ #size <a>:=</a> value ]
--   </pre>
setOutputVectorSize :: MonadIO m => OutputVector -> CSize -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.OutputVector.OutputVector
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.OutputVector.OutputVector
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.OutputVector.OutputVector tag
instance GHC.Classes.Eq GI.Gio.Structs.OutputVector.OutputVector
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.OutputVector.OutputVector


module GI.Gio.Callbacks

-- | <i>No description available in the introspection data.</i>
type ActionEntryActivateFieldCallback = SimpleAction -> Maybe GVariant -> IO ()

-- | <i>No description available in the introspection data.</i>
type ActionEntryActivateFieldCallback_WithClosures = SimpleAction -> Maybe GVariant -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_ActionEntryActivateFieldCallback = Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ActionEntryActivateFieldCallback :: ActionEntryActivateFieldCallback -> ActionEntryActivateFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ActionEntryActivateFieldCallback :: (HasCallStack, MonadIO m, IsSimpleAction a) => FunPtr C_ActionEntryActivateFieldCallback -> a -> Maybe GVariant -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_ActionEntryActivateFieldCallback :: MonadIO m => ActionEntryActivateFieldCallback -> m (GClosure C_ActionEntryActivateFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_ActionEntryActivateFieldCallback</a>.
mk_ActionEntryActivateFieldCallback :: C_ActionEntryActivateFieldCallback -> IO (FunPtr C_ActionEntryActivateFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ActionEntryActivateFieldCallback</a></tt>.
noActionEntryActivateFieldCallback :: Maybe ActionEntryActivateFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ActionEntryActivateFieldCallback_WithClosures</a></tt>.
noActionEntryActivateFieldCallback_WithClosures :: Maybe ActionEntryActivateFieldCallback_WithClosures

-- | Wrap a <a>ActionEntryActivateFieldCallback</a> into a
--   <a>C_ActionEntryActivateFieldCallback</a>.
wrap_ActionEntryActivateFieldCallback :: Maybe (Ptr (FunPtr C_ActionEntryActivateFieldCallback)) -> ActionEntryActivateFieldCallback_WithClosures -> C_ActionEntryActivateFieldCallback

-- | <i>No description available in the introspection data.</i>
type ActionEntryChangeStateFieldCallback = SimpleAction -> GVariant -> IO ()

-- | <i>No description available in the introspection data.</i>
type ActionEntryChangeStateFieldCallback_WithClosures = SimpleAction -> GVariant -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_ActionEntryChangeStateFieldCallback = Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_ActionEntryChangeStateFieldCallback :: ActionEntryChangeStateFieldCallback -> ActionEntryChangeStateFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ActionEntryChangeStateFieldCallback :: (HasCallStack, MonadIO m, IsSimpleAction a) => FunPtr C_ActionEntryChangeStateFieldCallback -> a -> GVariant -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_ActionEntryChangeStateFieldCallback :: MonadIO m => ActionEntryChangeStateFieldCallback -> m (GClosure C_ActionEntryChangeStateFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_ActionEntryChangeStateFieldCallback</a>.
mk_ActionEntryChangeStateFieldCallback :: C_ActionEntryChangeStateFieldCallback -> IO (FunPtr C_ActionEntryChangeStateFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ActionEntryChangeStateFieldCallback</a></tt>.
noActionEntryChangeStateFieldCallback :: Maybe ActionEntryChangeStateFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ActionEntryChangeStateFieldCallback_WithClosures</a></tt>.
noActionEntryChangeStateFieldCallback_WithClosures :: Maybe ActionEntryChangeStateFieldCallback_WithClosures

-- | Wrap a <a>ActionEntryChangeStateFieldCallback</a> into a
--   <a>C_ActionEntryChangeStateFieldCallback</a>.
wrap_ActionEntryChangeStateFieldCallback :: Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback)) -> ActionEntryChangeStateFieldCallback_WithClosures -> C_ActionEntryChangeStateFieldCallback

-- | Type definition for a function that will be called back when an
--   asynchronous operation within GIO has been completed.
--   <a>AsyncReadyCallback</a> callbacks from <a>Task</a> are guaranteed to
--   be invoked in a later iteration of the thread-default main context
--   (see <a>mainContextPushThreadDefault</a>) where the <a>Task</a> was
--   created. All other users of <a>AsyncReadyCallback</a> must likewise
--   call it asynchronously in a later iteration of the main context.
--   
--   The asynchronous operation is guaranteed to have held a reference to
--   <i><tt>sourceObject</tt></i> from the time when the <tt>*_async()</tt>
--   function was called, until after this callback returns.
type AsyncReadyCallback = Maybe Object -> AsyncResult -> IO ()

-- | Type definition for a function that will be called back when an
--   asynchronous operation within GIO has been completed.
--   <a>AsyncReadyCallback</a> callbacks from <a>Task</a> are guaranteed to
--   be invoked in a later iteration of the thread-default main context
--   (see <a>mainContextPushThreadDefault</a>) where the <a>Task</a> was
--   created. All other users of <a>AsyncReadyCallback</a> must likewise
--   call it asynchronously in a later iteration of the main context.
--   
--   The asynchronous operation is guaranteed to have held a reference to
--   <i><tt>sourceObject</tt></i> from the time when the <tt>*_async()</tt>
--   function was called, until after this callback returns.
type AsyncReadyCallback_WithClosures = Maybe Object -> AsyncResult -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_AsyncReadyCallback = Ptr Object -> Ptr AsyncResult -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_AsyncReadyCallback :: AsyncReadyCallback -> AsyncReadyCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_AsyncReadyCallback :: (HasCallStack, MonadIO m, IsObject a, IsAsyncResult b) => FunPtr C_AsyncReadyCallback -> Maybe a -> b -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_AsyncReadyCallback :: MonadIO m => AsyncReadyCallback -> m (GClosure C_AsyncReadyCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_AsyncReadyCallback</a>.
mk_AsyncReadyCallback :: C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>AsyncReadyCallback</a></tt>.
noAsyncReadyCallback :: Maybe AsyncReadyCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>AsyncReadyCallback_WithClosures</a></tt>.
noAsyncReadyCallback_WithClosures :: Maybe AsyncReadyCallback_WithClosures

-- | Wrap a <a>AsyncReadyCallback</a> into a <a>C_AsyncReadyCallback</a>.
wrap_AsyncReadyCallback :: Maybe (Ptr (FunPtr C_AsyncReadyCallback)) -> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback

-- | Invoked when a connection to a message bus has been obtained.
--   
--   <i>Since: 2.26</i>
type BusAcquiredCallback = DBusConnection -> Text -> IO ()

-- | Invoked when a connection to a message bus has been obtained.
--   
--   <i>Since: 2.26</i>
type BusAcquiredCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_BusAcquiredCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_BusAcquiredCallback :: BusAcquiredCallback -> BusAcquiredCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_BusAcquiredCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusAcquiredCallback -> a -> Text -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_BusAcquiredCallback :: MonadIO m => BusAcquiredCallback -> m (GClosure C_BusAcquiredCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_BusAcquiredCallback</a>.
mk_BusAcquiredCallback :: C_BusAcquiredCallback -> IO (FunPtr C_BusAcquiredCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusAcquiredCallback</a></tt>.
noBusAcquiredCallback :: Maybe BusAcquiredCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusAcquiredCallback_WithClosures</a></tt>.
noBusAcquiredCallback_WithClosures :: Maybe BusAcquiredCallback_WithClosures

-- | Wrap a <a>BusAcquiredCallback</a> into a <a>C_BusAcquiredCallback</a>.
wrap_BusAcquiredCallback :: Maybe (Ptr (FunPtr C_BusAcquiredCallback)) -> BusAcquiredCallback_WithClosures -> C_BusAcquiredCallback

-- | Invoked when the name is acquired.
--   
--   <i>Since: 2.26</i>
type BusNameAcquiredCallback = DBusConnection -> Text -> IO ()

-- | Invoked when the name is acquired.
--   
--   <i>Since: 2.26</i>
type BusNameAcquiredCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_BusNameAcquiredCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_BusNameAcquiredCallback :: BusNameAcquiredCallback -> BusNameAcquiredCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_BusNameAcquiredCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameAcquiredCallback -> a -> Text -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_BusNameAcquiredCallback :: MonadIO m => BusNameAcquiredCallback -> m (GClosure C_BusNameAcquiredCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_BusNameAcquiredCallback</a>.
mk_BusNameAcquiredCallback :: C_BusNameAcquiredCallback -> IO (FunPtr C_BusNameAcquiredCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameAcquiredCallback</a></tt>.
noBusNameAcquiredCallback :: Maybe BusNameAcquiredCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameAcquiredCallback_WithClosures</a></tt>.
noBusNameAcquiredCallback_WithClosures :: Maybe BusNameAcquiredCallback_WithClosures

-- | Wrap a <a>BusNameAcquiredCallback</a> into a
--   <a>C_BusNameAcquiredCallback</a>.
wrap_BusNameAcquiredCallback :: Maybe (Ptr (FunPtr C_BusNameAcquiredCallback)) -> BusNameAcquiredCallback_WithClosures -> C_BusNameAcquiredCallback

-- | Invoked when the name being watched is known to have to have an owner.
--   
--   <i>Since: 2.26</i>
type BusNameAppearedCallback = DBusConnection -> Text -> Text -> IO ()

-- | Invoked when the name being watched is known to have to have an owner.
--   
--   <i>Since: 2.26</i>
type BusNameAppearedCallback_WithClosures = DBusConnection -> Text -> Text -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_BusNameAppearedCallback = Ptr DBusConnection -> CString -> CString -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_BusNameAppearedCallback :: BusNameAppearedCallback -> BusNameAppearedCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_BusNameAppearedCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameAppearedCallback -> a -> Text -> Text -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_BusNameAppearedCallback :: MonadIO m => BusNameAppearedCallback -> m (GClosure C_BusNameAppearedCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_BusNameAppearedCallback</a>.
mk_BusNameAppearedCallback :: C_BusNameAppearedCallback -> IO (FunPtr C_BusNameAppearedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameAppearedCallback</a></tt>.
noBusNameAppearedCallback :: Maybe BusNameAppearedCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameAppearedCallback_WithClosures</a></tt>.
noBusNameAppearedCallback_WithClosures :: Maybe BusNameAppearedCallback_WithClosures

-- | Wrap a <a>BusNameAppearedCallback</a> into a
--   <a>C_BusNameAppearedCallback</a>.
wrap_BusNameAppearedCallback :: Maybe (Ptr (FunPtr C_BusNameAppearedCallback)) -> BusNameAppearedCallback_WithClosures -> C_BusNameAppearedCallback

-- | Invoked when the name is lost or <i><tt>connection</tt></i> has been
--   closed.
--   
--   <i>Since: 2.26</i>
type BusNameLostCallback = DBusConnection -> Text -> IO ()

-- | Invoked when the name is lost or <i><tt>connection</tt></i> has been
--   closed.
--   
--   <i>Since: 2.26</i>
type BusNameLostCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_BusNameLostCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_BusNameLostCallback :: BusNameLostCallback -> BusNameLostCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_BusNameLostCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameLostCallback -> a -> Text -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_BusNameLostCallback :: MonadIO m => BusNameLostCallback -> m (GClosure C_BusNameLostCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_BusNameLostCallback</a>.
mk_BusNameLostCallback :: C_BusNameLostCallback -> IO (FunPtr C_BusNameLostCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameLostCallback</a></tt>.
noBusNameLostCallback :: Maybe BusNameLostCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameLostCallback_WithClosures</a></tt>.
noBusNameLostCallback_WithClosures :: Maybe BusNameLostCallback_WithClosures

-- | Wrap a <a>BusNameLostCallback</a> into a <a>C_BusNameLostCallback</a>.
wrap_BusNameLostCallback :: Maybe (Ptr (FunPtr C_BusNameLostCallback)) -> BusNameLostCallback_WithClosures -> C_BusNameLostCallback

-- | Invoked when the name being watched is known not to have to have an
--   owner.
--   
--   This is also invoked when the <a>DBusConnection</a> on which the watch
--   was established has been closed. In that case,
--   <i><tt>connection</tt></i> will be <a>Nothing</a>.
--   
--   <i>Since: 2.26</i>
type BusNameVanishedCallback = DBusConnection -> Text -> IO ()

-- | Invoked when the name being watched is known not to have to have an
--   owner.
--   
--   This is also invoked when the <a>DBusConnection</a> on which the watch
--   was established has been closed. In that case,
--   <i><tt>connection</tt></i> will be <a>Nothing</a>.
--   
--   <i>Since: 2.26</i>
type BusNameVanishedCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()

-- | Type for the callback on the (unwrapped) C side.
type C_BusNameVanishedCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_BusNameVanishedCallback :: BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_BusNameVanishedCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameVanishedCallback -> a -> Text -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_BusNameVanishedCallback :: MonadIO m => BusNameVanishedCallback -> m (GClosure C_BusNameVanishedCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_BusNameVanishedCallback</a>.
mk_BusNameVanishedCallback :: C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameVanishedCallback</a></tt>.
noBusNameVanishedCallback :: Maybe BusNameVanishedCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>BusNameVanishedCallback_WithClosures</a></tt>.
noBusNameVanishedCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures

-- | Wrap a <a>BusNameVanishedCallback</a> into a
--   <a>C_BusNameVanishedCallback</a>.
wrap_BusNameVanishedCallback :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback)) -> BusNameVanishedCallback_WithClosures -> C_BusNameVanishedCallback

-- | Type for the callback on the (unwrapped) C side.
type C_CancellableSourceFunc = Ptr Cancellable -> Ptr () -> IO CInt

-- | This is the function type of the callback used for the <a>Source</a>
--   returned by <a>cancellableSourceNew</a>.
--   
--   <i>Since: 2.28</i>
type CancellableSourceFunc = Maybe Cancellable -> Ptr () -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_CancellableSourceFunc :: (HasCallStack, MonadIO m, IsCancellable a) => FunPtr C_CancellableSourceFunc -> Maybe a -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_CancellableSourceFunc :: MonadIO m => CancellableSourceFunc -> m (GClosure C_CancellableSourceFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_CancellableSourceFunc</a>.
mk_CancellableSourceFunc :: C_CancellableSourceFunc -> IO (FunPtr C_CancellableSourceFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>CancellableSourceFunc</a></tt>.
noCancellableSourceFunc :: Maybe CancellableSourceFunc

-- | Wrap a <a>CancellableSourceFunc</a> into a
--   <a>C_CancellableSourceFunc</a>.
wrap_CancellableSourceFunc :: Maybe (Ptr (FunPtr C_CancellableSourceFunc)) -> CancellableSourceFunc -> C_CancellableSourceFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DBusInterfaceGetPropertyFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GError -> Ptr () -> IO Ptr GVariant

-- | The type of the <i><tt>getProperty</tt></i> function in
--   <a>DBusInterfaceVTable</a>.
--   
--   <i>Since: 2.26</i>
type DBusInterfaceGetPropertyFunc = DBusConnection -> Maybe Text -> Text -> Text -> Text -> GError -> IO GVariant

-- | The type of the <i><tt>getProperty</tt></i> function in
--   <a>DBusInterfaceVTable</a>.
--   
--   <i>Since: 2.26</i>
type DBusInterfaceGetPropertyFunc_WithClosures = DBusConnection -> Maybe Text -> Text -> Text -> Text -> GError -> Ptr () -> IO GVariant

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusInterfaceGetPropertyFunc :: DBusInterfaceGetPropertyFunc -> DBusInterfaceGetPropertyFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusInterfaceGetPropertyFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusInterfaceGetPropertyFunc -> a -> Maybe Text -> Text -> Text -> Text -> GError -> Ptr () -> m GVariant

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusInterfaceGetPropertyFunc :: MonadIO m => DBusInterfaceGetPropertyFunc -> m (GClosure C_DBusInterfaceGetPropertyFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusInterfaceGetPropertyFunc</a>.
mk_DBusInterfaceGetPropertyFunc :: C_DBusInterfaceGetPropertyFunc -> IO (FunPtr C_DBusInterfaceGetPropertyFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusInterfaceGetPropertyFunc</a></tt>.
noDBusInterfaceGetPropertyFunc :: Maybe DBusInterfaceGetPropertyFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusInterfaceGetPropertyFunc_WithClosures</a></tt>.
noDBusInterfaceGetPropertyFunc_WithClosures :: Maybe DBusInterfaceGetPropertyFunc_WithClosures

-- | Wrap a <a>DBusInterfaceGetPropertyFunc</a> into a
--   <a>C_DBusInterfaceGetPropertyFunc</a>.
wrap_DBusInterfaceGetPropertyFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc)) -> DBusInterfaceGetPropertyFunc_WithClosures -> C_DBusInterfaceGetPropertyFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DBusInterfaceMethodCallFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr DBusMethodInvocation -> Ptr () -> IO ()

-- | The type of the <i><tt>methodCall</tt></i> function in
--   <a>DBusInterfaceVTable</a>.
--   
--   <i><tt>interfaceName</tt></i> may be <tt>NULL</tt> if not specified by
--   the sender, although it’s encouraged for the sender to set it. If
--   unset, and the object has only one method (across all interfaces)
--   matching <i><tt>methodName</tt></i>, that method is invoked.
--   Otherwise, behaviour is implementation defined. See the <a>D-Bus
--   specification</a>. It is recommended to return
--   [error<i><tt>gio</tt></i>.DBusError.UNKNOWN_METHOD].
--   
--   <i>Since: 2.26</i>
type DBusInterfaceMethodCallFunc = DBusConnection -> Maybe Text -> Text -> Maybe Text -> Text -> GVariant -> DBusMethodInvocation -> IO ()

-- | The type of the <i><tt>methodCall</tt></i> function in
--   <a>DBusInterfaceVTable</a>.
--   
--   <i><tt>interfaceName</tt></i> may be <tt>NULL</tt> if not specified by
--   the sender, although it’s encouraged for the sender to set it. If
--   unset, and the object has only one method (across all interfaces)
--   matching <i><tt>methodName</tt></i>, that method is invoked.
--   Otherwise, behaviour is implementation defined. See the <a>D-Bus
--   specification</a>. It is recommended to return
--   [error<i><tt>gio</tt></i>.DBusError.UNKNOWN_METHOD].
--   
--   <i>Since: 2.26</i>
type DBusInterfaceMethodCallFunc_WithClosures = DBusConnection -> Maybe Text -> Text -> Maybe Text -> Text -> GVariant -> DBusMethodInvocation -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusInterfaceMethodCallFunc :: DBusInterfaceMethodCallFunc -> DBusInterfaceMethodCallFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusInterfaceMethodCallFunc :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMethodInvocation b) => FunPtr C_DBusInterfaceMethodCallFunc -> a -> Maybe Text -> Text -> Maybe Text -> Text -> GVariant -> b -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusInterfaceMethodCallFunc :: MonadIO m => DBusInterfaceMethodCallFunc -> m (GClosure C_DBusInterfaceMethodCallFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusInterfaceMethodCallFunc</a>.
mk_DBusInterfaceMethodCallFunc :: C_DBusInterfaceMethodCallFunc -> IO (FunPtr C_DBusInterfaceMethodCallFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusInterfaceMethodCallFunc</a></tt>.
noDBusInterfaceMethodCallFunc :: Maybe DBusInterfaceMethodCallFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusInterfaceMethodCallFunc_WithClosures</a></tt>.
noDBusInterfaceMethodCallFunc_WithClosures :: Maybe DBusInterfaceMethodCallFunc_WithClosures

-- | Wrap a <a>DBusInterfaceMethodCallFunc</a> into a
--   <a>C_DBusInterfaceMethodCallFunc</a>.
wrap_DBusInterfaceMethodCallFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc)) -> DBusInterfaceMethodCallFunc_WithClosures -> C_DBusInterfaceMethodCallFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DBusInterfaceSetPropertyFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr GError -> Ptr () -> IO CInt

-- | The type of the <i><tt>setProperty</tt></i> function in
--   <a>DBusInterfaceVTable</a>.
--   
--   <i>Since: 2.26</i>
type DBusInterfaceSetPropertyFunc = DBusConnection -> Maybe Text -> Text -> Text -> Text -> GVariant -> GError -> IO Bool

-- | The type of the <i><tt>setProperty</tt></i> function in
--   <a>DBusInterfaceVTable</a>.
--   
--   <i>Since: 2.26</i>
type DBusInterfaceSetPropertyFunc_WithClosures = DBusConnection -> Maybe Text -> Text -> Text -> Text -> GVariant -> GError -> Ptr () -> IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusInterfaceSetPropertyFunc :: DBusInterfaceSetPropertyFunc -> DBusInterfaceSetPropertyFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusInterfaceSetPropertyFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusInterfaceSetPropertyFunc -> a -> Maybe Text -> Text -> Text -> Text -> GVariant -> GError -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusInterfaceSetPropertyFunc :: MonadIO m => DBusInterfaceSetPropertyFunc -> m (GClosure C_DBusInterfaceSetPropertyFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusInterfaceSetPropertyFunc</a>.
mk_DBusInterfaceSetPropertyFunc :: C_DBusInterfaceSetPropertyFunc -> IO (FunPtr C_DBusInterfaceSetPropertyFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusInterfaceSetPropertyFunc</a></tt>.
noDBusInterfaceSetPropertyFunc :: Maybe DBusInterfaceSetPropertyFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusInterfaceSetPropertyFunc_WithClosures</a></tt>.
noDBusInterfaceSetPropertyFunc_WithClosures :: Maybe DBusInterfaceSetPropertyFunc_WithClosures

-- | Wrap a <a>DBusInterfaceSetPropertyFunc</a> into a
--   <a>C_DBusInterfaceSetPropertyFunc</a>.
wrap_DBusInterfaceSetPropertyFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc)) -> DBusInterfaceSetPropertyFunc_WithClosures -> C_DBusInterfaceSetPropertyFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DBusMessageFilterFunction = Ptr DBusConnection -> Ptr DBusMessage -> CInt -> Ptr () -> IO Ptr DBusMessage

-- | Signature for function used in <a>dBusConnectionAddFilter</a>.
--   
--   A filter function is passed a <a>DBusMessage</a> and expected to
--   return a <a>DBusMessage</a> too. Passive filter functions that don't
--   modify the message can simply return the <i><tt>message</tt></i>
--   object:
--   
--   <pre>
--   static GDBusMessage *
--   passive_filter (GDBusConnection *connection
--                   GDBusMessage    *message,
--                   gboolean         incoming,
--                   gpointer         user_data)
--   {
--     // inspect @message
--     return message;
--   }
--   </pre>
--   
--   Filter functions that wants to drop a message can simply return
--   <a>Nothing</a>:
--   
--   <pre>
--   static GDBusMessage *
--   drop_filter (GDBusConnection *connection
--                GDBusMessage    *message,
--                gboolean         incoming,
--                gpointer         user_data)
--   {
--     if (should_drop_message)
--       {
--         g_object_unref (message);
--         message = NULL;
--       }
--     return message;
--   }
--   </pre>
--   
--   Finally, a filter function may modify a message by copying it:
--   
--   <pre>
--   static GDBusMessage *
--   modifying_filter (GDBusConnection *connection
--                     GDBusMessage    *message,
--                     gboolean         incoming,
--                     gpointer         user_data)
--   {
--     GDBusMessage *copy;
--     GError *error;
--   
--     error = NULL;
--     copy = g_dbus_message_copy (message, &amp;error);
--     // handle @error being set
--     g_object_unref (message);
--   
--     // modify @copy
--   
--     return copy;
--   }
--   </pre>
--   
--   If the returned <a>DBusMessage</a> is different from
--   <i><tt>message</tt></i> and cannot be sent on
--   <i><tt>connection</tt></i> (it could use features, such as file
--   descriptors, not compatible with <i><tt>connection</tt></i>), then a
--   warning is logged to standard error. Applications can check this ahead
--   of time using <a>dBusMessageToBlob</a> passing a
--   <a>DBusCapabilityFlags</a> value obtained from
--   <i><tt>connection</tt></i>.
--   
--   <i>Since: 2.26</i>
type DBusMessageFilterFunction = DBusConnection -> DBusMessage -> Bool -> IO Maybe DBusMessage

-- | Signature for function used in <a>dBusConnectionAddFilter</a>.
--   
--   A filter function is passed a <a>DBusMessage</a> and expected to
--   return a <a>DBusMessage</a> too. Passive filter functions that don't
--   modify the message can simply return the <i><tt>message</tt></i>
--   object:
--   
--   <pre>
--   static GDBusMessage *
--   passive_filter (GDBusConnection *connection
--                   GDBusMessage    *message,
--                   gboolean         incoming,
--                   gpointer         user_data)
--   {
--     // inspect @message
--     return message;
--   }
--   </pre>
--   
--   Filter functions that wants to drop a message can simply return
--   <a>Nothing</a>:
--   
--   <pre>
--   static GDBusMessage *
--   drop_filter (GDBusConnection *connection
--                GDBusMessage    *message,
--                gboolean         incoming,
--                gpointer         user_data)
--   {
--     if (should_drop_message)
--       {
--         g_object_unref (message);
--         message = NULL;
--       }
--     return message;
--   }
--   </pre>
--   
--   Finally, a filter function may modify a message by copying it:
--   
--   <pre>
--   static GDBusMessage *
--   modifying_filter (GDBusConnection *connection
--                     GDBusMessage    *message,
--                     gboolean         incoming,
--                     gpointer         user_data)
--   {
--     GDBusMessage *copy;
--     GError *error;
--   
--     error = NULL;
--     copy = g_dbus_message_copy (message, &amp;error);
--     // handle @error being set
--     g_object_unref (message);
--   
--     // modify @copy
--   
--     return copy;
--   }
--   </pre>
--   
--   If the returned <a>DBusMessage</a> is different from
--   <i><tt>message</tt></i> and cannot be sent on
--   <i><tt>connection</tt></i> (it could use features, such as file
--   descriptors, not compatible with <i><tt>connection</tt></i>), then a
--   warning is logged to standard error. Applications can check this ahead
--   of time using <a>dBusMessageToBlob</a> passing a
--   <a>DBusCapabilityFlags</a> value obtained from
--   <i><tt>connection</tt></i>.
--   
--   <i>Since: 2.26</i>
type DBusMessageFilterFunction_WithClosures = DBusConnection -> DBusMessage -> Bool -> Ptr () -> IO Maybe DBusMessage

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusMessageFilterFunction :: DBusMessageFilterFunction -> DBusMessageFilterFunction_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusMessageFilterFunction :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) => FunPtr C_DBusMessageFilterFunction -> a -> b -> Bool -> Ptr () -> m (Maybe DBusMessage)

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusMessageFilterFunction :: MonadIO m => DBusMessageFilterFunction -> m (GClosure C_DBusMessageFilterFunction)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusMessageFilterFunction</a>.
mk_DBusMessageFilterFunction :: C_DBusMessageFilterFunction -> IO (FunPtr C_DBusMessageFilterFunction)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusMessageFilterFunction</a></tt>.
noDBusMessageFilterFunction :: Maybe DBusMessageFilterFunction

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusMessageFilterFunction_WithClosures</a></tt>.
noDBusMessageFilterFunction_WithClosures :: Maybe DBusMessageFilterFunction_WithClosures

-- | Wrap a <a>DBusMessageFilterFunction</a> into a
--   <a>C_DBusMessageFilterFunction</a>.
wrap_DBusMessageFilterFunction :: Maybe (Ptr (FunPtr C_DBusMessageFilterFunction)) -> DBusMessageFilterFunction_WithClosures -> C_DBusMessageFilterFunction

-- | Type for the callback on the (unwrapped) C side.
type C_DBusProxyTypeFunc = Ptr DBusObjectManagerClient -> CString -> CString -> Ptr () -> IO CGType

-- | Function signature for a function used to determine the <a>GType</a>
--   to use for an interface proxy (if <i><tt>interfaceName</tt></i> is not
--   <a>Nothing</a>) or object proxy (if <i><tt>interfaceName</tt></i> is
--   <a>Nothing</a>).
--   
--   This function is called in the thread-default main context (see
--   <a>mainContextPushThreadDefault</a>) that <i><tt>manager</tt></i> was
--   constructed in.
--   
--   <i>Since: 2.30</i>
type DBusProxyTypeFunc = DBusObjectManagerClient -> Text -> Maybe Text -> Ptr () -> IO GType

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusProxyTypeFunc :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => FunPtr C_DBusProxyTypeFunc -> a -> Text -> Maybe Text -> Ptr () -> m GType

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusProxyTypeFunc :: MonadIO m => DBusProxyTypeFunc -> m (GClosure C_DBusProxyTypeFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusProxyTypeFunc</a>.
mk_DBusProxyTypeFunc :: C_DBusProxyTypeFunc -> IO (FunPtr C_DBusProxyTypeFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusProxyTypeFunc</a></tt>.
noDBusProxyTypeFunc :: Maybe DBusProxyTypeFunc

-- | Wrap a <a>DBusProxyTypeFunc</a> into a <a>C_DBusProxyTypeFunc</a>.
wrap_DBusProxyTypeFunc :: Maybe (Ptr (FunPtr C_DBusProxyTypeFunc)) -> DBusProxyTypeFunc -> C_DBusProxyTypeFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DBusSignalCallback = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr () -> IO ()

-- | Signature for callback function used in
--   <a>dBusConnectionSignalSubscribe</a>.
--   
--   <i>Since: 2.26</i>
type DBusSignalCallback = DBusConnection -> Maybe Text -> Text -> Text -> Text -> GVariant -> IO ()

-- | Signature for callback function used in
--   <a>dBusConnectionSignalSubscribe</a>.
--   
--   <i>Since: 2.26</i>
type DBusSignalCallback_WithClosures = DBusConnection -> Maybe Text -> Text -> Text -> Text -> GVariant -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusSignalCallback :: DBusSignalCallback -> DBusSignalCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusSignalCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusSignalCallback -> a -> Maybe Text -> Text -> Text -> Text -> GVariant -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusSignalCallback :: MonadIO m => DBusSignalCallback -> m (GClosure C_DBusSignalCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusSignalCallback</a>.
mk_DBusSignalCallback :: C_DBusSignalCallback -> IO (FunPtr C_DBusSignalCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSignalCallback</a></tt>.
noDBusSignalCallback :: Maybe DBusSignalCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSignalCallback_WithClosures</a></tt>.
noDBusSignalCallback_WithClosures :: Maybe DBusSignalCallback_WithClosures

-- | Wrap a <a>DBusSignalCallback</a> into a <a>C_DBusSignalCallback</a>.
wrap_DBusSignalCallback :: Maybe (Ptr (FunPtr C_DBusSignalCallback)) -> DBusSignalCallback_WithClosures -> C_DBusSignalCallback

-- | Type for the callback on the (unwrapped) C side.
type C_DBusSubtreeDispatchFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr () -> Ptr () -> IO Ptr DBusInterfaceVTable

-- | The type of the <i><tt>dispatch</tt></i> function in
--   <a>DBusSubtreeVTable</a>.
--   
--   Subtrees are flat. <i><tt>node</tt></i>, if non-<a>Nothing</a>, is
--   always exactly one segment of the object path (ie: it never contains a
--   slash).
--   
--   <i>Since: 2.26</i>
type DBusSubtreeDispatchFunc = DBusConnection -> Text -> Text -> Text -> Text -> Ptr () -> IO Maybe DBusInterfaceVTable

-- | The type of the <i><tt>dispatch</tt></i> function in
--   <a>DBusSubtreeVTable</a>.
--   
--   Subtrees are flat. <i><tt>node</tt></i>, if non-<a>Nothing</a>, is
--   always exactly one segment of the object path (ie: it never contains a
--   slash).
--   
--   <i>Since: 2.26</i>
type DBusSubtreeDispatchFunc_WithClosures = DBusConnection -> Text -> Text -> Text -> Text -> Ptr () -> Ptr () -> IO Maybe DBusInterfaceVTable

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusSubtreeDispatchFunc :: DBusSubtreeDispatchFunc -> DBusSubtreeDispatchFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusSubtreeDispatchFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusSubtreeDispatchFunc -> a -> Text -> Text -> Text -> Text -> Ptr () -> Ptr () -> m (Maybe DBusInterfaceVTable)

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusSubtreeDispatchFunc :: MonadIO m => DBusSubtreeDispatchFunc -> m (GClosure C_DBusSubtreeDispatchFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusSubtreeDispatchFunc</a>.
mk_DBusSubtreeDispatchFunc :: C_DBusSubtreeDispatchFunc -> IO (FunPtr C_DBusSubtreeDispatchFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSubtreeDispatchFunc</a></tt>.
noDBusSubtreeDispatchFunc :: Maybe DBusSubtreeDispatchFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSubtreeDispatchFunc_WithClosures</a></tt>.
noDBusSubtreeDispatchFunc_WithClosures :: Maybe DBusSubtreeDispatchFunc_WithClosures

-- | Wrap a <a>DBusSubtreeDispatchFunc</a> into a
--   <a>C_DBusSubtreeDispatchFunc</a>.
wrap_DBusSubtreeDispatchFunc :: Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc)) -> DBusSubtreeDispatchFunc_WithClosures -> C_DBusSubtreeDispatchFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DBusSubtreeEnumerateFunc = Ptr DBusConnection -> CString -> CString -> Ptr () -> IO Ptr CString

-- | The type of the <i><tt>enumerate</tt></i> function in
--   <a>DBusSubtreeVTable</a>.
--   
--   This function is called when generating introspection data and also
--   when preparing to dispatch incoming messages in the event that the
--   <a>DBusSubtreeFlagsDispatchToUnenumeratedNodes</a> flag is not
--   specified (ie: to verify that the object path is valid).
--   
--   Hierarchies are not supported; the items that you return should not
--   contain the <tt>/</tt> character.
--   
--   The return value will be freed with <a>strfreev</a>.
--   
--   <i>Since: 2.26</i>
type DBusSubtreeEnumerateFunc = DBusConnection -> Text -> Text -> IO [Text]

-- | The type of the <i><tt>enumerate</tt></i> function in
--   <a>DBusSubtreeVTable</a>.
--   
--   This function is called when generating introspection data and also
--   when preparing to dispatch incoming messages in the event that the
--   <a>DBusSubtreeFlagsDispatchToUnenumeratedNodes</a> flag is not
--   specified (ie: to verify that the object path is valid).
--   
--   Hierarchies are not supported; the items that you return should not
--   contain the <tt>/</tt> character.
--   
--   The return value will be freed with <a>strfreev</a>.
--   
--   <i>Since: 2.26</i>
type DBusSubtreeEnumerateFunc_WithClosures = DBusConnection -> Text -> Text -> Ptr () -> IO [Text]

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusSubtreeEnumerateFunc :: DBusSubtreeEnumerateFunc -> DBusSubtreeEnumerateFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusSubtreeEnumerateFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusSubtreeEnumerateFunc -> a -> Text -> Text -> Ptr () -> m [Text]

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusSubtreeEnumerateFunc :: MonadIO m => DBusSubtreeEnumerateFunc -> m (GClosure C_DBusSubtreeEnumerateFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusSubtreeEnumerateFunc</a>.
mk_DBusSubtreeEnumerateFunc :: C_DBusSubtreeEnumerateFunc -> IO (FunPtr C_DBusSubtreeEnumerateFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSubtreeEnumerateFunc</a></tt>.
noDBusSubtreeEnumerateFunc :: Maybe DBusSubtreeEnumerateFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSubtreeEnumerateFunc_WithClosures</a></tt>.
noDBusSubtreeEnumerateFunc_WithClosures :: Maybe DBusSubtreeEnumerateFunc_WithClosures

-- | Wrap a <a>DBusSubtreeEnumerateFunc</a> into a
--   <a>C_DBusSubtreeEnumerateFunc</a>.
wrap_DBusSubtreeEnumerateFunc :: Maybe (Ptr (FunPtr C_DBusSubtreeEnumerateFunc)) -> DBusSubtreeEnumerateFunc_WithClosures -> C_DBusSubtreeEnumerateFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DBusSubtreeIntrospectFunc = Ptr DBusConnection -> CString -> CString -> CString -> Ptr () -> IO Ptr Ptr DBusInterfaceInfo

-- | The type of the <i><tt>introspect</tt></i> function in
--   <a>DBusSubtreeVTable</a>.
--   
--   Subtrees are flat. <i><tt>node</tt></i>, if non-<a>Nothing</a>, is
--   always exactly one segment of the object path (ie: it never contains a
--   slash).
--   
--   This function should return <a>Nothing</a> to indicate that there is
--   no object at this node.
--   
--   If this function returns non-<a>Nothing</a>, the return value is
--   expected to be a <a>Nothing</a>-terminated array of pointers to
--   <a>DBusInterfaceInfo</a> structures describing the interfaces
--   implemented by <i><tt>node</tt></i>. This array will have
--   <a>dBusInterfaceInfoUnref</a> called on each item before being freed
--   with <a>free</a>.
--   
--   The difference between returning <a>Nothing</a> and an array
--   containing zero items is that the standard DBus interfaces will
--   returned to the remote introspector in the empty array case, but not
--   in the <a>Nothing</a> case.
--   
--   <i>Since: 2.26</i>
type DBusSubtreeIntrospectFunc = DBusConnection -> Text -> Text -> Text -> IO Maybe [DBusInterfaceInfo]

-- | The type of the <i><tt>introspect</tt></i> function in
--   <a>DBusSubtreeVTable</a>.
--   
--   Subtrees are flat. <i><tt>node</tt></i>, if non-<a>Nothing</a>, is
--   always exactly one segment of the object path (ie: it never contains a
--   slash).
--   
--   This function should return <a>Nothing</a> to indicate that there is
--   no object at this node.
--   
--   If this function returns non-<a>Nothing</a>, the return value is
--   expected to be a <a>Nothing</a>-terminated array of pointers to
--   <a>DBusInterfaceInfo</a> structures describing the interfaces
--   implemented by <i><tt>node</tt></i>. This array will have
--   <a>dBusInterfaceInfoUnref</a> called on each item before being freed
--   with <a>free</a>.
--   
--   The difference between returning <a>Nothing</a> and an array
--   containing zero items is that the standard DBus interfaces will
--   returned to the remote introspector in the empty array case, but not
--   in the <a>Nothing</a> case.
--   
--   <i>Since: 2.26</i>
type DBusSubtreeIntrospectFunc_WithClosures = DBusConnection -> Text -> Text -> Text -> Ptr () -> IO Maybe [DBusInterfaceInfo]

-- | A simple wrapper that ignores the closure arguments.
drop_closures_DBusSubtreeIntrospectFunc :: DBusSubtreeIntrospectFunc -> DBusSubtreeIntrospectFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DBusSubtreeIntrospectFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusSubtreeIntrospectFunc -> a -> Text -> Text -> Text -> Ptr () -> m (Maybe [DBusInterfaceInfo])

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DBusSubtreeIntrospectFunc :: MonadIO m => DBusSubtreeIntrospectFunc -> m (GClosure C_DBusSubtreeIntrospectFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DBusSubtreeIntrospectFunc</a>.
mk_DBusSubtreeIntrospectFunc :: C_DBusSubtreeIntrospectFunc -> IO (FunPtr C_DBusSubtreeIntrospectFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSubtreeIntrospectFunc</a></tt>.
noDBusSubtreeIntrospectFunc :: Maybe DBusSubtreeIntrospectFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DBusSubtreeIntrospectFunc_WithClosures</a></tt>.
noDBusSubtreeIntrospectFunc_WithClosures :: Maybe DBusSubtreeIntrospectFunc_WithClosures

-- | Wrap a <a>DBusSubtreeIntrospectFunc</a> into a
--   <a>C_DBusSubtreeIntrospectFunc</a>.
wrap_DBusSubtreeIntrospectFunc :: Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc)) -> DBusSubtreeIntrospectFunc_WithClosures -> C_DBusSubtreeIntrospectFunc

-- | Type for the callback on the (unwrapped) C side.
type C_DatagramBasedSourceFunc = Ptr DatagramBased -> CUInt -> Ptr () -> IO CInt

-- | This is the function type of the callback used for the <a>Source</a>
--   returned by <a>datagramBasedCreateSource</a>.
--   
--   <i>Since: 2.48</i>
type DatagramBasedSourceFunc = DatagramBased -> [IOCondition] -> Ptr () -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_DatagramBasedSourceFunc :: (HasCallStack, MonadIO m, IsDatagramBased a) => FunPtr C_DatagramBasedSourceFunc -> a -> [IOCondition] -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_DatagramBasedSourceFunc :: MonadIO m => DatagramBasedSourceFunc -> m (GClosure C_DatagramBasedSourceFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_DatagramBasedSourceFunc</a>.
mk_DatagramBasedSourceFunc :: C_DatagramBasedSourceFunc -> IO (FunPtr C_DatagramBasedSourceFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>DatagramBasedSourceFunc</a></tt>.
noDatagramBasedSourceFunc :: Maybe DatagramBasedSourceFunc

-- | Wrap a <a>DatagramBasedSourceFunc</a> into a
--   <a>C_DatagramBasedSourceFunc</a>.
wrap_DatagramBasedSourceFunc :: Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc)) -> DatagramBasedSourceFunc -> C_DatagramBasedSourceFunc

-- | Type for the callback on the (unwrapped) C side.
type C_FileMeasureProgressCallback = CInt -> Word64 -> Word64 -> Word64 -> Ptr () -> IO ()

-- | This callback type is used by <a>fileMeasureDiskUsage</a> to make
--   periodic progress reports when measuring the amount of disk spaced
--   used by a directory.
--   
--   These calls are made on a best-effort basis and not all types of
--   <a>File</a> will support them. At the minimum, however, one call will
--   always be made immediately.
--   
--   In the case that there is no support, <i><tt>reporting</tt></i> will
--   be set to <a>False</a> (and the other values undefined) and no further
--   calls will be made. Otherwise, the <i><tt>reporting</tt></i> will be
--   <a>True</a> and the other values all-zeros during the first
--   (immediate) call. In this way, you can know which type of progress UI
--   to show without a delay.
--   
--   For <a>fileMeasureDiskUsage</a> the callback is made directly. For
--   <tt><i>g_file_measure_disk_usage_async()</i></tt> the callback is made
--   via the default main context of the calling thread (ie: the same way
--   that the final async result would be reported).
--   
--   <i><tt>currentSize</tt></i> is in the same units as requested by the
--   operation (see <a>FileMeasureFlagsApparentSize</a>).
--   
--   The frequency of the updates is implementation defined, but is ideally
--   about once every 200ms.
--   
--   The last progress callback may or may not be equal to the final
--   result. Always check the async result to get the final value.
--   
--   <i>Since: 2.38</i>
type FileMeasureProgressCallback = Bool -> Word64 -> Word64 -> Word64 -> Ptr () -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_FileMeasureProgressCallback :: (HasCallStack, MonadIO m) => FunPtr C_FileMeasureProgressCallback -> Bool -> Word64 -> Word64 -> Word64 -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_FileMeasureProgressCallback :: MonadIO m => FileMeasureProgressCallback -> m (GClosure C_FileMeasureProgressCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_FileMeasureProgressCallback</a>.
mk_FileMeasureProgressCallback :: C_FileMeasureProgressCallback -> IO (FunPtr C_FileMeasureProgressCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>FileMeasureProgressCallback</a></tt>.
noFileMeasureProgressCallback :: Maybe FileMeasureProgressCallback

-- | Wrap a <a>FileMeasureProgressCallback</a> into a
--   <a>C_FileMeasureProgressCallback</a>.
wrap_FileMeasureProgressCallback :: Maybe (Ptr (FunPtr C_FileMeasureProgressCallback)) -> FileMeasureProgressCallback -> C_FileMeasureProgressCallback

-- | Type for the callback on the (unwrapped) C side.
type C_FileProgressCallback = Int64 -> Int64 -> Ptr () -> IO ()

-- | When doing file operations that may take a while, such as moving a
--   file or copying a file, a progress callback is used to pass how far
--   along that operation is to the application.
type FileProgressCallback = Int64 -> Int64 -> Ptr () -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_FileProgressCallback :: (HasCallStack, MonadIO m) => FunPtr C_FileProgressCallback -> Int64 -> Int64 -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_FileProgressCallback :: MonadIO m => FileProgressCallback -> m (GClosure C_FileProgressCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_FileProgressCallback</a>.
mk_FileProgressCallback :: C_FileProgressCallback -> IO (FunPtr C_FileProgressCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>FileProgressCallback</a></tt>.
noFileProgressCallback :: Maybe FileProgressCallback

-- | Wrap a <a>FileProgressCallback</a> into a
--   <a>C_FileProgressCallback</a>.
wrap_FileProgressCallback :: Maybe (Ptr (FunPtr C_FileProgressCallback)) -> FileProgressCallback -> C_FileProgressCallback

-- | Type for the callback on the (unwrapped) C side.
type C_FileReadMoreCallback = CString -> Int64 -> Ptr () -> IO CInt

-- | When loading the partial contents of a file with
--   <tt><i>g_file_load_partial_contents_async()</i></tt>, it may become
--   necessary to determine if any more data from the file should be
--   loaded. A <a>FileReadMoreCallback</a> function facilitates this by
--   returning <a>True</a> if more data should be read, or <a>False</a>
--   otherwise.
type FileReadMoreCallback = Text -> Int64 -> Ptr () -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_FileReadMoreCallback :: (HasCallStack, MonadIO m) => FunPtr C_FileReadMoreCallback -> Text -> Int64 -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_FileReadMoreCallback :: MonadIO m => FileReadMoreCallback -> m (GClosure C_FileReadMoreCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_FileReadMoreCallback</a>.
mk_FileReadMoreCallback :: C_FileReadMoreCallback -> IO (FunPtr C_FileReadMoreCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>FileReadMoreCallback</a></tt>.
noFileReadMoreCallback :: Maybe FileReadMoreCallback

-- | Wrap a <a>FileReadMoreCallback</a> into a
--   <a>C_FileReadMoreCallback</a>.
wrap_FileReadMoreCallback :: Maybe (Ptr (FunPtr C_FileReadMoreCallback)) -> FileReadMoreCallback -> C_FileReadMoreCallback

-- | Type for the callback on the (unwrapped) C side.
type C_IOSchedulerJobFunc = Ptr IOSchedulerJob -> Ptr Cancellable -> Ptr () -> IO CInt

-- | I/O Job function.
--   
--   Long-running jobs should periodically check the
--   <i><tt>cancellable</tt></i> to see if they have been cancelled.

-- | <i>Deprecated: (Since version 2.36)Use <a>ThreadPool</a>
--   or<a>taskRunInThread</a></i>
type IOSchedulerJobFunc = IOSchedulerJob -> Maybe Cancellable -> Ptr () -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_IOSchedulerJobFunc :: (HasCallStack, MonadIO m, IsCancellable a) => FunPtr C_IOSchedulerJobFunc -> IOSchedulerJob -> Maybe a -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_IOSchedulerJobFunc :: MonadIO m => IOSchedulerJobFunc -> m (GClosure C_IOSchedulerJobFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_IOSchedulerJobFunc</a>.
mk_IOSchedulerJobFunc :: C_IOSchedulerJobFunc -> IO (FunPtr C_IOSchedulerJobFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>IOSchedulerJobFunc</a></tt>.
noIOSchedulerJobFunc :: Maybe IOSchedulerJobFunc

-- | Wrap a <a>IOSchedulerJobFunc</a> into a <a>C_IOSchedulerJobFunc</a>.
wrap_IOSchedulerJobFunc :: Maybe (Ptr (FunPtr C_IOSchedulerJobFunc)) -> IOSchedulerJobFunc -> C_IOSchedulerJobFunc

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassCloseAsyncFieldCallback = Ptr InputStream -> Int32 -> Ptr Cancellable -> FunPtr C_AsyncReadyCallback -> Ptr () -> IO ()

-- | <i>No description available in the introspection data.</i>
type InputStreamClassCloseAsyncFieldCallback = InputStream -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> IO ()

-- | <i>No description available in the introspection data.</i>
type InputStreamClassCloseAsyncFieldCallback_WithClosures = InputStream -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_InputStreamClassCloseAsyncFieldCallback :: InputStreamClassCloseAsyncFieldCallback -> InputStreamClassCloseAsyncFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassCloseAsyncFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => FunPtr C_InputStreamClassCloseAsyncFieldCallback -> a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback_WithClosures -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_InputStreamClassCloseAsyncFieldCallback :: MonadIO m => InputStreamClassCloseAsyncFieldCallback -> m (GClosure C_InputStreamClassCloseAsyncFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassCloseAsyncFieldCallback</a>.
mk_InputStreamClassCloseAsyncFieldCallback :: C_InputStreamClassCloseAsyncFieldCallback -> IO (FunPtr C_InputStreamClassCloseAsyncFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassCloseAsyncFieldCallback</a></tt>.
noInputStreamClassCloseAsyncFieldCallback :: Maybe InputStreamClassCloseAsyncFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassCloseAsyncFieldCallback_WithClosures</a></tt>.
noInputStreamClassCloseAsyncFieldCallback_WithClosures :: Maybe InputStreamClassCloseAsyncFieldCallback_WithClosures

-- | Wrap a <a>InputStreamClassCloseAsyncFieldCallback</a> into a
--   <a>C_InputStreamClassCloseAsyncFieldCallback</a>.
wrap_InputStreamClassCloseAsyncFieldCallback :: Maybe (Ptr (FunPtr C_InputStreamClassCloseAsyncFieldCallback)) -> InputStreamClassCloseAsyncFieldCallback_WithClosures -> C_InputStreamClassCloseAsyncFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassCloseFinishFieldCallback = Ptr InputStream -> Ptr AsyncResult -> Ptr Ptr GError -> IO CInt

-- | <i>No description available in the introspection data.</i>
type InputStreamClassCloseFinishFieldCallback = InputStream -> AsyncResult -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassCloseFinishFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => FunPtr C_InputStreamClassCloseFinishFieldCallback -> a -> b -> m ()

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassCloseFinishFieldCallback</a>.
mk_InputStreamClassCloseFinishFieldCallback :: C_InputStreamClassCloseFinishFieldCallback -> IO (FunPtr C_InputStreamClassCloseFinishFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassCloseFinishFieldCallback</a></tt>.
noInputStreamClassCloseFinishFieldCallback :: Maybe InputStreamClassCloseFinishFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassCloseFnFieldCallback = Ptr InputStream -> Ptr Cancellable -> Ptr Ptr GError -> IO CInt

-- | <i>No description available in the introspection data.</i>
type InputStreamClassCloseFnFieldCallback = InputStream -> Maybe Cancellable -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassCloseFnFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => FunPtr C_InputStreamClassCloseFnFieldCallback -> a -> Maybe b -> m ()

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassCloseFnFieldCallback</a>.
mk_InputStreamClassCloseFnFieldCallback :: C_InputStreamClassCloseFnFieldCallback -> IO (FunPtr C_InputStreamClassCloseFnFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassCloseFnFieldCallback</a></tt>.
noInputStreamClassCloseFnFieldCallback :: Maybe InputStreamClassCloseFnFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassReadAsyncFieldCallback = Ptr InputStream -> Ptr Word8 -> CSize -> Int32 -> Ptr Cancellable -> FunPtr C_AsyncReadyCallback -> Ptr () -> IO ()

-- | <i>No description available in the introspection data.</i>
type InputStreamClassReadAsyncFieldCallback = InputStream -> Maybe ByteString -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> IO Maybe ByteString

-- | <i>No description available in the introspection data.</i>
type InputStreamClassReadAsyncFieldCallback_WithClosures = InputStream -> Maybe ByteString -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> Ptr () -> IO Maybe ByteString

-- | A simple wrapper that ignores the closure arguments.
drop_closures_InputStreamClassReadAsyncFieldCallback :: InputStreamClassReadAsyncFieldCallback -> InputStreamClassReadAsyncFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassReadAsyncFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => FunPtr C_InputStreamClassReadAsyncFieldCallback -> a -> Maybe ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback_WithClosures -> Ptr () -> m (Maybe ByteString)

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_InputStreamClassReadAsyncFieldCallback :: MonadIO m => InputStreamClassReadAsyncFieldCallback -> m (GClosure C_InputStreamClassReadAsyncFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassReadAsyncFieldCallback</a>.
mk_InputStreamClassReadAsyncFieldCallback :: C_InputStreamClassReadAsyncFieldCallback -> IO (FunPtr C_InputStreamClassReadAsyncFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassReadAsyncFieldCallback</a></tt>.
noInputStreamClassReadAsyncFieldCallback :: Maybe InputStreamClassReadAsyncFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassReadAsyncFieldCallback_WithClosures</a></tt>.
noInputStreamClassReadAsyncFieldCallback_WithClosures :: Maybe InputStreamClassReadAsyncFieldCallback_WithClosures

-- | Wrap a <a>InputStreamClassReadAsyncFieldCallback</a> into a
--   <a>C_InputStreamClassReadAsyncFieldCallback</a>.
wrap_InputStreamClassReadAsyncFieldCallback :: Maybe (Ptr (FunPtr C_InputStreamClassReadAsyncFieldCallback)) -> InputStreamClassReadAsyncFieldCallback_WithClosures -> C_InputStreamClassReadAsyncFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassReadFinishFieldCallback = Ptr InputStream -> Ptr AsyncResult -> Ptr Ptr GError -> IO Int64

-- | <i>No description available in the introspection data.</i>
type InputStreamClassReadFinishFieldCallback = InputStream -> AsyncResult -> IO Int64

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassReadFinishFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => FunPtr C_InputStreamClassReadFinishFieldCallback -> a -> b -> m Int64

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassReadFinishFieldCallback</a>.
mk_InputStreamClassReadFinishFieldCallback :: C_InputStreamClassReadFinishFieldCallback -> IO (FunPtr C_InputStreamClassReadFinishFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassReadFinishFieldCallback</a></tt>.
noInputStreamClassReadFinishFieldCallback :: Maybe InputStreamClassReadFinishFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassReadFnFieldCallback = Ptr InputStream -> Ptr () -> CSize -> Ptr Cancellable -> Ptr Ptr GError -> IO Int64

-- | <i>No description available in the introspection data.</i>
type InputStreamClassReadFnFieldCallback = InputStream -> Ptr () -> CSize -> Maybe Cancellable -> IO Int64

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassReadFnFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => FunPtr C_InputStreamClassReadFnFieldCallback -> a -> Ptr () -> CSize -> Maybe b -> m Int64

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassReadFnFieldCallback</a>.
mk_InputStreamClassReadFnFieldCallback :: C_InputStreamClassReadFnFieldCallback -> IO (FunPtr C_InputStreamClassReadFnFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassReadFnFieldCallback</a></tt>.
noInputStreamClassReadFnFieldCallback :: Maybe InputStreamClassReadFnFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassSkipAsyncFieldCallback = Ptr InputStream -> CSize -> Int32 -> Ptr Cancellable -> FunPtr C_AsyncReadyCallback -> Ptr () -> IO ()

-- | <i>No description available in the introspection data.</i>
type InputStreamClassSkipAsyncFieldCallback = InputStream -> CSize -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> IO ()

-- | <i>No description available in the introspection data.</i>
type InputStreamClassSkipAsyncFieldCallback_WithClosures = InputStream -> CSize -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> Ptr () -> IO ()

-- | A simple wrapper that ignores the closure arguments.
drop_closures_InputStreamClassSkipAsyncFieldCallback :: InputStreamClassSkipAsyncFieldCallback -> InputStreamClassSkipAsyncFieldCallback_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassSkipAsyncFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => FunPtr C_InputStreamClassSkipAsyncFieldCallback -> a -> CSize -> Int32 -> Maybe b -> Maybe AsyncReadyCallback_WithClosures -> Ptr () -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_InputStreamClassSkipAsyncFieldCallback :: MonadIO m => InputStreamClassSkipAsyncFieldCallback -> m (GClosure C_InputStreamClassSkipAsyncFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassSkipAsyncFieldCallback</a>.
mk_InputStreamClassSkipAsyncFieldCallback :: C_InputStreamClassSkipAsyncFieldCallback -> IO (FunPtr C_InputStreamClassSkipAsyncFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassSkipAsyncFieldCallback</a></tt>.
noInputStreamClassSkipAsyncFieldCallback :: Maybe InputStreamClassSkipAsyncFieldCallback

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassSkipAsyncFieldCallback_WithClosures</a></tt>.
noInputStreamClassSkipAsyncFieldCallback_WithClosures :: Maybe InputStreamClassSkipAsyncFieldCallback_WithClosures

-- | Wrap a <a>InputStreamClassSkipAsyncFieldCallback</a> into a
--   <a>C_InputStreamClassSkipAsyncFieldCallback</a>.
wrap_InputStreamClassSkipAsyncFieldCallback :: Maybe (Ptr (FunPtr C_InputStreamClassSkipAsyncFieldCallback)) -> InputStreamClassSkipAsyncFieldCallback_WithClosures -> C_InputStreamClassSkipAsyncFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassSkipFieldCallback = Ptr InputStream -> CSize -> Ptr Cancellable -> Ptr Ptr GError -> IO Int64

-- | <i>No description available in the introspection data.</i>
type InputStreamClassSkipFieldCallback = InputStream -> CSize -> Maybe Cancellable -> IO Int64

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassSkipFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => FunPtr C_InputStreamClassSkipFieldCallback -> a -> CSize -> Maybe b -> m Int64

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassSkipFieldCallback</a>.
mk_InputStreamClassSkipFieldCallback :: C_InputStreamClassSkipFieldCallback -> IO (FunPtr C_InputStreamClassSkipFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassSkipFieldCallback</a></tt>.
noInputStreamClassSkipFieldCallback :: Maybe InputStreamClassSkipFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassSkipFinishFieldCallback = Ptr InputStream -> Ptr AsyncResult -> Ptr Ptr GError -> IO Int64

-- | <i>No description available in the introspection data.</i>
type InputStreamClassSkipFinishFieldCallback = InputStream -> AsyncResult -> IO Int64

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_InputStreamClassSkipFinishFieldCallback :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => FunPtr C_InputStreamClassSkipFinishFieldCallback -> a -> b -> m Int64

-- | Generate a function pointer callable from C code, from a
--   <a>C_InputStreamClassSkipFinishFieldCallback</a>.
mk_InputStreamClassSkipFinishFieldCallback :: C_InputStreamClassSkipFinishFieldCallback -> IO (FunPtr C_InputStreamClassSkipFinishFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>InputStreamClassSkipFinishFieldCallback</a></tt>.
noInputStreamClassSkipFinishFieldCallback :: Maybe InputStreamClassSkipFinishFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_PollableSourceFunc = Ptr Object -> Ptr () -> IO CInt

-- | This is the function type of the callback used for the <a>Source</a>
--   returned by <a>pollableInputStreamCreateSource</a> and
--   <a>pollableOutputStreamCreateSource</a>.
--   
--   <i>Since: 2.28</i>
type PollableSourceFunc = Object -> Ptr () -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_PollableSourceFunc :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_PollableSourceFunc -> a -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_PollableSourceFunc :: MonadIO m => PollableSourceFunc -> m (GClosure C_PollableSourceFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_PollableSourceFunc</a>.
mk_PollableSourceFunc :: C_PollableSourceFunc -> IO (FunPtr C_PollableSourceFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>PollableSourceFunc</a></tt>.
noPollableSourceFunc :: Maybe PollableSourceFunc

-- | Wrap a <a>PollableSourceFunc</a> into a <a>C_PollableSourceFunc</a>.
wrap_PollableSourceFunc :: Maybe (Ptr (FunPtr C_PollableSourceFunc)) -> PollableSourceFunc -> C_PollableSourceFunc

-- | Type for the callback on the (unwrapped) C side.
type C_ReallocFunc = Ptr () -> CSize -> IO Ptr ()

-- | Changes the size of the memory block pointed to by
--   <i><tt>data</tt></i> to <i><tt>size</tt></i> bytes.
--   
--   The function should have the same semantics as
--   <tt><i>realloc()</i></tt>.
type ReallocFunc = Ptr () -> CSize -> IO Ptr ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_ReallocFunc :: (HasCallStack, MonadIO m) => FunPtr C_ReallocFunc -> Ptr () -> CSize -> m (Ptr ())

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_ReallocFunc :: MonadIO m => ReallocFunc -> m (GClosure C_ReallocFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_ReallocFunc</a>.
mk_ReallocFunc :: C_ReallocFunc -> IO (FunPtr C_ReallocFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>ReallocFunc</a></tt>.
noReallocFunc :: Maybe ReallocFunc

-- | Wrap a <a>ReallocFunc</a> into a <a>C_ReallocFunc</a>.
wrap_ReallocFunc :: Maybe (Ptr (FunPtr C_ReallocFunc)) -> ReallocFunc -> C_ReallocFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SeekableIfaceCanSeekFieldCallback = Ptr Seekable -> IO CInt

-- | <i>No description available in the introspection data.</i>
type SeekableIfaceCanSeekFieldCallback = Seekable -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SeekableIfaceCanSeekFieldCallback :: (HasCallStack, MonadIO m, IsSeekable a) => FunPtr C_SeekableIfaceCanSeekFieldCallback -> a -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SeekableIfaceCanSeekFieldCallback :: MonadIO m => SeekableIfaceCanSeekFieldCallback -> m (GClosure C_SeekableIfaceCanSeekFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SeekableIfaceCanSeekFieldCallback</a>.
mk_SeekableIfaceCanSeekFieldCallback :: C_SeekableIfaceCanSeekFieldCallback -> IO (FunPtr C_SeekableIfaceCanSeekFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SeekableIfaceCanSeekFieldCallback</a></tt>.
noSeekableIfaceCanSeekFieldCallback :: Maybe SeekableIfaceCanSeekFieldCallback

-- | Wrap a <a>SeekableIfaceCanSeekFieldCallback</a> into a
--   <a>C_SeekableIfaceCanSeekFieldCallback</a>.
wrap_SeekableIfaceCanSeekFieldCallback :: Maybe (Ptr (FunPtr C_SeekableIfaceCanSeekFieldCallback)) -> SeekableIfaceCanSeekFieldCallback -> C_SeekableIfaceCanSeekFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SeekableIfaceCanTruncateFieldCallback = Ptr Seekable -> IO CInt

-- | <i>No description available in the introspection data.</i>
type SeekableIfaceCanTruncateFieldCallback = Seekable -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SeekableIfaceCanTruncateFieldCallback :: (HasCallStack, MonadIO m, IsSeekable a) => FunPtr C_SeekableIfaceCanTruncateFieldCallback -> a -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SeekableIfaceCanTruncateFieldCallback :: MonadIO m => SeekableIfaceCanTruncateFieldCallback -> m (GClosure C_SeekableIfaceCanTruncateFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SeekableIfaceCanTruncateFieldCallback</a>.
mk_SeekableIfaceCanTruncateFieldCallback :: C_SeekableIfaceCanTruncateFieldCallback -> IO (FunPtr C_SeekableIfaceCanTruncateFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SeekableIfaceCanTruncateFieldCallback</a></tt>.
noSeekableIfaceCanTruncateFieldCallback :: Maybe SeekableIfaceCanTruncateFieldCallback

-- | Wrap a <a>SeekableIfaceCanTruncateFieldCallback</a> into a
--   <a>C_SeekableIfaceCanTruncateFieldCallback</a>.
wrap_SeekableIfaceCanTruncateFieldCallback :: Maybe (Ptr (FunPtr C_SeekableIfaceCanTruncateFieldCallback)) -> SeekableIfaceCanTruncateFieldCallback -> C_SeekableIfaceCanTruncateFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SeekableIfaceSeekFieldCallback = Ptr Seekable -> Int64 -> CUInt -> Ptr Cancellable -> Ptr Ptr GError -> IO CInt

-- | <i>No description available in the introspection data.</i>
type SeekableIfaceSeekFieldCallback = Seekable -> Int64 -> SeekType -> Maybe Cancellable -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SeekableIfaceSeekFieldCallback :: (HasCallStack, MonadIO m, IsSeekable a, IsCancellable b) => FunPtr C_SeekableIfaceSeekFieldCallback -> a -> Int64 -> SeekType -> Maybe b -> m ()

-- | Generate a function pointer callable from C code, from a
--   <a>C_SeekableIfaceSeekFieldCallback</a>.
mk_SeekableIfaceSeekFieldCallback :: C_SeekableIfaceSeekFieldCallback -> IO (FunPtr C_SeekableIfaceSeekFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SeekableIfaceSeekFieldCallback</a></tt>.
noSeekableIfaceSeekFieldCallback :: Maybe SeekableIfaceSeekFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SeekableIfaceTellFieldCallback = Ptr Seekable -> IO Int64

-- | <i>No description available in the introspection data.</i>
type SeekableIfaceTellFieldCallback = Seekable -> IO Int64

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SeekableIfaceTellFieldCallback :: (HasCallStack, MonadIO m, IsSeekable a) => FunPtr C_SeekableIfaceTellFieldCallback -> a -> m Int64

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SeekableIfaceTellFieldCallback :: MonadIO m => SeekableIfaceTellFieldCallback -> m (GClosure C_SeekableIfaceTellFieldCallback)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SeekableIfaceTellFieldCallback</a>.
mk_SeekableIfaceTellFieldCallback :: C_SeekableIfaceTellFieldCallback -> IO (FunPtr C_SeekableIfaceTellFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SeekableIfaceTellFieldCallback</a></tt>.
noSeekableIfaceTellFieldCallback :: Maybe SeekableIfaceTellFieldCallback

-- | Wrap a <a>SeekableIfaceTellFieldCallback</a> into a
--   <a>C_SeekableIfaceTellFieldCallback</a>.
wrap_SeekableIfaceTellFieldCallback :: Maybe (Ptr (FunPtr C_SeekableIfaceTellFieldCallback)) -> SeekableIfaceTellFieldCallback -> C_SeekableIfaceTellFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SeekableIfaceTruncateFnFieldCallback = Ptr Seekable -> Int64 -> Ptr Cancellable -> Ptr Ptr GError -> IO CInt

-- | <i>No description available in the introspection data.</i>
type SeekableIfaceTruncateFnFieldCallback = Seekable -> Int64 -> Maybe Cancellable -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SeekableIfaceTruncateFnFieldCallback :: (HasCallStack, MonadIO m, IsSeekable a, IsCancellable b) => FunPtr C_SeekableIfaceTruncateFnFieldCallback -> a -> Int64 -> Maybe b -> m ()

-- | Generate a function pointer callable from C code, from a
--   <a>C_SeekableIfaceTruncateFnFieldCallback</a>.
mk_SeekableIfaceTruncateFnFieldCallback :: C_SeekableIfaceTruncateFnFieldCallback -> IO (FunPtr C_SeekableIfaceTruncateFnFieldCallback)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SeekableIfaceTruncateFnFieldCallback</a></tt>.
noSeekableIfaceTruncateFnFieldCallback :: Maybe SeekableIfaceTruncateFnFieldCallback

-- | Type for the callback on the (unwrapped) C side.
type C_SettingsBindGetMapping = Ptr GValue -> Ptr GVariant -> Ptr () -> IO CInt

-- | The type for the function that is used to convert from <a>Settings</a>
--   to an object property.
--   
--   The <i><tt>value</tt></i> is already initialized to hold values of the
--   appropriate type.
type SettingsBindGetMapping = GValue -> GVariant -> IO Bool

-- | The type for the function that is used to convert from <a>Settings</a>
--   to an object property.
--   
--   The <i><tt>value</tt></i> is already initialized to hold values of the
--   appropriate type.
type SettingsBindGetMapping_WithClosures = GValue -> GVariant -> Ptr () -> IO Bool

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SettingsBindGetMapping :: SettingsBindGetMapping -> SettingsBindGetMapping_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SettingsBindGetMapping :: (HasCallStack, MonadIO m) => FunPtr C_SettingsBindGetMapping -> GValue -> GVariant -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SettingsBindGetMapping :: MonadIO m => SettingsBindGetMapping -> m (GClosure C_SettingsBindGetMapping)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SettingsBindGetMapping</a>.
mk_SettingsBindGetMapping :: C_SettingsBindGetMapping -> IO (FunPtr C_SettingsBindGetMapping)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SettingsBindGetMapping</a></tt>.
noSettingsBindGetMapping :: Maybe SettingsBindGetMapping

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SettingsBindGetMapping_WithClosures</a></tt>.
noSettingsBindGetMapping_WithClosures :: Maybe SettingsBindGetMapping_WithClosures

-- | Wrap a <a>SettingsBindGetMapping</a> into a
--   <a>C_SettingsBindGetMapping</a>.
wrap_SettingsBindGetMapping :: Maybe (Ptr (FunPtr C_SettingsBindGetMapping)) -> SettingsBindGetMapping_WithClosures -> C_SettingsBindGetMapping

-- | Type for the callback on the (unwrapped) C side.
type C_SettingsBindSetMapping = Ptr GValue -> Ptr VariantType -> Ptr () -> IO Ptr GVariant

-- | The type for the function that is used to convert an object property
--   value to a <a>GVariant</a> for storing it in <a>Settings</a>.
type SettingsBindSetMapping = GValue -> VariantType -> IO Maybe GVariant

-- | The type for the function that is used to convert an object property
--   value to a <a>GVariant</a> for storing it in <a>Settings</a>.
type SettingsBindSetMapping_WithClosures = GValue -> VariantType -> Ptr () -> IO Maybe GVariant

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SettingsBindSetMapping :: SettingsBindSetMapping -> SettingsBindSetMapping_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SettingsBindSetMapping :: (HasCallStack, MonadIO m) => FunPtr C_SettingsBindSetMapping -> GValue -> VariantType -> Ptr () -> m (Maybe GVariant)

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SettingsBindSetMapping :: MonadIO m => SettingsBindSetMapping -> m (GClosure C_SettingsBindSetMapping)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SettingsBindSetMapping</a>.
mk_SettingsBindSetMapping :: C_SettingsBindSetMapping -> IO (FunPtr C_SettingsBindSetMapping)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SettingsBindSetMapping</a></tt>.
noSettingsBindSetMapping :: Maybe SettingsBindSetMapping

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SettingsBindSetMapping_WithClosures</a></tt>.
noSettingsBindSetMapping_WithClosures :: Maybe SettingsBindSetMapping_WithClosures

-- | Wrap a <a>SettingsBindSetMapping</a> into a
--   <a>C_SettingsBindSetMapping</a>.
wrap_SettingsBindSetMapping :: Maybe (Ptr (FunPtr C_SettingsBindSetMapping)) -> SettingsBindSetMapping_WithClosures -> C_SettingsBindSetMapping

-- | Type for the callback on the (unwrapped) C side.
type C_SettingsGetMapping = Ptr GVariant -> Ptr Ptr () -> Ptr () -> IO CInt

-- | The type of the function that is used to convert from a value stored
--   in a <a>Settings</a> to a value that is useful to the application.
--   
--   If the value is successfully mapped, the result should be stored at
--   <i><tt>result</tt></i> and true returned. If mapping fails (for
--   example, if <i><tt>value</tt></i> is not in the right format) then
--   false should be returned.
--   
--   If <i><tt>value</tt></i> is <tt>NULL</tt> then it means that the
--   mapping function is being given a ‘last chance’ to successfully return
--   a valid value. True must be returned in this case.
type SettingsGetMapping = Maybe GVariant -> IO (Bool, Ptr ())

-- | The type of the function that is used to convert from a value stored
--   in a <a>Settings</a> to a value that is useful to the application.
--   
--   If the value is successfully mapped, the result should be stored at
--   <i><tt>result</tt></i> and true returned. If mapping fails (for
--   example, if <i><tt>value</tt></i> is not in the right format) then
--   false should be returned.
--   
--   If <i><tt>value</tt></i> is <tt>NULL</tt> then it means that the
--   mapping function is being given a ‘last chance’ to successfully return
--   a valid value. True must be returned in this case.
type SettingsGetMapping_WithClosures = Maybe GVariant -> Ptr () -> IO (Bool, Ptr ())

-- | A simple wrapper that ignores the closure arguments.
drop_closures_SettingsGetMapping :: SettingsGetMapping -> SettingsGetMapping_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SettingsGetMapping :: (HasCallStack, MonadIO m) => FunPtr C_SettingsGetMapping -> Maybe GVariant -> Ptr () -> m (Bool, Ptr ())

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SettingsGetMapping :: MonadIO m => SettingsGetMapping -> m (GClosure C_SettingsGetMapping)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SettingsGetMapping</a>.
mk_SettingsGetMapping :: C_SettingsGetMapping -> IO (FunPtr C_SettingsGetMapping)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SettingsGetMapping</a></tt>.
noSettingsGetMapping :: Maybe SettingsGetMapping

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SettingsGetMapping_WithClosures</a></tt>.
noSettingsGetMapping_WithClosures :: Maybe SettingsGetMapping_WithClosures

-- | Wrap a <a>SettingsGetMapping</a> into a <a>C_SettingsGetMapping</a>.
wrap_SettingsGetMapping :: Maybe (Ptr (FunPtr C_SettingsGetMapping)) -> SettingsGetMapping_WithClosures -> C_SettingsGetMapping

-- | Type for the callback on the (unwrapped) C side.
type C_SimpleAsyncThreadFunc = Ptr SimpleAsyncResult -> Ptr Object -> Ptr Cancellable -> IO ()

-- | Simple thread function that runs an asynchronous operation and checks
--   for cancellation.
type SimpleAsyncThreadFunc = SimpleAsyncResult -> Object -> Maybe Cancellable -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SimpleAsyncThreadFunc :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a, IsObject b, IsCancellable c) => FunPtr C_SimpleAsyncThreadFunc -> a -> b -> Maybe c -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SimpleAsyncThreadFunc :: MonadIO m => SimpleAsyncThreadFunc -> m (GClosure C_SimpleAsyncThreadFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SimpleAsyncThreadFunc</a>.
mk_SimpleAsyncThreadFunc :: C_SimpleAsyncThreadFunc -> IO (FunPtr C_SimpleAsyncThreadFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SimpleAsyncThreadFunc</a></tt>.
noSimpleAsyncThreadFunc :: Maybe SimpleAsyncThreadFunc

-- | Wrap a <a>SimpleAsyncThreadFunc</a> into a
--   <a>C_SimpleAsyncThreadFunc</a>.
wrap_SimpleAsyncThreadFunc :: Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc)) -> SimpleAsyncThreadFunc -> C_SimpleAsyncThreadFunc

-- | Type for the callback on the (unwrapped) C side.
type C_SocketSourceFunc = Ptr Socket -> CUInt -> Ptr () -> IO CInt

-- | This is the function type of the callback used for the <a>Source</a>
--   returned by <tt><i>g_socket_create_source()</i></tt>.
--   
--   <i>Since: 2.22</i>
type SocketSourceFunc = Socket -> [IOCondition] -> Ptr () -> IO Bool

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_SocketSourceFunc :: (HasCallStack, MonadIO m, IsSocket a) => FunPtr C_SocketSourceFunc -> a -> [IOCondition] -> Ptr () -> m Bool

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_SocketSourceFunc :: MonadIO m => SocketSourceFunc -> m (GClosure C_SocketSourceFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_SocketSourceFunc</a>.
mk_SocketSourceFunc :: C_SocketSourceFunc -> IO (FunPtr C_SocketSourceFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>SocketSourceFunc</a></tt>.
noSocketSourceFunc :: Maybe SocketSourceFunc

-- | Wrap a <a>SocketSourceFunc</a> into a <a>C_SocketSourceFunc</a>.
wrap_SocketSourceFunc :: Maybe (Ptr (FunPtr C_SocketSourceFunc)) -> SocketSourceFunc -> C_SocketSourceFunc

-- | Type for the callback on the (unwrapped) C side.
type C_TaskThreadFunc = Ptr Task -> Ptr Object -> Ptr () -> Ptr Cancellable -> IO ()

-- | The prototype for a task function to be run in a thread via
--   <a>taskRunInThread</a> or <a>taskRunInThreadSync</a>.
--   
--   If the return-on-cancel flag is set on <i><tt>task</tt></i>, and
--   <i><tt>cancellable</tt></i> gets cancelled, then the <a>Task</a> will
--   be completed immediately (as though <a>taskReturnErrorIfCancelled</a>
--   had been called), without waiting for the task function to complete.
--   However, the task function will continue running in its thread in the
--   background. The function therefore needs to be careful about how it
--   uses externally-visible state in this case. See
--   <a>taskSetReturnOnCancel</a> for more details.
--   
--   Other than in that case, <i><tt>task</tt></i> will be completed when
--   the <a>TaskThreadFunc</a> returns, not when it calls a
--   <tt>g_task_return_</tt> function.
--   
--   <i>Since: 2.36</i>
type TaskThreadFunc = Task -> Maybe Object -> Ptr () -> Maybe Cancellable -> IO ()

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_TaskThreadFunc :: (HasCallStack, MonadIO m, IsTask a, IsObject b, IsCancellable c) => FunPtr C_TaskThreadFunc -> a -> Maybe b -> Ptr () -> Maybe c -> m ()

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_TaskThreadFunc :: MonadIO m => TaskThreadFunc -> m (GClosure C_TaskThreadFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_TaskThreadFunc</a>.
mk_TaskThreadFunc :: C_TaskThreadFunc -> IO (FunPtr C_TaskThreadFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>TaskThreadFunc</a></tt>.
noTaskThreadFunc :: Maybe TaskThreadFunc

-- | Wrap a <a>TaskThreadFunc</a> into a <a>C_TaskThreadFunc</a>.
wrap_TaskThreadFunc :: Maybe (Ptr (FunPtr C_TaskThreadFunc)) -> TaskThreadFunc -> C_TaskThreadFunc

-- | Type for the callback on the (unwrapped) C side.
type C_VfsFileLookupFunc = Ptr Vfs -> CString -> Ptr () -> IO Ptr File

-- | This function type is used by <a>vfsRegisterUriScheme</a> to make it
--   possible for a client to associate a URI scheme to a different
--   <a>File</a> implementation.
--   
--   The client should return a reference to the new file that has been
--   created for <i><tt>uri</tt></i>, or <a>Nothing</a> to continue with
--   the default implementation.
--   
--   <i>Since: 2.50</i>
type VfsFileLookupFunc = Vfs -> Text -> IO Maybe File

-- | This function type is used by <a>vfsRegisterUriScheme</a> to make it
--   possible for a client to associate a URI scheme to a different
--   <a>File</a> implementation.
--   
--   The client should return a reference to the new file that has been
--   created for <i><tt>uri</tt></i>, or <a>Nothing</a> to continue with
--   the default implementation.
--   
--   <i>Since: 2.50</i>
type VfsFileLookupFunc_WithClosures = Vfs -> Text -> Ptr () -> IO Maybe File

-- | A simple wrapper that ignores the closure arguments.
drop_closures_VfsFileLookupFunc :: VfsFileLookupFunc -> VfsFileLookupFunc_WithClosures

-- | Given a pointer to a foreign C function, wrap it into a function
--   callable from Haskell.
dynamic_VfsFileLookupFunc :: (HasCallStack, MonadIO m, IsVfs a) => FunPtr C_VfsFileLookupFunc -> a -> Text -> Ptr () -> m (Maybe File)

-- | Wrap the callback into a <a>GClosure</a>.
genClosure_VfsFileLookupFunc :: MonadIO m => VfsFileLookupFunc -> m (GClosure C_VfsFileLookupFunc)

-- | Generate a function pointer callable from C code, from a
--   <a>C_VfsFileLookupFunc</a>.
mk_VfsFileLookupFunc :: C_VfsFileLookupFunc -> IO (FunPtr C_VfsFileLookupFunc)

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>VfsFileLookupFunc</a></tt>.
noVfsFileLookupFunc :: Maybe VfsFileLookupFunc

-- | A convenience synonym for <tt><a>Nothing</a> :: <a>Maybe</a>
--   <a>VfsFileLookupFunc_WithClosures</a></tt>.
noVfsFileLookupFunc_WithClosures :: Maybe VfsFileLookupFunc_WithClosures

-- | Wrap a <a>VfsFileLookupFunc</a> into a <a>C_VfsFileLookupFunc</a>.
wrap_VfsFileLookupFunc :: Maybe (Ptr (FunPtr C_VfsFileLookupFunc)) -> VfsFileLookupFunc_WithClosures -> C_VfsFileLookupFunc


-- | Structure used for scatter/gather data output when sending multiple
--   messages or packets in one go. You generally pass in an array of
--   <tt><i>GOutputVectors</i></tt> and the operation will use all the
--   buffers as if they were one buffer.
--   
--   If <i><tt>address</tt></i> is <a>Nothing</a> then the message is sent
--   to the default receiver (as previously set by <a>socketConnect</a>).
--   
--   <i>Since: 2.44</i>
module GI.Gio.Structs.OutputMessage

-- | Memory-managed wrapper type.
newtype OutputMessage
OutputMessage :: ManagedPtr OutputMessage -> OutputMessage

-- | Construct a <a>OutputMessage</a> struct initialized to zero.
newZeroOutputMessage :: MonadIO m => m OutputMessage

-- | Set the value of the “<tt>address</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #address
--   </pre>
clearOutputMessageAddress :: MonadIO m => OutputMessage -> m ()

-- | Get the value of the “<tt>address</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> outputMessage #address
--   </pre>
getOutputMessageAddress :: MonadIO m => OutputMessage -> m (Maybe SocketAddress)

-- | Set the value of the “<tt>address</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> outputMessage [ #address <a>:=</a> value ]
--   </pre>
setOutputMessageAddress :: MonadIO m => OutputMessage -> Ptr SocketAddress -> m ()

-- | Get the value of the “<tt>bytes_sent</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> outputMessage #bytesSent
--   </pre>
getOutputMessageBytesSent :: MonadIO m => OutputMessage -> m Word32

-- | Set the value of the “<tt>bytes_sent</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> outputMessage [ #bytesSent <a>:=</a> value ]
--   </pre>
setOutputMessageBytesSent :: MonadIO m => OutputMessage -> Word32 -> m ()

-- | Get the value of the “<tt>num_control_messages</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> outputMessage #numControlMessages
--   </pre>
getOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> m Word32

-- | Set the value of the “<tt>num_control_messages</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> outputMessage [ #numControlMessages <a>:=</a> value ]
--   </pre>
setOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> Word32 -> m ()

-- | Get the value of the “<tt>num_vectors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> outputMessage #numVectors
--   </pre>
getOutputMessageNumVectors :: MonadIO m => OutputMessage -> m Word32

-- | Set the value of the “<tt>num_vectors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> outputMessage [ #numVectors <a>:=</a> value ]
--   </pre>
setOutputMessageNumVectors :: MonadIO m => OutputMessage -> Word32 -> m ()

-- | Set the value of the “<tt>vectors</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #vectors
--   </pre>
clearOutputMessageVectors :: MonadIO m => OutputMessage -> m ()

-- | Get the value of the “<tt>vectors</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> outputMessage #vectors
--   </pre>
getOutputMessageVectors :: MonadIO m => OutputMessage -> m (Maybe OutputVector)

-- | Set the value of the “<tt>vectors</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> outputMessage [ #vectors <a>:=</a> value ]
--   </pre>
setOutputMessageVectors :: MonadIO m => OutputMessage -> Ptr OutputVector -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.OutputMessage.OutputMessage
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.OutputMessage.OutputMessage
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.OutputMessage.OutputMessage tag
instance GHC.Classes.Eq GI.Gio.Structs.OutputMessage.OutputMessage
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.OutputMessage.OutputMessage


-- | <i>No description available in the introspection data.</i>
module GI.Gio.Structs.InputStreamClass

-- | Memory-managed wrapper type.
newtype InputStreamClass
InputStreamClass :: ManagedPtr InputStreamClass -> InputStreamClass

-- | Construct a <a>InputStreamClass</a> struct initialized to zero.
newZeroInputStreamClass :: MonadIO m => m InputStreamClass

-- | Set the value of the “<tt>close_async</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #closeAsync
--   </pre>
clearInputStreamClassCloseAsync :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>close_async</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #closeAsync
--   </pre>
getInputStreamClassCloseAsync :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassCloseAsyncFieldCallback_WithClosures)

-- | Set the value of the “<tt>close_async</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #closeAsync <a>:=</a> value ]
--   </pre>
setInputStreamClassCloseAsync :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassCloseAsyncFieldCallback -> m ()

-- | Set the value of the “<tt>close_finish</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #closeFinish
--   </pre>
clearInputStreamClassCloseFinish :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>close_finish</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #closeFinish
--   </pre>
getInputStreamClassCloseFinish :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassCloseFinishFieldCallback)

-- | Set the value of the “<tt>close_finish</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #closeFinish <a>:=</a> value ]
--   </pre>
setInputStreamClassCloseFinish :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassCloseFinishFieldCallback -> m ()

-- | Set the value of the “<tt>close_fn</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #closeFn
--   </pre>
clearInputStreamClassCloseFn :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>close_fn</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #closeFn
--   </pre>
getInputStreamClassCloseFn :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassCloseFnFieldCallback)

-- | Set the value of the “<tt>close_fn</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #closeFn <a>:=</a> value ]
--   </pre>
setInputStreamClassCloseFn :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassCloseFnFieldCallback -> m ()

-- | Get the value of the “<tt>parent_class</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #parentClass
--   </pre>
getInputStreamClassParentClass :: MonadIO m => InputStreamClass -> m ObjectClass

-- | Set the value of the “<tt>read_async</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #readAsync
--   </pre>
clearInputStreamClassReadAsync :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>read_async</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #readAsync
--   </pre>
getInputStreamClassReadAsync :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassReadAsyncFieldCallback_WithClosures)

-- | Set the value of the “<tt>read_async</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #readAsync <a>:=</a> value ]
--   </pre>
setInputStreamClassReadAsync :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassReadAsyncFieldCallback -> m ()

-- | Set the value of the “<tt>read_finish</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #readFinish
--   </pre>
clearInputStreamClassReadFinish :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>read_finish</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #readFinish
--   </pre>
getInputStreamClassReadFinish :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassReadFinishFieldCallback)

-- | Set the value of the “<tt>read_finish</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #readFinish <a>:=</a> value ]
--   </pre>
setInputStreamClassReadFinish :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassReadFinishFieldCallback -> m ()

-- | Set the value of the “<tt>read_fn</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #readFn
--   </pre>
clearInputStreamClassReadFn :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>read_fn</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #readFn
--   </pre>
getInputStreamClassReadFn :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassReadFnFieldCallback)

-- | Set the value of the “<tt>read_fn</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #readFn <a>:=</a> value ]
--   </pre>
setInputStreamClassReadFn :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassReadFnFieldCallback -> m ()

-- | Set the value of the “<tt>skip</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #skip
--   </pre>
clearInputStreamClassSkip :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>skip</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #skip
--   </pre>
getInputStreamClassSkip :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassSkipFieldCallback)

-- | Set the value of the “<tt>skip</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #skip <a>:=</a> value ]
--   </pre>
setInputStreamClassSkip :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassSkipFieldCallback -> m ()

-- | Set the value of the “<tt>skip_async</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #skipAsync
--   </pre>
clearInputStreamClassSkipAsync :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>skip_async</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #skipAsync
--   </pre>
getInputStreamClassSkipAsync :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassSkipAsyncFieldCallback_WithClosures)

-- | Set the value of the “<tt>skip_async</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #skipAsync <a>:=</a> value ]
--   </pre>
setInputStreamClassSkipAsync :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassSkipAsyncFieldCallback -> m ()

-- | Set the value of the “<tt>skip_finish</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #skipFinish
--   </pre>
clearInputStreamClassSkipFinish :: MonadIO m => InputStreamClass -> m ()

-- | Get the value of the “<tt>skip_finish</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputStreamClass #skipFinish
--   </pre>
getInputStreamClassSkipFinish :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassSkipFinishFieldCallback)

-- | Set the value of the “<tt>skip_finish</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputStreamClass [ #skipFinish <a>:=</a> value ]
--   </pre>
setInputStreamClassSkipFinish :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassSkipFinishFieldCallback -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.InputStreamClass.InputStreamClass
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.InputStreamClass.InputStreamClass
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.InputStreamClass.InputStreamClass tag
instance GHC.Classes.Eq GI.Gio.Structs.InputStreamClass.InputStreamClass
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.InputStreamClass.InputStreamClass


-- | Structure used for scatter/gather data input when receiving multiple
--   messages or packets in one go. You generally pass in an array of empty
--   <tt><i>GInputVectors</i></tt> and the operation will use all the
--   buffers as if they were one buffer, and will set
--   <i><tt>bytesReceived</tt></i> to the total number of bytes received
--   across all <tt><i>GInputVectors</i></tt>.
--   
--   This structure closely mirrors <tt>struct mmsghdr</tt> and <tt>struct
--   msghdr</tt> from the POSIX sockets API (see <tt>man 2 recvmmsg</tt>).
--   
--   If <i><tt>address</tt></i> is non-<a>Nothing</a> then it is set to the
--   source address the message was received from, and the caller must free
--   it afterwards.
--   
--   If <i><tt>controlMessages</tt></i> is non-<a>Nothing</a> then it is
--   set to an array of control messages received with the message (if
--   any), and the caller must free it afterwards.
--   <i><tt>numControlMessages</tt></i> is set to the number of elements in
--   this array, which may be zero.
--   
--   Flags relevant to this message will be returned in
--   <i><tt>flags</tt></i>. For example, <tt>MSG_EOR</tt> or
--   <tt>MSG_TRUNC</tt>.
--   
--   <i>Since: 2.48</i>
module GI.Gio.Structs.InputMessage

-- | Memory-managed wrapper type.
newtype InputMessage
InputMessage :: ManagedPtr InputMessage -> InputMessage

-- | Construct a <a>InputMessage</a> struct initialized to zero.
newZeroInputMessage :: MonadIO m => m InputMessage

-- | Set the value of the “<tt>address</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #address
--   </pre>
clearInputMessageAddress :: MonadIO m => InputMessage -> m ()

-- | Get the value of the “<tt>address</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputMessage #address
--   </pre>
getInputMessageAddress :: MonadIO m => InputMessage -> m (Maybe SocketAddress)

-- | Set the value of the “<tt>address</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputMessage [ #address <a>:=</a> value ]
--   </pre>
setInputMessageAddress :: MonadIO m => InputMessage -> Ptr SocketAddress -> m ()

-- | Get the value of the “<tt>bytes_received</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputMessage #bytesReceived
--   </pre>
getInputMessageBytesReceived :: MonadIO m => InputMessage -> m CSize

-- | Set the value of the “<tt>bytes_received</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputMessage [ #bytesReceived <a>:=</a> value ]
--   </pre>
setInputMessageBytesReceived :: MonadIO m => InputMessage -> CSize -> m ()

-- | Get the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputMessage #flags
--   </pre>
getInputMessageFlags :: MonadIO m => InputMessage -> m Int32

-- | Set the value of the “<tt>flags</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputMessage [ #flags <a>:=</a> value ]
--   </pre>
setInputMessageFlags :: MonadIO m => InputMessage -> Int32 -> m ()

-- | Get the value of the “<tt>num_control_messages</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputMessage #numControlMessages
--   </pre>
getInputMessageNumControlMessages :: MonadIO m => InputMessage -> m Word32

-- | Set the value of the “<tt>num_control_messages</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputMessage [ #numControlMessages <a>:=</a> value ]
--   </pre>
setInputMessageNumControlMessages :: MonadIO m => InputMessage -> Word32 -> m ()

-- | Get the value of the “<tt>num_vectors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inputMessage #numVectors
--   </pre>
getInputMessageNumVectors :: MonadIO m => InputMessage -> m Word32

-- | Set the value of the “<tt>num_vectors</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> inputMessage [ #numVectors <a>:=</a> value ]
--   </pre>
setInputMessageNumVectors :: MonadIO m => InputMessage -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.InputMessage.InputMessage
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.InputMessage.InputMessage
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.InputMessage.InputMessage tag
instance GHC.Classes.Eq GI.Gio.Structs.InputMessage.InputMessage
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.InputMessage.InputMessage


-- | Virtual table for handling subtrees registered with
--   <a>dBusConnectionRegisterSubtree</a>.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusSubtreeVTable

-- | Memory-managed wrapper type.
newtype DBusSubtreeVTable
DBusSubtreeVTable :: ManagedPtr DBusSubtreeVTable -> DBusSubtreeVTable

-- | Construct a <a>DBusSubtreeVTable</a> struct initialized to zero.
newZeroDBusSubtreeVTable :: MonadIO m => m DBusSubtreeVTable

-- | Set the value of the “<tt>dispatch</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #dispatch
--   </pre>
clearDBusSubtreeVTableDispatch :: MonadIO m => DBusSubtreeVTable -> m ()

-- | Get the value of the “<tt>dispatch</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusSubtreeVTable #dispatch
--   </pre>
getDBusSubtreeVTableDispatch :: MonadIO m => DBusSubtreeVTable -> m (Maybe DBusSubtreeDispatchFunc_WithClosures)

-- | Set the value of the “<tt>dispatch</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusSubtreeVTable [ #dispatch <a>:=</a> value ]
--   </pre>
setDBusSubtreeVTableDispatch :: MonadIO m => DBusSubtreeVTable -> FunPtr C_DBusSubtreeDispatchFunc -> m ()

-- | Set the value of the “<tt>enumerate</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #enumerate
--   </pre>
clearDBusSubtreeVTableEnumerate :: MonadIO m => DBusSubtreeVTable -> m ()

-- | Get the value of the “<tt>enumerate</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusSubtreeVTable #enumerate
--   </pre>
getDBusSubtreeVTableEnumerate :: MonadIO m => DBusSubtreeVTable -> m (Maybe DBusSubtreeEnumerateFunc_WithClosures)

-- | Set the value of the “<tt>enumerate</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusSubtreeVTable [ #enumerate <a>:=</a> value ]
--   </pre>
setDBusSubtreeVTableEnumerate :: MonadIO m => DBusSubtreeVTable -> FunPtr C_DBusSubtreeEnumerateFunc -> m ()

-- | Set the value of the “<tt>introspect</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #introspect
--   </pre>
clearDBusSubtreeVTableIntrospect :: MonadIO m => DBusSubtreeVTable -> m ()

-- | Get the value of the “<tt>introspect</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusSubtreeVTable #introspect
--   </pre>
getDBusSubtreeVTableIntrospect :: MonadIO m => DBusSubtreeVTable -> m (Maybe DBusSubtreeIntrospectFunc_WithClosures)

-- | Set the value of the “<tt>introspect</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusSubtreeVTable [ #introspect <a>:=</a> value ]
--   </pre>
setDBusSubtreeVTableIntrospect :: MonadIO m => DBusSubtreeVTable -> FunPtr C_DBusSubtreeIntrospectFunc -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable


-- | Virtual table for handling properties and method calls for a D-Bus
--   interface.
--   
--   Since 2.38, if you want to handle getting/setting D-Bus properties
--   asynchronously, give <a>Nothing</a> as your
--   <tt><i>get_property()</i></tt> or <tt><i>set_property()</i></tt>
--   function. The D-Bus call will be directed to your
--   <i><tt>methodCall</tt></i> function, with the provided
--   <i><tt>interfaceName</tt></i> set to
--   "org.freedesktop.DBus.Properties".
--   
--   Ownership of the <a>DBusMethodInvocation</a> object passed to the
--   <tt><i>method_call()</i></tt> function is transferred to your handler;
--   you must call one of the methods of <a>DBusMethodInvocation</a> to
--   return a reply (possibly empty), or an error. These functions also
--   take ownership of the passed-in invocation object, so unless the
--   invocation object has otherwise been referenced, it will be then be
--   freed. Calling one of these functions may be done within your
--   <tt><i>method_call()</i></tt> implementation but it also can be done
--   at a later point to handle the method asynchronously.
--   
--   The usual checks on the validity of the calls is performed. For
--   <tt>Get</tt> calls, an error is automatically returned if the property
--   does not exist or the permissions do not allow access. The same checks
--   are performed for <tt>Set</tt> calls, and the provided value is also
--   checked for being the correct type.
--   
--   For both <tt>Get</tt> and <tt>Set</tt> calls, the
--   <a>DBusMethodInvocation</a> passed to the <i><tt>methodCall</tt></i>
--   handler can be queried with <a>dBusMethodInvocationGetPropertyInfo</a>
--   to get a pointer to the <a>DBusPropertyInfo</a> of the property.
--   
--   If you have readable properties specified in your interface info, you
--   must ensure that you either provide a non-<a>Nothing</a>
--   <i><tt>getProperty</tt></i>() function or provide implementations of
--   both the <tt>Get</tt> and <tt>GetAll</tt> methods on
--   org.freedesktop.DBus.Properties interface in your
--   <i><tt>methodCall</tt></i> function. Note that the required return
--   type of the <tt>Get</tt> call is <tt>(v)</tt>, not the type of the
--   property. <tt>GetAll</tt> expects a return value of type
--   <tt>a{sv}</tt>.
--   
--   If you have writable properties specified in your interface info, you
--   must ensure that you either provide a non-<a>Nothing</a>
--   <i><tt>setProperty</tt></i>() function or provide an implementation of
--   the <tt>Set</tt> call. If implementing the call, you must return the
--   value of type <tt><i>G_VARIANT_TYPE_UNIT</i></tt>.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Structs.DBusInterfaceVTable

-- | Memory-managed wrapper type.
newtype DBusInterfaceVTable
DBusInterfaceVTable :: ManagedPtr DBusInterfaceVTable -> DBusInterfaceVTable

-- | Construct a <a>DBusInterfaceVTable</a> struct initialized to zero.
newZeroDBusInterfaceVTable :: MonadIO m => m DBusInterfaceVTable

-- | Set the value of the “<tt>get_property</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #getProperty
--   </pre>
clearDBusInterfaceVTableGetProperty :: MonadIO m => DBusInterfaceVTable -> m ()

-- | Get the value of the “<tt>get_property</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceVTable #getProperty
--   </pre>
getDBusInterfaceVTableGetProperty :: MonadIO m => DBusInterfaceVTable -> m (Maybe DBusInterfaceGetPropertyFunc_WithClosures)

-- | Set the value of the “<tt>get_property</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceVTable [ #getProperty <a>:=</a> value ]
--   </pre>
setDBusInterfaceVTableGetProperty :: MonadIO m => DBusInterfaceVTable -> FunPtr C_DBusInterfaceGetPropertyFunc -> m ()

-- | Set the value of the “<tt>method_call</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #methodCall
--   </pre>
clearDBusInterfaceVTableMethodCall :: MonadIO m => DBusInterfaceVTable -> m ()

-- | Get the value of the “<tt>method_call</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceVTable #methodCall
--   </pre>
getDBusInterfaceVTableMethodCall :: MonadIO m => DBusInterfaceVTable -> m (Maybe DBusInterfaceMethodCallFunc_WithClosures)

-- | Set the value of the “<tt>method_call</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceVTable [ #methodCall <a>:=</a> value ]
--   </pre>
setDBusInterfaceVTableMethodCall :: MonadIO m => DBusInterfaceVTable -> FunPtr C_DBusInterfaceMethodCallFunc -> m ()

-- | Set the value of the “<tt>set_property</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #setProperty
--   </pre>
clearDBusInterfaceVTableSetProperty :: MonadIO m => DBusInterfaceVTable -> m ()

-- | Get the value of the “<tt>set_property</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceVTable #setProperty
--   </pre>
getDBusInterfaceVTableSetProperty :: MonadIO m => DBusInterfaceVTable -> m (Maybe DBusInterfaceSetPropertyFunc_WithClosures)

-- | Set the value of the “<tt>set_property</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceVTable [ #setProperty <a>:=</a> value ]
--   </pre>
setDBusInterfaceVTableSetProperty :: MonadIO m => DBusInterfaceVTable -> FunPtr C_DBusInterfaceSetPropertyFunc -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.DBusInterfaceVTable.DBusInterfaceVTable
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.DBusInterfaceVTable.DBusInterfaceVTable
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusInterfaceVTable.DBusInterfaceVTable tag
instance GHC.Classes.Eq GI.Gio.Structs.DBusInterfaceVTable.DBusInterfaceVTable
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.DBusInterfaceVTable.DBusInterfaceVTable


-- | This struct defines a single action. It is for use with
--   <a>actionMapAddActionEntries</a>.
--   
--   The order of the items in the structure are intended to reflect
--   frequency of use. It is permissible to use an incomplete initialiser
--   in order to leave some of the later values as <tt>NULL</tt>. All
--   values after <i><tt>name</tt></i> are optional. Additional optional
--   fields may be added in the future.
--   
--   See <a>actionMapAddActionEntries</a> for an example.
module GI.Gio.Structs.ActionEntry

-- | Memory-managed wrapper type.
newtype ActionEntry
ActionEntry :: ManagedPtr ActionEntry -> ActionEntry

-- | Construct a <a>ActionEntry</a> struct initialized to zero.
newZeroActionEntry :: MonadIO m => m ActionEntry

-- | Set the value of the “<tt>activate</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #activate
--   </pre>
clearActionEntryActivate :: MonadIO m => ActionEntry -> m ()

-- | Get the value of the “<tt>activate</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> actionEntry #activate
--   </pre>
getActionEntryActivate :: MonadIO m => ActionEntry -> m (Maybe ActionEntryActivateFieldCallback_WithClosures)

-- | Set the value of the “<tt>activate</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> actionEntry [ #activate <a>:=</a> value ]
--   </pre>
setActionEntryActivate :: MonadIO m => ActionEntry -> FunPtr C_ActionEntryActivateFieldCallback -> m ()

-- | Set the value of the “<tt>change_state</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #changeState
--   </pre>
clearActionEntryChangeState :: MonadIO m => ActionEntry -> m ()

-- | Get the value of the “<tt>change_state</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> actionEntry #changeState
--   </pre>
getActionEntryChangeState :: MonadIO m => ActionEntry -> m (Maybe ActionEntryChangeStateFieldCallback_WithClosures)

-- | Set the value of the “<tt>change_state</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> actionEntry [ #changeState <a>:=</a> value ]
--   </pre>
setActionEntryChangeState :: MonadIO m => ActionEntry -> FunPtr C_ActionEntryChangeStateFieldCallback -> m ()

-- | Set the value of the “<tt>name</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #name
--   </pre>
clearActionEntryName :: MonadIO m => ActionEntry -> m ()

-- | Get the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> actionEntry #name
--   </pre>
getActionEntryName :: MonadIO m => ActionEntry -> m (Maybe Text)

-- | Set the value of the “<tt>name</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> actionEntry [ #name <a>:=</a> value ]
--   </pre>
setActionEntryName :: MonadIO m => ActionEntry -> CString -> m ()

-- | Set the value of the “<tt>parameter_type</tt>” field to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #parameterType
--   </pre>
clearActionEntryParameterType :: MonadIO m => ActionEntry -> m ()

-- | Get the value of the “<tt>parameter_type</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> actionEntry #parameterType
--   </pre>
getActionEntryParameterType :: MonadIO m => ActionEntry -> m (Maybe Text)

-- | Set the value of the “<tt>parameter_type</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> actionEntry [ #parameterType <a>:=</a> value ]
--   </pre>
setActionEntryParameterType :: MonadIO m => ActionEntry -> CString -> m ()

-- | Set the value of the “<tt>state</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #state
--   </pre>
clearActionEntryState :: MonadIO m => ActionEntry -> m ()

-- | Get the value of the “<tt>state</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> actionEntry #state
--   </pre>
getActionEntryState :: MonadIO m => ActionEntry -> m (Maybe Text)

-- | Set the value of the “<tt>state</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> actionEntry [ #state <a>:=</a> value ]
--   </pre>
setActionEntryState :: MonadIO m => ActionEntry -> CString -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.ActionEntry.ActionEntry
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.ActionEntry.ActionEntry
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.ActionEntry.ActionEntry tag
instance GHC.Classes.Eq GI.Gio.Structs.ActionEntry.ActionEntry
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.ActionEntry.ActionEntry


-- | <tt>GVolumeMonitor</tt> is for listing the user interesting devices
--   and volumes on the computer. In other words, what a file selector or
--   file manager would show in a sidebar.
--   
--   <tt>GVolumeMonitor</tt> is not thread-default-context aware (see
--   <a>mainContextPushThreadDefault</a>), and so should not be used other
--   than from the main thread, with no thread-default-context active.
--   
--   In order to receive updates about volumes and mounts monitored through
--   GVFS, a main loop must be running.
module GI.Gio.Objects.VolumeMonitor

-- | Memory-managed wrapper type.
newtype VolumeMonitor
VolumeMonitor :: ManagedPtr VolumeMonitor -> VolumeMonitor

-- | Type class for types which can be safely cast to <a>VolumeMonitor</a>,
--   for instance with <a>toVolumeMonitor</a>.
class (GObject o, IsDescendantOf VolumeMonitor o) => IsVolumeMonitor o

-- | Cast to <a>VolumeMonitor</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toVolumeMonitor :: (MonadIO m, IsVolumeMonitor o) => o -> m VolumeMonitor

-- | This function should be called by any <a>VolumeMonitor</a>
--   implementation when a new <a>Mount</a> object is created that is not
--   associated with a <a>Volume</a> object. It must be called just before
--   emitting the <i><tt>mountAdded</tt></i> signal.
--   
--   If the return value is not <a>Nothing</a>, the caller must associate
--   the returned <a>Volume</a> object with the <a>Mount</a>. This involves
--   returning it in its <a>mountGetVolume</a> implementation. The caller
--   must also listen for the "removed" signal on the returned object and
--   give up its reference when handling that signal
--   
--   Similarly, if implementing <a>volumeMonitorAdoptOrphanMount</a>, the
--   implementor must take a reference to <i><tt>mount</tt></i> and return
--   it in its <a>volumeGetMount</a> implemented. Also, the implementor
--   must listen for the "unmounted" signal on <i><tt>mount</tt></i> and
--   give up its reference upon handling that signal.
--   
--   There are two main use cases for this function.
--   
--   One is when implementing a user space file system driver that reads
--   blocks of a block device that is already represented by the native
--   volume monitor (for example a CD Audio file system driver). Such a
--   driver will generate its own <a>Mount</a> object that needs to be
--   associated with the <a>Volume</a> object that represents the volume.
--   
--   The other is for implementing a <a>VolumeMonitor</a> whose sole
--   purpose is to return <a>Volume</a> objects representing entries in the
--   users "favorite servers" list or similar.

-- | <i>Deprecated: (Since version 2.20)Instead of using this function,
--   <a>VolumeMonitor</a>implementations should instead create shadow
--   mounts with the URI ofthe mount they intend to adopt. See the proxy
--   volume monitor ingvfs for an example of this. Also see
--   <a>mountIsShadowed</a>,<a>mountShadow</a> and <a>mountUnshadow</a>
--   functions.</i>
volumeMonitorAdoptOrphanMount :: (HasCallStack, MonadIO m, IsMount a) => a -> m Volume

-- | Gets the volume monitor used by gio.
volumeMonitorGet :: (HasCallStack, MonadIO m) => m VolumeMonitor

-- | Gets a list of drives connected to the system.
--   
--   The returned list should be freed with <tt><i>g_list_free()</i></tt>,
--   after its elements have been unreffed with <a>objectUnref</a>.
volumeMonitorGetConnectedDrives :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Drive]

-- | Finds a <a>Mount</a> object by its UUID (see <a>mountGetUuid</a>)
volumeMonitorGetMountForUuid :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> Text -> m (Maybe Mount)

-- | Gets a list of the mounts on the system.
--   
--   The returned list should be freed with <tt><i>g_list_free()</i></tt>,
--   after its elements have been unreffed with <a>objectUnref</a>.
volumeMonitorGetMounts :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Mount]

-- | Finds a <a>Volume</a> object by its UUID (see <a>volumeGetUuid</a>)
volumeMonitorGetVolumeForUuid :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> Text -> m (Maybe Volume)

-- | Gets a list of the volumes on the system.
--   
--   The returned list should be freed with <tt><i>g_list_free()</i></tt>,
--   after its elements have been unreffed with <a>objectUnref</a>.
volumeMonitorGetVolumes :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Volume]

-- | Emitted when a drive changes.
type VolumeMonitorDriveChangedCallback = Drive -> IO ()

-- | Connect a signal handler for the <a>driveChanged</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #driveChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>driveChanged</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #driveChanged callback
--   </pre>
onVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveChangedCallback) -> m SignalHandlerId

-- | Emitted when a drive is connected to the system.
type VolumeMonitorDriveConnectedCallback = Drive -> IO ()

-- | Connect a signal handler for the <a>driveConnected</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #driveConnected callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveConnectedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>driveConnected</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #driveConnected callback
--   </pre>
onVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveConnectedCallback) -> m SignalHandlerId

-- | Emitted when a drive is disconnected from the system.
type VolumeMonitorDriveDisconnectedCallback = Drive -> IO ()

-- | Connect a signal handler for the <a>driveDisconnected</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #driveDisconnected callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveDisconnectedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>driveDisconnected</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #driveDisconnected callback
--   </pre>
onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveDisconnectedCallback) -> m SignalHandlerId

-- | Emitted when the eject button is pressed on <i><tt>drive</tt></i>.
--   
--   <i>Since: 2.18</i>
type VolumeMonitorDriveEjectButtonCallback = Drive -> IO ()

-- | Connect a signal handler for the <a>driveEjectButton</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #driveEjectButton callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveEjectButtonCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>driveEjectButton</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #driveEjectButton callback
--   </pre>
onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveEjectButtonCallback) -> m SignalHandlerId

-- | Emitted when the stop button is pressed on <i><tt>drive</tt></i>.
--   
--   <i>Since: 2.22</i>
type VolumeMonitorDriveStopButtonCallback = Drive -> IO ()

-- | Connect a signal handler for the <a>driveStopButton</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #driveStopButton callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveStopButtonCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>driveStopButton</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #driveStopButton callback
--   </pre>
onVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveStopButtonCallback) -> m SignalHandlerId

-- | Emitted when a mount is added.
type VolumeMonitorMountAddedCallback = Mount -> IO ()

-- | Connect a signal handler for the <a>mountAdded</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #mountAdded callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountAddedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>mountAdded</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #mountAdded callback
--   </pre>
onVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountAddedCallback) -> m SignalHandlerId

-- | Emitted when a mount changes.
type VolumeMonitorMountChangedCallback = Mount -> IO ()

-- | Connect a signal handler for the <a>mountChanged</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #mountChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>mountChanged</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #mountChanged callback
--   </pre>
onVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountChangedCallback) -> m SignalHandlerId

-- | May be emitted when a mount is about to be removed.
--   
--   This signal depends on the backend and is only emitted if GIO was used
--   to unmount.
type VolumeMonitorMountPreUnmountCallback = Mount -> IO ()

-- | Connect a signal handler for the <a>mountPreUnmount</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #mountPreUnmount callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountPreUnmountCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>mountPreUnmount</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #mountPreUnmount callback
--   </pre>
onVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountPreUnmountCallback) -> m SignalHandlerId

-- | Emitted when a mount is removed.
type VolumeMonitorMountRemovedCallback = Mount -> IO ()

-- | Connect a signal handler for the <a>mountRemoved</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #mountRemoved callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>mountRemoved</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #mountRemoved callback
--   </pre>
onVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountRemovedCallback) -> m SignalHandlerId

-- | Emitted when a mountable volume is added to the system.
type VolumeMonitorVolumeAddedCallback = Volume -> IO ()

-- | Connect a signal handler for the <a>volumeAdded</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #volumeAdded callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeAddedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>volumeAdded</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #volumeAdded callback
--   </pre>
onVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeAddedCallback) -> m SignalHandlerId

-- | Emitted when mountable volume is changed.
type VolumeMonitorVolumeChangedCallback = Volume -> IO ()

-- | Connect a signal handler for the <a>volumeChanged</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #volumeChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>volumeChanged</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #volumeChanged callback
--   </pre>
onVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeChangedCallback) -> m SignalHandlerId

-- | Emitted when a mountable volume is removed from the system.
type VolumeMonitorVolumeRemovedCallback = Volume -> IO ()

-- | Connect a signal handler for the <a>volumeRemoved</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> volumeMonitor #volumeRemoved callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>volumeRemoved</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> volumeMonitor #volumeRemoved callback
--   </pre>
onVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeRemovedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.VolumeMonitor.VolumeMonitor)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.VolumeMonitor.VolumeMonitor o) => GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.VolumeMonitor.VolumeMonitor


-- | Entry point for using GIO functionality.
module GI.Gio.Objects.Vfs

-- | Memory-managed wrapper type.
newtype Vfs
Vfs :: ManagedPtr Vfs -> Vfs

-- | Type class for types which can be safely cast to <a>Vfs</a>, for
--   instance with <a>toVfs</a>.
class (GObject o, IsDescendantOf Vfs o) => IsVfs o

-- | Cast to <a>Vfs</a>, for types for which this is known to be safe. For
--   general casts, use <a>castTo</a>.
toVfs :: (MonadIO m, IsVfs o) => o -> m Vfs

-- | Gets the default <a>Vfs</a> for the system.
vfsGetDefault :: (HasCallStack, MonadIO m) => m Vfs

-- | Gets a <a>File</a> for <i><tt>path</tt></i>.
vfsGetFileForPath :: (HasCallStack, MonadIO m, IsVfs a) => a -> [Char] -> m File

-- | Gets a <a>File</a> for <i><tt>uri</tt></i>.
--   
--   This operation never fails, but the returned object might not support
--   any I/O operation if the URI is malformed or if the URI scheme is not
--   supported.
vfsGetFileForUri :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m File

-- | Gets the local <a>Vfs</a> for the system.
vfsGetLocal :: (HasCallStack, MonadIO m) => m Vfs

-- | Gets a list of URI schemes supported by <i><tt>vfs</tt></i>.
vfsGetSupportedUriSchemes :: (HasCallStack, MonadIO m, IsVfs a) => a -> m [Text]

-- | Checks if the VFS is active.
vfsIsActive :: (HasCallStack, MonadIO m, IsVfs a) => a -> m Bool

-- | This operation never fails, but the returned object might not support
--   any I/O operations if the <i><tt>parseName</tt></i> cannot be parsed
--   by the <a>Vfs</a> module.
vfsParseName :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m File

-- | Registers <i><tt>uriFunc</tt></i> and <i><tt>parseNameFunc</tt></i> as
--   the <a>File</a> URI and parse name lookup functions for URIs with a
--   scheme matching <i><tt>scheme</tt></i>. Note that
--   <i><tt>scheme</tt></i> is registered only within the running
--   application, as opposed to desktop-wide as it happens with GVfs
--   backends.
--   
--   When a <a>File</a> is requested with an URI containing
--   <i><tt>scheme</tt></i> (e.g. through <a>fileNewForUri</a>),
--   <i><tt>uriFunc</tt></i> will be called to allow a custom constructor.
--   The implementation of <i><tt>uriFunc</tt></i> should not be blocking,
--   and must not call <a>vfsRegisterUriScheme</a> or
--   <a>vfsUnregisterUriScheme</a>.
--   
--   When <a>fileParseName</a> is called with a parse name obtained from
--   such file, <i><tt>parseNameFunc</tt></i> will be called to allow the
--   <a>File</a> to be created again. In that case, it's responsibility of
--   <i><tt>parseNameFunc</tt></i> to make sure the parse name matches what
--   the custom <a>File</a> implementation returned when
--   <a>fileGetParseName</a> was previously called. The implementation of
--   <i><tt>parseNameFunc</tt></i> should not be blocking, and must not
--   call <a>vfsRegisterUriScheme</a> or <a>vfsUnregisterUriScheme</a>.
--   
--   It's an error to call this function twice with the same scheme. To
--   unregister a custom URI scheme, use <a>vfsUnregisterUriScheme</a>.
--   
--   <i>Since: 2.50</i>
vfsRegisterUriScheme :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> Maybe VfsFileLookupFunc -> Maybe VfsFileLookupFunc -> m Bool

-- | Unregisters the URI handler for <i><tt>scheme</tt></i> previously
--   registered with <a>vfsRegisterUriScheme</a>.
--   
--   <i>Since: 2.50</i>
vfsUnregisterUriScheme :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.Vfs.Vfs
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Vfs.Vfs
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Vfs.Vfs
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Vfs.Vfs)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Vfs.Vfs o) => GI.Gio.Objects.Vfs.IsVfs o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Vfs.Vfs
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Vfs.Vfs


-- | Support for UNIX-domain (also known as local) sockets, corresponding
--   to <tt>struct sockaddr_un</tt>.
--   
--   UNIX domain sockets are generally visible in the filesystem. However,
--   some systems support abstract socket names which are not visible in
--   the filesystem and not affected by the filesystem permissions,
--   visibility, etc. Currently this is only supported under Linux. If you
--   attempt to use abstract sockets on other systems, function calls may
--   return <tt>G_IO_ERROR_NOT_SUPPORTED</tt> errors. You can use
--   <a>unixSocketAddressAbstractNamesSupported</a> to see if abstract
--   names are supported.
--   
--   Since GLib 2.72, <tt>GUnixSocketAddress</tt> is available on all
--   platforms. It requires underlying system support (such as Windows 10
--   with <tt>AF_UNIX</tt>) at run time.
--   
--   Before GLib 2.72, <tt>&lt;gio/gunixsocketaddress.h&gt;</tt> belonged
--   to the UNIX-specific GIO interfaces, thus you had to use the
--   <tt>gio-unix-2.0.pc</tt> pkg-config file when using it. This is no
--   longer necessary since GLib 2.72.
module GI.Gio.Objects.UnixSocketAddress

-- | Memory-managed wrapper type.
newtype UnixSocketAddress
UnixSocketAddress :: ManagedPtr UnixSocketAddress -> UnixSocketAddress

-- | Type class for types which can be safely cast to
--   <a>UnixSocketAddress</a>, for instance with
--   <a>toUnixSocketAddress</a>.
class (GObject o, IsDescendantOf UnixSocketAddress o) => IsUnixSocketAddress o

-- | Cast to <a>UnixSocketAddress</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toUnixSocketAddress :: (MonadIO m, IsUnixSocketAddress o) => o -> m UnixSocketAddress

-- | Checks if abstract UNIX domain socket names are supported.
--   
--   <i>Since: 2.22</i>
unixSocketAddressAbstractNamesSupported :: (HasCallStack, MonadIO m) => m Bool

-- | Gets <i><tt>address</tt></i>'s type.
--   
--   <i>Since: 2.26</i>
unixSocketAddressGetAddressType :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m UnixSocketAddressType

-- | Tests if <i><tt>address</tt></i> is abstract.
--   
--   <i>Since: 2.22</i>

-- | <i>Deprecated: Use <a>unixSocketAddressGetAddressType</a></i>
unixSocketAddressGetIsAbstract :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m Bool

-- | Gets <i><tt>address</tt></i>'s path, or for abstract sockets the
--   "name".
--   
--   Guaranteed to be zero-terminated, but an abstract socket may contain
--   embedded zeros, and thus you should use
--   <a>unixSocketAddressGetPathLen</a> to get the true length of this
--   string.
--   
--   <i>Since: 2.22</i>
unixSocketAddressGetPath :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m Text

-- | Gets the length of <i><tt>address</tt></i>'s path.
--   
--   For details, see <a>unixSocketAddressGetPath</a>.
--   
--   <i>Since: 2.22</i>
unixSocketAddressGetPathLen :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m CSize

-- | Creates a new <a>UnixSocketAddress</a> for <i><tt>path</tt></i>.
--   
--   To create abstract socket addresses, on systems that support that, use
--   <a>unixSocketAddressNewAbstract</a>.
--   
--   <i>Since: 2.22</i>
unixSocketAddressNew :: (HasCallStack, MonadIO m) => Text -> m UnixSocketAddress

-- | Creates a new <a>UnixSocketAddressTypeAbstractPadded</a>
--   <a>UnixSocketAddress</a> for <i><tt>path</tt></i>.

-- | <i>Deprecated: Use <a>unixSocketAddressNewWithType</a>.</i>
unixSocketAddressNewAbstract :: (HasCallStack, MonadIO m) => [Int8] -> m UnixSocketAddress

-- | Creates a new <a>UnixSocketAddress</a> of type <i><tt>type</tt></i>
--   with name <i><tt>path</tt></i>.
--   
--   If <i><tt>type</tt></i> is <a>UnixSocketAddressTypePath</a>, this is
--   equivalent to calling <a>unixSocketAddressNew</a>.
--   
--   If <i><tt>type</tt></i> is <a>UnixSocketAddressTypeAnonymous</a>,
--   <i><tt>path</tt></i> and <i><tt>pathLen</tt></i> will be ignored.
--   
--   If <i><tt>pathType</tt></i> is <a>UnixSocketAddressTypeAbstract</a>,
--   then <i><tt>pathLen</tt></i> bytes of <i><tt>path</tt></i> will be
--   copied to the socket's path, and only those bytes will be considered
--   part of the name. (If <i><tt>pathLen</tt></i> is -1, then
--   <i><tt>path</tt></i> is assumed to be NUL-terminated.) For example, if
--   <i><tt>path</tt></i> was "test", then calling
--   <a>socketAddressGetNativeSize</a> on the returned socket would return
--   7 (2 bytes of overhead, 1 byte for the abstract-socket indicator byte,
--   and 4 bytes for the name "test").
--   
--   If <i><tt>pathType</tt></i> is
--   <a>UnixSocketAddressTypeAbstractPadded</a>, then
--   <i><tt>pathLen</tt></i> bytes of <i><tt>path</tt></i> will be copied
--   to the socket's path, the rest of the path will be padded with 0
--   bytes, and the entire zero-padded buffer will be considered the name.
--   (As above, if <i><tt>pathLen</tt></i> is -1, then <i><tt>path</tt></i>
--   is assumed to be NUL-terminated.) In this case,
--   <a>socketAddressGetNativeSize</a> will always return the full size of
--   a <tt>struct sockaddr_un</tt>, although
--   <a>unixSocketAddressGetPathLen</a> will still return just the length
--   of <i><tt>path</tt></i>.
--   
--   <a>UnixSocketAddressTypeAbstract</a> is preferred over
--   <a>UnixSocketAddressTypeAbstractPadded</a> for new programs. Of
--   course, when connecting to a server created by another process, you
--   must use the appropriate type corresponding to how that process
--   created its listening socket.
--   
--   <i>Since: 2.26</i>
unixSocketAddressNewWithType :: (HasCallStack, MonadIO m) => [Int8] -> UnixSocketAddressType -> m UnixSocketAddress

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>abstract</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructUnixSocketAddressAbstract :: (IsUnixSocketAddress o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>abstract</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> unixSocketAddress #abstract
--   </pre>
getUnixSocketAddressAbstract :: (MonadIO m, IsUnixSocketAddress o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>address-type</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructUnixSocketAddressAddressType :: (IsUnixSocketAddress o, MonadIO m) => UnixSocketAddressType -> m (GValueConstruct o)

-- | Get the value of the “<tt>address-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> unixSocketAddress #addressType
--   </pre>
getUnixSocketAddressAddressType :: (MonadIO m, IsUnixSocketAddress o) => o -> m UnixSocketAddressType

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>path</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructUnixSocketAddressPath :: (IsUnixSocketAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>path</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> unixSocketAddress #path
--   </pre>
getUnixSocketAddressPath :: (MonadIO m, IsUnixSocketAddress o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>path-as-array</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructUnixSocketAddressPathAsArray :: (IsUnixSocketAddress o, MonadIO m) => ByteString -> m (GValueConstruct o)

-- | Get the value of the “<tt>path-as-array</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> unixSocketAddress #pathAsArray
--   </pre>
getUnixSocketAddressPathAsArray :: (MonadIO m, IsUnixSocketAddress o) => o -> m (Maybe ByteString)
instance GHC.Classes.Eq GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress o) => GI.Gio.Objects.UnixSocketAddress.IsUnixSocketAddress o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress


-- | This is the subclass of <a>SocketConnection</a> that is created for
--   UNIX domain sockets.
--   
--   It contains functions to do some of the UNIX socket specific
--   functionality like passing file descriptors.
--   
--   Since GLib 2.72, <tt>GUnixConnection</tt> is available on all
--   platforms. It requires underlying system support (such as Windows 10
--   with <tt>AF_UNIX</tt>) at run time.
--   
--   Before GLib 2.72, <tt>&lt;gio/gunixconnection.h&gt;</tt> belonged to
--   the UNIX-specific GIO interfaces, thus you had to use the
--   <tt>gio-unix-2.0.pc</tt> pkg-config file when using it. This is no
--   longer necessary since GLib 2.72.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.UnixConnection

-- | Memory-managed wrapper type.
newtype UnixConnection
UnixConnection :: ManagedPtr UnixConnection -> UnixConnection

-- | Type class for types which can be safely cast to
--   <a>UnixConnection</a>, for instance with <a>toUnixConnection</a>.
class (GObject o, IsDescendantOf UnixConnection o) => IsUnixConnection o

-- | Cast to <a>UnixConnection</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toUnixConnection :: (MonadIO m, IsUnixConnection o) => o -> m UnixConnection

-- | Receives credentials from the sending end of the connection. The
--   sending end has to call <a>unixConnectionSendCredentials</a> (or
--   similar) for this to work.
--   
--   As well as reading the credentials this also reads (and discards) a
--   single byte from the stream, as this is required for credentials
--   passing to work on some implementations.
--   
--   This method can be expected to be available on the following
--   platforms:
--   
--   <ul>
--   <li>Linux since GLib 2.26</li>
--   <li>FreeBSD since GLib 2.26</li>
--   <li>GNU/kFreeBSD since GLib 2.36</li>
--   <li>Solaris, Illumos and OpenSolaris since GLib 2.40</li>
--   <li>GNU/Hurd since GLib 2.40</li>
--   </ul>
--   
--   Other ways to exchange credentials with a foreign peer includes the
--   <a>UnixCredentialsMessage</a> type and <a>socketGetCredentials</a>
--   function.
--   
--   <i>Since: 2.26</i>
unixConnectionReceiveCredentials :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> m Credentials

-- | Asynchronously receive credentials.
--   
--   For more details, see <a>unixConnectionReceiveCredentials</a> which is
--   the synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call
--   <a>unixConnectionReceiveCredentialsFinish</a> to get the result of the
--   operation.
--   
--   <i>Since: 2.32</i>
unixConnectionReceiveCredentialsAsync :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous receive credentials operation started with
--   <a>unixConnectionReceiveCredentialsAsync</a>.
--   
--   <i>Since: 2.32</i>
unixConnectionReceiveCredentialsFinish :: (HasCallStack, MonadIO m, IsUnixConnection a, IsAsyncResult b) => a -> b -> m Credentials

-- | Receives a file descriptor from the sending end of the connection. The
--   sending end has to call <a>unixConnectionSendFd</a> for this to work.
--   
--   As well as reading the fd this also reads a single byte from the
--   stream, as this is required for fd passing to work on some
--   implementations.
--   
--   <i>Since: 2.22</i>
unixConnectionReceiveFd :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> m Int32

-- | Passes the credentials of the current user the receiving side of the
--   connection. The receiving end has to call
--   <a>unixConnectionReceiveCredentials</a> (or similar) to accept the
--   credentials.
--   
--   As well as sending the credentials this also writes a single NUL byte
--   to the stream, as this is required for credentials passing to work on
--   some implementations.
--   
--   This method can be expected to be available on the following
--   platforms:
--   
--   <ul>
--   <li>Linux since GLib 2.26</li>
--   <li>FreeBSD since GLib 2.26</li>
--   <li>GNU/kFreeBSD since GLib 2.36</li>
--   <li>Solaris, Illumos and OpenSolaris since GLib 2.40</li>
--   <li>GNU/Hurd since GLib 2.40</li>
--   </ul>
--   
--   Other ways to exchange credentials with a foreign peer includes the
--   <a>UnixCredentialsMessage</a> type and <a>socketGetCredentials</a>
--   function.
--   
--   <i>Since: 2.26</i>
unixConnectionSendCredentials :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously send credentials.
--   
--   For more details, see <a>unixConnectionSendCredentials</a> which is
--   the synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>unixConnectionSendCredentialsFinish</a>
--   to get the result of the operation.
--   
--   <i>Since: 2.32</i>
unixConnectionSendCredentialsAsync :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous send credentials operation started with
--   <a>unixConnectionSendCredentialsAsync</a>.
--   
--   <i>Since: 2.32</i>
unixConnectionSendCredentialsFinish :: (HasCallStack, MonadIO m, IsUnixConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Passes a file descriptor to the receiving side of the connection. The
--   receiving end has to call <a>unixConnectionReceiveFd</a> to accept the
--   file descriptor.
--   
--   As well as sending the fd this also writes a single byte to the
--   stream, as this is required for fd passing to work on some
--   implementations.
--   
--   <i>Since: 2.22</i>
unixConnectionSendFd :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.UnixConnection.UnixConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixConnection.UnixConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixConnection.UnixConnection
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.UnixConnection.UnixConnection)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixConnection.UnixConnection o) => GI.Gio.Objects.UnixConnection.IsUnixConnection o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixConnection.UnixConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixConnection.UnixConnection


-- | <tt>GTlsInteraction</tt> provides a mechanism for the TLS connection
--   and database code to interact with the user. It can be used to ask the
--   user for passwords.
--   
--   To use a <tt>GTlsInteraction</tt> with a TLS connection use
--   <a>tlsConnectionSetInteraction</a>.
--   
--   Callers should instantiate a derived class that implements the various
--   interaction methods to show the required dialogs.
--   
--   Callers should use the 'invoke' functions like
--   <a>tlsInteractionInvokeAskPassword</a> to run interaction methods.
--   These functions make sure that the interaction is invoked in the main
--   loop and not in the current thread, if the current thread is not
--   running the main loop.
--   
--   Derived classes can choose to implement whichever interactions methods
--   they’d like to support by overriding those virtual methods in their
--   class initialization function. Any interactions not implemented will
--   return <tt>G_TLS_INTERACTION_UNHANDLED</tt>. If a derived class
--   implements an async method, it must also implement the corresponding
--   finish method.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.TlsInteraction

-- | Memory-managed wrapper type.
newtype TlsInteraction
TlsInteraction :: ManagedPtr TlsInteraction -> TlsInteraction

-- | Type class for types which can be safely cast to
--   <a>TlsInteraction</a>, for instance with <a>toTlsInteraction</a>.
class (GObject o, IsDescendantOf TlsInteraction o) => IsTlsInteraction o

-- | Cast to <a>TlsInteraction</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toTlsInteraction :: (MonadIO m, IsTlsInteraction o) => o -> m TlsInteraction

-- | Run synchronous interaction to ask the user for a password. In
--   general, <a>tlsInteractionInvokeAskPassword</a> should be used instead
--   of this function.
--   
--   Derived subclasses usually implement a password prompt, although they
--   may also choose to provide a password from elsewhere. The
--   <i><tt>password</tt></i> value will be filled in and then
--   <i><tt>callback</tt></i> will be called. Alternatively the user may
--   abort this password request, which will usually abort the TLS
--   connection.
--   
--   If the interaction is cancelled by the cancellation object, or by the
--   user then <a>TlsInteractionResultFailed</a> will be returned with an
--   error that contains a <a>IOErrorEnumCancelled</a> error code. Certain
--   implementations may not support immediate cancellation.
--   
--   <i>Since: 2.30</i>
tlsInteractionAskPassword :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsPassword b, IsCancellable c) => a -> b -> Maybe c -> m TlsInteractionResult

-- | Run asynchronous interaction to ask the user for a password. In
--   general, <a>tlsInteractionInvokeAskPassword</a> should be used instead
--   of this function.
--   
--   Derived subclasses usually implement a password prompt, although they
--   may also choose to provide a password from elsewhere. The
--   <i><tt>password</tt></i> value will be filled in and then
--   <i><tt>callback</tt></i> will be called. Alternatively the user may
--   abort this password request, which will usually abort the TLS
--   connection.
--   
--   If the interaction is cancelled by the cancellation object, or by the
--   user then <a>TlsInteractionResultFailed</a> will be returned with an
--   error that contains a <a>IOErrorEnumCancelled</a> error code. Certain
--   implementations may not support immediate cancellation.
--   
--   Certain implementations may not support immediate cancellation.
--   
--   <i>Since: 2.30</i>
tlsInteractionAskPasswordAsync :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsPassword b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Complete an ask password user interaction request. This should be once
--   the <a>tlsInteractionAskPasswordAsync</a> completion callback is
--   called.
--   
--   If <a>TlsInteractionResultHandled</a> is returned, then the
--   <a>TlsPassword</a> passed to <a>tlsInteractionAskPassword</a> will
--   have its password filled in.
--   
--   If the interaction is cancelled by the cancellation object, or by the
--   user then <a>TlsInteractionResultFailed</a> will be returned with an
--   error that contains a <a>IOErrorEnumCancelled</a> error code.
--   
--   <i>Since: 2.30</i>
tlsInteractionAskPasswordFinish :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsAsyncResult b) => a -> b -> m TlsInteractionResult

-- | Invoke the interaction to ask the user for a password. It invokes this
--   interaction in the main loop, specifically the <a>MainContext</a>
--   returned by <a>mainContextGetThreadDefault</a> when the interaction is
--   created. This is called by called by <a>TlsConnection</a> or
--   <a>TlsDatabase</a> to ask the user for a password.
--   
--   Derived subclasses usually implement a password prompt, although they
--   may also choose to provide a password from elsewhere. The
--   <i><tt>password</tt></i> value will be filled in and then
--   <i><tt>callback</tt></i> will be called. Alternatively the user may
--   abort this password request, which will usually abort the TLS
--   connection.
--   
--   The implementation can either be a synchronous (eg: modal dialog) or
--   an asynchronous one (eg: modeless dialog). This function will take
--   care of calling which ever one correctly.
--   
--   If the interaction is cancelled by the cancellation object, or by the
--   user then <a>TlsInteractionResultFailed</a> will be returned with an
--   error that contains a <a>IOErrorEnumCancelled</a> error code. Certain
--   implementations may not support immediate cancellation.
--   
--   <i>Since: 2.30</i>
tlsInteractionInvokeAskPassword :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsPassword b, IsCancellable c) => a -> b -> Maybe c -> m TlsInteractionResult

-- | Invoke the interaction to ask the user to choose a certificate to use
--   with the connection. It invokes this interaction in the main loop,
--   specifically the <a>MainContext</a> returned by
--   <a>mainContextGetThreadDefault</a> when the interaction is created.
--   This is called by called by <a>TlsConnection</a> when the peer
--   requests a certificate during the handshake.
--   
--   Derived subclasses usually implement a certificate selector, although
--   they may also choose to provide a certificate from elsewhere.
--   Alternatively the user may abort this certificate request, which may
--   or may not abort the TLS connection.
--   
--   The implementation can either be a synchronous (eg: modal dialog) or
--   an asynchronous one (eg: modeless dialog). This function will take
--   care of calling which ever one correctly.
--   
--   If the interaction is cancelled by the cancellation object, or by the
--   user then <a>TlsInteractionResultFailed</a> will be returned with an
--   error that contains a <a>IOErrorEnumCancelled</a> error code. Certain
--   implementations may not support immediate cancellation.
--   
--   <i>Since: 2.40</i>
tlsInteractionInvokeRequestCertificate :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsConnection b, IsCancellable c) => a -> b -> [TlsCertificateRequestFlags] -> Maybe c -> m TlsInteractionResult

-- | Run synchronous interaction to ask the user to choose a certificate to
--   use with the connection. In general,
--   <a>tlsInteractionInvokeRequestCertificate</a> should be used instead
--   of this function.
--   
--   Derived subclasses usually implement a certificate selector, although
--   they may also choose to provide a certificate from elsewhere.
--   Alternatively the user may abort this certificate request, which will
--   usually abort the TLS connection.
--   
--   If <a>TlsInteractionResultHandled</a> is returned, then the
--   <a>TlsConnection</a> passed to <a>tlsInteractionRequestCertificate</a>
--   will have had its <a>TlsConnection:certificate</a> filled in.
--   
--   If the interaction is cancelled by the cancellation object, or by the
--   user then <a>TlsInteractionResultFailed</a> will be returned with an
--   error that contains a <a>IOErrorEnumCancelled</a> error code. Certain
--   implementations may not support immediate cancellation.
--   
--   <i>Since: 2.40</i>
tlsInteractionRequestCertificate :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsConnection b, IsCancellable c) => a -> b -> [TlsCertificateRequestFlags] -> Maybe c -> m TlsInteractionResult

-- | Run asynchronous interaction to ask the user for a certificate to use
--   with the connection. In general,
--   <a>tlsInteractionInvokeRequestCertificate</a> should be used instead
--   of this function.
--   
--   Derived subclasses usually implement a certificate selector, although
--   they may also choose to provide a certificate from elsewhere.
--   <i><tt>callback</tt></i> will be called when the operation completes.
--   Alternatively the user may abort this certificate request, which will
--   usually abort the TLS connection.
--   
--   <i>Since: 2.40</i>
tlsInteractionRequestCertificateAsync :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsConnection b, IsCancellable c) => a -> b -> [TlsCertificateRequestFlags] -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Complete a request certificate user interaction request. This should
--   be once the <a>tlsInteractionRequestCertificateAsync</a> completion
--   callback is called.
--   
--   If <a>TlsInteractionResultHandled</a> is returned, then the
--   <a>TlsConnection</a> passed to
--   <a>tlsInteractionRequestCertificateAsync</a> will have had its
--   <a>TlsConnection:certificate</a> filled in.
--   
--   If the interaction is cancelled by the cancellation object, or by the
--   user then <a>TlsInteractionResultFailed</a> will be returned with an
--   error that contains a <a>IOErrorEnumCancelled</a> error code.
--   
--   <i>Since: 2.40</i>
tlsInteractionRequestCertificateFinish :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsAsyncResult b) => a -> b -> m TlsInteractionResult
instance GHC.Classes.Eq GI.Gio.Objects.TlsInteraction.TlsInteraction
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TlsInteraction.TlsInteraction
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsInteraction.TlsInteraction
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TlsInteraction.TlsInteraction)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TlsInteraction.TlsInteraction o) => GI.Gio.Objects.TlsInteraction.IsTlsInteraction o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TlsInteraction.TlsInteraction
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TlsInteraction.TlsInteraction


-- | <tt>GTlsDatabase</tt> is used to look up certificates and other
--   information from a certificate or key store. It is an abstract base
--   class which TLS library specific subtypes override.
--   
--   A <tt>GTlsDatabase</tt> may be accessed from multiple threads by the
--   TLS backend. All implementations are required to be fully thread-safe.
--   
--   Most common client applications will not directly interact with
--   <tt>GTlsDatabase</tt>. It is used internally by <a>TlsConnection</a>.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.TlsDatabase

-- | Memory-managed wrapper type.
newtype TlsDatabase
TlsDatabase :: ManagedPtr TlsDatabase -> TlsDatabase

-- | Type class for types which can be safely cast to <a>TlsDatabase</a>,
--   for instance with <a>toTlsDatabase</a>.
class (GObject o, IsDescendantOf TlsDatabase o) => IsTlsDatabase o

-- | Cast to <a>TlsDatabase</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toTlsDatabase :: (MonadIO m, IsTlsDatabase o) => o -> m TlsDatabase

-- | Create a handle string for the certificate. The database will only be
--   able to create a handle for certificates that originate from the
--   database. In cases where the database cannot create a handle for a
--   certificate, <a>Nothing</a> will be returned.
--   
--   This handle should be stable across various instances of the
--   application, and between applications. If a certificate is modified in
--   the database, then it is not guaranteed that this handle will continue
--   to point to it.
--   
--   <i>Since: 2.30</i>
tlsDatabaseCreateCertificateHandle :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b) => a -> b -> m (Maybe Text)

-- | Look up a certificate by its handle.
--   
--   The handle should have been created by calling
--   <a>tlsDatabaseCreateCertificateHandle</a> on a <a>TlsDatabase</a>
--   object of the same TLS backend. The handle is designed to remain valid
--   across instantiations of the database.
--   
--   If the handle is no longer valid, or does not point to a certificate
--   in this database, then <a>Nothing</a> will be returned.
--   
--   This function can block, use
--   <a>tlsDatabaseLookupCertificateForHandleAsync</a> to perform the
--   lookup operation asynchronously.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificateForHandle :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> Text -> Maybe b -> [TlsDatabaseLookupFlags] -> Maybe c -> m (Maybe TlsCertificate)

-- | Asynchronously look up a certificate by its handle in the database.
--   See <a>tlsDatabaseLookupCertificateForHandle</a> for more information.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificateForHandleAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> Text -> Maybe b -> [TlsDatabaseLookupFlags] -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous lookup of a certificate by its handle. See
--   <a>tlsDatabaseLookupCertificateForHandle</a> for more information.
--   
--   If the handle is no longer valid, or does not point to a certificate
--   in this database, then <a>Nothing</a> will be returned.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificateForHandleFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m TlsCertificate

-- | Look up the issuer of <i><tt>certificate</tt></i> in the database. The
--   <a>TlsCertificate:issuer</a> property of <i><tt>certificate</tt></i>
--   is not modified, and the two certificates are not hooked into a chain.
--   
--   This function can block. Use
--   <a>tlsDatabaseLookupCertificateIssuerAsync</a> to perform the lookup
--   operation asynchronously.
--   
--   Beware this function cannot be used to build certification paths. The
--   issuer certificate returned by this function may not be the same as
--   the certificate that would actually be used to construct a valid
--   certification path during certificate verification. <a>RFC 4158</a>
--   explains why an issuer certificate cannot be naively assumed to be
--   part of the the certification path (though GLib's TLS backends may not
--   follow the path building strategies outlined in this RFC). Due to the
--   complexity of certification path building, GLib does not provide any
--   way to know which certification path will actually be used when
--   verifying a TLS certificate. Accordingly, this function cannot be used
--   to make security-related decisions. Only GLib itself should make
--   security decisions about TLS certificates.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificateIssuer :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsTlsInteraction c, IsCancellable d) => a -> b -> Maybe c -> [TlsDatabaseLookupFlags] -> Maybe d -> m TlsCertificate

-- | Asynchronously look up the issuer of <i><tt>certificate</tt></i> in
--   the database. See <a>tlsDatabaseLookupCertificateIssuer</a> for more
--   information.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificateIssuerAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsTlsInteraction c, IsCancellable d) => a -> b -> Maybe c -> [TlsDatabaseLookupFlags] -> Maybe d -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous lookup issuer operation. See
--   <a>tlsDatabaseLookupCertificateIssuer</a> for more information.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificateIssuerFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m TlsCertificate

-- | Look up certificates issued by this issuer in the database.
--   
--   This function can block, use
--   <a>tlsDatabaseLookupCertificatesIssuedByAsync</a> to perform the
--   lookup operation asynchronously.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificatesIssuedBy :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> ByteString -> Maybe b -> [TlsDatabaseLookupFlags] -> Maybe c -> m [TlsCertificate]

-- | Asynchronously look up certificates issued by this issuer in the
--   database. See <a>tlsDatabaseLookupCertificatesIssuedBy</a> for more
--   information.
--   
--   The database may choose to hold a reference to the issuer byte array
--   for the duration of this asynchronous operation. The byte array should
--   not be modified during this time.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificatesIssuedByAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> ByteString -> Maybe b -> [TlsDatabaseLookupFlags] -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous lookup of certificates. See
--   <a>tlsDatabaseLookupCertificatesIssuedBy</a> for more information.
--   
--   <i>Since: 2.30</i>
tlsDatabaseLookupCertificatesIssuedByFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m [TlsCertificate]

-- | Determines the validity of a certificate chain, outside the context of
--   a TLS session.
--   
--   <i><tt>chain</tt></i> is a chain of <a>TlsCertificate</a> objects each
--   pointing to the next certificate in the chain by its
--   <a>TlsCertificate:issuer</a> property.
--   
--   <i><tt>purpose</tt></i> describes the purpose (or usage) for which the
--   certificate is being used. Typically <i><tt>purpose</tt></i> will be
--   set to <a>TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER</a> which means
--   that the certificate is being used to authenticate a server (and we
--   are acting as the client).
--   
--   The <i><tt>identity</tt></i> is used to ensure the server certificate
--   is valid for the expected peer identity. If the identity does not
--   match the certificate, <a>TlsCertificateFlagsBadIdentity</a> will be
--   set in the return value. If <i><tt>identity</tt></i> is
--   <a>Nothing</a>, that bit will never be set in the return value. The
--   peer identity may also be used to check for pinned certificates (trust
--   exceptions) in the database. These may override the normal
--   verification process on a host-by-host basis.
--   
--   Currently there are no <i><tt>flags</tt></i>, and
--   <a>TlsDatabaseVerifyFlagsNone</a> should be used.
--   
--   If <i><tt>chain</tt></i> is found to be valid, then the return value
--   will be 0. If <i><tt>chain</tt></i> is found to be invalid, then the
--   return value will indicate at least one problem found. If the function
--   is unable to determine whether <i><tt>chain</tt></i> is valid (for
--   example, because <i><tt>cancellable</tt></i> is triggered before it
--   completes) then the return value will be
--   <a>TlsCertificateFlagsGenericError</a> and <i><tt>error</tt></i> will
--   be set accordingly. <i><tt>error</tt></i> is not set when
--   <i><tt>chain</tt></i> is successfully analyzed but found to be
--   invalid.
--   
--   GLib guarantees that if certificate verification fails, at least one
--   error will be set in the return value, but it does not guarantee that
--   all possible errors will be set. Accordingly, you may not safely
--   decide to ignore any particular type of error. For example, it would
--   be incorrect to mask <a>TlsCertificateFlagsExpired</a> if you want to
--   allow expired certificates, because this could potentially be the only
--   error flag set even if other problems exist with the certificate.
--   
--   Prior to GLib 2.48, GLib's default TLS backend modified
--   <i><tt>chain</tt></i> to represent the certification path built by
--   <a>TlsDatabase</a> during certificate verification by adjusting the
--   <a>TlsCertificate:issuer</a> property of each certificate in
--   <i><tt>chain</tt></i>. Since GLib 2.48, this no longer occurs, so you
--   cannot rely on <a>TlsCertificate:issuer</a> to represent the actual
--   certification path used during certificate verification.
--   
--   Because TLS session context is not used, <a>TlsDatabase</a> may not
--   perform as many checks on the certificates as <a>TlsConnection</a>
--   would. For example, certificate constraints may not be honored, and
--   revocation checks may not be performed. The best way to verify TLS
--   certificates used by a TLS connection is to let <a>TlsConnection</a>
--   handle the verification.
--   
--   The TLS backend may attempt to look up and add missing certificates to
--   the chain. This may involve HTTP requests to download missing
--   certificates.
--   
--   This function can block. Use <a>tlsDatabaseVerifyChainAsync</a> to
--   perform the verification operation asynchronously.
--   
--   <i>Since: 2.30</i>
tlsDatabaseVerifyChain :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsSocketConnectable c, IsTlsInteraction d, IsCancellable e) => a -> b -> Text -> Maybe c -> Maybe d -> [TlsDatabaseVerifyFlags] -> Maybe e -> m [TlsCertificateFlags]

-- | Asynchronously determines the validity of a certificate chain after
--   looking up and adding any missing certificates to the chain. See
--   <a>tlsDatabaseVerifyChain</a> for more information.
--   
--   <i>Since: 2.30</i>
tlsDatabaseVerifyChainAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsSocketConnectable c, IsTlsInteraction d, IsCancellable e) => a -> b -> Text -> Maybe c -> Maybe d -> [TlsDatabaseVerifyFlags] -> Maybe e -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous verify chain operation. See
--   <a>tlsDatabaseVerifyChain</a> for more information.
--   
--   If <i><tt>chain</tt></i> is found to be valid, then the return value
--   will be 0. If <i><tt>chain</tt></i> is found to be invalid, then the
--   return value will indicate the problems found. If the function is
--   unable to determine whether <i><tt>chain</tt></i> is valid or not (eg,
--   because <i><tt>cancellable</tt></i> is triggered before it completes)
--   then the return value will be <a>TlsCertificateFlagsGenericError</a>
--   and <i><tt>error</tt></i> will be set accordingly.
--   <i><tt>error</tt></i> is not set when <i><tt>chain</tt></i> is
--   successfully analyzed but found to be invalid.
--   
--   <i>Since: 2.30</i>
tlsDatabaseVerifyChainFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m [TlsCertificateFlags]
instance GHC.Classes.Eq GI.Gio.Objects.TlsDatabase.TlsDatabase
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TlsDatabase.TlsDatabase
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsDatabase.TlsDatabase
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TlsDatabase.TlsDatabase)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TlsDatabase.TlsDatabase o) => GI.Gio.Objects.TlsDatabase.IsTlsDatabase o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TlsDatabase.TlsDatabase
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TlsDatabase.TlsDatabase


-- | <tt>GTlsConnection</tt> is the base TLS connection class type, which
--   wraps a <a>IOStream</a> and provides TLS encryption on top of it. Its
--   subclasses, <a>TlsClientConnection</a> and <a>TlsServerConnection</a>,
--   implement client-side and server-side TLS, respectively.
--   
--   For DTLS (Datagram TLS) support, see <a>DtlsConnection</a>.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Objects.TlsConnection

-- | Memory-managed wrapper type.
newtype TlsConnection
TlsConnection :: ManagedPtr TlsConnection -> TlsConnection

-- | Type class for types which can be safely cast to <a>TlsConnection</a>,
--   for instance with <a>toTlsConnection</a>.
class (GObject o, IsDescendantOf TlsConnection o) => IsTlsConnection o

-- | Cast to <a>TlsConnection</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toTlsConnection :: (MonadIO m, IsTlsConnection o) => o -> m TlsConnection

-- | Used by <a>TlsConnection</a> implementations to emit the
--   <a>TlsConnection::acceptCertificate</a> signal.
--   
--   <i>Since: 2.28</i>
tlsConnectionEmitAcceptCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) => a -> b -> [TlsCertificateFlags] -> m Bool

-- | Gets <i><tt>conn</tt></i>'s certificate, as set by
--   <a>tlsConnectionSetCertificate</a>.
--   
--   <i>Since: 2.28</i>
tlsConnectionGetCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m (Maybe TlsCertificate)

-- | Returns the name of the current TLS ciphersuite, or <a>Nothing</a> if
--   the connection has not handshaked or has been closed. Beware that the
--   TLS backend may use any of multiple different naming conventions,
--   because OpenSSL and GnuTLS have their own ciphersuite naming
--   conventions that are different from each other and different from the
--   standard, IANA- registered ciphersuite names. The ciphersuite name is
--   intended to be displayed to the user for informative purposes only,
--   and parsing it is not recommended.
--   
--   <i>Since: 2.70</i>
tlsConnectionGetCiphersuiteName :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m (Maybe Text)

-- | Gets the certificate database that <i><tt>conn</tt></i> uses to verify
--   peer certificates. See <a>tlsConnectionSetDatabase</a>.
--   
--   <i>Since: 2.30</i>
tlsConnectionGetDatabase :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m (Maybe TlsDatabase)

-- | Get the object that will be used to interact with the user. It will be
--   used for things like prompting the user for passwords. If
--   <a>Nothing</a> is returned, then no user interaction will occur for
--   this connection.
--   
--   <i>Since: 2.30</i>
tlsConnectionGetInteraction :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m (Maybe TlsInteraction)

-- | Gets the name of the application-layer protocol negotiated during the
--   handshake.
--   
--   If the peer did not use the ALPN extension, or did not advertise a
--   protocol that matched one of <i><tt>conn</tt></i>'s protocols, or the
--   TLS backend does not support ALPN, then this will be <a>Nothing</a>.
--   See <a>tlsConnectionSetAdvertisedProtocols</a>.
--   
--   <i>Since: 2.60</i>
tlsConnectionGetNegotiatedProtocol :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m (Maybe Text)

-- | Gets <i><tt>conn</tt></i>'s peer's certificate after the handshake has
--   completed or failed. (It is not set during the emission of
--   <a>TlsConnection::acceptCertificate</a>.)
--   
--   <i>Since: 2.28</i>
tlsConnectionGetPeerCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m (Maybe TlsCertificate)

-- | Gets the errors associated with validating <i><tt>conn</tt></i>'s
--   peer's certificate, after the handshake has completed or failed. (It
--   is not set during the emission of
--   <a>TlsConnection::acceptCertificate</a>.)
--   
--   See <a>TlsConnection:peerCertificateErrors</a> for more information.
--   
--   <i>Since: 2.28</i>
tlsConnectionGetPeerCertificateErrors :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m [TlsCertificateFlags]

-- | Returns the current TLS protocol version, which may be
--   <a>TlsProtocolVersionUnknown</a> if the connection has not handshaked,
--   or has been closed, or if the TLS backend has implemented a protocol
--   version that is not a recognized <a>TlsProtocolVersion</a>.
--   
--   <i>Since: 2.70</i>
tlsConnectionGetProtocolVersion :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m TlsProtocolVersion

-- | Gets <i><tt>conn</tt></i> rehandshaking mode. See
--   <a>tlsConnectionSetRehandshakeMode</a> for details.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.60.)Changing the rehandshake mode is
--   no longerrequired for compatibility. Also, rehandshaking has been
--   removedfrom the TLS protocol in TLS 1.3.</i>
tlsConnectionGetRehandshakeMode :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m TlsRehandshakeMode

-- | Tests whether or not <i><tt>conn</tt></i> expects a proper TLS close
--   notification when the connection is closed. See
--   <a>tlsConnectionSetRequireCloseNotify</a> for details.
--   
--   <i>Since: 2.28</i>
tlsConnectionGetRequireCloseNotify :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m Bool

-- | Gets whether <i><tt>conn</tt></i> uses the system certificate database
--   to verify peer certificates. See
--   <a>tlsConnectionSetUseSystemCertdb</a>.

-- | <i>Deprecated: (Since version 2.30)Use <a>tlsConnectionGetDatabase</a>
--   instead</i>
tlsConnectionGetUseSystemCertdb :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m Bool

-- | Attempts a TLS handshake on <i><tt>conn</tt></i>.
--   
--   On the client side, it is never necessary to call this method;
--   although the connection needs to perform a handshake after connecting
--   (or after sending a "STARTTLS"-type command), <a>TlsConnection</a>
--   will handle this for you automatically when you try to send or receive
--   data on the connection. You can call <a>tlsConnectionHandshake</a>
--   manually if you want to know whether the initial handshake succeeded
--   or failed (as opposed to just immediately trying to use
--   <i><tt>conn</tt></i> to read or write, in which case, if it fails, it
--   may not be possible to tell if it failed before or after completing
--   the handshake), but beware that servers may reject client
--   authentication after the handshake has completed, so a successful
--   handshake does not indicate the connection will be usable.
--   
--   Likewise, on the server side, although a handshake is necessary at the
--   beginning of the communication, you do not need to call this function
--   explicitly unless you want clearer error reporting.
--   
--   Previously, calling <a>tlsConnectionHandshake</a> after the initial
--   handshake would trigger a rehandshake; however, this usage was
--   deprecated in GLib 2.60 because rehandshaking was removed from the TLS
--   protocol in TLS 1.3. Since GLib 2.64, calling this function after the
--   initial handshake will no longer do anything.
--   
--   When using a <a>TlsConnection</a> created by <a>SocketClient</a>, the
--   <a>SocketClient</a> performs the initial handshake, so calling this
--   function manually is not recommended.
--   
--   <a>TlsConnection</a>::<tt><i>accept_certificate</i></tt> may be
--   emitted during the handshake.
--   
--   <i>Since: 2.28</i>
tlsConnectionHandshake :: (HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously performs a TLS handshake on <i><tt>conn</tt></i>. See
--   <a>tlsConnectionHandshake</a> for more information.
--   
--   <i>Since: 2.28</i>
tlsConnectionHandshakeAsync :: (HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous TLS handshake operation. See
--   <a>tlsConnectionHandshake</a> for more information.
--   
--   <i>Since: 2.28</i>
tlsConnectionHandshakeFinish :: (HasCallStack, MonadIO m, IsTlsConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Sets the list of application-layer protocols to advertise that the
--   caller is willing to speak on this connection. The Application-Layer
--   Protocol Negotiation (ALPN) extension will be used to negotiate a
--   compatible protocol with the peer; use
--   <a>tlsConnectionGetNegotiatedProtocol</a> to find the negotiated
--   protocol after the handshake. Specifying <a>Nothing</a> for the the
--   value of <i><tt>protocols</tt></i> will disable ALPN negotiation.
--   
--   See <a>IANA TLS ALPN Protocol IDs</a> for a list of registered
--   protocol IDs.
--   
--   <i>Since: 2.60</i>
tlsConnectionSetAdvertisedProtocols :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> Maybe [Text] -> m ()

-- | This sets the certificate that <i><tt>conn</tt></i> will present to
--   its peer during the TLS handshake. For a <a>TlsServerConnection</a>,
--   it is mandatory to set this, and that will normally be done at
--   construct time.
--   
--   For a <a>TlsClientConnection</a>, this is optional. If a handshake
--   fails with <a>TlsErrorCertificateRequired</a>, that means that the
--   server requires a certificate, and if you try connecting again, you
--   should call this method first. You can call
--   <a>tlsClientConnectionGetAcceptedCas</a> on the failed connection to
--   get a list of Certificate Authorities that the server will accept
--   certificates from.
--   
--   (It is also possible that a server will allow the connection with or
--   without a certificate; in that case, if you don't provide a
--   certificate, you can tell that the server requested one by the fact
--   that <a>tlsClientConnectionGetAcceptedCas</a> will return
--   non-<a>Nothing</a>.)
--   
--   <i>Since: 2.28</i>
tlsConnectionSetCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) => a -> b -> m ()

-- | Sets the certificate database that is used to verify peer
--   certificates. This is set to the default database by default. See
--   <a>tlsBackendGetDefaultDatabase</a>. If set to <a>Nothing</a>, then
--   peer certificate validation will always set the
--   <a>TlsCertificateFlagsUnknownCa</a> error (meaning
--   <a>TlsConnection::acceptCertificate</a> will always be emitted on
--   client-side connections, unless that bit is not set in
--   <a>TlsClientConnection:validationFlags</a>).
--   
--   There are nonintuitive security implications when using a non-default
--   database. See <a>TlsConnection:database</a> for details.
--   
--   <i>Since: 2.30</i>
tlsConnectionSetDatabase :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsDatabase b) => a -> Maybe b -> m ()

-- | Set the object that will be used to interact with the user. It will be
--   used for things like prompting the user for passwords.
--   
--   The <i><tt>interaction</tt></i> argument will normally be a derived
--   subclass of <a>TlsInteraction</a>. <a>Nothing</a> can also be provided
--   if no user interaction should occur for this connection.
--   
--   <i>Since: 2.30</i>
tlsConnectionSetInteraction :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsInteraction b) => a -> Maybe b -> m ()

-- | Since GLib 2.64, changing the rehandshake mode is no longer supported
--   and will have no effect. With TLS 1.3, rehandshaking has been removed
--   from the TLS protocol, replaced by separate post-handshake
--   authentication and rekey operations.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.60.)Changing the rehandshake mode is
--   no longerrequired for compatibility. Also, rehandshaking has been
--   removedfrom the TLS protocol in TLS 1.3.</i>
tlsConnectionSetRehandshakeMode :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> TlsRehandshakeMode -> m ()

-- | Sets whether or not <i><tt>conn</tt></i> expects a proper TLS close
--   notification before the connection is closed. If this is <a>True</a>
--   (the default), then <i><tt>conn</tt></i> will expect to receive a TLS
--   close notification from its peer before the connection is closed, and
--   will return a <a>TlsErrorEof</a> error if the connection is closed
--   without proper notification (since this may indicate a network error,
--   or man-in-the-middle attack).
--   
--   In some protocols, the application will know whether or not the
--   connection was closed cleanly based on application-level data (because
--   the application-level data includes a length field, or is somehow
--   self-delimiting); in this case, the close notify is redundant and
--   sometimes omitted. (TLS 1.1 explicitly allows this; in TLS 1.0 it is
--   technically an error, but often done anyway.) You can use
--   <a>tlsConnectionSetRequireCloseNotify</a> to tell <i><tt>conn</tt></i>
--   to allow an "unannounced" connection close, in which case the close
--   will show up as a 0-length read, as in a non-TLS
--   <a>SocketConnection</a>, and it is up to the application to check that
--   the data has been fully received.
--   
--   Note that this only affects the behavior when the peer closes the
--   connection; when the application calls <a>iOStreamClose</a> itself on
--   <i><tt>conn</tt></i>, this will send a close notification regardless
--   of the setting of this property. If you explicitly want to do an
--   unclean close, you can close <i><tt>conn</tt></i>'s
--   <a>TlsConnection:baseIoStream</a> rather than closing
--   <i><tt>conn</tt></i> itself, but note that this may only be done when
--   no other operations are pending on <i><tt>conn</tt></i> or the base
--   I/O stream.
--   
--   <i>Since: 2.28</i>
tlsConnectionSetRequireCloseNotify :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> Bool -> m ()

-- | Sets whether <i><tt>conn</tt></i> uses the system certificate database
--   to verify peer certificates. This is <a>True</a> by default. If set to
--   <a>False</a>, then peer certificate validation will always set the
--   <a>TlsCertificateFlagsUnknownCa</a> error (meaning
--   <a>TlsConnection::acceptCertificate</a> will always be emitted on
--   client-side connections, unless that bit is not set in
--   <a>TlsClientConnection:validationFlags</a>).

-- | <i>Deprecated: (Since version 2.30)Use <a>tlsConnectionSetDatabase</a>
--   instead</i>
tlsConnectionSetUseSystemCertdb :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> Bool -> m ()

-- | Set the value of the “<tt>advertised-protocols</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #advertisedProtocols
--   </pre>
clearTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>advertised-protocols</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructTlsConnectionAdvertisedProtocols :: (IsTlsConnection o, MonadIO m) => [Text] -> m (GValueConstruct o)

-- | Get the value of the “<tt>advertised-protocols</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #advertisedProtocols
--   </pre>
getTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe [Text])

-- | Set the value of the “<tt>advertised-protocols</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsConnection [ #advertisedProtocols <a>:=</a> value ]
--   </pre>
setTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> [Text] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>base-io-stream</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTlsConnectionBaseIoStream :: (IsTlsConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>base-io-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #baseIoStream
--   </pre>
getTlsConnectionBaseIoStream :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe IOStream)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>certificate</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructTlsConnectionCertificate :: (IsTlsConnection o, MonadIO m, IsTlsCertificate a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>certificate</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #certificate
--   </pre>
getTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsCertificate)

-- | Set the value of the “<tt>certificate</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsConnection [ #certificate <a>:=</a> value ]
--   </pre>
setTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o, IsTlsCertificate a) => o -> a -> m ()

-- | Get the value of the “<tt>ciphersuite-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #ciphersuiteName
--   </pre>
getTlsConnectionCiphersuiteName :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>database</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #database
--   </pre>
clearTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>database</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructTlsConnectionDatabase :: (IsTlsConnection o, MonadIO m, IsTlsDatabase a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>database</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #database
--   </pre>
getTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsDatabase)

-- | Set the value of the “<tt>database</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsConnection [ #database <a>:=</a> value ]
--   </pre>
setTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o, IsTlsDatabase a) => o -> a -> m ()

-- | Set the value of the “<tt>interaction</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #interaction
--   </pre>
clearTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>interaction</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructTlsConnectionInteraction :: (IsTlsConnection o, MonadIO m, IsTlsInteraction a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>interaction</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #interaction
--   </pre>
getTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsInteraction)

-- | Set the value of the “<tt>interaction</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsConnection [ #interaction <a>:=</a> value ]
--   </pre>
setTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o, IsTlsInteraction a) => o -> a -> m ()

-- | Get the value of the “<tt>negotiated-protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #negotiatedProtocol
--   </pre>
getTlsConnectionNegotiatedProtocol :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Text)

-- | Get the value of the “<tt>peer-certificate</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #peerCertificate
--   </pre>
getTlsConnectionPeerCertificate :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsCertificate)

-- | Get the value of the “<tt>peer-certificate-errors</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #peerCertificateErrors
--   </pre>
getTlsConnectionPeerCertificateErrors :: (MonadIO m, IsTlsConnection o) => o -> m [TlsCertificateFlags]

-- | Get the value of the “<tt>protocol-version</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #protocolVersion
--   </pre>
getTlsConnectionProtocolVersion :: (MonadIO m, IsTlsConnection o) => o -> m TlsProtocolVersion

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>rehandshake-mode</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTlsConnectionRehandshakeMode :: (IsTlsConnection o, MonadIO m) => TlsRehandshakeMode -> m (GValueConstruct o)

-- | Get the value of the “<tt>rehandshake-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #rehandshakeMode
--   </pre>
getTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> m TlsRehandshakeMode

-- | Set the value of the “<tt>rehandshake-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsConnection [ #rehandshakeMode <a>:=</a> value ]
--   </pre>
setTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> TlsRehandshakeMode -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>require-close-notify</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructTlsConnectionRequireCloseNotify :: (IsTlsConnection o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>require-close-notify</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #requireCloseNotify
--   </pre>
getTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> m Bool

-- | Set the value of the “<tt>require-close-notify</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsConnection [ #requireCloseNotify <a>:=</a> value ]
--   </pre>
setTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>use-system-certdb</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTlsConnectionUseSystemCertdb :: (IsTlsConnection o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>use-system-certdb</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsConnection #useSystemCertdb
--   </pre>
getTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> m Bool

-- | Set the value of the “<tt>use-system-certdb</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsConnection [ #useSystemCertdb <a>:=</a> value ]
--   </pre>
setTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m ()

-- | Emitted during the TLS handshake after the peer certificate has been
--   received. You can examine <i><tt>peerCert</tt></i>'s certification
--   path by calling <a>tlsCertificateGetIssuer</a> on it.
--   
--   For a client-side connection, <i><tt>peerCert</tt></i> is the server's
--   certificate, and the signal will only be emitted if the certificate
--   was not acceptable according to <i><tt>conn</tt></i>'s
--   <a>TlsClientConnection</a>:<tt><i>validation_flags</i></tt>. If you
--   would like the certificate to be accepted despite
--   <i><tt>errors</tt></i>, return <a>True</a> from the signal handler.
--   Otherwise, if no handler accepts the certificate, the handshake will
--   fail with <a>TlsErrorBadCertificate</a>.
--   
--   GLib guarantees that if certificate verification fails, this signal
--   will be emitted with at least one error will be set in
--   <i><tt>errors</tt></i>, but it does not guarantee that all possible
--   errors will be set. Accordingly, you may not safely decide to ignore
--   any particular type of error. For example, it would be incorrect to
--   ignore <a>TlsCertificateFlagsExpired</a> if you want to allow expired
--   certificates, because this could potentially be the only error flag
--   set even if other problems exist with the certificate.
--   
--   For a server-side connection, <i><tt>peerCert</tt></i> is the
--   certificate presented by the client, if this was requested via the
--   server's
--   <a>TlsServerConnection</a>:<tt><i>authentication_mode</i></tt>. On the
--   server side, the signal is always emitted when the client presents a
--   certificate, and the certificate will only be accepted if a handler
--   returns <a>True</a>.
--   
--   Note that if this signal is emitted as part of asynchronous I/O in the
--   main thread, then you should not attempt to interact with the user
--   before returning from the signal handler. If you want to let the user
--   decide whether or not to accept the certificate, you would have to
--   return <a>False</a> from the signal handler on the first attempt, and
--   then after the connection attempt returns a
--   <a>TlsErrorBadCertificate</a>, you can interact with the user, and if
--   the user decides to accept the certificate, remember that fact, create
--   a new connection, and return <a>True</a> from the signal handler the
--   next time.
--   
--   If you are doing I/O in another thread, you do not need to worry about
--   this, and can simply block in the signal handler until the UI thread
--   returns an answer.
--   
--   <i>Since: 2.28</i>
type TlsConnectionAcceptCertificateCallback = TlsCertificate -> [TlsCertificateFlags] -> IO Bool

-- | Connect a signal handler for the <a>acceptCertificate</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> tlsConnection #acceptCertificate callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> ((?self :: a) => TlsConnectionAcceptCertificateCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>acceptCertificate</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> tlsConnection #acceptCertificate callback
--   </pre>
onTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> ((?self :: a) => TlsConnectionAcceptCertificateCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.TlsConnection.TlsConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TlsConnection.TlsConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsConnection.TlsConnection
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TlsConnection.TlsConnection)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TlsConnection.TlsConnection o) => GI.Gio.Objects.TlsConnection.IsTlsConnection o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TlsConnection.TlsConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TlsConnection.TlsConnection


-- | A certificate used for TLS authentication and encryption. This can
--   represent either a certificate only (eg, the certificate received by a
--   client from a server), or the combination of a certificate and a
--   private key (which is needed when acting as a
--   <a>TlsServerConnection</a>).
--   
--   <i>Since: 2.28</i>
module GI.Gio.Objects.TlsCertificate

-- | Memory-managed wrapper type.
newtype TlsCertificate
TlsCertificate :: ManagedPtr TlsCertificate -> TlsCertificate

-- | Type class for types which can be safely cast to
--   <a>TlsCertificate</a>, for instance with <a>toTlsCertificate</a>.
class (GObject o, IsDescendantOf TlsCertificate o) => IsTlsCertificate o

-- | Cast to <a>TlsCertificate</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toTlsCertificate :: (MonadIO m, IsTlsCertificate o) => o -> m TlsCertificate

-- | Gets the value of <a>TlsCertificate:dnsNames</a>.
--   
--   <i>Since: 2.70</i>
tlsCertificateGetDnsNames :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe [Bytes])

-- | Gets the value of <a>TlsCertificate:ipAddresses</a>.
--   
--   <i>Since: 2.70</i>
tlsCertificateGetIpAddresses :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe [InetAddress])

-- | Gets the <a>TlsCertificate</a> representing <i><tt>cert</tt></i>'s
--   issuer, if known
--   
--   <i>Since: 2.28</i>
tlsCertificateGetIssuer :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe TlsCertificate)

-- | Returns the issuer name from the certificate.
--   
--   <i>Since: 2.70</i>
tlsCertificateGetIssuerName :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe Text)

-- | Returns the time at which the certificate became or will become
--   invalid.
--   
--   <i>Since: 2.70</i>
tlsCertificateGetNotValidAfter :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe DateTime)

-- | Returns the time at which the certificate became or will become valid.
--   
--   <i>Since: 2.70</i>
tlsCertificateGetNotValidBefore :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe DateTime)

-- | Returns the subject name from the certificate.
--   
--   <i>Since: 2.70</i>
tlsCertificateGetSubjectName :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe Text)

-- | Check if two <a>TlsCertificate</a> objects represent the same
--   certificate. The raw DER byte data of the two certificates are checked
--   for equality. This has the effect that two certificates may compare
--   equal even if their <a>TlsCertificate:issuer</a>,
--   <a>TlsCertificate:privateKey</a>, or
--   <a>TlsCertificate:privateKeyPem</a> properties differ.
--   
--   <i>Since: 2.34</i>
tlsCertificateIsSame :: (HasCallStack, MonadIO m, IsTlsCertificate a, IsTlsCertificate b) => a -> b -> m Bool

-- | Creates one or more <tt><i>GTlsCertificates</i></tt> from the
--   PEM-encoded data in <i><tt>file</tt></i>. If <i><tt>file</tt></i>
--   cannot be read or parsed, the function will return <a>Nothing</a> and
--   set <i><tt>error</tt></i>. If <i><tt>file</tt></i> does not contain
--   any PEM-encoded certificates, this will return an empty list and not
--   set <i><tt>error</tt></i>.
--   
--   <i>Since: 2.28</i>
tlsCertificateListNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m [TlsCertificate]

-- | Creates a <a>TlsCertificate</a> from the data in <i><tt>file</tt></i>.
--   
--   As of 2.72, if the filename ends in <tt>.p12</tt> or <tt>.pfx</tt> the
--   data is loaded by <a>tlsCertificateNewFromPkcs12</a> otherwise it is
--   loaded by <a>tlsCertificateNewFromPem</a>. See those functions for
--   exact details.
--   
--   If <i><tt>file</tt></i> cannot be read or parsed, the function will
--   return <a>Nothing</a> and set <i><tt>error</tt></i>.
--   
--   <i>Since: 2.28</i>
tlsCertificateNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m TlsCertificate

-- | Creates a <a>TlsCertificate</a> from the data in <i><tt>file</tt></i>.
--   
--   If <i><tt>file</tt></i> cannot be read or parsed, the function will
--   return <a>Nothing</a> and set <i><tt>error</tt></i>.
--   
--   Any unknown file types will error with <a>IOErrorEnumNotSupported</a>.
--   Currently only <tt>.p12</tt> and <tt>.pfx</tt> files are supported.
--   See <a>tlsCertificateNewFromPkcs12</a> for more details.
--   
--   <i>Since: 2.72</i>
tlsCertificateNewFromFileWithPassword :: (HasCallStack, MonadIO m) => [Char] -> Text -> m TlsCertificate

-- | Creates a <a>TlsCertificate</a> from the PEM-encoded data in
--   <i><tt>certFile</tt></i> and <i><tt>keyFile</tt></i>. The returned
--   certificate will be the first certificate found in
--   <i><tt>certFile</tt></i>. As of GLib 2.44, if <i><tt>certFile</tt></i>
--   contains more certificates it will try to load a certificate chain.
--   All certificates will be verified in the order found (top-level
--   certificate should be the last one in the file) and the
--   <a>TlsCertificate:issuer</a> property of each certificate will be set
--   accordingly if the verification succeeds. If any certificate in the
--   chain cannot be verified, the first certificate in the file will still
--   be returned.
--   
--   If either file cannot be read or parsed, the function will return
--   <a>Nothing</a> and set <i><tt>error</tt></i>. Otherwise, this behaves
--   like <a>tlsCertificateNewFromPem</a>.
--   
--   <i>Since: 2.28</i>
tlsCertificateNewFromFiles :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> m TlsCertificate

-- | Creates a <a>TlsCertificate</a> from the PEM-encoded data in
--   <i><tt>data</tt></i>. If <i><tt>data</tt></i> includes both a
--   certificate and a private key, then the returned certificate will
--   include the private key data as well. (See the
--   <a>TlsCertificate:privateKeyPem</a> property for information about
--   supported formats.)
--   
--   The returned certificate will be the first certificate found in
--   <i><tt>data</tt></i>. As of GLib 2.44, if <i><tt>data</tt></i>
--   contains more certificates it will try to load a certificate chain.
--   All certificates will be verified in the order found (top-level
--   certificate should be the last one in the file) and the
--   <a>TlsCertificate:issuer</a> property of each certificate will be set
--   accordingly if the verification succeeds. If any certificate in the
--   chain cannot be verified, the first certificate in the file will still
--   be returned.
--   
--   <i>Since: 2.28</i>
tlsCertificateNewFromPem :: (HasCallStack, MonadIO m) => Text -> Int64 -> m TlsCertificate

-- | Creates a <a>TlsCertificate</a> from a <a>PKCS #11</a> URI.
--   
--   An example <i><tt>pkcs11Uri</tt></i> would be
--   <tt>pkcs11:model=Model;manufacturer=Manufacture;serial=1;token=My%20Client%20Certificate;id=%01</tt>
--   
--   Where the token’s layout is:
--   
--   <pre>
--   Object 0:
--     URL: pkcs11:model=Model;manufacturer=Manufacture;serial=1;token=My%20Client%20Certificate;id=%01;object=private%20key;type=private
--     Type: Private key (RSA-2048)
--     ID: 01
--   
--   Object 1:
--     URL: pkcs11:model=Model;manufacturer=Manufacture;serial=1;token=My%20Client%20Certificate;id=%01;object=Certificate%20for%20Authentication;type=cert
--     Type: X.509 Certificate (RSA-2048)
--     ID: 01
--   </pre>
--   
--   In this case the certificate and private key would both be detected
--   and used as expected. <i><tt>pkcsUri</tt></i> may also just reference
--   an X.509 certificate object and then optionally
--   <i><tt>privateKeyPkcs11Uri</tt></i> allows using a private key exposed
--   under a different URI.
--   
--   Note that the private key is not accessed until usage and may fail or
--   require a PIN later.
--   
--   <i>Since: 2.68</i>
tlsCertificateNewFromPkcs11Uris :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m TlsCertificate

-- | Creates a <a>TlsCertificate</a> from the data in <i><tt>data</tt></i>.
--   It must contain a certificate and matching private key.
--   
--   If extra certificates are included they will be verified as a chain
--   and the <a>TlsCertificate:issuer</a> property will be set. All other
--   data will be ignored.
--   
--   You can pass as single password for all of the data which will be used
--   both for the PKCS <tt><i>12</i></tt> container as well as encrypted
--   private keys. If decryption fails it will error with
--   <a>TlsErrorBadCertificatePassword</a>.
--   
--   This constructor requires support in the current <a>TlsBackend</a>. If
--   support is missing it will error with <a>IOErrorEnumNotSupported</a>.
--   
--   Other parsing failures will error with <a>TlsErrorBadCertificate</a>.
--   
--   <i>Since: 2.72</i>
tlsCertificateNewFromPkcs12 :: (HasCallStack, MonadIO m) => ByteString -> Maybe Text -> m TlsCertificate

-- | This verifies <i><tt>cert</tt></i> and returns a set of
--   <a>TlsCertificateFlags</a> indicating any problems found with it. This
--   can be used to verify a certificate outside the context of making a
--   connection, or to check a certificate against a CA that is not part of
--   the system CA database.
--   
--   If <i><tt>cert</tt></i> is valid, <a>TlsCertificateFlagsNoFlags</a> is
--   returned.
--   
--   If <i><tt>identity</tt></i> is not <a>Nothing</a>,
--   <i><tt>cert</tt></i>'s name(s) will be compared against it, and
--   <a>TlsCertificateFlagsBadIdentity</a> will be set in the return value
--   if it does not match. If <i><tt>identity</tt></i> is <a>Nothing</a>,
--   that bit will never be set in the return value.
--   
--   If <i><tt>trustedCa</tt></i> is not <a>Nothing</a>, then
--   <i><tt>cert</tt></i> (or one of the certificates in its chain) must be
--   signed by it, or else <a>TlsCertificateFlagsUnknownCa</a> will be set
--   in the return value. If <i><tt>trustedCa</tt></i> is <a>Nothing</a>,
--   that bit will never be set in the return value.
--   
--   GLib guarantees that if certificate verification fails, at least one
--   error will be set in the return value, but it does not guarantee that
--   all possible errors will be set. Accordingly, you may not safely
--   decide to ignore any particular type of error. For example, it would
--   be incorrect to mask <a>TlsCertificateFlagsExpired</a> if you want to
--   allow expired certificates, because this could potentially be the only
--   error flag set even if other problems exist with the certificate.
--   
--   Because TLS session context is not used, <a>TlsCertificate</a> may not
--   perform as many checks on the certificates as <a>TlsConnection</a>
--   would. For example, certificate constraints may not be honored, and
--   revocation checks may not be performed. The best way to verify TLS
--   certificates used by a TLS connection is to let <a>TlsConnection</a>
--   handle the verification.
--   
--   <i>Since: 2.28</i>
tlsCertificateVerify :: (HasCallStack, MonadIO m, IsTlsCertificate a, IsSocketConnectable b, IsTlsCertificate c) => a -> Maybe b -> Maybe c -> m [TlsCertificateFlags]

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>certificate</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructTlsCertificateCertificate :: (IsTlsCertificate o, MonadIO m) => ByteString -> m (GValueConstruct o)

-- | Get the value of the “<tt>certificate</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #certificate
--   </pre>
getTlsCertificateCertificate :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe ByteString)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>certificate-pem</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTlsCertificateCertificatePem :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>certificate-pem</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #certificatePem
--   </pre>
getTlsCertificateCertificatePem :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>issuer</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructTlsCertificateIssuer :: (IsTlsCertificate o, MonadIO m, IsTlsCertificate a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>issuer</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #issuer
--   </pre>
getTlsCertificateIssuer :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe TlsCertificate)

-- | Get the value of the “<tt>issuer-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #issuerName
--   </pre>
getTlsCertificateIssuerName :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text)

-- | Get the value of the “<tt>not-valid-after</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #notValidAfter
--   </pre>
getTlsCertificateNotValidAfter :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe DateTime)

-- | Get the value of the “<tt>not-valid-before</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #notValidBefore
--   </pre>
getTlsCertificateNotValidBefore :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe DateTime)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>password</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructTlsCertificatePassword :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>pkcs11-uri</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructTlsCertificatePkcs11Uri :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>pkcs11-uri</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #pkcs11Uri
--   </pre>
getTlsCertificatePkcs11Uri :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>pkcs12-data</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructTlsCertificatePkcs12Data :: (IsTlsCertificate o, MonadIO m) => ByteString -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>private-key</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructTlsCertificatePrivateKey :: (IsTlsCertificate o, MonadIO m) => ByteString -> m (GValueConstruct o)

-- | Get the value of the “<tt>private-key</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #privateKey
--   </pre>
getTlsCertificatePrivateKey :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe ByteString)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>private-key-pem</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTlsCertificatePrivateKeyPem :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>private-key-pem</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #privateKeyPem
--   </pre>
getTlsCertificatePrivateKeyPem :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>private-key-pkcs11-uri</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructTlsCertificatePrivateKeyPkcs11Uri :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>private-key-pkcs11-uri</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #privateKeyPkcs11Uri
--   </pre>
getTlsCertificatePrivateKeyPkcs11Uri :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text)

-- | Get the value of the “<tt>subject-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsCertificate #subjectName
--   </pre>
getTlsCertificateSubjectName :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text)
instance GHC.Classes.Eq GI.Gio.Objects.TlsCertificate.TlsCertificate
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TlsCertificate.TlsCertificate
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsCertificate.TlsCertificate
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TlsCertificate.TlsCertificate)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TlsCertificate.TlsCertificate o) => GI.Gio.Objects.TlsCertificate.IsTlsCertificate o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TlsCertificate.TlsCertificate
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TlsCertificate.TlsCertificate


-- | A <tt>GThreadedSocketService</tt> is a simple subclass of
--   <a>SocketService</a> that handles incoming connections by creating a
--   worker thread and dispatching the connection to it by emitting the
--   <a>signal<i><tt>gio</tt></i>.ThreadedSocketService[run</a> signal] in
--   the new thread.
--   
--   The signal handler may perform blocking I/O and need not return until
--   the connection is closed.
--   
--   The service is implemented using a thread pool, so there is a limited
--   amount of threads available to serve incoming requests. The service
--   automatically stops the <a>SocketService</a> from accepting new
--   connections when all threads are busy.
--   
--   As with <a>SocketService</a>, you may connect to
--   <a>ThreadedSocketService::run</a>, or subclass and override the
--   default handler.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.ThreadedSocketService

-- | Memory-managed wrapper type.
newtype ThreadedSocketService
ThreadedSocketService :: ManagedPtr ThreadedSocketService -> ThreadedSocketService

-- | Type class for types which can be safely cast to
--   <a>ThreadedSocketService</a>, for instance with
--   <a>toThreadedSocketService</a>.
class (GObject o, IsDescendantOf ThreadedSocketService o) => IsThreadedSocketService o

-- | Cast to <a>ThreadedSocketService</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toThreadedSocketService :: (MonadIO m, IsThreadedSocketService o) => o -> m ThreadedSocketService

-- | Creates a new <a>ThreadedSocketService</a> with no listeners.
--   Listeners must be added with one of the <a>SocketListener</a> "add"
--   methods.
--   
--   <i>Since: 2.22</i>
threadedSocketServiceNew :: (HasCallStack, MonadIO m) => Int32 -> m ThreadedSocketService

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>max-threads</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructThreadedSocketServiceMaxThreads :: (IsThreadedSocketService o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>max-threads</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> threadedSocketService #maxThreads
--   </pre>
getThreadedSocketServiceMaxThreads :: (MonadIO m, IsThreadedSocketService o) => o -> m Int32

-- | The <a>run</a> signal is emitted in a worker thread in response to an
--   incoming connection. This thread is dedicated to handling
--   <i><tt>connection</tt></i> and may perform blocking IO. The signal
--   handler need not return until the connection is closed.
type ThreadedSocketServiceRunCallback = SocketConnection -> Maybe Object -> IO Bool

-- | Connect a signal handler for the <a>run</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> threadedSocketService #run callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterThreadedSocketServiceRun :: (IsThreadedSocketService a, MonadIO m) => a -> ((?self :: a) => ThreadedSocketServiceRunCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>run</a> signal, to be run before
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>on</a> threadedSocketService #run callback
--   </pre>
onThreadedSocketServiceRun :: (IsThreadedSocketService a, MonadIO m) => a -> ((?self :: a) => ThreadedSocketServiceRunCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService o) => GI.Gio.Objects.ThreadedSocketService.IsThreadedSocketService o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService


-- | A <tt>GTcpWrapperConnection</tt> can be used to wrap a <a>IOStream</a>
--   that is based on a <a>Socket</a>, but which is not actually a
--   <a>SocketConnection</a>. This is used by <a>SocketClient</a> so that
--   it can always return a <a>SocketConnection</a>, even when the
--   connection it has actually created is not directly a
--   <a>SocketConnection</a>.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Objects.TcpWrapperConnection

-- | Memory-managed wrapper type.
newtype TcpWrapperConnection
TcpWrapperConnection :: ManagedPtr TcpWrapperConnection -> TcpWrapperConnection

-- | Type class for types which can be safely cast to
--   <a>TcpWrapperConnection</a>, for instance with
--   <a>toTcpWrapperConnection</a>.
class (GObject o, IsDescendantOf TcpWrapperConnection o) => IsTcpWrapperConnection o

-- | Cast to <a>TcpWrapperConnection</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toTcpWrapperConnection :: (MonadIO m, IsTcpWrapperConnection o) => o -> m TcpWrapperConnection

-- | Gets <i><tt>conn</tt></i>'s base <a>IOStream</a>
tcpWrapperConnectionGetBaseIoStream :: (HasCallStack, MonadIO m, IsTcpWrapperConnection a) => a -> m IOStream

-- | Wraps <i><tt>baseIoStream</tt></i> and <i><tt>socket</tt></i> together
--   as a <a>SocketConnection</a>.
--   
--   <i>Since: 2.28</i>
tcpWrapperConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsSocket b) => a -> b -> m TcpWrapperConnection

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>base-io-stream</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTcpWrapperConnectionBaseIoStream :: (IsTcpWrapperConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>base-io-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tcpWrapperConnection #baseIoStream
--   </pre>
getTcpWrapperConnectionBaseIoStream :: (MonadIO m, IsTcpWrapperConnection o) => o -> m IOStream
instance GHC.Classes.Eq GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection o) => GI.Gio.Objects.TcpWrapperConnection.IsTcpWrapperConnection o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection


-- | This is the subclass of <a>SocketConnection</a> that is created for
--   TCP/IP sockets.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.TcpConnection

-- | Memory-managed wrapper type.
newtype TcpConnection
TcpConnection :: ManagedPtr TcpConnection -> TcpConnection

-- | Type class for types which can be safely cast to <a>TcpConnection</a>,
--   for instance with <a>toTcpConnection</a>.
class (GObject o, IsDescendantOf TcpConnection o) => IsTcpConnection o

-- | Cast to <a>TcpConnection</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toTcpConnection :: (MonadIO m, IsTcpConnection o) => o -> m TcpConnection

-- | Checks if graceful disconnects are used. See
--   <a>tcpConnectionSetGracefulDisconnect</a>.
--   
--   <i>Since: 2.22</i>
tcpConnectionGetGracefulDisconnect :: (HasCallStack, MonadIO m, IsTcpConnection a) => a -> m Bool

-- | This enables graceful disconnects on close. A graceful disconnect
--   means that we signal the receiving end that the connection is
--   terminated and wait for it to close the connection before closing the
--   connection.
--   
--   A graceful disconnect means that we can be sure that we successfully
--   sent all the outstanding data to the other end, or get an error
--   reported. However, it also means we have to wait for all the data to
--   reach the other side and for it to acknowledge this by closing the
--   socket, which may take a while. For this reason it is disabled by
--   default.
--   
--   <i>Since: 2.22</i>
tcpConnectionSetGracefulDisconnect :: (HasCallStack, MonadIO m, IsTcpConnection a) => a -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>graceful-disconnect</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructTcpConnectionGracefulDisconnect :: (IsTcpConnection o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>graceful-disconnect</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tcpConnection #gracefulDisconnect
--   </pre>
getTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> m Bool

-- | Set the value of the “<tt>graceful-disconnect</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tcpConnection [ #gracefulDisconnect <a>:=</a> value ]
--   </pre>
setTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> Bool -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.TcpConnection.TcpConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TcpConnection.TcpConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TcpConnection.TcpConnection
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.TcpConnection.TcpConnection)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TcpConnection.TcpConnection o) => GI.Gio.Objects.TcpConnection.IsTcpConnection o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.TcpConnection.TcpConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.TcpConnection.TcpConnection


-- | A <tt>GTask</tt> represents and manages a cancellable ‘task’.
--   
--   <h2>Asynchronous operations</h2>
--   
--   The most common usage of <tt>GTask</tt> is as a <a>AsyncResult</a>, to
--   manage data during an asynchronous operation. You call <a>taskNew</a>
--   in the ‘start’ method, followed by <a>taskSetTaskData</a> and the like
--   if you need to keep some additional data associated with the task, and
--   then pass the task object around through your asynchronous operation.
--   Eventually, you will call a method such as <a>taskReturnPointer</a> or
--   <a>taskReturnError</a>, which will save the value you give it and then
--   invoke the task’s callback function in the thread-default main context
--   (see <a>mainContextPushThreadDefault</a>) where it was created
--   (waiting until the next iteration of the main loop first, if
--   necessary). The caller will pass the <tt>GTask</tt> back to the
--   operation’s finish function (as a <a>AsyncResult</a>), and you can use
--   <a>taskPropagatePointer</a> or the like to extract the return value.
--   
--   Using <tt>GTask</tt> requires the thread-default <a>MainContext</a>
--   from when the <tt>GTask</tt> was constructed to be running at least
--   until the task has completed and its data has been freed.
--   
--   If a <tt>GTask</tt> has been constructed and its callback set, it is
--   an error to not call <tt>g_task_return_*()</tt> on it. GLib will warn
--   at runtime if this happens (since 2.76).
--   
--   Here is an example for using <tt>GTask</tt> as a <a>AsyncResult</a>:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   typedef struct {
--     CakeFrostingType frosting;
--     char *message;
--   } DecorationData;
--   
--   static void
--   decoration_data_free (DecorationData *decoration)
--   {
--     g_free (decoration-&gt;message);
--     g_slice_free (DecorationData, decoration);
--   }
--   
--   static void
--   baked_cb (Cake     *cake,
--             gpointer  user_data)
--   {
--     GTask *task = user_data;
--     DecorationData *decoration = g_task_get_task_data (task);
--     GError *error = NULL;
--   
--     if (cake == NULL)
--       {
--         g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR,
--                                  "Go to the supermarket");
--         g_object_unref (task);
--         return;
--       }
--   
--     if (!cake_decorate (cake, decoration-&gt;frosting, decoration-&gt;message, &amp;error))
--       {
--         g_object_unref (cake);
--         // g_task_return_error() takes ownership of error
--         g_task_return_error (task, error);
--         g_object_unref (task);
--         return;
--       }
--   
--     g_task_return_pointer (task, cake, g_object_unref);
--     g_object_unref (task);
--   }
--   
--   void
--   baker_bake_cake_async (Baker               *self,
--                          guint                radius,
--                          CakeFlavor           flavor,
--                          CakeFrostingType     frosting,
--                          const char          *message,
--                          GCancellable        *cancellable,
--                          GAsyncReadyCallback  callback,
--                          gpointer             user_data)
--   {
--     GTask *task;
--     DecorationData *decoration;
--     Cake  *cake;
--   
--     task = g_task_new (self, cancellable, callback, user_data);
--     if (radius &lt; 3)
--       {
--         g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_TOO_SMALL,
--                                  "%ucm radius cakes are silly",
--                                  radius);
--         g_object_unref (task);
--         return;
--       }
--   
--     cake = _baker_get_cached_cake (self, radius, flavor, frosting, message);
--     if (cake != NULL)
--       {
--         // _baker_get_cached_cake() returns a reffed cake
--         g_task_return_pointer (task, cake, g_object_unref);
--         g_object_unref (task);
--         return;
--       }
--   
--     decoration = g_slice_new (DecorationData);
--     decoration-&gt;frosting = frosting;
--     decoration-&gt;message = g_strdup (message);
--     g_task_set_task_data (task, decoration, (GDestroyNotify) decoration_data_free);
--   
--     _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task);
--   }
--   
--   Cake *
--   baker_bake_cake_finish (Baker         *self,
--                           GAsyncResult  *result,
--                           GError       **error)
--   {
--     g_return_val_if_fail (g_task_is_valid (result, self), NULL);
--   
--     return g_task_propagate_pointer (G_TASK (result), error);
--   }
--   </pre>
--   
--   <h2>Chained asynchronous operations</h2>
--   
--   <tt>GTask</tt> also tries to simplify asynchronous operations that
--   internally chain together several smaller asynchronous operations.
--   <a>taskGetCancellable</a>, <a>taskGetContext</a>, and
--   <a>taskGetPriority</a> allow you to get back the task’s
--   <a>Cancellable</a>, <a>MainContext</a>, and <a>I/O priority</a> when
--   starting a new subtask, so you don’t have to keep track of them
--   yourself. <a>Task</a>.<tt><i>attach_source</i></tt>() simplifies the
--   case of waiting for a source to fire (automatically using the correct
--   <a>MainContext</a> and priority).
--   
--   Here is an example for chained asynchronous operations:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   typedef struct {
--     Cake *cake;
--     CakeFrostingType frosting;
--     char *message;
--   } BakingData;
--   
--   static void
--   decoration_data_free (BakingData *bd)
--   {
--     if (bd-&gt;cake)
--       g_object_unref (bd-&gt;cake);
--     g_free (bd-&gt;message);
--     g_slice_free (BakingData, bd);
--   }
--   
--   static void
--   decorated_cb (Cake         *cake,
--                 GAsyncResult *result,
--                 gpointer      user_data)
--   {
--     GTask *task = user_data;
--     GError *error = NULL;
--   
--     if (!cake_decorate_finish (cake, result, &amp;error))
--       {
--         g_object_unref (cake);
--         g_task_return_error (task, error);
--         g_object_unref (task);
--         return;
--       }
--   
--     // baking_data_free() will drop its ref on the cake, so we have to
--     // take another here to give to the caller.
--     g_task_return_pointer (task, g_object_ref (cake), g_object_unref);
--     g_object_unref (task);
--   }
--   
--   static gboolean
--   decorator_ready (gpointer user_data)
--   {
--     GTask *task = user_data;
--     BakingData *bd = g_task_get_task_data (task);
--   
--     cake_decorate_async (bd-&gt;cake, bd-&gt;frosting, bd-&gt;message,
--                          g_task_get_cancellable (task),
--                          decorated_cb, task);
--   
--     return G_SOURCE_REMOVE;
--   }
--   
--   static void
--   baked_cb (Cake     *cake,
--             gpointer  user_data)
--   {
--     GTask *task = user_data;
--     BakingData *bd = g_task_get_task_data (task);
--     GError *error = NULL;
--   
--     if (cake == NULL)
--       {
--         g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR,
--                                  "Go to the supermarket");
--         g_object_unref (task);
--         return;
--       }
--   
--     bd-&gt;cake = cake;
--   
--     // Bail out now if the user has already cancelled
--     if (g_task_return_error_if_cancelled (task))
--       {
--         g_object_unref (task);
--         return;
--       }
--   
--     if (cake_decorator_available (cake))
--       decorator_ready (task);
--     else
--       {
--         GSource *source;
--   
--         source = cake_decorator_wait_source_new (cake);
--         // Attach @source to @task’s GMainContext and have it call
--         // decorator_ready() when it is ready.
--         g_task_attach_source (task, source, decorator_ready);
--         g_source_unref (source);
--       }
--   }
--   
--   void
--   baker_bake_cake_async (Baker               *self,
--                          guint                radius,
--                          CakeFlavor           flavor,
--                          CakeFrostingType     frosting,
--                          const char          *message,
--                          gint                 priority,
--                          GCancellable        *cancellable,
--                          GAsyncReadyCallback  callback,
--                          gpointer             user_data)
--   {
--     GTask *task;
--     BakingData *bd;
--   
--     task = g_task_new (self, cancellable, callback, user_data);
--     g_task_set_priority (task, priority);
--   
--     bd = g_slice_new0 (BakingData);
--     bd-&gt;frosting = frosting;
--     bd-&gt;message = g_strdup (message);
--     g_task_set_task_data (task, bd, (GDestroyNotify) baking_data_free);
--   
--     _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task);
--   }
--   
--   Cake *
--   baker_bake_cake_finish (Baker         *self,
--                           GAsyncResult  *result,
--                           GError       **error)
--   {
--     g_return_val_if_fail (g_task_is_valid (result, self), NULL);
--   
--     return g_task_propagate_pointer (G_TASK (result), error);
--   }
--   </pre>
--   
--   <h2>Asynchronous operations from synchronous ones</h2>
--   
--   You can use <a>taskRunInThread</a> to turn a synchronous operation
--   into an asynchronous one, by running it in a thread. When it
--   completes, the result will be dispatched to the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) where the
--   <tt>GTask</tt> was created.
--   
--   Running a task in a thread:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   typedef struct {
--     guint radius;
--     CakeFlavor flavor;
--     CakeFrostingType frosting;
--     char *message;
--   } CakeData;
--   
--   static void
--   cake_data_free (CakeData *cake_data)
--   {
--     g_free (cake_data-&gt;message);
--     g_slice_free (CakeData, cake_data);
--   }
--   
--   static void
--   bake_cake_thread (GTask         *task,
--                     gpointer       source_object,
--                     gpointer       task_data,
--                     GCancellable  *cancellable)
--   {
--     Baker *self = source_object;
--     CakeData *cake_data = task_data;
--     Cake *cake;
--     GError *error = NULL;
--   
--     cake = bake_cake (baker, cake_data-&gt;radius, cake_data-&gt;flavor,
--                       cake_data-&gt;frosting, cake_data-&gt;message,
--                       cancellable, &amp;error);
--     if (cake)
--       g_task_return_pointer (task, cake, g_object_unref);
--     else
--       g_task_return_error (task, error);
--   }
--   
--   void
--   baker_bake_cake_async (Baker               *self,
--                          guint                radius,
--                          CakeFlavor           flavor,
--                          CakeFrostingType     frosting,
--                          const char          *message,
--                          GCancellable        *cancellable,
--                          GAsyncReadyCallback  callback,
--                          gpointer             user_data)
--   {
--     CakeData *cake_data;
--     GTask *task;
--   
--     cake_data = g_slice_new (CakeData);
--     cake_data-&gt;radius = radius;
--     cake_data-&gt;flavor = flavor;
--     cake_data-&gt;frosting = frosting;
--     cake_data-&gt;message = g_strdup (message);
--     task = g_task_new (self, cancellable, callback, user_data);
--     g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
--     g_task_run_in_thread (task, bake_cake_thread);
--     g_object_unref (task);
--   }
--   
--   Cake *
--   baker_bake_cake_finish (Baker         *self,
--                           GAsyncResult  *result,
--                           GError       **error)
--   {
--     g_return_val_if_fail (g_task_is_valid (result, self), NULL);
--   
--     return g_task_propagate_pointer (G_TASK (result), error);
--   }
--   </pre>
--   
--   <h2>Adding cancellability to uncancellable tasks</h2>
--   
--   Finally, <a>taskRunInThread</a> and <a>taskRunInThreadSync</a> can be
--   used to turn an uncancellable operation into a cancellable one. If you
--   call <a>taskSetReturnOnCancel</a>, passing <tt>TRUE</tt>, then if the
--   task’s <a>Cancellable</a> is cancelled, it will return control back to
--   the caller immediately, while allowing the task thread to continue
--   running in the background (and simply discarding its result when it
--   finally does finish). Provided that the task thread is careful about
--   how it uses locks and other externally-visible resources, this allows
--   you to make ‘GLib-friendly’ asynchronous and cancellable synchronous
--   variants of blocking APIs.
--   
--   Cancelling a task:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static void
--   bake_cake_thread (GTask         *task,
--                     gpointer       source_object,
--                     gpointer       task_data,
--                     GCancellable  *cancellable)
--   {
--     Baker *self = source_object;
--     CakeData *cake_data = task_data;
--     Cake *cake;
--     GError *error = NULL;
--   
--     cake = bake_cake (baker, cake_data-&gt;radius, cake_data-&gt;flavor,
--                       cake_data-&gt;frosting, cake_data-&gt;message,
--                       &amp;error);
--     if (error)
--       {
--         g_task_return_error (task, error);
--         return;
--       }
--   
--     // If the task has already been cancelled, then we don’t want to add
--     // the cake to the cake cache. Likewise, we don’t  want to have the
--     // task get cancelled in the middle of updating the cache.
--     // g_task_set_return_on_cancel() will return %TRUE here if it managed
--     // to disable return-on-cancel, or %FALSE if the task was cancelled
--     // before it could.
--     if (g_task_set_return_on_cancel (task, FALSE))
--       {
--         // If the caller cancels at this point, their
--         // GAsyncReadyCallback won’t be invoked until we return,
--         // so we don’t have to worry that this code will run at
--         // the same time as that code does. But if there were
--         // other functions that might look at the cake cache,
--         // then we’d probably need a GMutex here as well.
--         baker_add_cake_to_cache (baker, cake);
--         g_task_return_pointer (task, cake, g_object_unref);
--       }
--   }
--   
--   void
--   baker_bake_cake_async (Baker               *self,
--                          guint                radius,
--                          CakeFlavor           flavor,
--                          CakeFrostingType     frosting,
--                          const char          *message,
--                          GCancellable        *cancellable,
--                          GAsyncReadyCallback  callback,
--                          gpointer             user_data)
--   {
--     CakeData *cake_data;
--     GTask *task;
--   
--     cake_data = g_slice_new (CakeData);
--   
--     ...
--   
--     task = g_task_new (self, cancellable, callback, user_data);
--     g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
--     g_task_set_return_on_cancel (task, TRUE);
--     g_task_run_in_thread (task, bake_cake_thread);
--   }
--   
--   Cake *
--   baker_bake_cake_sync (Baker               *self,
--                         guint                radius,
--                         CakeFlavor           flavor,
--                         CakeFrostingType     frosting,
--                         const char          *message,
--                         GCancellable        *cancellable,
--                         GError             **error)
--   {
--     CakeData *cake_data;
--     GTask *task;
--     Cake *cake;
--   
--     cake_data = g_slice_new (CakeData);
--   
--     ...
--   
--     task = g_task_new (self, cancellable, NULL, NULL);
--     g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
--     g_task_set_return_on_cancel (task, TRUE);
--     g_task_run_in_thread_sync (task, bake_cake_thread);
--   
--     cake = g_task_propagate_pointer (task, error);
--     g_object_unref (task);
--     return cake;
--   }
--   </pre>
--   
--   <h2>Porting from <a>SimpleAsyncResult</a></h2>
--   
--   <tt>GTask</tt>’s API attempts to be simpler than
--   <a>SimpleAsyncResult</a>’s in several ways:
--   
--   <ul>
--   <li>You can save task-specific data with <a>taskSetTaskData</a>, and
--   retrieve it later with <a>taskGetTaskData</a>. This replaces the abuse
--   of <a>SimpleAsyncResult</a>.<tt><i>set_op_res_gpointer</i></tt>() for
--   the same purpose with <a>SimpleAsyncResult</a>.</li>
--   <li>In addition to the task data, <tt>GTask</tt> also keeps track of
--   the <a>priority</a>, <a>Cancellable</a>, and <a>MainContext</a>
--   associated with the task, so tasks that consist of a chain of simpler
--   asynchronous operations will have easy access to those values when
--   starting each sub-task.</li>
--   <li><a>taskReturnErrorIfCancelled</a> provides simplified handling for
--   cancellation. In addition, cancellation overrides any other
--   <tt>GTask</tt> return value by default, like <a>SimpleAsyncResult</a>
--   does when <a>simpleAsyncResultSetCheckCancellable</a> is called. (You
--   can use <a>taskSetCheckCancellable</a> to turn off that behavior.) On
--   the other hand, <a>taskRunInThread</a> guarantees that it will always
--   run your <tt>task_func</tt>, even if the task’s <a>Cancellable</a> is
--   already cancelled before the task gets a chance to run; you can start
--   your <tt>task_func</tt> with a <a>taskReturnErrorIfCancelled</a> check
--   if you need the old behavior.</li>
--   <li>The ‘return’ methods (eg, <a>taskReturnPointer</a>) automatically
--   cause the task to be ‘completed’ as well, and there is no need to
--   worry about the ‘complete’ vs ‘complete in idle’ distinction.
--   (<tt>GTask</tt> automatically figures out whether the task’s callback
--   can be invoked directly, or if it needs to be sent to another
--   <a>MainContext</a>, or delayed until the next iteration of the current
--   <a>MainContext</a>.)</li>
--   <li>The ‘finish’ functions for <tt>GTask</tt> based operations are
--   generally much simpler than <a>SimpleAsyncResult</a> ones, normally
--   consisting of only a single call to <a>taskPropagatePointer</a> or the
--   like. Since <a>taskPropagatePointer</a> ‘steals’ the return value from
--   the <tt>GTask</tt>, it is not necessary to juggle pointers around to
--   prevent it from being freed twice.</li>
--   <li>With <a>SimpleAsyncResult</a>, it was common to call
--   <a>simpleAsyncResultPropagateError</a> from the <tt>_finish()</tt>
--   wrapper function, and have virtual method implementations only deal
--   with successful returns. This behavior is deprecated, because it makes
--   it difficult for a subclass to chain to a parent class’s async
--   methods. Instead, the wrapper function should just be a simple
--   wrapper, and the virtual method should call an appropriate
--   <tt>g_task_propagate_</tt> function. Note that wrapper methods can now
--   use <a>asyncResultLegacyPropagateError</a> to do old-style
--   <a>SimpleAsyncResult</a> error-returning behavior, and
--   <a>asyncResultIsTagged</a> to check if a result is tagged as having
--   come from the <tt>_async()</tt> wrapper function (for ‘short-circuit’
--   results, such as when passing <tt>0</tt> to
--   <a>inputStreamReadAsync</a>).</li>
--   </ul>
--   
--   <h2>Thread-safety considerations</h2>
--   
--   Due to some infelicities in the API design, there is a thread-safety
--   concern that users of <tt>GTask</tt> have to be aware of:
--   
--   If the <tt>main</tt> thread drops its last reference to the source
--   object or the task data before the task is finalized, then the
--   finalizers of these objects may be called on the worker thread.
--   
--   This is a problem if the finalizers use non-threadsafe API, and can
--   lead to hard-to-debug crashes. Possible workarounds include:
--   
--   <ul>
--   <li>Clear task data in a signal handler for
--   <tt>notify::completed</tt></li>
--   <li>Keep iterating a main context in the main thread and defer
--   dropping the reference to the source object to that main context when
--   the task is finalized</li>
--   </ul>
module GI.Gio.Objects.Task

-- | Memory-managed wrapper type.
newtype Task
Task :: ManagedPtr Task -> Task

-- | Type class for types which can be safely cast to <a>Task</a>, for
--   instance with <a>toTask</a>.
class (GObject o, IsDescendantOf Task o) => IsTask o

-- | Cast to <a>Task</a>, for types for which this is known to be safe. For
--   general casts, use <a>castTo</a>.
toTask :: (MonadIO m, IsTask o) => o -> m Task

-- | Gets <i><tt>task</tt></i>'s <a>Cancellable</a>
--   
--   <i>Since: 2.36</i>
taskGetCancellable :: (HasCallStack, MonadIO m, IsTask a) => a -> m (Maybe Cancellable)

-- | Gets <i><tt>task</tt></i>'s check-cancellable flag. See
--   <a>taskSetCheckCancellable</a> for more details.
--   
--   <i>Since: 2.36</i>
taskGetCheckCancellable :: (HasCallStack, MonadIO m, IsTask a) => a -> m Bool

-- | Gets the value of <a>Task:completed</a>. This changes from
--   <a>False</a> to <a>True</a> after the task’s callback is invoked, and
--   will return <a>False</a> if called from inside the callback.
--   
--   <i>Since: 2.44</i>
taskGetCompleted :: (HasCallStack, MonadIO m, IsTask a) => a -> m Bool

-- | Gets the <a>MainContext</a> that <i><tt>task</tt></i> will return its
--   result in (that is, the context that was the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) at the point when
--   <i><tt>task</tt></i> was created).
--   
--   This will always return a non-<a>Nothing</a> value, even if the task's
--   context is the default <a>MainContext</a>.
--   
--   <i>Since: 2.36</i>
taskGetContext :: (HasCallStack, MonadIO m, IsTask a) => a -> m MainContext

-- | Gets <i><tt>task</tt></i>’s name. See <a>taskSetName</a>.
--   
--   <i>Since: 2.60</i>
taskGetName :: (HasCallStack, MonadIO m, IsTask a) => a -> m (Maybe Text)

-- | Gets <i><tt>task</tt></i>'s priority
--   
--   <i>Since: 2.36</i>
taskGetPriority :: (HasCallStack, MonadIO m, IsTask a) => a -> m Int32

-- | Gets <i><tt>task</tt></i>'s return-on-cancel flag. See
--   <a>taskSetReturnOnCancel</a> for more details.
--   
--   <i>Since: 2.36</i>
taskGetReturnOnCancel :: (HasCallStack, MonadIO m, IsTask a) => a -> m Bool

-- | Gets the source object from <i><tt>task</tt></i>. Like
--   <a>asyncResultGetSourceObject</a>, but does not ref the object.
--   
--   <i>Since: 2.36</i>
taskGetSourceObject :: (HasCallStack, MonadIO m, IsTask a) => a -> m (Maybe Object)

-- | Gets <i><tt>task</tt></i>'s source tag. See <a>taskSetSourceTag</a>.
--   
--   <i>Since: 2.36</i>
taskGetSourceTag :: (HasCallStack, MonadIO m, IsTask a) => a -> m (Ptr ())

-- | Gets <i><tt>task</tt></i>'s <tt>task_data</tt>.
--   
--   <i>Since: 2.36</i>
taskGetTaskData :: (HasCallStack, MonadIO m, IsTask a) => a -> m (Ptr ())

-- | Tests if <i><tt>task</tt></i> resulted in an error.
--   
--   <i>Since: 2.36</i>
taskHadError :: (HasCallStack, MonadIO m, IsTask a) => a -> m Bool

-- | Checks that <i><tt>result</tt></i> is a <a>Task</a>, and that
--   <i><tt>sourceObject</tt></i> is its source object (or that
--   <i><tt>sourceObject</tt></i> is <a>Nothing</a> and
--   <i><tt>result</tt></i> has no source object). This can be used in
--   <tt><i>g_return_if_fail()</i></tt> checks.
--   
--   <i>Since: 2.36</i>
taskIsValid :: (HasCallStack, MonadIO m, IsAsyncResult a, IsObject b) => a -> Maybe b -> m Bool

-- | Creates a <a>Task</a> acting on <i><tt>sourceObject</tt></i>, which
--   will eventually be used to invoke <i><tt>callback</tt></i> in the
--   current thread-default main context (see
--   <a>mainContextPushThreadDefault</a>).
--   
--   Call this in the "start" method of your asynchronous method, and pass
--   the <a>Task</a> around throughout the asynchronous operation. You can
--   use <a>taskSetTaskData</a> to attach task-specific data to the object,
--   which you can retrieve later via <a>taskGetTaskData</a>.
--   
--   By default, if <i><tt>cancellable</tt></i> is cancelled, then the
--   return value of the task will always be <a>IOErrorEnumCancelled</a>,
--   even if the task had already completed before the cancellation. This
--   allows for simplified handling in cases where cancellation may imply
--   that other objects that the task depends on have been destroyed. If
--   you do not want this behavior, you can use
--   <a>taskSetCheckCancellable</a> to change it.
--   
--   <i>Since: 2.36</i>
taskNew :: (HasCallStack, MonadIO m, IsObject a, IsCancellable b) => Maybe a -> Maybe b -> Maybe AsyncReadyCallback -> m Task

-- | Gets the result of <i><tt>task</tt></i> as a <a>Bool</a>.
--   
--   If the task resulted in an error, or was cancelled, then this will
--   instead return <a>False</a> and set <i><tt>error</tt></i>.
--   
--   Since this method transfers ownership of the return value (or error)
--   to the caller, you may only call it once.
--   
--   <i>Since: 2.36</i>
taskPropagateBoolean :: (HasCallStack, MonadIO m, IsTask a) => a -> m ()

-- | Gets the result of <i><tt>task</tt></i> as an integer
--   (<tt><i>gssize</i></tt>).
--   
--   If the task resulted in an error, or was cancelled, then this will
--   instead return -1 and set <i><tt>error</tt></i>.
--   
--   Since this method transfers ownership of the return value (or error)
--   to the caller, you may only call it once.
--   
--   <i>Since: 2.36</i>
taskPropagateInt :: (HasCallStack, MonadIO m, IsTask a) => a -> m Int64

-- | Gets the result of <i><tt>task</tt></i> as a pointer, and transfers
--   ownership of that value to the caller.
--   
--   If the task resulted in an error, or was cancelled, then this will
--   instead return <a>Nothing</a> and set <i><tt>error</tt></i>.
--   
--   Since this method transfers ownership of the return value (or error)
--   to the caller, you may only call it once.
--   
--   <i>Since: 2.36</i>
taskPropagatePointer :: (HasCallStack, MonadIO m, IsTask a) => a -> m (Ptr ())

-- | Gets the result of <i><tt>task</tt></i> as a <a>Value</a>, and
--   transfers ownership of that value to the caller. As with
--   <a>taskReturnValue</a>, this is a generic low-level method;
--   <a>taskPropagatePointer</a> and the like will usually be more useful
--   for C code.
--   
--   If the task resulted in an error, or was cancelled, then this will
--   instead set <i><tt>error</tt></i> and return <a>False</a>.
--   
--   Since this method transfers ownership of the return value (or error)
--   to the caller, you may only call it once.
--   
--   <i>Since: 2.64</i>
taskPropagateValue :: (HasCallStack, MonadIO m, IsTask a) => a -> m GValue

-- | Creates a <a>Task</a> and then immediately calls
--   <a>taskReturnError</a> on it. Use this in the wrapper function of an
--   asynchronous method when you want to avoid even calling the virtual
--   method. You can then use <a>asyncResultIsTagged</a> in the finish
--   method wrapper to check if the result there is tagged as having been
--   created by the wrapper method, and deal with it appropriately if so.
--   
--   See also <tt><i>g_task_report_new_error()</i></tt>.
--   
--   <i>Since: 2.36</i>
taskReportError :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Maybe AsyncReadyCallback -> Ptr () -> GError -> m ()

-- | Sets <i><tt>task</tt></i>'s result to <i><tt>result</tt></i> and
--   completes the task (see <a>taskReturnPointer</a> for more discussion
--   of exactly what this means).
--   
--   <i>Since: 2.36</i>
taskReturnBoolean :: (HasCallStack, MonadIO m, IsTask a) => a -> Bool -> m ()

-- | Sets <i><tt>task</tt></i>'s result to <i><tt>error</tt></i> (which
--   <i><tt>task</tt></i> assumes ownership of) and completes the task (see
--   <a>taskReturnPointer</a> for more discussion of exactly what this
--   means).
--   
--   Note that since the task takes ownership of <i><tt>error</tt></i>, and
--   since the task may be completed before returning from
--   <a>taskReturnError</a>, you cannot assume that <i><tt>error</tt></i>
--   is still valid after calling this. Call <a>errorCopy</a> on the error
--   if you need to keep a local copy as well.
--   
--   See also <a>Task</a>.<tt><i>return_new_error</i></tt>(),
--   <a>taskReturnNewErrorLiteral</a>.
--   
--   <i>Since: 2.36</i>
taskReturnError :: (HasCallStack, MonadIO m, IsTask a) => a -> GError -> m ()

-- | Checks if <i><tt>task</tt></i>'s <a>Cancellable</a> has been
--   cancelled, and if so, sets <i><tt>task</tt></i>'s error accordingly
--   and completes the task (see <a>taskReturnPointer</a> for more
--   discussion of exactly what this means).
--   
--   <i>Since: 2.36</i>
taskReturnErrorIfCancelled :: (HasCallStack, MonadIO m, IsTask a) => a -> m Bool

-- | Sets <i><tt>task</tt></i>'s result to <i><tt>result</tt></i> and
--   completes the task (see <a>taskReturnPointer</a> for more discussion
--   of exactly what this means).
--   
--   <i>Since: 2.36</i>
taskReturnInt :: (HasCallStack, MonadIO m, IsTask a) => a -> Int64 -> m ()

-- | Sets <i><tt>task</tt></i>’s result to a new
--   [type<i><tt>gLib</tt></i>.Error] created from <i><tt>domain</tt></i>,
--   <i><tt>code</tt></i>, <i><tt>message</tt></i> and completes the task.
--   
--   See <a>taskReturnPointer</a> for more discussion of exactly what
--   ‘completing the task’ means.
--   
--   See also <a>Task</a>.<tt><i>return_new_error</i></tt>().
--   
--   <i>Since: 2.80</i>
taskReturnNewErrorLiteral :: (HasCallStack, MonadIO m, IsTask a) => a -> Word32 -> Int32 -> Text -> m ()

-- | Sets <i><tt>task</tt></i>'s result to <i><tt>result</tt></i> and
--   completes the task. If <i><tt>result</tt></i> is not <a>Nothing</a>,
--   then <i><tt>resultDestroy</tt></i> will be used to free
--   <i><tt>result</tt></i> if the caller does not take ownership of it
--   with <a>taskPropagatePointer</a>.
--   
--   "Completes the task" means that for an ordinary asynchronous task it
--   will either invoke the task's callback, or else queue that callback to
--   be invoked in the proper <a>MainContext</a>, or in the next iteration
--   of the current <a>MainContext</a>. For a task run via
--   <a>taskRunInThread</a> or <a>taskRunInThreadSync</a>, calling this
--   method will save <i><tt>result</tt></i> to be returned to the caller
--   later, but the task will not actually be completed until the
--   <a>TaskThreadFunc</a> exits.
--   
--   Note that since the task may be completed before returning from
--   <a>taskReturnPointer</a>, you cannot assume that
--   <i><tt>result</tt></i> is still valid after calling this, unless you
--   are still holding another reference on it.
--   
--   <i>Since: 2.36</i>
taskReturnPointer :: (HasCallStack, MonadIO m, IsTask a) => a -> Ptr () -> Maybe DestroyNotify -> m ()

-- | Sets <i><tt>task</tt></i>'s result to <i><tt>result</tt></i> (by
--   copying it) and completes the task.
--   
--   If <i><tt>result</tt></i> is <a>Nothing</a> then a <a>Value</a> of
--   type <tt><i>G_TYPE_POINTER</i></tt> with a value of <a>Nothing</a>
--   will be used for the result.
--   
--   This is a very generic low-level method intended primarily for use by
--   language bindings; for C code, <a>taskReturnPointer</a> and the like
--   will normally be much easier to use.
--   
--   <i>Since: 2.64</i>
taskReturnValue :: (HasCallStack, MonadIO m, IsTask a) => a -> Maybe GValue -> m ()

-- | Runs <i><tt>taskFunc</tt></i> in another thread. When
--   <i><tt>taskFunc</tt></i> returns, <i><tt>task</tt></i>'s
--   <a>AsyncReadyCallback</a> will be invoked in <i><tt>task</tt></i>'s
--   <a>MainContext</a>.
--   
--   This takes a ref on <i><tt>task</tt></i> until the task completes.
--   
--   See <a>TaskThreadFunc</a> for more details about how
--   <i><tt>taskFunc</tt></i> is handled.
--   
--   Although GLib currently rate-limits the tasks queued via
--   <a>taskRunInThread</a>, you should not assume that it will always do
--   this. If you have a very large number of tasks to run (several tens of
--   tasks), but don't want them to all run at once, you should only queue
--   a limited number of them (around ten) at a time.
--   
--   Be aware that if your task depends on other tasks to complete, use of
--   this function could lead to a livelock if the other tasks also use
--   this function and enough of them (around 10) execute in a dependency
--   chain, as that will exhaust the thread pool. If this situation is
--   possible, consider using a separate worker thread or thread pool
--   explicitly, rather than using <a>taskRunInThread</a>.
--   
--   <i>Since: 2.36</i>
taskRunInThread :: (HasCallStack, MonadIO m, IsTask a) => a -> TaskThreadFunc -> m ()

-- | Runs <i><tt>taskFunc</tt></i> in another thread, and waits for it to
--   return or be cancelled. You can use <a>taskPropagatePointer</a>, etc,
--   afterward to get the result of <i><tt>taskFunc</tt></i>.
--   
--   See <a>TaskThreadFunc</a> for more details about how
--   <i><tt>taskFunc</tt></i> is handled.
--   
--   Normally this is used with tasks created with a <a>Nothing</a>
--   <tt>callback</tt>, but note that even if the task does have a
--   callback, it will not be invoked when <i><tt>taskFunc</tt></i>
--   returns. <a>Task:completed</a> will be set to <a>True</a> just before
--   this function returns.
--   
--   Although GLib currently rate-limits the tasks queued via
--   <a>taskRunInThreadSync</a>, you should not assume that it will always
--   do this. If you have a very large number of tasks to run, but don't
--   want them to all run at once, you should only queue a limited number
--   of them at a time.
--   
--   <i>Since: 2.36</i>
taskRunInThreadSync :: (HasCallStack, MonadIO m, IsTask a) => a -> TaskThreadFunc -> m ()

-- | Sets or clears <i><tt>task</tt></i>'s check-cancellable flag. If this
--   is <a>True</a> (the default), then <a>taskPropagatePointer</a>, etc,
--   and <a>taskHadError</a> will check the task's <a>Cancellable</a>
--   first, and if it has been cancelled, then they will consider the task
--   to have returned an "Operation was cancelled" error
--   (<a>IOErrorEnumCancelled</a>), regardless of any other error or return
--   value the task may have had.
--   
--   If <i><tt>checkCancellable</tt></i> is <a>False</a>, then the
--   <a>Task</a> will not check the cancellable itself, and it is up to
--   <i><tt>task</tt></i>'s owner to do this (eg, via
--   <a>taskReturnErrorIfCancelled</a>).
--   
--   If you are using <a>taskSetReturnOnCancel</a> as well, then you must
--   leave check-cancellable set <a>True</a>.
--   
--   <i>Since: 2.36</i>
taskSetCheckCancellable :: (HasCallStack, MonadIO m, IsTask a) => a -> Bool -> m ()

-- | Sets <i><tt>task</tt></i>’s name, used in debugging and profiling. The
--   name defaults to <a>Nothing</a>.
--   
--   The task name should describe in a human readable way what the task
--   does. For example, ‘Open file’ or ‘Connect to network host’. It is
--   used to set the name of the <a>Source</a> used for idle completion of
--   the task.
--   
--   This function may only be called before the <i><tt>task</tt></i> is
--   first used in a thread other than the one it was constructed in.
--   
--   <i>Since: 2.60</i>
taskSetName :: (HasCallStack, MonadIO m, IsTask a) => a -> Maybe Text -> m ()

-- | Sets <i><tt>task</tt></i>'s priority. If you do not call this, it will
--   default to <a>PRIORITY_DEFAULT</a>.
--   
--   This will affect the priority of <tt><i>GSources</i></tt> created with
--   <tt><i>g_task_attach_source()</i></tt> and the scheduling of tasks run
--   in threads, and can also be explicitly retrieved later via
--   <a>taskGetPriority</a>.
--   
--   <i>Since: 2.36</i>
taskSetPriority :: (HasCallStack, MonadIO m, IsTask a) => a -> Int32 -> m ()

-- | Sets or clears <i><tt>task</tt></i>'s return-on-cancel flag. This is
--   only meaningful for tasks run via <a>taskRunInThread</a> or
--   <a>taskRunInThreadSync</a>.
--   
--   If <i><tt>returnOnCancel</tt></i> is <a>True</a>, then cancelling
--   <i><tt>task</tt></i>'s <a>Cancellable</a> will immediately cause it to
--   return, as though the task's <a>TaskThreadFunc</a> had called
--   <a>taskReturnErrorIfCancelled</a> and then returned.
--   
--   This allows you to create a cancellable wrapper around an
--   uninterruptible function. The <a>TaskThreadFunc</a> just needs to be
--   careful that it does not modify any externally-visible state after it
--   has been cancelled. To do that, the thread should call
--   <a>taskSetReturnOnCancel</a> again to (atomically) set
--   return-on-cancel <a>False</a> before making externally-visible
--   changes; if the task gets cancelled before the return-on-cancel flag
--   could be changed, <a>taskSetReturnOnCancel</a> will indicate this by
--   returning <a>False</a>.
--   
--   You can disable and re-enable this flag multiple times if you wish. If
--   the task's <a>Cancellable</a> is cancelled while return-on-cancel is
--   <a>False</a>, then calling <a>taskSetReturnOnCancel</a> to set it
--   <a>True</a> again will cause the task to be cancelled at that point.
--   
--   If the task's <a>Cancellable</a> is already cancelled before you call
--   <a>taskRunInThread</a>/<a>taskRunInThreadSync</a>, then the
--   <a>TaskThreadFunc</a> will still be run (for consistency), but the
--   task will also be completed right away.
--   
--   <i>Since: 2.36</i>
taskSetReturnOnCancel :: (HasCallStack, MonadIO m, IsTask a) => a -> Bool -> m Bool

-- | Sets <i><tt>task</tt></i>'s source tag.
--   
--   You can use this to tag a task return value with a particular pointer
--   (usually a pointer to the function doing the tagging) and then later
--   check it using <a>taskGetSourceTag</a> (or <a>asyncResultIsTagged</a>)
--   in the task's "finish" function, to figure out if the response came
--   from a particular place.
--   
--   A macro wrapper around this function will automatically set the task’s
--   name to the string form of <i><tt>sourceTag</tt></i> if it’s not
--   already set, for convenience.
--   
--   <i>Since: 2.36</i>
taskSetSourceTag :: (HasCallStack, MonadIO m, IsTask a) => a -> Ptr () -> m ()

-- | Sets <i><tt>task</tt></i>’s name, used in debugging and profiling.
--   
--   This is a variant of <a>taskSetName</a> that avoids copying
--   <i><tt>name</tt></i>.
--   
--   This function is called automatically by <a>taskSetSourceTag</a>
--   unless a name is set.
--   
--   <i>Since: 2.76</i>
taskSetStaticName :: (HasCallStack, MonadIO m, IsTask a) => a -> Maybe Text -> m ()

-- | Sets <i><tt>task</tt></i>'s task data (freeing the existing task data,
--   if any).
--   
--   <i>Since: 2.36</i>
taskSetTaskData :: (HasCallStack, MonadIO m, IsTask a) => a -> Ptr () -> Maybe DestroyNotify -> m ()

-- | Get the value of the “<tt>completed</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> task #completed
--   </pre>
getTaskCompleted :: (MonadIO m, IsTask o) => o -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.Task.Task
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Task.Task
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Task.Task
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Task.Task)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Task.Task o) => GI.Gio.Objects.Task.IsTask o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Task.Task
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Task.Task


-- | This class contains a set of options for launching child processes,
--   such as where its standard input and output will be directed, the
--   argument list, the environment, and more.
--   
--   While the <a>Subprocess</a> class has high level functions covering
--   popular cases, use of this class allows access to more advanced
--   options. It can also be used to launch multiple subprocesses with a
--   similar configuration.
--   
--   <i>Since: 2.40</i>
module GI.Gio.Objects.SubprocessLauncher

-- | Memory-managed wrapper type.
newtype SubprocessLauncher
SubprocessLauncher :: ManagedPtr SubprocessLauncher -> SubprocessLauncher

-- | Type class for types which can be safely cast to
--   <a>SubprocessLauncher</a>, for instance with
--   <a>toSubprocessLauncher</a>.
class (GObject o, IsDescendantOf SubprocessLauncher o) => IsSubprocessLauncher o

-- | Cast to <a>SubprocessLauncher</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toSubprocessLauncher :: (MonadIO m, IsSubprocessLauncher o) => o -> m SubprocessLauncher

-- | Closes all the file descriptors previously passed to the object with
--   <a>subprocessLauncherTakeFd</a>,
--   <a>subprocessLauncherTakeStderrFd</a>, etc.
--   
--   After calling this method, any subsequent calls to
--   <tt><i>g_subprocess_launcher_spawn()</i></tt> or
--   <a>subprocessLauncherSpawnv</a> will return <a>IOErrorEnumClosed</a>.
--   This method is idempotent if called more than once.
--   
--   This function is called automatically when the
--   <a>SubprocessLauncher</a> is disposed, but is provided separately so
--   that garbage collected language bindings can call it earlier to
--   guarantee when FDs are closed.
--   
--   <i>Since: 2.68</i>
subprocessLauncherClose :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> m ()

-- | Returns the value of the environment variable <i><tt>variable</tt></i>
--   in the environment of processes launched from this launcher.
--   
--   On UNIX, the returned string can be an arbitrary byte string. On
--   Windows, it will be UTF-8.
--   
--   <i>Since: 2.40</i>
subprocessLauncherGetenv :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [Char] -> m (Maybe [Char])

-- | Creates a new <a>SubprocessLauncher</a>.
--   
--   The launcher is created with the default options. A copy of the
--   environment of the calling process is made at the time of this call
--   and will be used as the environment that the process is launched in.
--   
--   <i>Since: 2.40</i>
subprocessLauncherNew :: (HasCallStack, MonadIO m) => [SubprocessFlags] -> m SubprocessLauncher

-- | Sets the current working directory that processes will be launched
--   with.
--   
--   By default processes are launched with the current working directory
--   of the launching process at the time of launch.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSetCwd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [Char] -> m ()

-- | Replace the entire environment of processes launched from this
--   launcher with the given 'environ' variable.
--   
--   Typically you will build this variable by using <a>listenv</a> to copy
--   the process 'environ' and using the functions <a>environSetenv</a>,
--   <a>environUnsetenv</a>, etc.
--   
--   As an alternative, you can use <a>subprocessLauncherSetenv</a>,
--   <a>subprocessLauncherUnsetenv</a>, etc.
--   
--   Pass an empty array to set an empty environment. Pass <a>Nothing</a>
--   to inherit the parent process’ environment. As of GLib 2.54, the
--   parent process’ environment will be copied when
--   <a>subprocessLauncherSetEnviron</a> is called. Previously, it was
--   copied when the subprocess was executed. This means the copied
--   environment may now be modified (using
--   <a>subprocessLauncherSetenv</a>, etc.) before launching the
--   subprocess.
--   
--   On UNIX, all strings in this array can be arbitrary byte strings. On
--   Windows, they should be in UTF-8.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSetEnviron :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [[Char]] -> m ()

-- | Sets the flags on the launcher.
--   
--   The default flags are <a>SubprocessFlagsNone</a>.
--   
--   You may not set flags that specify conflicting options for how to
--   handle a particular stdio stream (eg: specifying both
--   <a>SubprocessFlagsStdinPipe</a> and
--   <a>SubprocessFlagsStdinInherit</a>).
--   
--   You may also not set a flag that conflicts with a previous call to a
--   function like <a>subprocessLauncherSetStdinFilePath</a> or
--   <a>subprocessLauncherTakeStdoutFd</a>.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSetFlags :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [SubprocessFlags] -> m ()

-- | Sets the file path to use as the stderr for spawned processes.
--   
--   If <i><tt>path</tt></i> is <a>Nothing</a> then any previously given
--   path is unset.
--   
--   The file will be created or truncated when the process is spawned, as
--   would be the case if using '2&gt;' at the shell.
--   
--   If you want to send both stdout and stderr to the same file then use
--   <a>SubprocessFlagsStderrMerge</a>.
--   
--   You may not set a stderr file path if a stderr fd is already set or if
--   the launcher flags contain any flags directing stderr elsewhere.
--   
--   This feature is only available on UNIX.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSetStderrFilePath :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Maybe [Char] -> m ()

-- | Sets the file path to use as the stdin for spawned processes.
--   
--   If <i><tt>path</tt></i> is <a>Nothing</a> then any previously given
--   path is unset.
--   
--   The file must exist or spawning the process will fail.
--   
--   You may not set a stdin file path if a stdin fd is already set or if
--   the launcher flags contain any flags directing stdin elsewhere.
--   
--   This feature is only available on UNIX.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSetStdinFilePath :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Maybe [Char] -> m ()

-- | Sets the file path to use as the stdout for spawned processes.
--   
--   If <i><tt>path</tt></i> is <a>Nothing</a> then any previously given
--   path is unset.
--   
--   The file will be created or truncated when the process is spawned, as
--   would be the case if using '&gt;' at the shell.
--   
--   You may not set a stdout file path if a stdout fd is already set or if
--   the launcher flags contain any flags directing stdout elsewhere.
--   
--   This feature is only available on UNIX.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSetStdoutFilePath :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Maybe [Char] -> m ()

-- | Sets the environment variable <i><tt>variable</tt></i> in the
--   environment of processes launched from this launcher.
--   
--   On UNIX, both the variable's name and value can be arbitrary byte
--   strings, except that the variable's name cannot contain '='. On
--   Windows, they should be in UTF-8.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSetenv :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [Char] -> [Char] -> Bool -> m ()

-- | Creates a <a>Subprocess</a> given a provided array of arguments.
--   
--   <i>Since: 2.40</i>
subprocessLauncherSpawnv :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [[Char]] -> m Subprocess

-- | Transfer an arbitrary file descriptor from parent process to the
--   child. This function takes ownership of the <i><tt>sourceFd</tt></i>;
--   it will be closed in the parent when <i><tt>self</tt></i> is freed.
--   
--   By default, all file descriptors from the parent will be closed. This
--   function allows you to create (for example) a custom <tt>pipe()</tt>
--   or <tt>socketpair()</tt> before launching the process, and choose the
--   target descriptor in the child.
--   
--   An example use case is GNUPG, which has a command line argument
--   <tt>--passphrase-fd</tt> providing a file descriptor number where it
--   expects the passphrase to be written.
subprocessLauncherTakeFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> Int32 -> m ()

-- | Sets the file descriptor to use as the stderr for spawned processes.
--   
--   If <i><tt>fd</tt></i> is -1 then any previously given fd is unset.
--   
--   Note that the default behaviour is to pass stderr through to the
--   stderr of the parent process.
--   
--   The passed <i><tt>fd</tt></i> belongs to the
--   <a>SubprocessLauncher</a>. It will be automatically closed when the
--   launcher is finalized. The file descriptor will also be closed on the
--   child side when executing the spawned process.
--   
--   You may not set a stderr fd if a stderr file path is already set or if
--   the launcher flags contain any flags directing stderr elsewhere.
--   
--   This feature is only available on UNIX.
--   
--   <i>Since: 2.40</i>
subprocessLauncherTakeStderrFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> m ()

-- | Sets the file descriptor to use as the stdin for spawned processes.
--   
--   If <i><tt>fd</tt></i> is -1 then any previously given fd is unset.
--   
--   Note that if your intention is to have the stdin of the calling
--   process inherited by the child then <a>SubprocessFlagsStdinInherit</a>
--   is a better way to go about doing that.
--   
--   The passed <i><tt>fd</tt></i> is noted but will not be touched in the
--   current process. It is therefore necessary that it be kept open by the
--   caller until the subprocess is spawned. The file descriptor will also
--   not be explicitly closed on the child side, so it must be marked
--   O_CLOEXEC if that's what you want.
--   
--   You may not set a stdin fd if a stdin file path is already set or if
--   the launcher flags contain any flags directing stdin elsewhere.
--   
--   This feature is only available on UNIX.
--   
--   <i>Since: 2.40</i>
subprocessLauncherTakeStdinFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> m ()

-- | Sets the file descriptor to use as the stdout for spawned processes.
--   
--   If <i><tt>fd</tt></i> is -1 then any previously given fd is unset.
--   
--   Note that the default behaviour is to pass stdout through to the
--   stdout of the parent process.
--   
--   The passed <i><tt>fd</tt></i> is noted but will not be touched in the
--   current process. It is therefore necessary that it be kept open by the
--   caller until the subprocess is spawned. The file descriptor will also
--   not be explicitly closed on the child side, so it must be marked
--   O_CLOEXEC if that's what you want.
--   
--   You may not set a stdout fd if a stdout file path is already set or if
--   the launcher flags contain any flags directing stdout elsewhere.
--   
--   This feature is only available on UNIX.
--   
--   <i>Since: 2.40</i>
subprocessLauncherTakeStdoutFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> m ()

-- | Removes the environment variable <i><tt>variable</tt></i> from the
--   environment of processes launched from this launcher.
--   
--   On UNIX, the variable's name can be an arbitrary byte string not
--   containing '='. On Windows, it should be in UTF-8.
--   
--   <i>Since: 2.40</i>
subprocessLauncherUnsetenv :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [Char] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSubprocessLauncherFlags :: (IsSubprocessLauncher o, MonadIO m) => [SubprocessFlags] -> m (GValueConstruct o)
instance GHC.Classes.Eq GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher o) => GI.Gio.Objects.SubprocessLauncher.IsSubprocessLauncher o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher


-- | <tt>GSubprocess</tt> allows the creation of and interaction with child
--   processes.
--   
--   Processes can be communicated with using standard GIO-style APIs (ie:
--   <a>InputStream</a>, <a>OutputStream</a>). There are GIO-style APIs to
--   wait for process termination (ie: cancellable and with an asynchronous
--   variant).
--   
--   There is an API to force a process to terminate, as well as a
--   race-free API for sending UNIX signals to a subprocess.
--   
--   One major advantage that GIO brings over the core GLib library is
--   comprehensive API for asynchronous I/O, such
--   <a>outputStreamSpliceAsync</a>. This makes <tt>GSubprocess</tt>
--   significantly more powerful and flexible than equivalent APIs in some
--   other languages such as the <tt>subprocess.py</tt> included with
--   Python. For example, using <tt>GSubprocess</tt> one could create two
--   child processes, reading standard output from the first, processing
--   it, and writing to the input stream of the second, all without
--   blocking the main loop.
--   
--   A powerful <a>subprocessCommunicate</a> API is provided similar to the
--   <tt>communicate()</tt> method of <tt>subprocess.py</tt>. This enables
--   very easy interaction with a subprocess that has been opened with
--   pipes.
--   
--   <tt>GSubprocess</tt> defaults to tight control over the file
--   descriptors open in the child process, avoiding dangling-FD issues
--   that are caused by a simple <tt>fork()</tt>/<tt>exec()</tt>. The only
--   open file descriptors in the spawned process are ones that were
--   explicitly specified by the <tt>GSubprocess</tt> API (unless
--   <tt>G_SUBPROCESS_FLAGS_INHERIT_FDS</tt> was specified).
--   
--   <tt>GSubprocess</tt> will quickly reap all child processes as they
--   exit, avoiding ‘zombie processes’ remaining around for long periods of
--   time. <a>subprocessWait</a> can be used to wait for this to happen,
--   but it will happen even without the call being explicitly made.
--   
--   As a matter of principle, <tt>GSubprocess</tt> has no API that accepts
--   shell-style space-separated strings. It will, however, match the
--   typical shell behaviour of searching the <tt>PATH</tt> for executables
--   that do not contain a directory separator in their name. By default,
--   the <tt>PATH</tt> of the current process is used. You can specify
--   <tt>G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP</tt> to use the
--   <tt>PATH</tt> of the launcher environment instead.
--   
--   <tt>GSubprocess</tt> attempts to have a very simple API for most uses
--   (ie: spawning a subprocess with arguments and support for most typical
--   kinds of input and output redirection). See <a>subprocessNew</a>. The
--   <a>SubprocessLauncher</a> API is provided for more complicated cases
--   (advanced types of redirection, environment variable manipulation,
--   change of working directory, child setup functions, etc).
--   
--   A typical use of <tt>GSubprocess</tt> will involve calling
--   <a>subprocessNew</a>, followed by <a>subprocessWaitAsync</a> or
--   <a>subprocessWait</a>. After the process exits, the status can be
--   checked using functions such as <a>subprocessGetIfExited</a> (which
--   are similar to the familiar <tt>WIFEXITED</tt>-style POSIX macros).
--   
--   Note that as of GLib 2.82, creating a <tt>GSubprocess</tt> causes the
--   signal <tt>SIGPIPE</tt> to be ignored for the remainder of the
--   program. If you are writing a command-line utility that uses
--   <tt>GSubprocess</tt>, you may need to take into account the fact that
--   your program will not automatically be killed if it tries to write to
--   <tt>stdout</tt> after it has been closed.
--   
--   <i>Since: 2.40</i>
module GI.Gio.Objects.Subprocess

-- | Memory-managed wrapper type.
newtype Subprocess
Subprocess :: ManagedPtr Subprocess -> Subprocess

-- | Type class for types which can be safely cast to <a>Subprocess</a>,
--   for instance with <a>toSubprocess</a>.
class (GObject o, IsDescendantOf Subprocess o) => IsSubprocess o

-- | Cast to <a>Subprocess</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toSubprocess :: (MonadIO m, IsSubprocess o) => o -> m Subprocess

-- | Communicate with the subprocess until it terminates, and all input and
--   output has been completed.
--   
--   If <i><tt>stdinBuf</tt></i> is given, the subprocess must have been
--   created with <a>SubprocessFlagsStdinPipe</a>. The given data is fed to
--   the stdin of the subprocess and the pipe is closed (ie: EOF).
--   
--   At the same time (as not to cause blocking when dealing with large
--   amounts of data), if <a>SubprocessFlagsStdoutPipe</a> or
--   <a>SubprocessFlagsStderrPipe</a> were used, reads from those streams.
--   The data that was read is returned in <i><tt>stdout</tt></i> and/or
--   the <i><tt>stderr</tt></i>.
--   
--   If the subprocess was created with <a>SubprocessFlagsStdoutPipe</a>,
--   <i><tt>stdoutBuf</tt></i> will contain the data read from stdout.
--   Otherwise, for subprocesses not created with
--   <a>SubprocessFlagsStdoutPipe</a>, <i><tt>stdoutBuf</tt></i> will be
--   set to <a>Nothing</a>. Similar provisions apply to
--   <i><tt>stderrBuf</tt></i> and <a>SubprocessFlagsStderrPipe</a>.
--   
--   As usual, any output variable may be given as <a>Nothing</a> to ignore
--   it.
--   
--   If you desire the stdout and stderr data to be interleaved, create the
--   subprocess with <a>SubprocessFlagsStdoutPipe</a> and
--   <a>SubprocessFlagsStderrMerge</a>. The merged result will be returned
--   in <i><tt>stdoutBuf</tt></i> and <i><tt>stderrBuf</tt></i> will be set
--   to <a>Nothing</a>.
--   
--   In case of any error (including cancellation), <a>False</a> will be
--   returned with <i><tt>error</tt></i> set. Some or all of the stdin data
--   may have been written. Any stdout or stderr data that has been read
--   will be discarded. None of the out variables (aside from
--   <i><tt>error</tt></i>) will have been set to anything in particular
--   and should not be inspected.
--   
--   In the case that <a>True</a> is returned, the subprocess has exited
--   and the exit status inspection APIs (eg: <a>subprocessGetIfExited</a>,
--   <a>subprocessGetExitStatus</a>) may be used.
--   
--   You should not attempt to use any of the subprocess pipes after
--   starting this function, since they may be left in strange states, even
--   if the operation was cancelled. You should especially not attempt to
--   interact with the pipes while the operation is in progress (either
--   from another thread or if using the asynchronous version).
--   
--   <i>Since: 2.40</i>
subprocessCommunicate :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe Bytes -> Maybe b -> m (Maybe Bytes, Maybe Bytes)

-- | Asynchronous version of <a>subprocessCommunicate</a>. Complete
--   invocation with <a>subprocessCommunicateFinish</a>.
subprocessCommunicateAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe Bytes -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Complete an invocation of <a>subprocessCommunicateAsync</a>.
subprocessCommunicateFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m (Maybe Bytes, Maybe Bytes)

-- | Like <a>subprocessCommunicate</a>, but validates the output of the
--   process as UTF-8, and returns it as a regular NUL terminated string.
--   
--   On error, <i><tt>stdoutBuf</tt></i> and <i><tt>stderrBuf</tt></i> will
--   be set to undefined values and should not be used.
subprocessCommunicateUtf8 :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe Text -> Maybe b -> m (Maybe Text, Maybe Text)

-- | Asynchronous version of <a>subprocessCommunicateUtf8</a>. Complete
--   invocation with <a>subprocessCommunicateUtf8Finish</a>.
subprocessCommunicateUtf8Async :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Complete an invocation of <a>subprocessCommunicateUtf8Async</a>.
subprocessCommunicateUtf8Finish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m (Maybe Text, Maybe Text)

-- | Use an operating-system specific method to attempt an immediate,
--   forceful termination of the process. There is no mechanism to
--   determine whether or not the request itself was successful; however,
--   you can use <a>subprocessWait</a> to monitor the status of the process
--   after calling this function.
--   
--   On Unix, this function sends <tt><i>SIGKILL</i></tt>.
--   
--   <i>Since: 2.40</i>
subprocessForceExit :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m ()

-- | Check the exit status of the subprocess, given that it exited
--   normally. This is the value passed to the <tt><i>exit()</i></tt>
--   system call or the return value from main.
--   
--   This is equivalent to the system WEXITSTATUS macro.
--   
--   It is an error to call this function before <a>subprocessWait</a> and
--   unless <a>subprocessGetIfExited</a> returned <a>True</a>.
--   
--   <i>Since: 2.40</i>
subprocessGetExitStatus :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Int32

-- | On UNIX, returns the process ID as a decimal string. On Windows,
--   returns the result of <tt><i>GetProcessId()</i></tt> also as a string.
--   If the subprocess has terminated, this will return <a>Nothing</a>.
--   
--   <i>Since: 2.40</i>
subprocessGetIdentifier :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m (Maybe Text)

-- | Check if the given subprocess exited normally (ie: by way of
--   <tt><i>exit()</i></tt> or return from <tt><i>main()</i></tt>).
--   
--   This is equivalent to the system WIFEXITED macro.
--   
--   It is an error to call this function before <a>subprocessWait</a> has
--   returned.
--   
--   <i>Since: 2.40</i>
subprocessGetIfExited :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Bool

-- | Check if the given subprocess terminated in response to a signal.
--   
--   This is equivalent to the system WIFSIGNALED macro.
--   
--   It is an error to call this function before <a>subprocessWait</a> has
--   returned.
--   
--   <i>Since: 2.40</i>
subprocessGetIfSignaled :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Bool

-- | Gets the raw status code of the process, as from
--   <tt><i>waitpid()</i></tt>.
--   
--   This value has no particular meaning, but it can be used with the
--   macros defined by the system headers such as WIFEXITED. It can also be
--   used with <a>spawnCheckWaitStatus</a>.
--   
--   It is more likely that you want to use <a>subprocessGetIfExited</a>
--   followed by <a>subprocessGetExitStatus</a>.
--   
--   It is an error to call this function before <a>subprocessWait</a> has
--   returned.
--   
--   <i>Since: 2.40</i>
subprocessGetStatus :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Int32

-- | Gets the <a>InputStream</a> from which to read the stderr output of
--   <i><tt>subprocess</tt></i>.
--   
--   The process must have been created with
--   <a>SubprocessFlagsStderrPipe</a>, otherwise <a>Nothing</a> will be
--   returned.
--   
--   <i>Since: 2.40</i>
subprocessGetStderrPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m (Maybe InputStream)

-- | Gets the <a>OutputStream</a> that you can write to in order to give
--   data to the stdin of <i><tt>subprocess</tt></i>.
--   
--   The process must have been created with
--   <a>SubprocessFlagsStdinPipe</a> and not
--   <a>SubprocessFlagsStdinInherit</a>, otherwise <a>Nothing</a> will be
--   returned.
--   
--   <i>Since: 2.40</i>
subprocessGetStdinPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m (Maybe OutputStream)

-- | Gets the <a>InputStream</a> from which to read the stdout output of
--   <i><tt>subprocess</tt></i>.
--   
--   The process must have been created with
--   <a>SubprocessFlagsStdoutPipe</a>, otherwise <a>Nothing</a> will be
--   returned.
--   
--   <i>Since: 2.40</i>
subprocessGetStdoutPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m (Maybe InputStream)

-- | Checks if the process was "successful". A process is considered
--   successful if it exited cleanly with an exit status of 0, either by
--   way of the <tt><i>exit()</i></tt> system call or return from
--   <tt><i>main()</i></tt>.
--   
--   It is an error to call this function before <a>subprocessWait</a> has
--   returned.
--   
--   <i>Since: 2.40</i>
subprocessGetSuccessful :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Bool

-- | Get the signal number that caused the subprocess to terminate, given
--   that it terminated due to a signal.
--   
--   This is equivalent to the system WTERMSIG macro.
--   
--   It is an error to call this function before <a>subprocessWait</a> and
--   unless <a>subprocessGetIfSignaled</a> returned <a>True</a>.
--   
--   <i>Since: 2.40</i>
subprocessGetTermSig :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Int32

-- | Create a new process with the given flags and argument list.
--   
--   The argument list is expected to be <a>Nothing</a>-terminated.
--   
--   <i>Since: 2.40</i>
subprocessNew :: (HasCallStack, MonadIO m) => [[Char]] -> [SubprocessFlags] -> m Subprocess

-- | Sends the UNIX signal <i><tt>signalNum</tt></i> to the subprocess, if
--   it is still running.
--   
--   This API is race-free. If the subprocess has terminated, it will not
--   be signalled.
--   
--   This API is not available on Windows.
--   
--   <i>Since: 2.40</i>
subprocessSendSignal :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> Int32 -> m ()

-- | Synchronously wait for the subprocess to terminate.
--   
--   After the process terminates you can query its exit status with
--   functions such as <a>subprocessGetIfExited</a> and
--   <a>subprocessGetExitStatus</a>.
--   
--   This function does not fail in the case of the subprocess having
--   abnormal termination. See <a>subprocessWaitCheck</a> for that.
--   
--   Cancelling <i><tt>cancellable</tt></i> doesn't kill the subprocess.
--   Call <a>subprocessForceExit</a> if it is desirable.
--   
--   <i>Since: 2.40</i>
subprocessWait :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> m ()

-- | Wait for the subprocess to terminate.
--   
--   This is the asynchronous version of <a>subprocessWait</a>.
--   
--   <i>Since: 2.40</i>
subprocessWaitAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Combines <a>subprocessWait</a> with <a>spawnCheckWaitStatus</a>.
--   
--   <i>Since: 2.40</i>
subprocessWaitCheck :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> m ()

-- | Combines <a>subprocessWaitAsync</a> with <a>spawnCheckWaitStatus</a>.
--   
--   This is the asynchronous version of <a>subprocessWaitCheck</a>.
--   
--   <i>Since: 2.40</i>
subprocessWaitCheckAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Collects the result of a previous call to
--   <a>subprocessWaitCheckAsync</a>.
--   
--   <i>Since: 2.40</i>
subprocessWaitCheckFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m ()

-- | Collects the result of a previous call to <a>subprocessWaitAsync</a>.
--   
--   <i>Since: 2.40</i>
subprocessWaitFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>argv</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSubprocessArgv :: (IsSubprocess o, MonadIO m) => [Text] -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSubprocessFlags :: (IsSubprocess o, MonadIO m) => [SubprocessFlags] -> m (GValueConstruct o)
instance GHC.Classes.Eq GI.Gio.Objects.Subprocess.Subprocess
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Subprocess.Subprocess
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Subprocess.Subprocess
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Subprocess.Subprocess)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Subprocess.Subprocess o) => GI.Gio.Objects.Subprocess.IsSubprocess o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Subprocess.Subprocess
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Subprocess.Subprocess


-- | A <tt>GSocketService</tt> is an object that represents a service that
--   is provided to the network or over local sockets. When a new
--   connection is made to the service the <a>SocketService::incoming</a>
--   signal is emitted.
--   
--   A <tt>GSocketService</tt> is a subclass of <a>SocketListener</a> and
--   you need to add the addresses you want to accept connections on with
--   the <a>SocketListener</a> APIs.
--   
--   There are two options for implementing a network service based on
--   <tt>GSocketService</tt>. The first is to create the service using
--   <a>socketServiceNew</a> and to connect to the
--   <a>SocketService::incoming</a> signal. The second is to subclass
--   <tt>GSocketService</tt> and override the default signal handler
--   implementation.
--   
--   In either case, the handler must immediately return, or else it will
--   block additional incoming connections from being serviced. If you are
--   interested in writing connection handlers that contain blocking code
--   then see <a>ThreadedSocketService</a>.
--   
--   The socket service runs on the main loop of the thread-default context
--   (see <a>mainContextPushThreadDefault</a>) of the thread it is created
--   in, and is not threadsafe in general. However, the calls to start and
--   stop the service are thread-safe so these can be used from threads
--   that handle incoming clients.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.SocketService

-- | Memory-managed wrapper type.
newtype SocketService
SocketService :: ManagedPtr SocketService -> SocketService

-- | Type class for types which can be safely cast to <a>SocketService</a>,
--   for instance with <a>toSocketService</a>.
class (GObject o, IsDescendantOf SocketService o) => IsSocketService o

-- | Cast to <a>SocketService</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toSocketService :: (MonadIO m, IsSocketService o) => o -> m SocketService

-- | Check whether the service is active or not. An active service will
--   accept new clients that connect, while a non-active service will let
--   connecting clients queue up until the service is started.
--   
--   <i>Since: 2.22</i>
socketServiceIsActive :: (HasCallStack, MonadIO m, IsSocketService a) => a -> m Bool

-- | Creates a new <a>SocketService</a> with no sockets to listen for. New
--   listeners can be added with e.g. <a>socketListenerAddAddress</a> or
--   <a>socketListenerAddInetPort</a>.
--   
--   New services are created active, there is no need to call
--   <a>socketServiceStart</a>, unless <a>socketServiceStop</a> has been
--   called before.
--   
--   <i>Since: 2.22</i>
socketServiceNew :: (HasCallStack, MonadIO m) => m SocketService

-- | Restarts the service, i.e. start accepting connections from the added
--   sockets when the mainloop runs. This only needs to be called after the
--   service has been stopped from <a>socketServiceStop</a>.
--   
--   This call is thread-safe, so it may be called from a thread handling
--   an incoming client request.
--   
--   <i>Since: 2.22</i>
socketServiceStart :: (HasCallStack, MonadIO m, IsSocketService a) => a -> m ()

-- | Stops the service, i.e. stops accepting connections from the added
--   sockets when the mainloop runs.
--   
--   This call is thread-safe, so it may be called from a thread handling
--   an incoming client request.
--   
--   Note that this only stops accepting new connections; it does not close
--   the listening sockets, and you can call <a>socketServiceStart</a>
--   again later to begin listening again. To close the listening sockets,
--   call <a>socketListenerClose</a>. (This will happen automatically when
--   the <a>SocketService</a> is finalized.)
--   
--   This must be called before calling <a>socketListenerClose</a> as the
--   socket service will start accepting connections immediately when a new
--   socket is added.
--   
--   <i>Since: 2.22</i>
socketServiceStop :: (HasCallStack, MonadIO m, IsSocketService a) => a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>active</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketServiceActive :: (IsSocketService o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>active</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketService #active
--   </pre>
getSocketServiceActive :: (MonadIO m, IsSocketService o) => o -> m Bool

-- | Set the value of the “<tt>active</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketService [ #active <a>:=</a> value ]
--   </pre>
setSocketServiceActive :: (MonadIO m, IsSocketService o) => o -> Bool -> m ()

-- | The <a>incoming</a> signal is emitted when a new incoming connection
--   to <i><tt>service</tt></i> needs to be handled. The handler must
--   initiate the handling of <i><tt>connection</tt></i>, but may not
--   block; in essence, asynchronous operations must be used.
--   
--   <i><tt>connection</tt></i> will be unreffed once the signal handler
--   returns, so you need to ref it yourself if you are planning to use it.
--   
--   <i>Since: 2.22</i>
type SocketServiceIncomingCallback = SocketConnection -> Maybe Object -> IO Bool

-- | Connect a signal handler for the <a>incoming</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> socketService #incoming callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSocketServiceIncoming :: (IsSocketService a, MonadIO m) => a -> ((?self :: a) => SocketServiceIncomingCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>incoming</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> socketService #incoming callback
--   </pre>
onSocketServiceIncoming :: (IsSocketService a, MonadIO m) => a -> ((?self :: a) => SocketServiceIncomingCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.SocketService.SocketService
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketService.SocketService
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketService.SocketService
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SocketService.SocketService)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SocketService.SocketService o) => GI.Gio.Objects.SocketService.IsSocketService o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SocketService.SocketService
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SocketService.SocketService


-- | A <tt>GSocketListener</tt> is an object that keeps track of a set of
--   server sockets and helps you accept sockets from any of the socket,
--   either sync or async.
--   
--   Add addresses and ports to listen on using
--   <a>socketListenerAddAddress</a> and <a>socketListenerAddInetPort</a>.
--   These will be listened on until <a>socketListenerClose</a> is called.
--   Dropping your final reference to the <tt>GSocketListener</tt> will not
--   cause <a>socketListenerClose</a> to be called implicitly, as some
--   references to the <tt>GSocketListener</tt> may be held internally.
--   
--   If you want to implement a network server, also look at
--   <a>SocketService</a> and <a>ThreadedSocketService</a> which are
--   subclasses of <tt>GSocketListener</tt> that make this even easier.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.SocketListener

-- | Memory-managed wrapper type.
newtype SocketListener
SocketListener :: ManagedPtr SocketListener -> SocketListener

-- | Type class for types which can be safely cast to
--   <a>SocketListener</a>, for instance with <a>toSocketListener</a>.
class (GObject o, IsDescendantOf SocketListener o) => IsSocketListener o

-- | Cast to <a>SocketListener</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toSocketListener :: (MonadIO m, IsSocketListener o) => o -> m SocketListener

-- | Blocks waiting for a client to connect to any of the sockets added to
--   the listener. Returns a <a>SocketConnection</a> for the socket that
--   was accepted.
--   
--   If <i><tt>sourceObject</tt></i> is not <a>Nothing</a> it will be
--   filled out with the source object specified when the corresponding
--   socket or address was added to the listener.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   <i>Since: 2.22</i>
socketListenerAccept :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> m (SocketConnection, Maybe Object)

-- | This is the asynchronous version of <a>socketListenerAccept</a>.
--   
--   When the operation is finished <i><tt>callback</tt></i> will be
--   called. You can then call <a>socketListenerAcceptFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
socketListenerAcceptAsync :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async accept operation. See
--   <a>socketListenerAcceptAsync</a>
--   
--   <i>Since: 2.22</i>
socketListenerAcceptFinish :: (HasCallStack, MonadIO m, IsSocketListener a, IsAsyncResult b) => a -> b -> m (SocketConnection, Maybe Object)

-- | Blocks waiting for a client to connect to any of the sockets added to
--   the listener. Returns the <a>Socket</a> that was accepted.
--   
--   If you want to accept the high-level <a>SocketConnection</a>, not a
--   <a>Socket</a>, which is often the case, then you should use
--   <a>socketListenerAccept</a> instead.
--   
--   If <i><tt>sourceObject</tt></i> is not <a>Nothing</a> it will be
--   filled out with the source object specified when the corresponding
--   socket or address was added to the listener.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   <i>Since: 2.22</i>
socketListenerAcceptSocket :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> m (Socket, Maybe Object)

-- | This is the asynchronous version of <a>socketListenerAcceptSocket</a>.
--   
--   When the operation is finished <i><tt>callback</tt></i> will be
--   called. You can then call <a>socketListenerAcceptSocketFinish</a> to
--   get the result of the operation.
--   
--   <i>Since: 2.22</i>
socketListenerAcceptSocketAsync :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async accept operation. See
--   <a>socketListenerAcceptSocketAsync</a>
--   
--   <i>Since: 2.22</i>
socketListenerAcceptSocketFinish :: (HasCallStack, MonadIO m, IsSocketListener a, IsAsyncResult b) => a -> b -> m (Socket, Maybe Object)

-- | Creates a socket of type <i><tt>type</tt></i> and protocol
--   <i><tt>protocol</tt></i>, binds it to <i><tt>address</tt></i> and adds
--   it to the set of sockets we're accepting sockets from.
--   
--   Note that adding an IPv6 address, depending on the platform, may or
--   may not result in a listener that also accepts IPv4 connections. For
--   more deterministic behavior, see <a>socketListenerAddInetPort</a>.
--   
--   <i><tt>sourceObject</tt></i> will be passed out in the various calls
--   to accept to identify this particular source, which is useful if
--   you're listening on multiple addresses and do different things
--   depending on what address is connected to.
--   
--   If successful and <i><tt>effectiveAddress</tt></i> is
--   non-<a>Nothing</a> then it will be set to the address that the binding
--   actually occurred at. This is helpful for determining the port number
--   that was used for when requesting a binding to port 0 (ie: "any
--   port"). This address, if requested, belongs to the caller and must be
--   freed.
--   
--   Call <a>socketListenerClose</a> to stop listening on
--   <i><tt>address</tt></i>; this will not be done automatically when you
--   drop your final reference to <i><tt>listener</tt></i>, as references
--   may be held internally.
--   
--   <i>Since: 2.22</i>
socketListenerAddAddress :: (HasCallStack, MonadIO m, IsSocketListener a, IsSocketAddress b, IsObject c) => a -> b -> SocketType -> SocketProtocol -> Maybe c -> m SocketAddress

-- | Listens for TCP connections on any available port number for both IPv6
--   and IPv4 (if each is available).
--   
--   This is useful if you need to have a socket for incoming connections
--   but don't care about the specific port number.
--   
--   If possible, the <a>SocketListener</a> will listen on both IPv4 and
--   IPv6 (listening on the same port on both). If listening on one of the
--   socket families fails, the <a>SocketListener</a> will only listen on
--   the other. If listening on both fails, an error will be returned.
--   
--   If you need to distinguish whether listening on IPv4 or IPv6 or both
--   was successful, connect to <a>SocketListener::event</a>.
--   
--   <i><tt>sourceObject</tt></i> will be passed out in the various calls
--   to accept to identify this particular source, which is useful if
--   you're listening on multiple addresses and do different things
--   depending on what address is connected to.
--   
--   <i>Since: 2.24</i>
socketListenerAddAnyInetPort :: (HasCallStack, MonadIO m, IsSocketListener a, IsObject b) => a -> Maybe b -> m Word16

-- | Helper function for <a>socketListenerAddAddress</a> that creates a
--   TCP/IP socket listening on IPv4 and IPv6 (if supported) on the
--   specified port on all interfaces.
--   
--   If possible, the <a>SocketListener</a> will listen on both IPv4 and
--   IPv6 (listening on the same port on both). If listening on one of the
--   socket families fails, the <a>SocketListener</a> will only listen on
--   the other. If listening on both fails, an error will be returned.
--   
--   If you need to distinguish whether listening on IPv4 or IPv6 or both
--   was successful, connect to <a>SocketListener::event</a>.
--   
--   <i><tt>sourceObject</tt></i> will be passed out in the various calls
--   to accept to identify this particular source, which is useful if
--   you're listening on multiple addresses and do different things
--   depending on what address is connected to.
--   
--   Call <a>socketListenerClose</a> to stop listening on
--   <i><tt>port</tt></i>; this will not be done automatically when you
--   drop your final reference to <i><tt>listener</tt></i>, as references
--   may be held internally.
--   
--   <i>Since: 2.22</i>
socketListenerAddInetPort :: (HasCallStack, MonadIO m, IsSocketListener a, IsObject b) => a -> Word16 -> Maybe b -> m ()

-- | Adds <i><tt>socket</tt></i> to the set of sockets that we try to
--   accept new clients from. The socket must be bound to a local address
--   and listened to.
--   
--   For parallel calls to <a>SocketListener</a> methods to work, the
--   socket must be in non-blocking mode. (See <a>Socket:blocking</a>.)
--   
--   <i><tt>sourceObject</tt></i> will be passed out in the various calls
--   to accept to identify this particular source, which is useful if
--   you're listening on multiple addresses and do different things
--   depending on what address is connected to.
--   
--   The <i><tt>socket</tt></i> will not be automatically closed when the
--   <i><tt>listener</tt></i> is finalized unless the listener held the
--   final reference to the socket. Before GLib 2.42, the
--   <i><tt>socket</tt></i> was automatically closed on finalization of the
--   <i><tt>listener</tt></i>, even if references to it were held
--   elsewhere.
--   
--   <i>Since: 2.22</i>
socketListenerAddSocket :: (HasCallStack, MonadIO m, IsSocketListener a, IsSocket b, IsObject c) => a -> b -> Maybe c -> m ()

-- | Closes all the sockets in the listener.
--   
--   <i>Since: 2.22</i>
socketListenerClose :: (HasCallStack, MonadIO m, IsSocketListener a) => a -> m ()

-- | Creates a new <a>SocketListener</a> with no sockets to listen for. New
--   listeners can be added with e.g. <a>socketListenerAddAddress</a> or
--   <a>socketListenerAddInetPort</a>.
--   
--   <i>Since: 2.22</i>
socketListenerNew :: (HasCallStack, MonadIO m) => m SocketListener

-- | Sets the listen backlog on the sockets in the listener. This must be
--   called before adding any sockets, addresses or ports to the
--   <a>SocketListener</a> (for example, by calling
--   <a>socketListenerAddInetPort</a>) to be effective.
--   
--   See <a>socketSetListenBacklog</a> for details
--   
--   <i>Since: 2.22</i>
socketListenerSetBacklog :: (HasCallStack, MonadIO m, IsSocketListener a) => a -> Int32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>listen-backlog</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructSocketListenerListenBacklog :: (IsSocketListener o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>listen-backlog</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketListener #listenBacklog
--   </pre>
getSocketListenerListenBacklog :: (MonadIO m, IsSocketListener o) => o -> m Int32

-- | Set the value of the “<tt>listen-backlog</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketListener [ #listenBacklog <a>:=</a> value ]
--   </pre>
setSocketListenerListenBacklog :: (MonadIO m, IsSocketListener o) => o -> Int32 -> m ()

-- | Emitted when <i><tt>listener</tt></i>'s activity on
--   <i><tt>socket</tt></i> changes state. Note that when
--   <i><tt>listener</tt></i> is used to listen on both IPv4 and IPv6, a
--   separate set of signals will be emitted for each, and the order they
--   happen in is undefined.
--   
--   <i>Since: 2.46</i>
type SocketListenerEventCallback = SocketListenerEvent -> Socket -> IO ()

-- | Connect a signal handler for the <a>event</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> socketListener #event callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSocketListenerEvent :: (IsSocketListener a, MonadIO m) => a -> ((?self :: a) => SocketListenerEventCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>event</a> signal, to be run before
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>on</a> socketListener #event callback
--   </pre>
onSocketListenerEvent :: (IsSocketListener a, MonadIO m) => a -> ((?self :: a) => SocketListenerEventCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.SocketListener.SocketListener
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketListener.SocketListener
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketListener.SocketListener
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SocketListener.SocketListener)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SocketListener.SocketListener o) => GI.Gio.Objects.SocketListener.IsSocketListener o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SocketListener.SocketListener
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SocketListener.SocketListener


-- | <tt>GSocketConnection</tt> is a <a>IOStream</a> for a connected
--   socket. They can be created either by <a>SocketClient</a> when
--   connecting to a host, or by <a>SocketListener</a> when accepting a new
--   client.
--   
--   The type of the <tt>GSocketConnection</tt> object returned from these
--   calls depends on the type of the underlying socket that is in use. For
--   instance, for a TCP/IP connection it will be a <a>TcpConnection</a>.
--   
--   Choosing what type of object to construct is done with the socket
--   connection factory, and it is possible for third parties to register
--   custom socket connection types for specific combination of socket
--   family/type/protocol using <a>socketConnectionFactoryRegisterType</a>.
--   
--   To close a <tt>GSocketConnection</tt>, use <a>iOStreamClose</a>.
--   Closing both substreams of the <a>IOStream</a> separately will not
--   close the underlying <a>Socket</a>.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.SocketConnection

-- | Memory-managed wrapper type.
newtype SocketConnection
SocketConnection :: ManagedPtr SocketConnection -> SocketConnection

-- | Type class for types which can be safely cast to
--   <a>SocketConnection</a>, for instance with <a>toSocketConnection</a>.
class (GObject o, IsDescendantOf SocketConnection o) => IsSocketConnection o

-- | Cast to <a>SocketConnection</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toSocketConnection :: (MonadIO m, IsSocketConnection o) => o -> m SocketConnection

-- | Connect <i><tt>connection</tt></i> to the specified remote address.
--   
--   <i>Since: 2.32</i>
socketConnectionConnect :: (HasCallStack, MonadIO m, IsSocketConnection a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe c -> m ()

-- | Asynchronously connect <i><tt>connection</tt></i> to the specified
--   remote address.
--   
--   This clears the <a>Socket:blocking</a> flag on
--   <i><tt>connection</tt></i>'s underlying socket if it is currently set.
--   
--   If <a>Socket:timeout</a> is set, the operation will time out and
--   return <a>IOErrorEnumTimedOut</a> after that period. Otherwise, it
--   will continue indefinitely until operating system timeouts (if any)
--   are hit.
--   
--   Use <a>socketConnectionConnectFinish</a> to retrieve the result.
--   
--   <i>Since: 2.32</i>
socketConnectionConnectAsync :: (HasCallStack, MonadIO m, IsSocketConnection a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Gets the result of a <a>socketConnectionConnectAsync</a> call.
--   
--   <i>Since: 2.32</i>
socketConnectionConnectFinish :: (HasCallStack, MonadIO m, IsSocketConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Looks up the <a>GType</a> to be used when creating socket connections
--   on sockets with the specified <i><tt>family</tt></i>,
--   <i><tt>type</tt></i> and <i><tt>protocolId</tt></i>.
--   
--   If no type is registered, the <a>SocketConnection</a> base type is
--   returned.
--   
--   <i>Since: 2.22</i>
socketConnectionFactoryLookupType :: (HasCallStack, MonadIO m) => SocketFamily -> SocketType -> Int32 -> m GType

-- | Looks up the <a>GType</a> to be used when creating socket connections
--   on sockets with the specified <i><tt>family</tt></i>,
--   <i><tt>type</tt></i> and <i><tt>protocol</tt></i>.
--   
--   If no type is registered, the <a>SocketConnection</a> base type is
--   returned.
--   
--   <i>Since: 2.22</i>
socketConnectionFactoryRegisterType :: (HasCallStack, MonadIO m) => GType -> SocketFamily -> SocketType -> Int32 -> m ()

-- | Try to get the local address of a socket connection.
--   
--   <i>Since: 2.22</i>
socketConnectionGetLocalAddress :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m SocketAddress

-- | Try to get the remote address of a socket connection.
--   
--   Since GLib 2.40, when used with <a>socketClientConnect</a> or
--   <a>socketClientConnectAsync</a>, during emission of
--   <a>SocketClientEventConnecting</a>, this function will return the
--   remote address that will be used for the connection. This allows
--   applications to print e.g. "Connecting to example.com
--   (10.42.77.3)...".
--   
--   <i>Since: 2.22</i>
socketConnectionGetRemoteAddress :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m SocketAddress

-- | Gets the underlying <a>Socket</a> object of the connection. This can
--   be useful if you want to do something unusual on it not supported by
--   the <a>SocketConnection</a> APIs.
--   
--   <i>Since: 2.22</i>
socketConnectionGetSocket :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m Socket

-- | Checks if <i><tt>connection</tt></i> is connected. This is equivalent
--   to calling <a>socketIsConnected</a> on <i><tt>connection</tt></i>'s
--   underlying <a>Socket</a>.
--   
--   <i>Since: 2.32</i>
socketConnectionIsConnected :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>socket</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketConnectionSocket :: (IsSocketConnection o, MonadIO m, IsSocket a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>socket</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketConnection #socket
--   </pre>
getSocketConnectionSocket :: (MonadIO m, IsSocketConnection o) => o -> m Socket
instance GHC.Classes.Eq GI.Gio.Objects.SocketConnection.SocketConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketConnection.SocketConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketConnection.SocketConnection
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SocketConnection.SocketConnection)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SocketConnection.SocketConnection o) => GI.Gio.Objects.SocketConnection.IsSocketConnection o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SocketConnection.SocketConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SocketConnection.SocketConnection


-- | <tt>GSocketClient</tt> is a lightweight high-level utility class for
--   connecting to a network host using a connection oriented socket type.
--   
--   You create a <tt>GSocketClient</tt> object, set any options you want,
--   and then call a sync or async connect operation, which returns a
--   <a>SocketConnection</a> subclass on success.
--   
--   The type of the <a>SocketConnection</a> object returned depends on the
--   type of the underlying socket that is in use. For instance, for a
--   TCP/IP connection it will be a <a>TcpConnection</a>.
--   
--   As <tt>GSocketClient</tt> is a lightweight object, you don't need to
--   cache it. You can just create a new one any time you need one.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.SocketClient

-- | Memory-managed wrapper type.
newtype SocketClient
SocketClient :: ManagedPtr SocketClient -> SocketClient

-- | Type class for types which can be safely cast to <a>SocketClient</a>,
--   for instance with <a>toSocketClient</a>.
class (GObject o, IsDescendantOf SocketClient o) => IsSocketClient o

-- | Cast to <a>SocketClient</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toSocketClient :: (MonadIO m, IsSocketClient o) => o -> m SocketClient

-- | Enable proxy protocols to be handled by the application. When the
--   indicated proxy protocol is returned by the <a>ProxyResolver</a>,
--   <a>SocketClient</a> will consider this protocol as supported but will
--   not try to find a <a>Proxy</a> instance to handle handshaking. The
--   application must check for this case by calling
--   <a>socketConnectionGetRemoteAddress</a> on the returned
--   <a>SocketConnection</a>, and seeing if it's a <a>ProxyAddress</a> of
--   the appropriate type, to determine whether or not it needs to handle
--   the proxy handshaking itself.
--   
--   This should be used for proxy protocols that are dialects of another
--   protocol such as HTTP proxy. It also allows cohabitation of proxy
--   protocols that are reused between protocols. A good example is HTTP.
--   It can be used to proxy HTTP, FTP and Gopher and can also be use as
--   generic socket proxy through the HTTP CONNECT method.
--   
--   When the proxy is detected as being an application proxy, TLS
--   handshake will be skipped. This is required to let the application do
--   the proxy specific handshake.
socketClientAddApplicationProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Text -> m ()

-- | Tries to resolve the <i><tt>connectable</tt></i> and make a network
--   connection to it.
--   
--   Upon a successful connection, a new <a>SocketConnection</a> is
--   constructed and returned. The caller owns this new object and must
--   drop their reference to it when finished with it.
--   
--   The type of the <a>SocketConnection</a> object returned depends on the
--   type of the underlying socket that is used. For instance, for a TCP/IP
--   connection it will be a <a>TcpConnection</a>.
--   
--   The socket created will be the same family as the address that the
--   <i><tt>connectable</tt></i> resolves to, unless family is set with
--   <a>socketClientSetFamily</a> or indirectly via
--   <a>socketClientSetLocalAddress</a>. The socket type defaults to
--   <a>SocketTypeStream</a> but can be set with
--   <a>socketClientSetSocketType</a>.
--   
--   If a local address is specified with
--   <a>socketClientSetLocalAddress</a> the socket will be bound to this
--   address before connecting.
--   
--   <i>Since: 2.22</i>
socketClientConnect :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> m SocketConnection

-- | This is the asynchronous version of <a>socketClientConnect</a>.
--   
--   You may wish to prefer the asynchronous version even in synchronous
--   command line programs because, since 2.60, it implements <a>RFC
--   8305</a> "Happy Eyeballs" recommendations to work around long
--   connection timeouts in networks where IPv6 is broken by performing an
--   IPv4 connection simultaneously without waiting for IPv6 to time out,
--   which is not supported by the synchronous call. (This is not an API
--   guarantee, and may change in the future.)
--   
--   When the operation is finished <i><tt>callback</tt></i> will be
--   called. You can then call <a>socketClientConnectFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
socketClientConnectAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async connect operation. See
--   <a>socketClientConnectAsync</a>
--   
--   <i>Since: 2.22</i>
socketClientConnectFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection

-- | This is a helper function for <a>socketClientConnect</a>.
--   
--   Attempts to create a TCP connection to the named host.
--   
--   <i><tt>hostAndPort</tt></i> may be in any of a number of recognized
--   formats; an IPv6 address, an IPv4 address, or a domain name (in which
--   case a DNS lookup is performed). Quoting with [] is supported for all
--   address types. A port override may be specified in the usual way with
--   a colon. Ports may be given as decimal numbers or symbolic names (in
--   which case an /etc/services lookup is performed).
--   
--   If no port override is given in <i><tt>hostAndPort</tt></i> then
--   <i><tt>defaultPort</tt></i> will be used as the port number to connect
--   to.
--   
--   In general, <i><tt>hostAndPort</tt></i> is expected to be provided by
--   the user (allowing them to give the hostname, and a port override if
--   necessary) and <i><tt>defaultPort</tt></i> is expected to be provided
--   by the application.
--   
--   In the case that an IP address is given, a single connection attempt
--   is made. In the case that a name is given, multiple connection
--   attempts may be made, in turn and according to the number of address
--   records in DNS, until a connection succeeds.
--   
--   Upon a successful connection, a new <a>SocketConnection</a> is
--   constructed and returned. The caller owns this new object and must
--   drop their reference to it when finished with it.
--   
--   In the event of any failure (DNS error, service not found, no hosts
--   connectable) <a>Nothing</a> is returned and <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) is set accordingly.
--   
--   <i>Since: 2.22</i>
socketClientConnectToHost :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> m SocketConnection

-- | This is the asynchronous version of <a>socketClientConnectToHost</a>.
--   
--   When the operation is finished <i><tt>callback</tt></i> will be
--   called. You can then call <a>socketClientConnectToHostFinish</a> to
--   get the result of the operation.
--   
--   <i>Since: 2.22</i>
socketClientConnectToHostAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async connect operation. See
--   <a>socketClientConnectToHostAsync</a>
--   
--   <i>Since: 2.22</i>
socketClientConnectToHostFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection

-- | Attempts to create a TCP connection to a service.
--   
--   This call looks up the SRV record for <i><tt>service</tt></i> at
--   <i><tt>domain</tt></i> for the "tcp" protocol. It then attempts to
--   connect, in turn, to each of the hosts providing the service until
--   either a connection succeeds or there are no hosts remaining.
--   
--   Upon a successful connection, a new <a>SocketConnection</a> is
--   constructed and returned. The caller owns this new object and must
--   drop their reference to it when finished with it.
--   
--   In the event of any failure (DNS error, service not found, no hosts
--   connectable) <a>Nothing</a> is returned and <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) is set accordingly.
socketClientConnectToService :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Text -> Maybe b -> m SocketConnection

-- | This is the asynchronous version of
--   <a>socketClientConnectToService</a>.
--   
--   <i>Since: 2.22</i>
socketClientConnectToServiceAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async connect operation. See
--   <a>socketClientConnectToServiceAsync</a>
--   
--   <i>Since: 2.22</i>
socketClientConnectToServiceFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection

-- | This is a helper function for <a>socketClientConnect</a>.
--   
--   Attempts to create a TCP connection with a network URI.
--   
--   <i><tt>uri</tt></i> may be any valid URI containing an "authority"
--   (hostname/port) component. If a port is not specified in the URI,
--   <i><tt>defaultPort</tt></i> will be used. TLS will be negotiated if
--   <a>SocketClient:tls</a> is <a>True</a>. (t<a>SocketClient</a> does not
--   know to automatically assume TLS for certain URI schemes.)
--   
--   Using this rather than <a>socketClientConnect</a> or
--   <a>socketClientConnectToHost</a> allows <a>SocketClient</a> to
--   determine when to use application-specific proxy protocols.
--   
--   Upon a successful connection, a new <a>SocketConnection</a> is
--   constructed and returned. The caller owns this new object and must
--   drop their reference to it when finished with it.
--   
--   In the event of any failure (DNS error, service not found, no hosts
--   connectable) <a>Nothing</a> is returned and <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) is set accordingly.
--   
--   <i>Since: 2.26</i>
socketClientConnectToUri :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> m SocketConnection

-- | This is the asynchronous version of <a>socketClientConnectToUri</a>.
--   
--   When the operation is finished <i><tt>callback</tt></i> will be
--   called. You can then call <a>socketClientConnectToUriFinish</a> to get
--   the result of the operation.
--   
--   <i>Since: 2.26</i>
socketClientConnectToUriAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async connect operation. See
--   <a>socketClientConnectToUriAsync</a>
--   
--   <i>Since: 2.26</i>
socketClientConnectToUriFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection

-- | Gets the proxy enable state; see <a>socketClientSetEnableProxy</a>
--   
--   <i>Since: 2.26</i>
socketClientGetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool

-- | Gets the socket family of the socket client.
--   
--   See <a>socketClientSetFamily</a> for details.
--   
--   <i>Since: 2.22</i>
socketClientGetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketFamily

-- | Gets the local address of the socket client.
--   
--   See <a>socketClientSetLocalAddress</a> for details.
--   
--   <i>Since: 2.22</i>
socketClientGetLocalAddress :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m (Maybe SocketAddress)

-- | Gets the protocol name type of the socket client.
--   
--   See <a>socketClientSetProtocol</a> for details.
--   
--   <i>Since: 2.22</i>
socketClientGetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketProtocol

-- | Gets the <a>ProxyResolver</a> being used by <i><tt>client</tt></i>.
--   Normally, this will be the resolver returned by
--   <a>proxyResolverGetDefault</a>, but you can override it with
--   <a>socketClientSetProxyResolver</a>.
--   
--   <i>Since: 2.36</i>
socketClientGetProxyResolver :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m ProxyResolver

-- | Gets the socket type of the socket client.
--   
--   See <a>socketClientSetSocketType</a> for details.
--   
--   <i>Since: 2.22</i>
socketClientGetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketType

-- | Gets the I/O timeout time for sockets created by
--   <i><tt>client</tt></i>.
--   
--   See <a>socketClientSetTimeout</a> for details.
--   
--   <i>Since: 2.26</i>
socketClientGetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Word32

-- | Gets whether <i><tt>client</tt></i> creates TLS connections. See
--   <a>socketClientSetTls</a> for details.
--   
--   <i>Since: 2.28</i>
socketClientGetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool

-- | Gets the TLS validation flags used creating TLS connections via
--   <i><tt>client</tt></i>.
--   
--   This function does not work as originally designed and is impossible
--   to use correctly. See <a>SocketClient:tlsValidationFlags</a> for more
--   information.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.72)Do not attempt to ignore validation
--   errors.</i>
socketClientGetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m [TlsCertificateFlags]

-- | Creates a new <a>SocketClient</a> with the default options.
--   
--   <i>Since: 2.22</i>
socketClientNew :: (HasCallStack, MonadIO m) => m SocketClient

-- | Sets whether or not <i><tt>client</tt></i> attempts to make
--   connections via a proxy server. When enabled (the default),
--   <a>SocketClient</a> will use a <a>ProxyResolver</a> to determine if a
--   proxy protocol such as SOCKS is needed, and automatically do the
--   necessary proxy negotiation.
--   
--   See also <a>socketClientSetProxyResolver</a>.
--   
--   <i>Since: 2.26</i>
socketClientSetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()

-- | Sets the socket family of the socket client. If this is set to
--   something other than <a>SocketFamilyInvalid</a> then the sockets
--   created by this object will be of the specified family.
--   
--   This might be useful for instance if you want to force the local
--   connection to be an ipv4 socket, even though the address might be an
--   ipv6 mapped to ipv4 address.
--   
--   <i>Since: 2.22</i>
socketClientSetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketFamily -> m ()

-- | Sets the local address of the socket client. The sockets created by
--   this object will bound to the specified address (if not
--   <a>Nothing</a>) before connecting.
--   
--   This is useful if you want to ensure that the local side of the
--   connection is on a specific port, or on a specific interface.
--   
--   <i>Since: 2.22</i>
socketClientSetLocalAddress :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketAddress b) => a -> Maybe b -> m ()

-- | Sets the protocol of the socket client. The sockets created by this
--   object will use of the specified protocol.
--   
--   If <i><tt>protocol</tt></i> is <a>SocketProtocolDefault</a> that means
--   to use the default protocol for the socket family and type.
--   
--   <i>Since: 2.22</i>
socketClientSetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketProtocol -> m ()

-- | Overrides the <a>ProxyResolver</a> used by <i><tt>client</tt></i>. You
--   can call this if you want to use specific proxies, rather than using
--   the system default proxy settings.
--   
--   Note that whether or not the proxy resolver is actually used depends
--   on the setting of <a>SocketClient:enableProxy</a>, which is not
--   changed by this function (but which is <a>True</a> by default)
--   
--   <i>Since: 2.36</i>
socketClientSetProxyResolver :: (HasCallStack, MonadIO m, IsSocketClient a, IsProxyResolver b) => a -> Maybe b -> m ()

-- | Sets the socket type of the socket client. The sockets created by this
--   object will be of the specified type.
--   
--   It doesn't make sense to specify a type of <a>SocketTypeDatagram</a>,
--   as GSocketClient is used for connection oriented services.
--   
--   <i>Since: 2.22</i>
socketClientSetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketType -> m ()

-- | Sets the I/O timeout for sockets created by <i><tt>client</tt></i>.
--   <i><tt>timeout</tt></i> is a time in seconds, or 0 for no timeout (the
--   default).
--   
--   The timeout value affects the initial connection attempt as well, so
--   setting this may cause calls to <a>socketClientConnect</a>, etc, to
--   fail with <a>IOErrorEnumTimedOut</a>.
--   
--   <i>Since: 2.26</i>
socketClientSetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Word32 -> m ()

-- | Sets whether <i><tt>client</tt></i> creates TLS (aka SSL) connections.
--   If <i><tt>tls</tt></i> is <a>True</a>, <i><tt>client</tt></i> will
--   wrap its connections in a <a>TlsClientConnection</a> and perform a TLS
--   handshake when connecting.
--   
--   Note that since <a>SocketClient</a> must return a
--   <a>SocketConnection</a>, but <a>TlsClientConnection</a> is not a
--   <a>SocketConnection</a>, this actually wraps the resulting
--   <a>TlsClientConnection</a> in a <a>TcpWrapperConnection</a> when
--   returning it. You can use <a>tcpWrapperConnectionGetBaseIoStream</a>
--   on the return value to extract the <a>TlsClientConnection</a>.
--   
--   If you need to modify the behavior of the TLS handshake (eg, by
--   setting a client-side certificate to use, or connecting to the
--   <a>TlsConnection::acceptCertificate</a> signal), you can connect to
--   <i><tt>client</tt></i>'s <a>SocketClient::event</a> signal and wait
--   for it to be emitted with <a>SocketClientEventTlsHandshaking</a>,
--   which will give you a chance to see the <a>TlsClientConnection</a>
--   before the handshake starts.
--   
--   <i>Since: 2.28</i>
socketClientSetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()

-- | Sets the TLS validation flags used when creating TLS connections via
--   <i><tt>client</tt></i>. The default value is
--   <a>TlsCertificateFlagsValidateAll</a>.
--   
--   This function does not work as originally designed and is impossible
--   to use correctly. See <a>SocketClient:tlsValidationFlags</a> for more
--   information.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.72)Do not attempt to ignore validation
--   errors.</i>
socketClientSetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> [TlsCertificateFlags] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>enable-proxy</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructSocketClientEnableProxy :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>enable-proxy</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #enableProxy
--   </pre>
getSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> m Bool

-- | Set the value of the “<tt>enable-proxy</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #enableProxy <a>:=</a> value ]
--   </pre>
setSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>family</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketClientFamily :: (IsSocketClient o, MonadIO m) => SocketFamily -> m (GValueConstruct o)

-- | Get the value of the “<tt>family</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #family
--   </pre>
getSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> m SocketFamily

-- | Set the value of the “<tt>family</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #family <a>:=</a> value ]
--   </pre>
setSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> SocketFamily -> m ()

-- | Set the value of the “<tt>local-address</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #localAddress
--   </pre>
clearSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>local-address</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructSocketClientLocalAddress :: (IsSocketClient o, MonadIO m, IsSocketAddress a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>local-address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #localAddress
--   </pre>
getSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m (Maybe SocketAddress)

-- | Set the value of the “<tt>local-address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #localAddress <a>:=</a> value ]
--   </pre>
setSocketClientLocalAddress :: (MonadIO m, IsSocketClient o, IsSocketAddress a) => o -> a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>protocol</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructSocketClientProtocol :: (IsSocketClient o, MonadIO m) => SocketProtocol -> m (GValueConstruct o)

-- | Get the value of the “<tt>protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #protocol
--   </pre>
getSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> m SocketProtocol

-- | Set the value of the “<tt>protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #protocol <a>:=</a> value ]
--   </pre>
setSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> SocketProtocol -> m ()

-- | Set the value of the “<tt>proxy-resolver</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #proxyResolver
--   </pre>
clearSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>proxy-resolver</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructSocketClientProxyResolver :: (IsSocketClient o, MonadIO m, IsProxyResolver a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>proxy-resolver</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #proxyResolver
--   </pre>
getSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ProxyResolver

-- | Set the value of the “<tt>proxy-resolver</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #proxyResolver <a>:=</a> value ]
--   </pre>
setSocketClientProxyResolver :: (MonadIO m, IsSocketClient o, IsProxyResolver a) => o -> a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>timeout</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketClientTimeout :: (IsSocketClient o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #timeout
--   </pre>
getSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> m Word32

-- | Set the value of the “<tt>timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #timeout <a>:=</a> value ]
--   </pre>
setSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> Word32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>tls</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketClientTls :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>tls</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #tls
--   </pre>
getSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> m Bool

-- | Set the value of the “<tt>tls</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #tls <a>:=</a> value ]
--   </pre>
setSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>tls-validation-flags</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructSocketClientTlsValidationFlags :: (IsSocketClient o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>tls-validation-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #tlsValidationFlags
--   </pre>
getSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> m [TlsCertificateFlags]

-- | Set the value of the “<tt>tls-validation-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #tlsValidationFlags <a>:=</a> value ]
--   </pre>
setSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> [TlsCertificateFlags] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>type</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketClientType :: (IsSocketClient o, MonadIO m) => SocketType -> m (GValueConstruct o)

-- | Get the value of the “<tt>type</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketClient #type
--   </pre>
getSocketClientType :: (MonadIO m, IsSocketClient o) => o -> m SocketType

-- | Set the value of the “<tt>type</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socketClient [ #type <a>:=</a> value ]
--   </pre>
setSocketClientType :: (MonadIO m, IsSocketClient o) => o -> SocketType -> m ()

-- | Emitted when <i><tt>client</tt></i>'s activity on
--   <i><tt>connectable</tt></i> changes state. Among other things, this
--   can be used to provide progress information about a network connection
--   in the UI. The meanings of the different <i><tt>event</tt></i> values
--   are as follows:
--   
--   <ul>
--   <li><a>SocketClientEventResolving</a>: <i><tt>client</tt></i> is about
--   to look up <i><tt>connectable</tt></i> in DNS.
--   <i><tt>connection</tt></i> will be <a>Nothing</a>.</li>
--   <li><a>SocketClientEventResolved</a>: <i><tt>client</tt></i> has
--   successfully resolved <i><tt>connectable</tt></i> in DNS.
--   <i><tt>connection</tt></i> will be <a>Nothing</a>.</li>
--   <li><a>SocketClientEventConnecting</a>: <i><tt>client</tt></i> is
--   about to make a connection to a remote host; either a proxy server or
--   the destination server itself. <i><tt>connection</tt></i> is the
--   <a>SocketConnection</a>, which is not yet connected. Since GLib 2.40,
--   you can access the remote address via
--   <a>socketConnectionGetRemoteAddress</a>.</li>
--   <li><a>SocketClientEventConnected</a>: <i><tt>client</tt></i> has
--   successfully connected to a remote host. <i><tt>connection</tt></i> is
--   the connected <a>SocketConnection</a>.</li>
--   <li><a>SocketClientEventProxyNegotiating</a>: <i><tt>client</tt></i>
--   is about to negotiate with a proxy to get it to connect to
--   <i><tt>connectable</tt></i>. <i><tt>connection</tt></i> is the
--   <a>SocketConnection</a> to the proxy server.</li>
--   <li><a>SocketClientEventProxyNegotiated</a>: <i><tt>client</tt></i>
--   has negotiated a connection to <i><tt>connectable</tt></i> through a
--   proxy server. <i><tt>connection</tt></i> is the stream returned from
--   <a>proxyConnect</a>, which may or may not be a
--   <a>SocketConnection</a>.</li>
--   <li><a>SocketClientEventTlsHandshaking</a>: <i><tt>client</tt></i> is
--   about to begin a TLS handshake. <i><tt>connection</tt></i> is a
--   <a>TlsClientConnection</a>.</li>
--   <li><a>SocketClientEventTlsHandshaked</a>: <i><tt>client</tt></i> has
--   successfully completed the TLS handshake. <i><tt>connection</tt></i>
--   is a <a>TlsClientConnection</a>.</li>
--   <li><a>SocketClientEventComplete</a>: <i><tt>client</tt></i> has
--   either successfully connected to <i><tt>connectable</tt></i> (in which
--   case <i><tt>connection</tt></i> is the <a>SocketConnection</a> that it
--   will be returning to the caller) or has failed (in which case
--   <i><tt>connection</tt></i> is <a>Nothing</a> and the client is about
--   to return an error).</li>
--   </ul>
--   
--   Each event except <a>SocketClientEventComplete</a> may be emitted
--   multiple times (or not at all) for a given connectable (in particular,
--   if <i><tt>client</tt></i> ends up attempting to connect to more than
--   one address). However, if <i><tt>client</tt></i> emits the
--   <a>SocketClient::event</a> signal at all for a given connectable, then
--   it will always emit it with <a>SocketClientEventComplete</a> when it
--   is done.
--   
--   Note that there may be additional <a>SocketClientEvent</a> values in
--   the future; unrecognized <i><tt>event</tt></i> values should be
--   ignored.
--   
--   <i>Since: 2.32</i>
type SocketClientEventCallback = SocketClientEvent -> SocketConnectable -> Maybe IOStream -> IO ()

-- | Connect a signal handler for the <a>event</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> socketClient #event callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> ((?self :: a) => SocketClientEventCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>event</a> signal, to be run before
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>on</a> socketClient #event callback
--   </pre>
onSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> ((?self :: a) => SocketClientEventCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.SocketClient.SocketClient
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketClient.SocketClient
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketClient.SocketClient
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SocketClient.SocketClient)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SocketClient.SocketClient o) => GI.Gio.Objects.SocketClient.IsSocketClient o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SocketClient.SocketClient
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SocketClient.SocketClient


-- | <tt>GSocketAddressEnumerator</tt> is an enumerator type for
--   <a>SocketAddress</a> instances. It is returned by enumeration
--   functions such as <a>socketConnectableEnumerate</a>, which returns a
--   <tt>GSocketAddressEnumerator</tt> to list each <a>SocketAddress</a>
--   which could be used to connect to that <a>SocketConnectable</a>.
--   
--   Enumeration is typically a blocking operation, so the asynchronous
--   methods <a>socketAddressEnumeratorNextAsync</a> and
--   <a>socketAddressEnumeratorNextFinish</a> should be used where
--   possible.
--   
--   Each <tt>GSocketAddressEnumerator</tt> can only be enumerated once.
--   Once <a>socketAddressEnumeratorNext</a> has returned <tt>NULL</tt>,
--   further enumeration with that <tt>GSocketAddressEnumerator</tt> is not
--   possible, and it can be unreffed.
module GI.Gio.Objects.SocketAddressEnumerator

-- | Memory-managed wrapper type.
newtype SocketAddressEnumerator
SocketAddressEnumerator :: ManagedPtr SocketAddressEnumerator -> SocketAddressEnumerator

-- | Type class for types which can be safely cast to
--   <a>SocketAddressEnumerator</a>, for instance with
--   <a>toSocketAddressEnumerator</a>.
class (GObject o, IsDescendantOf SocketAddressEnumerator o) => IsSocketAddressEnumerator o

-- | Cast to <a>SocketAddressEnumerator</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toSocketAddressEnumerator :: (MonadIO m, IsSocketAddressEnumerator o) => o -> m SocketAddressEnumerator

-- | Retrieves the next <a>SocketAddress</a> from
--   <i><tt>enumerator</tt></i>. Note that this may block for some amount
--   of time. (Eg, a <a>NetworkAddress</a> may need to do a DNS lookup
--   before it can return an address.) Use
--   <a>socketAddressEnumeratorNextAsync</a> if you need to avoid blocking.
--   
--   If <i><tt>enumerator</tt></i> is expected to yield addresses, but for
--   some reason is unable to (eg, because of a DNS error), then the first
--   call to <a>socketAddressEnumeratorNext</a> will return an appropriate
--   error in <tt>*error</tt>. However, if the first call to
--   <a>socketAddressEnumeratorNext</a> succeeds, then any further internal
--   errors (other than <i><tt>cancellable</tt></i> being triggered) will
--   be ignored.
socketAddressEnumeratorNext :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => a -> Maybe b -> m (Maybe SocketAddress)

-- | Asynchronously retrieves the next <a>SocketAddress</a> from
--   <i><tt>enumerator</tt></i> and then calls <i><tt>callback</tt></i>,
--   which must call <a>socketAddressEnumeratorNextFinish</a> to get the
--   result.
--   
--   It is an error to call this multiple times before the previous
--   callback has finished.
socketAddressEnumeratorNextAsync :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Retrieves the result of a completed call to
--   <a>socketAddressEnumeratorNextAsync</a>. See
--   <a>socketAddressEnumeratorNext</a> for more information about error
--   handling.
socketAddressEnumeratorNextFinish :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsAsyncResult b) => a -> b -> m (Maybe SocketAddress)
instance GHC.Classes.Eq GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator o) => GI.Gio.Objects.SocketAddressEnumerator.IsSocketAddressEnumerator o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator


-- | <tt>GSocketAddress</tt> is the equivalent of <a>`struct sockaddr`</a>)
--   and its subtypes in the BSD sockets API. This is an abstract class;
--   use <a>InetSocketAddress</a> for internet sockets, or
--   <a>UnixSocketAddress</a> for UNIX domain sockets.
module GI.Gio.Objects.SocketAddress

-- | Memory-managed wrapper type.
newtype SocketAddress
SocketAddress :: ManagedPtr SocketAddress -> SocketAddress

-- | Type class for types which can be safely cast to <a>SocketAddress</a>,
--   for instance with <a>toSocketAddress</a>.
class (GObject o, IsDescendantOf SocketAddress o) => IsSocketAddress o

-- | Cast to <a>SocketAddress</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toSocketAddress :: (MonadIO m, IsSocketAddress o) => o -> m SocketAddress

-- | Gets the socket family type of <i><tt>address</tt></i>.
--   
--   <i>Since: 2.22</i>
socketAddressGetFamily :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> m SocketFamily

-- | Gets the size of <i><tt>address</tt></i>'s native struct sockaddr. You
--   can use this to allocate memory to pass to
--   <a>socketAddressToNative</a>.
--   
--   <i>Since: 2.22</i>
socketAddressGetNativeSize :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> m Int64

-- | Creates a <a>SocketAddress</a> subclass corresponding to the native
--   struct sockaddr <i><tt>native</tt></i>.
--   
--   <i>Since: 2.22</i>
socketAddressNewFromNative :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m SocketAddress

-- | Converts a <a>SocketAddress</a> to a native struct sockaddr, which can
--   be passed to low-level functions like <tt><i>connect()</i></tt> or
--   <tt><i>bind()</i></tt>.
--   
--   If not enough space is available, a <a>IOErrorEnumNoSpace</a> error is
--   returned. If the address type is not known on the system then a
--   <a>IOErrorEnumNotSupported</a> error is returned.
--   
--   <i>Since: 2.22</i>
socketAddressToNative :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> Ptr () -> CSize -> m ()

-- | Get the value of the “<tt>family</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socketAddress #family
--   </pre>
getSocketAddressFamily :: (MonadIO m, IsSocketAddress o) => o -> m SocketFamily
instance GHC.Classes.Eq GI.Gio.Objects.SocketAddress.SocketAddress
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketAddress.SocketAddress
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketAddress.SocketAddress
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SocketAddress.SocketAddress)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SocketAddress.SocketAddress o) => GI.Gio.Objects.SocketAddress.IsSocketAddress o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SocketAddress.SocketAddress
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SocketAddress.SocketAddress


-- | A <tt>GSocket</tt> is a low-level networking primitive. It is a more
--   or less direct mapping of the BSD socket API in a portable GObject
--   based API. It supports both the UNIX socket implementations and
--   winsock2 on Windows.
--   
--   <tt>GSocket</tt> is the platform independent base upon which the
--   higher level network primitives are based. Applications are not
--   typically meant to use it directly, but rather through classes like
--   <a>SocketClient</a>, <a>SocketService</a> and <a>SocketConnection</a>.
--   However there may be cases where direct use of <tt>GSocket</tt> is
--   useful.
--   
--   <tt>GSocket</tt> implements the <a>Initable</a> interface, so if it is
--   manually constructed by e.g. <a>Object</a>.<tt><i>new</i></tt>() you
--   must call <a>initableInit</a> and check the results before using the
--   object. This is done automatically in <a>socketNew</a> and
--   <a>socketNewFromFd</a>, so these functions can return <tt>NULL</tt>.
--   
--   Sockets operate in two general modes, blocking or non-blocking. When
--   in blocking mode all operations (which don’t take an explicit blocking
--   parameter) block until the requested operation is finished or there is
--   an error. In non-blocking mode all calls that would block return
--   immediately with a <tt>G_IO_ERROR_WOULD_BLOCK</tt> error. To know when
--   a call would successfully run you can call
--   <a>socketConditionCheck</a>, or <a>socketConditionWait</a>. You can
--   also use <a>Socket</a>.<tt><i>create_source</i></tt>() and attach it
--   to a [type<i><tt>gLib</tt></i>.MainContext] to get callbacks when I/O
--   is possible. Note that all sockets are always set to non blocking mode
--   in the system, and blocking mode is emulated in <tt>GSocket</tt>.
--   
--   When working in non-blocking mode applications should always be able
--   to handle getting a <tt>G_IO_ERROR_WOULD_BLOCK</tt> error even when
--   some other function said that I/O was possible. This can easily happen
--   in case of a race condition in the application, but it can also happen
--   for other reasons. For instance, on Windows a socket is always seen as
--   writable until a write returns <tt>G_IO_ERROR_WOULD_BLOCK</tt>.
--   
--   <tt>GSocket</tt>s can be either connection oriented or datagram based.
--   For connection oriented types you must first establish a connection by
--   either connecting to an address or accepting a connection from another
--   address. For connectionless socket types the target/source address is
--   specified or received in each I/O operation.
--   
--   All socket file descriptors are set to be close-on-exec.
--   
--   Note that creating a <tt>GSocket</tt> causes the signal
--   <tt>SIGPIPE</tt> to be ignored for the remainder of the program. If
--   you are writing a command-line utility that uses <tt>GSocket</tt>, you
--   may need to take into account the fact that your program will not
--   automatically be killed if it tries to write to <tt>stdout</tt> after
--   it has been closed.
--   
--   Like most other APIs in GLib, <tt>GSocket</tt> is not inherently
--   thread safe. To use a <tt>GSocket</tt> concurrently from multiple
--   threads, you must implement your own locking.
--   
--   <h2>Nagle’s algorithm</h2>
--   
--   Since GLib 2.80, <tt>GSocket</tt> will automatically set the
--   <tt>TCP_NODELAY</tt> option on all <tt>G_SOCKET_TYPE_STREAM</tt>
--   sockets. This disables <a>Nagle’s algorithm</a> as it typically does
--   more harm than good on modern networks.
--   
--   If your application needs Nagle’s algorithm enabled, call
--   <a>socketSetOption</a> after constructing a <tt>GSocket</tt> to enable
--   it:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   socket = g_socket_new (…, G_SOCKET_TYPE_STREAM, …);
--   if (socket != NULL)
--     {
--       g_socket_set_option (socket, IPPROTO_TCP, TCP_NODELAY, FALSE, &amp;local_error);
--       // handle error if needed
--     }
--   </pre>
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.Socket

-- | Memory-managed wrapper type.
newtype Socket
Socket :: ManagedPtr Socket -> Socket

-- | Type class for types which can be safely cast to <a>Socket</a>, for
--   instance with <a>toSocket</a>.
class (GObject o, IsDescendantOf Socket o) => IsSocket o

-- | Cast to <a>Socket</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toSocket :: (MonadIO m, IsSocket o) => o -> m Socket

-- | Accept incoming connections on a connection-based socket. This removes
--   the first outstanding connection request from the listening socket and
--   creates a <a>Socket</a> object for it.
--   
--   The <i><tt>socket</tt></i> must be bound to a local address with
--   <a>socketBind</a> and must be listening for incoming connections
--   (<a>socketListen</a>).
--   
--   If there are no outstanding connections then the operation will block
--   or return <a>IOErrorEnumWouldBlock</a> if non-blocking I/O is enabled.
--   To be notified of an incoming connection, wait for the
--   <a>IOConditionIn</a> condition.
--   
--   <i>Since: 2.22</i>
socketAccept :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> Maybe b -> m Socket

-- | When a socket is created it is attached to an address family, but it
--   doesn't have an address in this family. <a>socketBind</a> assigns the
--   address (sometimes called name) of the socket.
--   
--   It is generally required to bind to a local address before you can
--   receive connections. (See <a>socketListen</a> and <a>socketAccept</a>
--   ). In certain situations, you may also want to bind a socket that will
--   be used to initiate connections, though this is not normally required.
--   
--   If <i><tt>socket</tt></i> is a TCP socket, then
--   <i><tt>allowReuse</tt></i> controls the setting of the
--   <tt>SO_REUSEADDR</tt> socket option; normally it should be <a>True</a>
--   for server sockets (sockets that you will eventually call
--   <a>socketAccept</a> on), and <a>False</a> for client sockets. (Failing
--   to set this flag on a server socket may cause <a>socketBind</a> to
--   return <a>IOErrorEnumAddressInUse</a> if the server program is stopped
--   and then immediately restarted.)
--   
--   If <i><tt>socket</tt></i> is a UDP socket, then
--   <i><tt>allowReuse</tt></i> determines whether or not other UDP sockets
--   can be bound to the same address at the same time. In particular, you
--   can have several UDP sockets bound to the same address, and they will
--   all receive all of the multicast and broadcast packets sent to that
--   address. (The behavior of unicast UDP packets to an address with
--   multiple listeners is not defined.)
--   
--   <i>Since: 2.22</i>
socketBind :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b) => a -> b -> Bool -> m ()

-- | Checks and resets the pending connect error for the socket. This is
--   used to check for errors when <a>socketConnect</a> is used in
--   non-blocking mode.
--   
--   <i>Since: 2.22</i>
socketCheckConnectResult :: (HasCallStack, MonadIO m, IsSocket a) => a -> m ()

-- | Closes the socket, shutting down any active connection.
--   
--   Closing a socket does not wait for all outstanding I/O operations to
--   finish, so the caller should not rely on them to be guaranteed to
--   complete even if the close returns with no error.
--   
--   Once the socket is closed, all other operations will return
--   <a>IOErrorEnumClosed</a>. Closing a socket multiple times will not
--   return an error.
--   
--   Sockets will be automatically closed when the last reference is
--   dropped, but you might want to call this function to make sure
--   resources are released as early as possible.
--   
--   Beware that due to the way that TCP works, it is possible for
--   recently-sent data to be lost if either you close a socket while the
--   <a>IOConditionIn</a> condition is set, or else if the remote
--   connection tries to send something to you after you close the socket
--   but before it has finished reading all of the data you sent. There is
--   no easy generic way to avoid this problem; the easiest fix is to
--   design the network protocol such that the client will never send data
--   "out of turn". Another solution is for the server to half-close the
--   connection by calling <a>socketShutdown</a> with only the
--   <i><tt>shutdownWrite</tt></i> flag set, and then wait for the client
--   to notice this and close its side of the connection, after which the
--   server can safely call <a>socketClose</a>. (This is what
--   <a>TcpConnection</a> does if you call
--   <a>tcpConnectionSetGracefulDisconnect</a>. But of course, this only
--   works if the client will close its connection after the server does.)
--   
--   <i>Since: 2.22</i>
socketClose :: (HasCallStack, MonadIO m, IsSocket a) => a -> m ()

-- | Checks on the readiness of <i><tt>socket</tt></i> to perform
--   operations. The operations specified in <i><tt>condition</tt></i> are
--   checked for and masked against the currently-satisfied conditions on
--   <i><tt>socket</tt></i>. The result is returned.
--   
--   Note that on Windows, it is possible for an operation to return
--   <a>IOErrorEnumWouldBlock</a> even immediately after
--   <a>socketConditionCheck</a> has claimed that the socket is ready for
--   writing. Rather than calling <a>socketConditionCheck</a> and then
--   writing to the socket if it succeeds, it is generally better to simply
--   try writing to the socket right away, and try again later if the
--   initial attempt returns <a>IOErrorEnumWouldBlock</a>.
--   
--   It is meaningless to specify <a>IOConditionErr</a> or
--   <a>IOConditionHup</a> in condition; these conditions will always be
--   set in the output if they are true.
--   
--   This call never blocks.
--   
--   <i>Since: 2.22</i>
socketConditionCheck :: (HasCallStack, MonadIO m, IsSocket a) => a -> [IOCondition] -> m [IOCondition]

-- | Waits for up to <i><tt>timeoutUs</tt></i> microseconds for
--   <i><tt>condition</tt></i> to become true on <i><tt>socket</tt></i>. If
--   the condition is met, <a>True</a> is returned.
--   
--   If <i><tt>cancellable</tt></i> is cancelled before the condition is
--   met, or if <i><tt>timeoutUs</tt></i> (or the socket's
--   <a>Socket:timeout</a>) is reached before the condition is met, then
--   <a>False</a> is returned and <i><tt>error</tt></i>, if
--   non-<a>Nothing</a>, is set to the appropriate value
--   (<a>IOErrorEnumCancelled</a> or <a>IOErrorEnumTimedOut</a>).
--   
--   If you don't want a timeout, use <a>socketConditionWait</a>.
--   (Alternatively, you can pass -1 for <i><tt>timeoutUs</tt></i>.)
--   
--   Note that although <i><tt>timeoutUs</tt></i> is in microseconds for
--   consistency with other GLib APIs, this function actually only has
--   millisecond resolution, and the behavior is undefined if
--   <i><tt>timeoutUs</tt></i> is not an exact number of milliseconds.
--   
--   <i>Since: 2.32</i>
socketConditionTimedWait :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [IOCondition] -> Int64 -> Maybe b -> m ()

-- | Waits for <i><tt>condition</tt></i> to become true on
--   <i><tt>socket</tt></i>. When the condition is met, <a>True</a> is
--   returned.
--   
--   If <i><tt>cancellable</tt></i> is cancelled before the condition is
--   met, or if the socket has a timeout set and it is reached before the
--   condition is met, then <a>False</a> is returned and
--   <i><tt>error</tt></i>, if non-<a>Nothing</a>, is set to the
--   appropriate value (<a>IOErrorEnumCancelled</a> or
--   <a>IOErrorEnumTimedOut</a>).
--   
--   See also <a>socketConditionTimedWait</a>.
--   
--   <i>Since: 2.22</i>
socketConditionWait :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [IOCondition] -> Maybe b -> m ()

-- | Connect the socket to the specified remote address.
--   
--   For connection oriented socket this generally means we attempt to make
--   a connection to the <i><tt>address</tt></i>. For a connection-less
--   socket it sets the default address for <a>socketSend</a> and discards
--   all incoming datagrams from other sources.
--   
--   Generally connection oriented sockets can only connect once, but
--   connection-less sockets can connect multiple times to change the
--   default address.
--   
--   If the connect call needs to do network I/O it will block, unless
--   non-blocking I/O is enabled. Then <a>IOErrorEnumPending</a> is
--   returned and the user can be notified of the connection finishing by
--   waiting for the G_IO_OUT condition. The result of the connection must
--   then be checked with <a>socketCheckConnectResult</a>.
--   
--   <i>Since: 2.22</i>
socketConnect :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe c -> m ()

-- | Creates a <a>SocketConnection</a> subclass of the right type for
--   <i><tt>socket</tt></i>.
--   
--   <i>Since: 2.22</i>
socketConnectionFactoryCreateConnection :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketConnection

-- | Get the amount of data pending in the OS input buffer, without
--   blocking.
--   
--   If <i><tt>socket</tt></i> is a UDP or SCTP socket, this will return
--   the size of just the next packet, even if additional packets are
--   buffered after that one.
--   
--   Note that on Windows, this function is rather inefficient in the UDP
--   case, and so if you know any plausible upper bound on the size of the
--   incoming packet, it is better to just do a <a>socketReceive</a> with a
--   buffer of that size, rather than calling
--   <a>socketGetAvailableBytes</a> first and then doing a receive of
--   exactly the right size.
--   
--   <i>Since: 2.32</i>
socketGetAvailableBytes :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int64

-- | Gets the blocking mode of the socket. For details on blocking I/O, see
--   <a>socketSetBlocking</a>.
--   
--   <i>Since: 2.22</i>
socketGetBlocking :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool

-- | Gets the broadcast setting on <i><tt>socket</tt></i>; if <a>True</a>,
--   it is possible to send packets to broadcast addresses.
--   
--   <i>Since: 2.32</i>
socketGetBroadcast :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool

-- | Returns the credentials of the foreign process connected to this
--   socket, if any (e.g. it is only supported for <a>SocketFamilyUnix</a>
--   sockets).
--   
--   If this operation isn't supported on the OS, the method fails with the
--   <a>IOErrorEnumNotSupported</a> error. On Linux this is implemented by
--   reading the <tt><i>SO_PEERCRED</i></tt> option on the underlying
--   socket.
--   
--   This method can be expected to be available on the following
--   platforms:
--   
--   <ul>
--   <li>Linux since GLib 2.26</li>
--   <li>OpenBSD since GLib 2.30</li>
--   <li>Solaris, Illumos and OpenSolaris since GLib 2.40</li>
--   <li>NetBSD since GLib 2.42</li>
--   <li>macOS, tvOS, iOS since GLib 2.66</li>
--   </ul>
--   
--   Other ways to obtain credentials from a foreign peer includes the
--   <a>UnixCredentialsMessage</a> type and
--   <a>unixConnectionSendCredentials</a> /
--   <a>unixConnectionReceiveCredentials</a> functions.
--   
--   <i>Since: 2.26</i>
socketGetCredentials :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Credentials

-- | Gets the socket family of the socket.
--   
--   <i>Since: 2.22</i>
socketGetFamily :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketFamily

-- | Returns the underlying OS socket object. On unix this is a socket file
--   descriptor, and on Windows this is a Winsock2 SOCKET handle. This may
--   be useful for doing platform specific or otherwise unusual operations
--   on the socket.
--   
--   <i>Since: 2.22</i>
socketGetFd :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int32

-- | Gets the keepalive mode of the socket. For details on this, see
--   <a>socketSetKeepalive</a>.
--   
--   <i>Since: 2.22</i>
socketGetKeepalive :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool

-- | Gets the listen backlog setting of the socket. For details on this,
--   see <a>socketSetListenBacklog</a>.
--   
--   <i>Since: 2.22</i>
socketGetListenBacklog :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int32

-- | Try to get the local address of a bound socket. This is only useful if
--   the socket has been bound to a local address, either explicitly or
--   implicitly when connecting.
--   
--   <i>Since: 2.22</i>
socketGetLocalAddress :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketAddress

-- | Gets the multicast loopback setting on <i><tt>socket</tt></i>; if
--   <a>True</a> (the default), outgoing multicast packets will be looped
--   back to multicast listeners on the same host.
--   
--   <i>Since: 2.32</i>
socketGetMulticastLoopback :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool

-- | Gets the multicast time-to-live setting on <i><tt>socket</tt></i>; see
--   <a>socketSetMulticastTtl</a> for more details.
--   
--   <i>Since: 2.32</i>
socketGetMulticastTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32

-- | Gets the value of an integer-valued option on <i><tt>socket</tt></i>,
--   as with <tt><i>getsockopt()</i></tt>. (If you need to fetch a
--   non-integer-valued option, you will need to call
--   <tt><i>getsockopt()</i></tt> directly.)
--   
--   The <a>`&lt;gio/gnetworking.h&gt;`</a> header pulls in system headers
--   that will define most of the standard/portable socket options. For
--   unusual socket protocols or platform-dependent options, you may need
--   to include additional headers.
--   
--   Note that even for socket options that are a single byte in size,
--   <i><tt>value</tt></i> is still a pointer to a <tt><i>gint</i></tt>
--   variable, not a <tt><i>guchar</i></tt>; <a>socketGetOption</a> will
--   handle the conversion internally.
--   
--   <i>Since: 2.36</i>
socketGetOption :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> Int32 -> m Int32

-- | Gets the socket protocol id the socket was created with. In case the
--   protocol is unknown, -1 is returned.
--   
--   <i>Since: 2.22</i>
socketGetProtocol :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketProtocol

-- | Try to get the remote address of a connected socket. This is only
--   useful for connection oriented sockets that have been connected.
--   
--   <i>Since: 2.22</i>
socketGetRemoteAddress :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketAddress

-- | Gets the socket type of the socket.
--   
--   <i>Since: 2.22</i>
socketGetSocketType :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketType

-- | Gets the timeout setting of the socket. For details on this, see
--   <a>socketSetTimeout</a>.
--   
--   <i>Since: 2.26</i>
socketGetTimeout :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32

-- | Gets the unicast time-to-live setting on <i><tt>socket</tt></i>; see
--   <a>socketSetTtl</a> for more details.
--   
--   <i>Since: 2.32</i>
socketGetTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32

-- | Checks whether a socket is closed.
--   
--   <i>Since: 2.22</i>
socketIsClosed :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool

-- | Check whether the socket is connected. This is only useful for
--   connection-oriented sockets.
--   
--   If using <a>socketShutdown</a>, this function will return <a>True</a>
--   until the socket has been shut down for reading and writing. If you do
--   a non-blocking connect, this function will not return <a>True</a>
--   until after you call <a>socketCheckConnectResult</a>.
--   
--   <i>Since: 2.22</i>
socketIsConnected :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool

-- | Registers <i><tt>socket</tt></i> to receive multicast messages sent to
--   <i><tt>group</tt></i>. <i><tt>socket</tt></i> must be a
--   <a>SocketTypeDatagram</a> socket, and must have been bound to an
--   appropriate interface and port with <a>socketBind</a>.
--   
--   If <i><tt>iface</tt></i> is <a>Nothing</a>, the system will
--   automatically pick an interface to bind to based on
--   <i><tt>group</tt></i>.
--   
--   If <i><tt>sourceSpecific</tt></i> is <a>True</a>, source-specific
--   multicast as defined in RFC 4604 is used. Note that on older platforms
--   this may fail with a <a>IOErrorEnumNotSupported</a> error.
--   
--   To bind to a given source-specific multicast address, use
--   <a>socketJoinMulticastGroupSsm</a> instead.
--   
--   <i>Since: 2.32</i>
socketJoinMulticastGroup :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b) => a -> b -> Bool -> Maybe Text -> m ()

-- | Registers <i><tt>socket</tt></i> to receive multicast messages sent to
--   <i><tt>group</tt></i>. <i><tt>socket</tt></i> must be a
--   <a>SocketTypeDatagram</a> socket, and must have been bound to an
--   appropriate interface and port with <a>socketBind</a>.
--   
--   If <i><tt>iface</tt></i> is <a>Nothing</a>, the system will
--   automatically pick an interface to bind to based on
--   <i><tt>group</tt></i>.
--   
--   If <i><tt>sourceSpecific</tt></i> is not <a>Nothing</a>, use
--   source-specific multicast as defined in RFC 4604. Note that on older
--   platforms this may fail with a <a>IOErrorEnumNotSupported</a> error.
--   
--   Note that this function can be called multiple times for the same
--   <i><tt>group</tt></i> with different <i><tt>sourceSpecific</tt></i> in
--   order to receive multicast packets from more than one source.
--   
--   <i>Since: 2.56</i>
socketJoinMulticastGroupSsm :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b, IsInetAddress c) => a -> b -> Maybe c -> Maybe Text -> m ()

-- | Removes <i><tt>socket</tt></i> from the multicast group defined by
--   <i><tt>group</tt></i>, <i><tt>iface</tt></i>, and
--   <i><tt>sourceSpecific</tt></i> (which must all have the same values
--   they had when you joined the group).
--   
--   <i><tt>socket</tt></i> remains bound to its address and port, and can
--   still receive unicast messages after calling this.
--   
--   To unbind to a given source-specific multicast address, use
--   <a>socketLeaveMulticastGroupSsm</a> instead.
--   
--   <i>Since: 2.32</i>
socketLeaveMulticastGroup :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b) => a -> b -> Bool -> Maybe Text -> m ()

-- | Removes <i><tt>socket</tt></i> from the multicast group defined by
--   <i><tt>group</tt></i>, <i><tt>iface</tt></i>, and
--   <i><tt>sourceSpecific</tt></i> (which must all have the same values
--   they had when you joined the group).
--   
--   <i><tt>socket</tt></i> remains bound to its address and port, and can
--   still receive unicast messages after calling this.
--   
--   <i>Since: 2.56</i>
socketLeaveMulticastGroupSsm :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b, IsInetAddress c) => a -> b -> Maybe c -> Maybe Text -> m ()

-- | Marks the socket as a server socket, i.e. a socket that is used to
--   accept incoming requests using <a>socketAccept</a>.
--   
--   Before calling this the socket must be bound to a local address using
--   <a>socketBind</a>.
--   
--   To set the maximum amount of outstanding clients, use
--   <a>socketSetListenBacklog</a>.
--   
--   <i>Since: 2.22</i>
socketListen :: (HasCallStack, MonadIO m, IsSocket a) => a -> m ()

-- | Creates a new <a>Socket</a> with the defined family, type and
--   protocol. If <i><tt>protocol</tt></i> is 0
--   (<a>SocketProtocolDefault</a>) the default protocol type for the
--   family and type is used.
--   
--   The <i><tt>protocol</tt></i> is a family and type specific int that
--   specifies what kind of protocol to use. <a>SocketProtocol</a> lists
--   several common ones. Many families only support one protocol, and use
--   0 for this, others support several and using 0 means to use the
--   default protocol for the family and type.
--   
--   The protocol id is passed directly to the operating system, so you can
--   use protocols not listed in <a>SocketProtocol</a> if you know the
--   protocol number used for it.
--   
--   <i>Since: 2.22</i>
socketNew :: (HasCallStack, MonadIO m) => SocketFamily -> SocketType -> SocketProtocol -> m Socket

-- | Creates a new <a>Socket</a> from a native file descriptor or winsock
--   SOCKET handle.
--   
--   This reads all the settings from the file descriptor so that all
--   properties should work. Note that the file descriptor will be set to
--   non-blocking mode, independent on the blocking mode of the
--   <a>Socket</a>.
--   
--   On success, the returned <a>Socket</a> takes ownership of
--   <i><tt>fd</tt></i>. On failure, the caller must close
--   <i><tt>fd</tt></i> themselves.
--   
--   Since GLib 2.46, it is no longer a fatal error to call this on a
--   non-socket descriptor. Instead, a GError will be set with code
--   <a>IOErrorEnumFailed</a>
--   
--   <i>Since: 2.22</i>
socketNewFromFd :: (HasCallStack, MonadIO m) => Int32 -> m Socket

-- | Receive data (up to <i><tt>size</tt></i> bytes) from a socket. This is
--   mainly used by connection-oriented sockets; it is identical to
--   <a>socketReceiveFrom</a> with <i><tt>address</tt></i> set to
--   <a>Nothing</a>.
--   
--   For <a>SocketTypeDatagram</a> and <a>SocketTypeSeqpacket</a> sockets,
--   <a>socketReceive</a> will always read either 0 or 1 complete messages
--   from the socket. If the received message is too large to fit in
--   <i><tt>buffer</tt></i>, then the data beyond <i><tt>size</tt></i>
--   bytes will be discarded, without any explicit indication that this has
--   occurred.
--   
--   For <a>SocketTypeStream</a> sockets, <a>socketReceive</a> can return
--   any number of bytes, up to <i><tt>size</tt></i>. If more than
--   <i><tt>size</tt></i> bytes have been received, the additional data
--   will be returned in future calls to <a>socketReceive</a>.
--   
--   If the socket is in blocking mode the call will block until there is
--   some data to receive, the connection is closed, or there is an error.
--   If there is no data available and the socket is in non-blocking mode,
--   a <a>IOErrorEnumWouldBlock</a> error will be returned. To be notified
--   when data is available, wait for the <a>IOConditionIn</a> condition.
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   
--   <i>Since: 2.22</i>
socketReceive :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe b -> m (Int64, ByteString)

-- | Receives data (up to <i><tt>size</tt></i> bytes) from a socket.
--   
--   This function is a variant of <a>socketReceive</a> which returns a
--   <a>Bytes</a> rather than a plain buffer.
--   
--   Pass <tt>-1</tt> to <i><tt>timeoutUs</tt></i> to block indefinitely
--   until data is received (or the connection is closed, or there is an
--   error). Pass <tt>0</tt> to use the default timeout from
--   <a>Socket:timeout</a>, or pass a positive number to wait for that many
--   microseconds for data before returning <tt>G_IO_ERROR_TIMED_OUT</tt>.
--   
--   <i>Since: 2.80</i>
socketReceiveBytes :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> CSize -> Int64 -> Maybe b -> m Bytes

-- | Receive data (up to <i><tt>size</tt></i> bytes) from a socket.
--   
--   This function is a variant of <a>socketReceiveFrom</a> which returns a
--   <a>Bytes</a> rather than a plain buffer.
--   
--   If <i><tt>address</tt></i> is non-<a>Nothing</a> then
--   <i><tt>address</tt></i> will be set equal to the source address of the
--   received packet.
--   
--   The <i><tt>address</tt></i> is owned by the caller.
--   
--   Pass <tt>-1</tt> to <i><tt>timeoutUs</tt></i> to block indefinitely
--   until data is received (or the connection is closed, or there is an
--   error). Pass <tt>0</tt> to use the default timeout from
--   <a>Socket:timeout</a>, or pass a positive number to wait for that many
--   microseconds for data before returning <tt>G_IO_ERROR_TIMED_OUT</tt>.
--   
--   <i>Since: 2.80</i>
socketReceiveBytesFrom :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> CSize -> Int64 -> Maybe b -> m (Bytes, SocketAddress)

-- | Receive data (up to <i><tt>size</tt></i> bytes) from a socket.
--   
--   If <i><tt>address</tt></i> is non-<a>Nothing</a> then
--   <i><tt>address</tt></i> will be set equal to the source address of the
--   received packet. <i><tt>address</tt></i> is owned by the caller.
--   
--   See <a>socketReceive</a> for additional information.
--   
--   <i>Since: 2.22</i>
socketReceiveFrom :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe b -> m (Int64, SocketAddress, ByteString)

-- | Receive data from a socket. For receiving multiple messages, see
--   <a>socketReceiveMessages</a>; for easier use, see <a>socketReceive</a>
--   and <a>socketReceiveFrom</a>.
--   
--   If <i><tt>address</tt></i> is non-<a>Nothing</a> then
--   <i><tt>address</tt></i> will be set equal to the source address of the
--   received packet. <i><tt>address</tt></i> is owned by the caller.
--   
--   <i><tt>vector</tt></i> must point to an array of <a>InputVector</a>
--   structs and <i><tt>numVectors</tt></i> must be the length of this
--   array. These structs describe the buffers that received data will be
--   scattered into. If <i><tt>numVectors</tt></i> is -1, then
--   <i><tt>vectors</tt></i> is assumed to be terminated by a
--   <a>InputVector</a> with a <a>Nothing</a> buffer pointer.
--   
--   As a special case, if <i><tt>numVectors</tt></i> is 0 (in which case,
--   <i><tt>vectors</tt></i> may of course be <a>Nothing</a>), then a
--   single byte is received and discarded. This is to facilitate the
--   common practice of sending a single '\0' byte for the purposes of
--   transferring ancillary data.
--   
--   <i><tt>messages</tt></i>, if non-<a>Nothing</a>, will be set to point
--   to a newly-allocated array of <a>SocketControlMessage</a> instances or
--   <a>Nothing</a> if no such messages was received. These correspond to
--   the control messages received from the kernel, one
--   <a>SocketControlMessage</a> per message from the kernel. This array is
--   <a>Nothing</a>-terminated and must be freed by the caller using
--   <a>free</a> after calling <a>objectUnref</a> on each element. If
--   <i><tt>messages</tt></i> is <a>Nothing</a>, any control messages
--   received will be discarded.
--   
--   <i><tt>numMessages</tt></i>, if non-<a>Nothing</a>, will be set to the
--   number of control messages received.
--   
--   If both <i><tt>messages</tt></i> and <i><tt>numMessages</tt></i> are
--   non-<a>Nothing</a>, then <i><tt>numMessages</tt></i> gives the number
--   of <a>SocketControlMessage</a> instances in <i><tt>messages</tt></i>
--   (ie: not including the <a>Nothing</a> terminator).
--   
--   <i><tt>flags</tt></i> is an in/out parameter. The commonly available
--   arguments for this are available in the <a>SocketMsgFlags</a> enum,
--   but the values there are the same as the system values, and the flags
--   are passed in as-is, so you can pass in system-specific flags too (and
--   <a>socketReceiveMessage</a> may pass system-specific flags out). Flags
--   passed in to the parameter affect the receive operation; flags
--   returned out of it are relevant to the specific returned message.
--   
--   As with <a>socketReceive</a>, data may be discarded if
--   <i><tt>socket</tt></i> is <a>SocketTypeDatagram</a> or
--   <a>SocketTypeSeqpacket</a> and you do not provide enough buffer space
--   to read a complete message. You can pass <a>SocketMsgFlagsPeek</a> in
--   <i><tt>flags</tt></i> to peek at the current message without removing
--   it from the receive queue, but there is no portable way to find out
--   the length of the message other than by reading it into a
--   sufficiently-large buffer.
--   
--   If the socket is in blocking mode the call will block until there is
--   some data to receive, the connection is closed, or there is an error.
--   If there is no data available and the socket is in non-blocking mode,
--   a <a>IOErrorEnumWouldBlock</a> error will be returned. To be notified
--   when data is available, wait for the <a>IOConditionIn</a> condition.
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   
--   <i>Since: 2.22</i>
socketReceiveMessage :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [InputVector] -> Int32 -> Maybe b -> m (Int64, SocketAddress, Maybe [SocketControlMessage], Int32)

-- | Receive multiple data messages from <i><tt>socket</tt></i> in one go.
--   This is the most complicated and fully-featured version of this call.
--   For easier use, see <a>socketReceive</a>, <a>socketReceiveFrom</a>,
--   and <a>socketReceiveMessage</a>.
--   
--   <i><tt>messages</tt></i> must point to an array of <a>InputMessage</a>
--   structs and <i><tt>numMessages</tt></i> must be the length of this
--   array. Each <a>InputMessage</a> contains a pointer to an array of
--   <a>InputVector</a> structs describing the buffers that the data
--   received in each message will be written to. Using multiple
--   <tt><i>GInputVectors</i></tt> is more memory-efficient than manually
--   copying data out of a single buffer to multiple sources, and more
--   system-call-efficient than making multiple calls to
--   <a>socketReceive</a>, such as in scenarios where a lot of data packets
--   need to be received (e.g. high-bandwidth video streaming over
--   RTP/UDP).
--   
--   <i><tt>flags</tt></i> modify how all messages are received. The
--   commonly available arguments for this are available in the
--   <a>SocketMsgFlags</a> enum, but the values there are the same as the
--   system values, and the flags are passed in as-is, so you can pass in
--   system-specific flags too. These flags affect the overall receive
--   operation. Flags affecting individual messages are returned in
--   <a>InputMessage</a>.<tt><i>flags</i></tt>.
--   
--   The other members of <a>InputMessage</a> are treated as described in
--   its documentation.
--   
--   If <a>Socket:blocking</a> is <a>True</a> the call will block until
--   <i><tt>numMessages</tt></i> have been received, or the end of the
--   stream is reached.
--   
--   If <a>Socket:blocking</a> is <a>False</a> the call will return up to
--   <i><tt>numMessages</tt></i> without blocking, or
--   <a>IOErrorEnumWouldBlock</a> if no messages are queued in the
--   operating system to be received.
--   
--   In blocking mode, if <a>Socket:timeout</a> is positive and is reached
--   before any messages are received, <a>IOErrorEnumTimedOut</a> is
--   returned, otherwise up to <i><tt>numMessages</tt></i> are returned.
--   (Note: This is effectively the behaviour of <tt>MSG_WAITFORONE</tt>
--   with <tt><i>recvmmsg()</i></tt>.)
--   
--   To be notified when messages are available, wait for the
--   <a>IOConditionIn</a> condition. Note though that you may still receive
--   <a>IOErrorEnumWouldBlock</a> from <a>socketReceiveMessages</a> even if
--   you were previously notified of a <a>IOConditionIn</a> condition.
--   
--   If the remote peer closes the connection, any messages queued in the
--   operating system will be returned, and subsequent calls to
--   <a>socketReceiveMessages</a> will return 0 (with no error set).
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   An error will only be returned if zero messages could be received;
--   otherwise the number of messages successfully received before the
--   error will be returned.
--   
--   <i>Since: 2.48</i>
socketReceiveMessages :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [InputMessage] -> Int32 -> Maybe b -> m Int32

-- | This behaves exactly the same as <a>socketReceive</a>, except that the
--   choice of blocking or non-blocking behavior is determined by the
--   <i><tt>blocking</tt></i> argument rather than by
--   <i><tt>socket</tt></i>'s properties.
--   
--   <i>Since: 2.26</i>
socketReceiveWithBlocking :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m (Int64, ByteString)

-- | Tries to send <i><tt>size</tt></i> bytes from <i><tt>buffer</tt></i>
--   on the socket. This is mainly used by connection-oriented sockets; it
--   is identical to <a>socketSendTo</a> with <i><tt>address</tt></i> set
--   to <a>Nothing</a>.
--   
--   If the socket is in blocking mode the call will block until there is
--   space for the data in the socket queue. If there is no space available
--   and the socket is in non-blocking mode a <a>IOErrorEnumWouldBlock</a>
--   error will be returned. To be notified when space is available, wait
--   for the <a>IOConditionOut</a> condition. Note though that you may
--   still receive <a>IOErrorEnumWouldBlock</a> from <a>socketSend</a> even
--   if you were previously notified of a <a>IOConditionOut</a> condition.
--   (On Windows in particular, this is very common due to the way the
--   underlying APIs work.)
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   
--   <i>Since: 2.22</i>
socketSend :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe b -> m Int64

-- | Send data to <i><tt>address</tt></i> on <i><tt>socket</tt></i>. For
--   sending multiple messages see <a>socketSendMessages</a>; for easier
--   use, see <a>socketSend</a> and <a>socketSendTo</a>.
--   
--   If <i><tt>address</tt></i> is <a>Nothing</a> then the message is sent
--   to the default receiver (set by <a>socketConnect</a>).
--   
--   <i><tt>vectors</tt></i> must point to an array of <a>OutputVector</a>
--   structs and <i><tt>numVectors</tt></i> must be the length of this
--   array. (If <i><tt>numVectors</tt></i> is -1, then
--   <i><tt>vectors</tt></i> is assumed to be terminated by a
--   <a>OutputVector</a> with a <a>Nothing</a> buffer pointer.) The
--   <a>OutputVector</a> structs describe the buffers that the sent data
--   will be gathered from. Using multiple <tt><i>GOutputVectors</i></tt>
--   is more memory-efficient than manually copying data from multiple
--   sources into a single buffer, and more network-efficient than making
--   multiple calls to <a>socketSend</a>.
--   
--   <i><tt>messages</tt></i>, if non-<a>Nothing</a>, is taken to point to
--   an array of <i><tt>numMessages</tt></i> <a>SocketControlMessage</a>
--   instances. These correspond to the control messages to be sent on the
--   socket. If <i><tt>numMessages</tt></i> is -1 then
--   <i><tt>messages</tt></i> is treated as a <a>Nothing</a>-terminated
--   array.
--   
--   <i><tt>flags</tt></i> modify how the message is sent. The commonly
--   available arguments for this are available in the
--   <a>SocketMsgFlags</a> enum, but the values there are the same as the
--   system values, and the flags are passed in as-is, so you can pass in
--   system-specific flags too.
--   
--   If the socket is in blocking mode the call will block until there is
--   space for the data in the socket queue. If there is no space available
--   and the socket is in non-blocking mode a <a>IOErrorEnumWouldBlock</a>
--   error will be returned. To be notified when space is available, wait
--   for the <a>IOConditionOut</a> condition. Note though that you may
--   still receive <a>IOErrorEnumWouldBlock</a> from <a>socketSend</a> even
--   if you were previously notified of a <a>IOConditionOut</a> condition.
--   (On Windows in particular, this is very common due to the way the
--   underlying APIs work.)
--   
--   The sum of the sizes of each <a>OutputVector</a> in vectors must not
--   be greater than <tt><i>G_MAXSSIZE</i></tt>. If the message can be
--   larger than this, then it is mandatory to use the
--   <a>socketSendMessageWithTimeout</a> function.
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   
--   <i>Since: 2.22</i>
socketSendMessage :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe b -> [OutputVector] -> Maybe [SocketControlMessage] -> Int32 -> Maybe c -> m Int64

-- | This behaves exactly the same as <a>socketSendMessage</a>, except that
--   the choice of timeout behavior is determined by the
--   <i><tt>timeoutUs</tt></i> argument rather than by
--   <i><tt>socket</tt></i>'s properties.
--   
--   On error <a>PollableReturnFailed</a> is returned and
--   <i><tt>error</tt></i> is set accordingly, or if the socket is
--   currently not writable <a>PollableReturnWouldBlock</a> is returned.
--   <i><tt>bytesWritten</tt></i> will contain 0 in both cases.
--   
--   <i>Since: 2.60</i>
socketSendMessageWithTimeout :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe b -> [OutputVector] -> Maybe [SocketControlMessage] -> Int32 -> Int64 -> Maybe c -> m (PollableReturn, CSize)

-- | Send multiple data messages from <i><tt>socket</tt></i> in one go.
--   This is the most complicated and fully-featured version of this call.
--   For easier use, see <a>socketSend</a>, <a>socketSendTo</a>, and
--   <a>socketSendMessage</a>.
--   
--   <i><tt>messages</tt></i> must point to an array of
--   <a>OutputMessage</a> structs and <i><tt>numMessages</tt></i> must be
--   the length of this array. Each <a>OutputMessage</a> contains an
--   address to send the data to, and a pointer to an array of
--   <a>OutputVector</a> structs to describe the buffers that the data to
--   be sent for each message will be gathered from. Using multiple
--   <tt><i>GOutputVectors</i></tt> is more memory-efficient than manually
--   copying data from multiple sources into a single buffer, and more
--   network-efficient than making multiple calls to <a>socketSend</a>.
--   Sending multiple messages in one go avoids the overhead of making a
--   lot of syscalls in scenarios where a lot of data packets need to be
--   sent (e.g. high-bandwidth video streaming over RTP/UDP), or where the
--   same data needs to be sent to multiple recipients.
--   
--   <i><tt>flags</tt></i> modify how the message is sent. The commonly
--   available arguments for this are available in the
--   <a>SocketMsgFlags</a> enum, but the values there are the same as the
--   system values, and the flags are passed in as-is, so you can pass in
--   system-specific flags too.
--   
--   If the socket is in blocking mode the call will block until there is
--   space for all the data in the socket queue. If there is no space
--   available and the socket is in non-blocking mode a
--   <a>IOErrorEnumWouldBlock</a> error will be returned if no data was
--   written at all, otherwise the number of messages sent will be
--   returned. To be notified when space is available, wait for the
--   <a>IOConditionOut</a> condition. Note though that you may still
--   receive <a>IOErrorEnumWouldBlock</a> from <a>socketSend</a> even if
--   you were previously notified of a <a>IOConditionOut</a> condition. (On
--   Windows in particular, this is very common due to the way the
--   underlying APIs work.)
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   An error will only be returned if zero messages could be sent;
--   otherwise the number of messages successfully sent before the error
--   will be returned.
--   
--   <i>Since: 2.44</i>
socketSendMessages :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [OutputMessage] -> Int32 -> Maybe b -> m Int32

-- | Tries to send <i><tt>size</tt></i> bytes from <i><tt>buffer</tt></i>
--   to <i><tt>address</tt></i>. If <i><tt>address</tt></i> is
--   <a>Nothing</a> then the message is sent to the default receiver (set
--   by <a>socketConnect</a>).
--   
--   See <a>socketSend</a> for additional information.
--   
--   <i>Since: 2.22</i>
socketSendTo :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe b -> ByteString -> Maybe c -> m Int64

-- | This behaves exactly the same as <a>socketSend</a>, except that the
--   choice of blocking or non-blocking behavior is determined by the
--   <i><tt>blocking</tt></i> argument rather than by
--   <i><tt>socket</tt></i>'s properties.
--   
--   <i>Since: 2.26</i>
socketSendWithBlocking :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m Int64

-- | Sets the blocking mode of the socket. In blocking mode all operations
--   (which don’t take an explicit blocking parameter) block until they
--   succeed or there is an error. In non-blocking mode all functions
--   return results immediately or with a <a>IOErrorEnumWouldBlock</a>
--   error.
--   
--   All sockets are created in blocking mode. However, note that the
--   platform level socket is always non-blocking, and blocking mode is a
--   GSocket level feature.
--   
--   <i>Since: 2.22</i>
socketSetBlocking :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()

-- | Sets whether <i><tt>socket</tt></i> should allow sending to broadcast
--   addresses. This is <a>False</a> by default.
--   
--   <i>Since: 2.32</i>
socketSetBroadcast :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()

-- | Sets or unsets the <tt><i>SO_KEEPALIVE</i></tt> flag on the underlying
--   socket. When this flag is set on a socket, the system will attempt to
--   verify that the remote socket endpoint is still present if a
--   sufficiently long period of time passes with no data being exchanged.
--   If the system is unable to verify the presence of the remote endpoint,
--   it will automatically close the connection.
--   
--   This option is only functional on certain kinds of sockets. (Notably,
--   <a>SocketProtocolTcp</a> sockets.)
--   
--   The exact time between pings is system- and protocol-dependent, but
--   will normally be at least two hours. Most commonly, you would set this
--   flag on a server socket if you want to allow clients to remain idle
--   for long periods of time, but also want to ensure that connections are
--   eventually garbage-collected if clients crash or become unreachable.
--   
--   <i>Since: 2.22</i>
socketSetKeepalive :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()

-- | Sets the maximum number of outstanding connections allowed when
--   listening on this socket. If more clients than this are connecting to
--   the socket and the application is not handling them on time then the
--   new connections will be refused.
--   
--   Note that this must be called before <a>socketListen</a> and has no
--   effect if called after that.
--   
--   <i>Since: 2.22</i>
socketSetListenBacklog :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> m ()

-- | Sets whether outgoing multicast packets will be received by sockets
--   listening on that multicast address on the same host. This is
--   <a>True</a> by default.
--   
--   <i>Since: 2.32</i>
socketSetMulticastLoopback :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()

-- | Sets the time-to-live for outgoing multicast datagrams on
--   <i><tt>socket</tt></i>. By default, this is 1, meaning that multicast
--   packets will not leave the local network.
--   
--   <i>Since: 2.32</i>
socketSetMulticastTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()

-- | Sets the value of an integer-valued option on <i><tt>socket</tt></i>,
--   as with <tt><i>setsockopt()</i></tt>. (If you need to set a
--   non-integer-valued option, you will need to call
--   <tt><i>setsockopt()</i></tt> directly.)
--   
--   The <a>`&lt;gio/gnetworking.h&gt;`</a> header pulls in system headers
--   that will define most of the standard/portable socket options. For
--   unusual socket protocols or platform-dependent options, you may need
--   to include additional headers.
--   
--   <i>Since: 2.36</i>
socketSetOption :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> Int32 -> Int32 -> m ()

-- | Sets the time in seconds after which I/O operations on
--   <i><tt>socket</tt></i> will time out if they have not yet completed.
--   
--   On a blocking socket, this means that any blocking <a>Socket</a>
--   operation will time out after <i><tt>timeout</tt></i> seconds of
--   inactivity, returning <a>IOErrorEnumTimedOut</a>.
--   
--   On a non-blocking socket, calls to <a>socketConditionWait</a> will
--   also fail with <a>IOErrorEnumTimedOut</a> after the given time.
--   Sources created with <tt><i>g_socket_create_source()</i></tt> will
--   trigger after <i><tt>timeout</tt></i> seconds of inactivity, with the
--   requested condition set, at which point calling <a>socketReceive</a>,
--   <a>socketSend</a>, <a>socketCheckConnectResult</a>, etc, will fail
--   with <a>IOErrorEnumTimedOut</a>.
--   
--   If <i><tt>timeout</tt></i> is 0 (the default), operations will never
--   time out on their own.
--   
--   Note that if an I/O operation is interrupted by a signal, this may
--   cause the timeout to be reset.
--   
--   <i>Since: 2.26</i>
socketSetTimeout :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()

-- | Sets the time-to-live for outgoing unicast packets on
--   <i><tt>socket</tt></i>. By default the platform-specific default value
--   is used.
--   
--   <i>Since: 2.32</i>
socketSetTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()

-- | Shut down part or all of a full-duplex connection.
--   
--   If <i><tt>shutdownRead</tt></i> is <a>True</a> then the receiving side
--   of the connection is shut down, and further reading is disallowed.
--   
--   If <i><tt>shutdownWrite</tt></i> is <a>True</a> then the sending side
--   of the connection is shut down, and further writing is disallowed.
--   
--   It is allowed for both <i><tt>shutdownRead</tt></i> and
--   <i><tt>shutdownWrite</tt></i> to be <a>True</a>.
--   
--   One example where it is useful to shut down only one side of a
--   connection is graceful disconnect for TCP connections where you close
--   the sending side, then wait for the other side to close the
--   connection, thus ensuring that the other side saw all sent data.
--   
--   <i>Since: 2.22</i>
socketShutdown :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> Bool -> m ()

-- | Checks if a socket is capable of speaking IPv4.
--   
--   IPv4 sockets are capable of speaking IPv4. On some operating systems
--   and under some combinations of circumstances IPv6 sockets are also
--   capable of speaking IPv4. See RFC 3493 section 3.7 for more
--   information.
--   
--   No other types of sockets are currently considered as being capable of
--   speaking IPv4.
--   
--   <i>Since: 2.22</i>
socketSpeaksIpv4 :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>blocking</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructSocketBlocking :: (IsSocket o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>blocking</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #blocking
--   </pre>
getSocketBlocking :: (MonadIO m, IsSocket o) => o -> m Bool

-- | Set the value of the “<tt>blocking</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #blocking <a>:=</a> value ]
--   </pre>
setSocketBlocking :: (MonadIO m, IsSocket o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>broadcast</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructSocketBroadcast :: (IsSocket o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>broadcast</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #broadcast
--   </pre>
getSocketBroadcast :: (MonadIO m, IsSocket o) => o -> m Bool

-- | Set the value of the “<tt>broadcast</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #broadcast <a>:=</a> value ]
--   </pre>
setSocketBroadcast :: (MonadIO m, IsSocket o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>family</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketFamily :: (IsSocket o, MonadIO m) => SocketFamily -> m (GValueConstruct o)

-- | Get the value of the “<tt>family</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #family
--   </pre>
getSocketFamily :: (MonadIO m, IsSocket o) => o -> m SocketFamily

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>fd</tt>” property. This is rarely needed directly, but it is used
--   by <a>new</a>.
constructSocketFd :: (IsSocket o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>fd</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #fd
--   </pre>
getSocketFd :: (MonadIO m, IsSocket o) => o -> m Int32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>keepalive</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructSocketKeepalive :: (IsSocket o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>keepalive</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #keepalive
--   </pre>
getSocketKeepalive :: (MonadIO m, IsSocket o) => o -> m Bool

-- | Set the value of the “<tt>keepalive</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #keepalive <a>:=</a> value ]
--   </pre>
setSocketKeepalive :: (MonadIO m, IsSocket o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>listen-backlog</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructSocketListenBacklog :: (IsSocket o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>listen-backlog</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #listenBacklog
--   </pre>
getSocketListenBacklog :: (MonadIO m, IsSocket o) => o -> m Int32

-- | Set the value of the “<tt>listen-backlog</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #listenBacklog <a>:=</a> value ]
--   </pre>
setSocketListenBacklog :: (MonadIO m, IsSocket o) => o -> Int32 -> m ()

-- | Get the value of the “<tt>local-address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #localAddress
--   </pre>
getSocketLocalAddress :: (MonadIO m, IsSocket o) => o -> m (Maybe SocketAddress)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>multicast-loopback</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructSocketMulticastLoopback :: (IsSocket o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>multicast-loopback</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #multicastLoopback
--   </pre>
getSocketMulticastLoopback :: (MonadIO m, IsSocket o) => o -> m Bool

-- | Set the value of the “<tt>multicast-loopback</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #multicastLoopback <a>:=</a> value ]
--   </pre>
setSocketMulticastLoopback :: (MonadIO m, IsSocket o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>multicast-ttl</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructSocketMulticastTtl :: (IsSocket o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>multicast-ttl</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #multicastTtl
--   </pre>
getSocketMulticastTtl :: (MonadIO m, IsSocket o) => o -> m Word32

-- | Set the value of the “<tt>multicast-ttl</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #multicastTtl <a>:=</a> value ]
--   </pre>
setSocketMulticastTtl :: (MonadIO m, IsSocket o) => o -> Word32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>protocol</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructSocketProtocol :: (IsSocket o, MonadIO m) => SocketProtocol -> m (GValueConstruct o)

-- | Get the value of the “<tt>protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #protocol
--   </pre>
getSocketProtocol :: (MonadIO m, IsSocket o) => o -> m SocketProtocol

-- | Get the value of the “<tt>remote-address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #remoteAddress
--   </pre>
getSocketRemoteAddress :: (MonadIO m, IsSocket o) => o -> m (Maybe SocketAddress)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>timeout</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketTimeout :: (IsSocket o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #timeout
--   </pre>
getSocketTimeout :: (MonadIO m, IsSocket o) => o -> m Word32

-- | Set the value of the “<tt>timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #timeout <a>:=</a> value ]
--   </pre>
setSocketTimeout :: (MonadIO m, IsSocket o) => o -> Word32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>ttl</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketTtl :: (IsSocket o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>ttl</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #ttl
--   </pre>
getSocketTtl :: (MonadIO m, IsSocket o) => o -> m Word32

-- | Set the value of the “<tt>ttl</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> socket [ #ttl <a>:=</a> value ]
--   </pre>
setSocketTtl :: (MonadIO m, IsSocket o) => o -> Word32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>type</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSocketType :: (IsSocket o, MonadIO m) => SocketType -> m (GValueConstruct o)

-- | Get the value of the “<tt>type</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> socket #type
--   </pre>
getSocketType :: (MonadIO m, IsSocket o) => o -> m SocketType
instance GHC.Classes.Eq GI.Gio.Objects.Socket.Socket
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Socket.Socket
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Socket.Socket
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Socket.Socket)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Socket.Socket o) => GI.Gio.Objects.Socket.IsSocket o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Socket.Socket
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Socket.Socket


-- | <tt>GSimpleProxyResolver</tt> is a simple <a>ProxyResolver</a>
--   implementation that handles a single default proxy, multiple
--   URI-scheme-specific proxies, and a list of hosts that proxies should
--   not be used for.
--   
--   <tt>GSimpleProxyResolver</tt> is never the default proxy resolver, but
--   it can be used as the base class for another proxy resolver
--   implementation, or it can be created and used manually, such as with
--   <a>socketClientSetProxyResolver</a>.
--   
--   <i>Since: 2.36</i>
module GI.Gio.Objects.SimpleProxyResolver

-- | Memory-managed wrapper type.
newtype SimpleProxyResolver
SimpleProxyResolver :: ManagedPtr SimpleProxyResolver -> SimpleProxyResolver

-- | Type class for types which can be safely cast to
--   <a>SimpleProxyResolver</a>, for instance with
--   <a>toSimpleProxyResolver</a>.
class (GObject o, IsDescendantOf SimpleProxyResolver o) => IsSimpleProxyResolver o

-- | Cast to <a>SimpleProxyResolver</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toSimpleProxyResolver :: (MonadIO m, IsSimpleProxyResolver o) => o -> m SimpleProxyResolver

-- | Creates a new <a>SimpleProxyResolver</a>. See
--   <a>SimpleProxyResolver:defaultProxy</a> and
--   <a>SimpleProxyResolver:ignoreHosts</a> for more details on how the
--   arguments are interpreted.
--   
--   <i>Since: 2.36</i>
simpleProxyResolverNew :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe [Text] -> m ProxyResolver

-- | Sets the default proxy on <i><tt>resolver</tt></i>, to be used for any
--   URIs that don't match <a>SimpleProxyResolver:ignoreHosts</a> or a
--   proxy set via <a>simpleProxyResolverSetUriProxy</a>.
--   
--   If <i><tt>defaultProxy</tt></i> starts with "socks://",
--   <a>SimpleProxyResolver</a> will treat it as referring to all three of
--   the socks5, socks4a, and socks4 proxy types.
--   
--   <i>Since: 2.36</i>
simpleProxyResolverSetDefaultProxy :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> Maybe Text -> m ()

-- | Sets the list of ignored hosts.
--   
--   See <a>SimpleProxyResolver:ignoreHosts</a> for more details on how the
--   <i><tt>ignoreHosts</tt></i> argument is interpreted.
--   
--   <i>Since: 2.36</i>
simpleProxyResolverSetIgnoreHosts :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> [Text] -> m ()

-- | Adds a URI-scheme-specific proxy to <i><tt>resolver</tt></i>; URIs
--   whose scheme matches <i><tt>uriScheme</tt></i> (and which don't match
--   <a>SimpleProxyResolver:ignoreHosts</a>) will be proxied via
--   <i><tt>proxy</tt></i>.
--   
--   As with <a>SimpleProxyResolver:defaultProxy</a>, if
--   <i><tt>proxy</tt></i> starts with "socks://",
--   <a>SimpleProxyResolver</a> will treat it as referring to all three of
--   the socks5, socks4a, and socks4 proxy types.
--   
--   <i>Since: 2.36</i>
simpleProxyResolverSetUriProxy :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> Text -> Text -> m ()

-- | Set the value of the “<tt>default-proxy</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #defaultProxy
--   </pre>
clearSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>default-proxy</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructSimpleProxyResolverDefaultProxy :: (IsSimpleProxyResolver o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>default-proxy</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleProxyResolver #defaultProxy
--   </pre>
getSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>default-proxy</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> simpleProxyResolver [ #defaultProxy <a>:=</a> value ]
--   </pre>
setSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>ignore-hosts</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructSimpleProxyResolverIgnoreHosts :: (IsSimpleProxyResolver o, MonadIO m) => [Text] -> m (GValueConstruct o)

-- | Get the value of the “<tt>ignore-hosts</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleProxyResolver #ignoreHosts
--   </pre>
getSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe [Text])

-- | Set the value of the “<tt>ignore-hosts</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> simpleProxyResolver [ #ignoreHosts <a>:=</a> value ]
--   </pre>
setSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> [Text] -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver o) => GI.Gio.Objects.SimpleProxyResolver.IsSimpleProxyResolver o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver


-- | <tt>GSimplePermission</tt> is a trivial implementation of
--   <a>Permission</a> that represents a permission that is either always
--   or never allowed. The value is given at construction and doesn’t
--   change.
--   
--   Calling <a>permissionAcquire</a> or <a>permissionRelease</a> on a
--   <tt>GSimplePermission</tt> will result in errors.
module GI.Gio.Objects.SimplePermission

-- | Memory-managed wrapper type.
newtype SimplePermission
SimplePermission :: ManagedPtr SimplePermission -> SimplePermission

-- | Type class for types which can be safely cast to
--   <a>SimplePermission</a>, for instance with <a>toSimplePermission</a>.
class (GObject o, IsDescendantOf SimplePermission o) => IsSimplePermission o

-- | Cast to <a>SimplePermission</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toSimplePermission :: (MonadIO m, IsSimplePermission o) => o -> m SimplePermission

-- | Creates a new <a>Permission</a> instance that represents an action
--   that is either always or never allowed.
--   
--   <i>Since: 2.26</i>
simplePermissionNew :: (HasCallStack, MonadIO m) => Bool -> m SimplePermission
instance GHC.Classes.Eq GI.Gio.Objects.SimplePermission.SimplePermission
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimplePermission.SimplePermission
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimplePermission.SimplePermission
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SimplePermission.SimplePermission)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SimplePermission.SimplePermission o) => GI.Gio.Objects.SimplePermission.IsSimplePermission o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SimplePermission.SimplePermission
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SimplePermission.SimplePermission


-- | <tt>GSimpleIOStream</tt> creates a <a>IOStream</a> from an arbitrary
--   <a>InputStream</a> and <a>OutputStream</a>. This allows any pair of
--   input and output streams to be used with <a>IOStream</a> methods.
--   
--   This is useful when you obtained a <a>InputStream</a> and a
--   <a>OutputStream</a> by other means, for instance creating them with
--   platform specific methods as <a>`g_unix_input_stream_new()`</a> (from
--   <tt>gio-unix-2.0.pc</tt> / <tt>GioUnix-2.0</tt>), and you want to take
--   advantage of the methods provided by <a>IOStream</a>.
--   
--   <i>Since: 2.44</i>
module GI.Gio.Objects.SimpleIOStream

-- | Memory-managed wrapper type.
newtype SimpleIOStream
SimpleIOStream :: ManagedPtr SimpleIOStream -> SimpleIOStream

-- | Type class for types which can be safely cast to
--   <a>SimpleIOStream</a>, for instance with <a>toSimpleIOStream</a>.
class (GObject o, IsDescendantOf SimpleIOStream o) => IsSimpleIOStream o

-- | Cast to <a>SimpleIOStream</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toSimpleIOStream :: (MonadIO m, IsSimpleIOStream o) => o -> m SimpleIOStream

-- | Creates a new <a>SimpleIOStream</a> wrapping
--   <i><tt>inputStream</tt></i> and <i><tt>outputStream</tt></i>. See also
--   <a>IOStream</a>.
--   
--   <i>Since: 2.44</i>
simpleIOStreamNew :: (HasCallStack, MonadIO m, IsInputStream a, IsOutputStream b) => a -> b -> m SimpleIOStream

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>input-stream</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructSimpleIOStreamInputStream :: (IsSimpleIOStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>input-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleIOStream #inputStream
--   </pre>
getSimpleIOStreamInputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe InputStream)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>output-stream</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructSimpleIOStreamOutputStream :: (IsSimpleIOStream o, MonadIO m, IsOutputStream a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>output-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> simpleIOStream #outputStream
--   </pre>
getSimpleIOStreamOutputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe OutputStream)
instance GHC.Classes.Eq GI.Gio.Objects.SimpleIOStream.SimpleIOStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleIOStream.SimpleIOStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleIOStream.SimpleIOStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SimpleIOStream.SimpleIOStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SimpleIOStream.SimpleIOStream o) => GI.Gio.Objects.SimpleIOStream.IsSimpleIOStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SimpleIOStream.SimpleIOStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SimpleIOStream.SimpleIOStream


-- | As of GLib 2.46, <tt>GSimpleAsyncResult</tt> is deprecated in favor of
--   <a>Task</a>, which provides a simpler API.
--   
--   <tt>GSimpleAsyncResult</tt> implements <a>AsyncResult</a>.
--   
--   <tt>GSimpleAsyncResult</tt> handles
--   [type<i><tt>gio</tt></i>.AsyncReadyCallback]s, error reporting,
--   operation cancellation and the final state of an operation, completely
--   transparent to the application. Results can be returned as a pointer
--   e.g. for functions that return data that is collected asynchronously,
--   a boolean value for checking the success or failure of an operation,
--   or a <tt>gssize</tt> for operations which return the number of bytes
--   modified by the operation; all of the simple return cases are covered.
--   
--   Most of the time, an application will not need to know of the details
--   of this API; it is handled transparently, and any necessary operations
--   are handled by <a>AsyncResult</a>’s interface. However, if
--   implementing a new GIO module, for writing language bindings, or for
--   complex applications that need better control of how asynchronous
--   operations are completed, it is important to understand this
--   functionality.
--   
--   <tt>GSimpleAsyncResult</tt>s are tagged with the calling function to
--   ensure that asynchronous functions and their finishing functions are
--   used together correctly.
--   
--   To create a new <tt>GSimpleAsyncResult</tt>, call
--   <a>simpleAsyncResultNew</a>. If the result needs to be created for a
--   <tt>GError</tt>, use <a>simpleAsyncResultNewFromError</a> or
--   <a>SimpleAsyncResult</a>.<tt><i>new_take_error</i></tt>(). If a
--   <tt>GError</tt> is not available (e.g. the asynchronous operation
--   doesn’t take a <tt>GError</tt> argument), but the result still needs
--   to be created for an error condition, use
--   <a>SimpleAsyncResult</a>.<tt><i>new_error</i></tt>() (or
--   <a>SimpleAsyncResult</a>.<tt><i>set_error_va</i></tt>() if your
--   application or binding requires passing a variable argument list
--   directly), and the error can then be propagated through the use of
--   <a>simpleAsyncResultPropagateError</a>.
--   
--   An asynchronous operation can be made to ignore a cancellation event
--   by calling <a>simpleAsyncResultSetHandleCancellation</a> with a
--   <tt>GSimpleAsyncResult</tt> for the operation and <tt>FALSE</tt>. This
--   is useful for operations that are dangerous to cancel, such as close
--   (which would cause a leak if cancelled before being run).
--   
--   <tt>GSimpleAsyncResult</tt> can integrate into GLib’s event loop,
--   [type<i><tt>gLib</tt></i>.MainLoop], or it can use
--   [type<i><tt>gLib</tt></i>.Thread]s. <a>simpleAsyncResultComplete</a>
--   will finish an I/O task directly from the point where it is called.
--   <a>simpleAsyncResultCompleteInIdle</a> will finish it from an idle
--   handler in the thread-default main context (see
--   <a>mainContextPushThreadDefault</a>) where the
--   <tt>GSimpleAsyncResult</tt> was created.
--   <a>SimpleAsyncResult</a>.<tt><i>run_in_thread</i></tt>() will run the
--   job in a separate thread and then use
--   <a>simpleAsyncResultCompleteInIdle</a> to deliver the result.
--   
--   To set the results of an asynchronous function,
--   <a>SimpleAsyncResult</a>.<tt><i>set_op_res_gpointer</i></tt>(),
--   <a>simpleAsyncResultSetOpResGboolean</a>, and
--   <a>simpleAsyncResultSetOpResGssize</a> are provided, setting the
--   operation's result to a <tt>gpointer</tt>, <tt>gboolean</tt>, or
--   <tt>gssize</tt>, respectively.
--   
--   Likewise, to get the result of an asynchronous function,
--   <a>SimpleAsyncResult</a>.<tt><i>get_op_res_gpointer</i></tt>(),
--   <a>simpleAsyncResultGetOpResGboolean</a>, and
--   <a>simpleAsyncResultGetOpResGssize</a> are provided, getting the
--   operation’s result as a <tt>gpointer</tt>, <tt>gboolean</tt>, and
--   <tt>gssize</tt>, respectively.
--   
--   For the details of the requirements implementations must respect, see
--   <a>AsyncResult</a>. A typical implementation of an asynchronous
--   operation using <tt>GSimpleAsyncResult</tt> looks something like this:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static void
--   baked_cb (Cake    *cake,
--             gpointer user_data)
--   {
--     // In this example, this callback is not given a reference to the cake,
--     // so the GSimpleAsyncResult has to take a reference to it.
--     GSimpleAsyncResult *result = user_data;
--   
--     if (cake == NULL)
--       g_simple_async_result_set_error (result,
--                                        BAKER_ERRORS,
--                                        BAKER_ERROR_NO_FLOUR,
--                                        "Go to the supermarket");
--     else
--       g_simple_async_result_set_op_res_gpointer (result,
--                                                  g_object_ref (cake),
--                                                  g_object_unref);
--   
--   
--     // In this example, we assume that baked_cb is called as a callback from
--     // the mainloop, so it's safe to complete the operation synchronously here.
--     // If, however, _baker_prepare_cake () might call its callback without
--     // first returning to the mainloop — inadvisable, but some APIs do so —
--     // we would need to use g_simple_async_result_complete_in_idle().
--     g_simple_async_result_complete (result);
--     g_object_unref (result);
--   }
--   
--   void
--   baker_bake_cake_async (Baker              *self,
--                          guint               radius,
--                          GAsyncReadyCallback callback,
--                          gpointer            user_data)
--   {
--     GSimpleAsyncResult *simple;
--     Cake               *cake;
--   
--     if (radius &lt; 3)
--       {
--         g_simple_async_report_error_in_idle (G_OBJECT (self),
--                                              callback,
--                                              user_data,
--                                              BAKER_ERRORS,
--                                              BAKER_ERROR_TOO_SMALL,
--                                              "%ucm radius cakes are silly",
--                                              radius);
--         return;
--       }
--   
--     simple = g_simple_async_result_new (G_OBJECT (self),
--                                         callback,
--                                         user_data,
--                                         baker_bake_cake_async);
--     cake = _baker_get_cached_cake (self, radius);
--   
--     if (cake != NULL)
--       {
--         g_simple_async_result_set_op_res_gpointer (simple,
--                                                    g_object_ref (cake),
--                                                    g_object_unref);
--         g_simple_async_result_complete_in_idle (simple);
--         g_object_unref (simple);
--         // Drop the reference returned by _baker_get_cached_cake();
--         // the GSimpleAsyncResult has taken its own reference.
--         g_object_unref (cake);
--         return;
--       }
--   
--     _baker_prepare_cake (self, radius, baked_cb, simple);
--   }
--   
--   Cake *
--   baker_bake_cake_finish (Baker        *self,
--                           GAsyncResult *result,
--                           GError      **error)
--   {
--     GSimpleAsyncResult *simple;
--     Cake               *cake;
--   
--     g_return_val_if_fail (g_simple_async_result_is_valid (result,
--                                                           G_OBJECT (self),
--                                                           baker_bake_cake_async),
--                           NULL);
--   
--     simple = (GSimpleAsyncResult *) result;
--   
--     if (g_simple_async_result_propagate_error (simple, error))
--       return NULL;
--   
--     cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
--     return g_object_ref (cake);
--   }
--   </pre>
module GI.Gio.Objects.SimpleAsyncResult

-- | Memory-managed wrapper type.
newtype SimpleAsyncResult
SimpleAsyncResult :: ManagedPtr SimpleAsyncResult -> SimpleAsyncResult

-- | Type class for types which can be safely cast to
--   <a>SimpleAsyncResult</a>, for instance with
--   <a>toSimpleAsyncResult</a>.
class (GObject o, IsDescendantOf SimpleAsyncResult o) => IsSimpleAsyncResult o

-- | Cast to <a>SimpleAsyncResult</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toSimpleAsyncResult :: (MonadIO m, IsSimpleAsyncResult o) => o -> m SimpleAsyncResult

-- | Completes an asynchronous I/O job immediately. Must be called in the
--   thread where the asynchronous result was to be delivered, as it
--   invokes the callback directly. If you are in a different thread use
--   <a>simpleAsyncResultCompleteInIdle</a>.
--   
--   Calling this function takes a reference to <i><tt>simple</tt></i> for
--   as long as is needed to complete the call.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> instead.</i>
simpleAsyncResultComplete :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m ()

-- | Completes an asynchronous function in an idle handler in the
--   thread-default main context (see <a>mainContextPushThreadDefault</a>)
--   of the thread that <i><tt>simple</tt></i> was initially created in
--   (and re-pushes that context around the invocation of the callback).
--   
--   Calling this function takes a reference to <i><tt>simple</tt></i> for
--   as long as is needed to complete the call.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> instead.</i>
simpleAsyncResultCompleteInIdle :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m ()

-- | Gets the operation result boolean from within the asynchronous result.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> and
--   <a>taskPropagateBoolean</a> instead.</i>
simpleAsyncResultGetOpResGboolean :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m Bool

-- | Gets a gssize from the asynchronous result.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> and
--   <a>taskPropagateInt</a> instead.</i>
simpleAsyncResultGetOpResGssize :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m Int64

-- | Ensures that the data passed to the _finish function of an async
--   operation is consistent. Three checks are performed.
--   
--   First, <i><tt>result</tt></i> is checked to ensure that it is really a
--   <a>SimpleAsyncResult</a>. Second, <i><tt>source</tt></i> is checked to
--   ensure that it matches the source object of <i><tt>result</tt></i>.
--   Third, <i><tt>sourceTag</tt></i> is checked to ensure that it is equal
--   to the <i><tt>sourceTag</tt></i> argument given to
--   <a>simpleAsyncResultNew</a> (which, by convention, is a pointer to the
--   _async function corresponding to the _finish function from which this
--   function is called). (Alternatively, if either
--   <i><tt>sourceTag</tt></i> or <i><tt>result</tt></i>'s source tag is
--   <a>Nothing</a>, then the source tag check is skipped.)
--   
--   <i>Since: 2.20</i>

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> and
--   <a>taskIsValid</a> instead.</i>
simpleAsyncResultIsValid :: (HasCallStack, MonadIO m, IsAsyncResult a, IsObject b) => a -> Maybe b -> Ptr () -> m Bool

-- | Creates a <a>SimpleAsyncResult</a>.
--   
--   The common convention is to create the <a>SimpleAsyncResult</a> in the
--   function that starts the asynchronous operation and use that same
--   function as the <i><tt>sourceTag</tt></i>.
--   
--   If your operation supports cancellation with <a>Cancellable</a> (which
--   it probably should) then you should provide the user's cancellable to
--   <a>simpleAsyncResultSetCheckCancellable</a> immediately after this
--   function returns.

-- | <i>Deprecated: (Since version 2.46)Use <a>taskNew</a> instead.</i>
simpleAsyncResultNew :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Maybe AsyncReadyCallback -> Ptr () -> m SimpleAsyncResult

-- | Creates a <a>SimpleAsyncResult</a> from an error condition.

-- | <i>Deprecated: (Since version 2.46)Use <a>taskNew</a> and
--   <a>taskReturnError</a> instead.</i>
simpleAsyncResultNewFromError :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Maybe AsyncReadyCallback -> GError -> m SimpleAsyncResult

-- | Propagates an error from within the simple asynchronous result to a
--   given destination.
--   
--   If the <a>Cancellable</a> given to a prior call to
--   <a>simpleAsyncResultSetCheckCancellable</a> is cancelled then this
--   function will return <a>True</a> with <i><tt>dest</tt></i> set
--   appropriately.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> instead.</i>
simpleAsyncResultPropagateError :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m ()

-- | Sets a <a>Cancellable</a> to check before dispatching results.
--   
--   This function has one very specific purpose: the provided cancellable
--   is checked at the time of <a>simpleAsyncResultPropagateError</a> If it
--   is cancelled, these functions will return an "Operation was cancelled"
--   error (<a>IOErrorEnumCancelled</a>).
--   
--   Implementors of cancellable asynchronous functions should use this in
--   order to provide a guarantee to their callers that cancelling an async
--   operation will reliably result in an error being returned for that
--   operation (even if a positive result for the operation has already
--   been sent as an idle to the main context to be dispatched).
--   
--   The checking described above is done regardless of any call to the
--   unrelated <a>simpleAsyncResultSetHandleCancellation</a> function.
--   
--   <i>Since: 2.32</i>

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> instead.</i>
simpleAsyncResultSetCheckCancellable :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a, IsCancellable b) => a -> Maybe b -> m ()

-- | Sets the result from a <a>GError</a>.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> and
--   <a>taskReturnError</a> instead.</i>
simpleAsyncResultSetFromError :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> GError -> m ()

-- | Sets whether to handle cancellation within the asynchronous operation.
--   
--   This function has nothing to do with
--   <a>simpleAsyncResultSetCheckCancellable</a>. It only refers to the
--   <a>Cancellable</a> passed to
--   <tt><i>g_simple_async_result_run_in_thread()</i></tt>.

-- | <i>Deprecated: (Since version 2.46)</i>
simpleAsyncResultSetHandleCancellation :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> Bool -> m ()

-- | Sets the operation result to a boolean within the asynchronous result.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> and
--   <a>taskReturnBoolean</a> instead.</i>
simpleAsyncResultSetOpResGboolean :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> Bool -> m ()

-- | Sets the operation result within the asynchronous result to the given
--   <i><tt>opRes</tt></i>.

-- | <i>Deprecated: (Since version 2.46)Use <a>Task</a> and
--   <a>taskReturnInt</a> instead.</i>
simpleAsyncResultSetOpResGssize :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> Int64 -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult o) => GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult


-- | <tt>GSimpleActionGroup</tt> is a hash table filled with <a>Action</a>
--   objects, implementing the <a>ActionGroup</a> and <a>ActionMap</a>
--   interfaces.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Objects.SimpleActionGroup

-- | Memory-managed wrapper type.
newtype SimpleActionGroup
SimpleActionGroup :: ManagedPtr SimpleActionGroup -> SimpleActionGroup

-- | Type class for types which can be safely cast to
--   <a>SimpleActionGroup</a>, for instance with
--   <a>toSimpleActionGroup</a>.
class (GObject o, IsDescendantOf SimpleActionGroup o) => IsSimpleActionGroup o

-- | Cast to <a>SimpleActionGroup</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toSimpleActionGroup :: (MonadIO m, IsSimpleActionGroup o) => o -> m SimpleActionGroup

-- | A convenience function for creating multiple <a>SimpleAction</a>
--   instances and adding them to the action group.
--   
--   <i>Since: 2.30</i>

-- | <i>Deprecated: (Since version 2.38)Use
--   <a>actionMapAddActionEntries</a></i>
simpleActionGroupAddEntries :: (HasCallStack, MonadIO m, IsSimpleActionGroup a) => a -> [ActionEntry] -> Ptr () -> m ()

-- | Adds an action to the action group.
--   
--   If the action group already contains an action with the same name as
--   <i><tt>action</tt></i> then the old action is dropped from the group.
--   
--   The action group takes its own reference on <i><tt>action</tt></i>.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.38)Use <a>actionMapAddAction</a></i>
simpleActionGroupInsert :: (HasCallStack, MonadIO m, IsSimpleActionGroup a, IsAction b) => a -> b -> m ()

-- | Looks up the action with the name <i><tt>actionName</tt></i> in the
--   group.
--   
--   If no such action exists, returns <a>Nothing</a>.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.38)Use
--   <a>actionMapLookupAction</a></i>
simpleActionGroupLookup :: (HasCallStack, MonadIO m, IsSimpleActionGroup a) => a -> Text -> m Action

-- | Creates a new, empty, <a>SimpleActionGroup</a>.
--   
--   <i>Since: 2.28</i>
simpleActionGroupNew :: (HasCallStack, MonadIO m) => m SimpleActionGroup

-- | Removes the named action from the action group.
--   
--   If no action of this name is in the group then nothing happens.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.38)Use
--   <a>actionMapRemoveAction</a></i>
simpleActionGroupRemove :: (HasCallStack, MonadIO m, IsSimpleActionGroup a) => a -> Text -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup o) => GI.Gio.Objects.SimpleActionGroup.IsSimpleActionGroup o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup


-- | <tt>GProxyAddressEnumerator</tt> is a wrapper around
--   <a>SocketAddressEnumerator</a> which takes the <a>SocketAddress</a>
--   instances returned by the <a>SocketAddressEnumerator</a> and wraps
--   them in <a>ProxyAddress</a> instances, using the given
--   <a>ProxyAddressEnumerator:proxyResolver</a>.
--   
--   This enumerator will be returned (for example, by
--   <a>socketConnectableEnumerate</a>) as appropriate when a proxy is
--   configured; there should be no need to manually wrap a
--   <a>SocketAddressEnumerator</a> instance with one.
module GI.Gio.Objects.ProxyAddressEnumerator

-- | Memory-managed wrapper type.
newtype ProxyAddressEnumerator
ProxyAddressEnumerator :: ManagedPtr ProxyAddressEnumerator -> ProxyAddressEnumerator

-- | Type class for types which can be safely cast to
--   <a>ProxyAddressEnumerator</a>, for instance with
--   <a>toProxyAddressEnumerator</a>.
class (GObject o, IsDescendantOf ProxyAddressEnumerator o) => IsProxyAddressEnumerator o

-- | Cast to <a>ProxyAddressEnumerator</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toProxyAddressEnumerator :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m ProxyAddressEnumerator

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>connectable</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructProxyAddressEnumeratorConnectable :: (IsProxyAddressEnumerator o, MonadIO m, IsSocketConnectable a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>connectable</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddressEnumerator #connectable
--   </pre>
getProxyAddressEnumeratorConnectable :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe SocketConnectable)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>default-port</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructProxyAddressEnumeratorDefaultPort :: (IsProxyAddressEnumerator o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>default-port</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddressEnumerator #defaultPort
--   </pre>
getProxyAddressEnumeratorDefaultPort :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m Word32

-- | Set the value of the “<tt>proxy-resolver</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #proxyResolver
--   </pre>
clearProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>proxy-resolver</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructProxyAddressEnumeratorProxyResolver :: (IsProxyAddressEnumerator o, MonadIO m, IsProxyResolver a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>proxy-resolver</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddressEnumerator #proxyResolver
--   </pre>
getProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe ProxyResolver)

-- | Set the value of the “<tt>proxy-resolver</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> proxyAddressEnumerator [ #proxyResolver <a>:=</a> value ]
--   </pre>
setProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o, IsProxyResolver a) => o -> a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>uri</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructProxyAddressEnumeratorUri :: (IsProxyAddressEnumerator o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>uri</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddressEnumerator #uri
--   </pre>
getProxyAddressEnumeratorUri :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe Text)
instance GHC.Classes.Eq GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator o) => GI.Gio.Objects.ProxyAddressEnumerator.IsProxyAddressEnumerator o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator


-- | A <a>InetSocketAddress</a> representing a connection via a proxy
--   server.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.ProxyAddress

-- | Memory-managed wrapper type.
newtype ProxyAddress
ProxyAddress :: ManagedPtr ProxyAddress -> ProxyAddress

-- | Type class for types which can be safely cast to <a>ProxyAddress</a>,
--   for instance with <a>toProxyAddress</a>.
class (GObject o, IsDescendantOf ProxyAddress o) => IsProxyAddress o

-- | Cast to <a>ProxyAddress</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toProxyAddress :: (MonadIO m, IsProxyAddress o) => o -> m ProxyAddress

-- | Gets <i><tt>proxy</tt></i>'s destination hostname; that is, the name
--   of the host that will be connected to via the proxy, not the name of
--   the proxy itself.
--   
--   <i>Since: 2.26</i>
proxyAddressGetDestinationHostname :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text

-- | Gets <i><tt>proxy</tt></i>'s destination port; that is, the port on
--   the destination host that will be connected to via the proxy, not the
--   port number of the proxy itself.
--   
--   <i>Since: 2.26</i>
proxyAddressGetDestinationPort :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Word16

-- | Gets the protocol that is being spoken to the destination server; eg,
--   "http" or "ftp".
--   
--   <i>Since: 2.34</i>
proxyAddressGetDestinationProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text

-- | Gets <i><tt>proxy</tt></i>'s password.
--   
--   <i>Since: 2.26</i>
proxyAddressGetPassword :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text)

-- | Gets <i><tt>proxy</tt></i>'s protocol. eg, "socks" or "http"
--   
--   <i>Since: 2.26</i>
proxyAddressGetProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text

-- | Gets the proxy URI that <i><tt>proxy</tt></i> was constructed from.
--   
--   <i>Since: 2.34</i>
proxyAddressGetUri :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text)

-- | Gets <i><tt>proxy</tt></i>'s username.
--   
--   <i>Since: 2.26</i>
proxyAddressGetUsername :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text)

-- | Creates a new <a>ProxyAddress</a> for <i><tt>inetaddr</tt></i> with
--   <i><tt>protocol</tt></i> that should tunnel through
--   <i><tt>destHostname</tt></i> and <i><tt>destPort</tt></i>.
--   
--   (Note that this method doesn't set the <a>ProxyAddress:uri</a> or
--   <a>ProxyAddress:destinationProtocol</a> fields; use
--   <tt><i>g_object_new()</i></tt> directly if you want to set those.)
--   
--   <i>Since: 2.26</i>
proxyAddressNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word16 -> Text -> Text -> Word16 -> Maybe Text -> Maybe Text -> m ProxyAddress

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>destination-hostname</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructProxyAddressDestinationHostname :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>destination-hostname</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddress #destinationHostname
--   </pre>
getProxyAddressDestinationHostname :: (MonadIO m, IsProxyAddress o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>destination-port</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructProxyAddressDestinationPort :: (IsProxyAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>destination-port</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddress #destinationPort
--   </pre>
getProxyAddressDestinationPort :: (MonadIO m, IsProxyAddress o) => o -> m Word32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>destination-protocol</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructProxyAddressDestinationProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>destination-protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddress #destinationProtocol
--   </pre>
getProxyAddressDestinationProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>password</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructProxyAddressPassword :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>password</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddress #password
--   </pre>
getProxyAddressPassword :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>protocol</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructProxyAddressProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddress #protocol
--   </pre>
getProxyAddressProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>uri</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructProxyAddressUri :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>uri</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddress #uri
--   </pre>
getProxyAddressUri :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>username</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructProxyAddressUsername :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>username</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> proxyAddress #username
--   </pre>
getProxyAddressUsername :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text)
instance GHC.Classes.Eq GI.Gio.Objects.ProxyAddress.ProxyAddress
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ProxyAddress.ProxyAddress
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ProxyAddress.ProxyAddress
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ProxyAddress.ProxyAddress)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ProxyAddress.ProxyAddress o) => GI.Gio.Objects.ProxyAddress.IsProxyAddress o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ProxyAddress.ProxyAddress
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ProxyAddress.ProxyAddress


-- | A <tt>GPermission</tt> represents the status of the caller’s
--   permission to perform a certain action.
--   
--   You can query if the action is currently allowed and if it is possible
--   to acquire the permission so that the action will be allowed in the
--   future.
--   
--   There is also an API to actually acquire the permission and one to
--   release it.
--   
--   As an example, a <tt>GPermission</tt> might represent the ability for
--   the user to write to a <a>Settings</a> object. This
--   <tt>GPermission</tt> object could then be used to decide if it is
--   appropriate to show a “Click here to unlock” button in a dialog and to
--   provide the mechanism to invoke when that button is clicked.
module GI.Gio.Objects.Permission

-- | Memory-managed wrapper type.
newtype Permission
Permission :: ManagedPtr Permission -> Permission

-- | Type class for types which can be safely cast to <a>Permission</a>,
--   for instance with <a>toPermission</a>.
class (GObject o, IsDescendantOf Permission o) => IsPermission o

-- | Cast to <a>Permission</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toPermission :: (MonadIO m, IsPermission o) => o -> m Permission

-- | Attempts to acquire the permission represented by
--   <i><tt>permission</tt></i>.
--   
--   The precise method by which this happens depends on the permission and
--   the underlying authentication mechanism. A simple example is that a
--   dialog may appear asking the user to enter their password.
--   
--   You should check with <a>permissionGetCanAcquire</a> before calling
--   this function.
--   
--   If the permission is acquired then <a>True</a> is returned. Otherwise,
--   <a>False</a> is returned and <i><tt>error</tt></i> is set
--   appropriately.
--   
--   This call is blocking, likely for a very long time (in the case that
--   user interaction is required). See <a>permissionAcquireAsync</a> for
--   the non-blocking version.
--   
--   <i>Since: 2.26</i>
permissionAcquire :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe b -> m ()

-- | Attempts to acquire the permission represented by
--   <i><tt>permission</tt></i>.
--   
--   This is the first half of the asynchronous version of
--   <a>permissionAcquire</a>.
--   
--   <i>Since: 2.26</i>
permissionAcquireAsync :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Collects the result of attempting to acquire the permission
--   represented by <i><tt>permission</tt></i>.
--   
--   This is the second half of the asynchronous version of
--   <a>permissionAcquire</a>.
--   
--   <i>Since: 2.26</i>
permissionAcquireFinish :: (HasCallStack, MonadIO m, IsPermission a, IsAsyncResult b) => a -> b -> m ()

-- | Gets the value of the 'allowed' property. This property is <a>True</a>
--   if the caller currently has permission to perform the action that
--   <i><tt>permission</tt></i> represents the permission to perform.
--   
--   <i>Since: 2.26</i>
permissionGetAllowed :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool

-- | Gets the value of the 'can-acquire' property. This property is
--   <a>True</a> if it is generally possible to acquire the permission by
--   calling <a>permissionAcquire</a>.
--   
--   <i>Since: 2.26</i>
permissionGetCanAcquire :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool

-- | Gets the value of the 'can-release' property. This property is
--   <a>True</a> if it is generally possible to release the permission by
--   calling <a>permissionRelease</a>.
--   
--   <i>Since: 2.26</i>
permissionGetCanRelease :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool

-- | This function is called by the <a>Permission</a> implementation to
--   update the properties of the permission. You should never call this
--   function except from a <a>Permission</a> implementation.
--   
--   GObject notify signals are generated, as appropriate.
--   
--   <i>Since: 2.26</i>
permissionImplUpdate :: (HasCallStack, MonadIO m, IsPermission a) => a -> Bool -> Bool -> Bool -> m ()

-- | Attempts to release the permission represented by
--   <i><tt>permission</tt></i>.
--   
--   The precise method by which this happens depends on the permission and
--   the underlying authentication mechanism. In most cases the permission
--   will be dropped immediately without further action.
--   
--   You should check with <a>permissionGetCanRelease</a> before calling
--   this function.
--   
--   If the permission is released then <a>True</a> is returned. Otherwise,
--   <a>False</a> is returned and <i><tt>error</tt></i> is set
--   appropriately.
--   
--   This call is blocking, likely for a very long time (in the case that
--   user interaction is required). See <a>permissionReleaseAsync</a> for
--   the non-blocking version.
--   
--   <i>Since: 2.26</i>
permissionRelease :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe b -> m ()

-- | Attempts to release the permission represented by
--   <i><tt>permission</tt></i>.
--   
--   This is the first half of the asynchronous version of
--   <a>permissionRelease</a>.
--   
--   <i>Since: 2.26</i>
permissionReleaseAsync :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Collects the result of attempting to release the permission
--   represented by <i><tt>permission</tt></i>.
--   
--   This is the second half of the asynchronous version of
--   <a>permissionRelease</a>.
--   
--   <i>Since: 2.26</i>
permissionReleaseFinish :: (HasCallStack, MonadIO m, IsPermission a, IsAsyncResult b) => a -> b -> m ()

-- | Get the value of the “<tt>allowed</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> permission #allowed
--   </pre>
getPermissionAllowed :: (MonadIO m, IsPermission o) => o -> m Bool

-- | Get the value of the “<tt>can-acquire</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> permission #canAcquire
--   </pre>
getPermissionCanAcquire :: (MonadIO m, IsPermission o) => o -> m Bool

-- | Get the value of the “<tt>can-release</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> permission #canRelease
--   </pre>
getPermissionCanRelease :: (MonadIO m, IsPermission o) => o -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.Permission.Permission
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Permission.Permission
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Permission.Permission
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Permission.Permission)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Permission.Permission o) => GI.Gio.Objects.Permission.IsPermission o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Permission.Permission
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Permission.Permission


-- | <tt>GOutputStream</tt> is a base class for implementing streaming
--   output.
--   
--   It has functions to write to a stream (<a>outputStreamWrite</a>), to
--   close a stream (<a>outputStreamClose</a>) and to flush pending writes
--   (<a>outputStreamFlush</a>).
--   
--   To copy the content of an input stream to an output stream without
--   manually handling the reads and writes, use <a>outputStreamSplice</a>.
--   
--   See the documentation for <a>IOStream</a> for details of thread safety
--   of streaming APIs.
--   
--   All of these functions have async variants too.
--   
--   All classes derived from <tt>GOutputStream</tt> *should* implement
--   synchronous writing, splicing, flushing and closing streams, but *may*
--   implement asynchronous versions.
module GI.Gio.Objects.OutputStream

-- | Memory-managed wrapper type.
newtype OutputStream
OutputStream :: ManagedPtr OutputStream -> OutputStream

-- | Type class for types which can be safely cast to <a>OutputStream</a>,
--   for instance with <a>toOutputStream</a>.
class (GObject o, IsDescendantOf OutputStream o) => IsOutputStream o

-- | Cast to <a>OutputStream</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toOutputStream :: (MonadIO m, IsOutputStream o) => o -> m OutputStream

-- | Clears the pending flag on <i><tt>stream</tt></i>.
outputStreamClearPending :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m ()

-- | Closes the stream, releasing resources related to it.
--   
--   Once the stream is closed, all other operations will return
--   <a>IOErrorEnumClosed</a>. Closing a stream multiple times will not
--   return an error.
--   
--   Closing a stream will automatically flush any outstanding buffers in
--   the stream.
--   
--   Streams will be automatically closed when the last reference is
--   dropped, but you might want to call this function to make sure
--   resources are released as early as possible.
--   
--   Some streams might keep the backing store of the stream (e.g. a file
--   descriptor) open after the stream is closed. See the documentation for
--   the individual stream for details.
--   
--   On failure the first error that happened will be reported, but the
--   close operation will finish as much as possible. A stream that failed
--   to close will still return <a>IOErrorEnumClosed</a> for all
--   operations. Still, it is important to check and report the error to
--   the user, otherwise there might be a loss of data as all data might
--   not be written.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. Cancelling a close will
--   still leave the stream closed, but there some streams can use a faster
--   close that doesn't block to e.g. check errors. On cancellation (as
--   with any error) there is no guarantee that all written data will reach
--   the target.
outputStreamClose :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Maybe b -> m ()

-- | Requests an asynchronous close of the stream, releasing resources
--   related to it. When the operation is finished <i><tt>callback</tt></i>
--   will be called. You can then call <a>outputStreamCloseFinish</a> to
--   get the result of the operation.
--   
--   For behaviour details see <a>outputStreamClose</a>.
--   
--   The asynchronous methods have a default fallback that uses threads to
--   implement asynchronicity, so they are optional for inheriting classes.
--   However, if you override one you must override all.
outputStreamCloseAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Closes an output stream.
outputStreamCloseFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m ()

-- | Forces a write of all user-space buffered data for the given
--   <i><tt>stream</tt></i>. Will block during the operation. Closing the
--   stream will implicitly cause a flush.
--   
--   This function is optional for inherited classes.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
outputStreamFlush :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Maybe b -> m ()

-- | Forces an asynchronous write of all user-space buffered data for the
--   given <i><tt>stream</tt></i>. For behaviour details see
--   <a>outputStreamFlush</a>.
--   
--   When the operation is finished <i><tt>callback</tt></i> will be
--   called. You can then call <a>outputStreamFlushFinish</a> to get the
--   result of the operation.
outputStreamFlushAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes flushing an output stream.
outputStreamFlushFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m ()

-- | Checks if an output stream has pending actions.
outputStreamHasPending :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m Bool

-- | Checks if an output stream has already been closed.
outputStreamIsClosed :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m Bool

-- | Checks if an output stream is being closed. This can be used inside
--   e.g. a flush implementation to see if the flush (or other i/o
--   operation) is called from within the closing operation.
--   
--   <i>Since: 2.24</i>
outputStreamIsClosing :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m Bool

-- | Sets <i><tt>stream</tt></i> to have actions pending. If the pending
--   flag is already set or <i><tt>stream</tt></i> is closed, it will
--   return <a>False</a> and set <i><tt>error</tt></i>.
outputStreamSetPending :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m ()

-- | Splices an input stream into an output stream.
outputStreamSplice :: (HasCallStack, MonadIO m, IsOutputStream a, IsInputStream b, IsCancellable c) => a -> b -> [OutputStreamSpliceFlags] -> Maybe c -> m Int64

-- | Splices a stream asynchronously. When the operation is finished
--   <i><tt>callback</tt></i> will be called. You can then call
--   <a>outputStreamSpliceFinish</a> to get the result of the operation.
--   
--   For the synchronous, blocking version of this function, see
--   <a>outputStreamSplice</a>.
outputStreamSpliceAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsInputStream b, IsCancellable c) => a -> b -> [OutputStreamSpliceFlags] -> Int32 -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous stream splice operation.
outputStreamSpliceFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m Int64

-- | Tries to write <i><tt>count</tt></i> bytes from <i><tt>buffer</tt></i>
--   into the stream. Will block during the operation.
--   
--   If count is 0, returns 0 and does nothing. A value of
--   <i><tt>count</tt></i> larger than <tt><i>G_MAXSSIZE</i></tt> will
--   cause a <a>IOErrorEnumInvalidArgument</a> error.
--   
--   On success, the number of bytes written to the stream is returned. It
--   is not an error if this is not the same as the requested size, as it
--   can happen e.g. on a partial I/O error, or if there is not enough
--   storage in the stream. All writes block until at least one byte is
--   written or an error occurs; 0 is never returned (unless
--   <i><tt>count</tt></i> is 0).
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If an operation was
--   partially finished when the operation was cancelled the partial result
--   will be returned, without an error.
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
outputStreamWrite :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m Int64

-- | Tries to write <i><tt>count</tt></i> bytes from <i><tt>buffer</tt></i>
--   into the stream. Will block during the operation.
--   
--   This function is similar to <a>outputStreamWrite</a>, except it tries
--   to write as many bytes as requested, only stopping on an error.
--   
--   On a successful write of <i><tt>count</tt></i> bytes, <a>True</a> is
--   returned, and <i><tt>bytesWritten</tt></i> is set to
--   <i><tt>count</tt></i>.
--   
--   If there is an error during the operation <a>False</a> is returned and
--   <i><tt>error</tt></i> is set to indicate the error status.
--   
--   As a special exception to the normal conventions for functions that
--   use <a>GError</a>, if this function returns <a>False</a> (and sets
--   <i><tt>error</tt></i>) then <i><tt>bytesWritten</tt></i> will be set
--   to the number of bytes that were successfully written before the error
--   was encountered. This functionality is only available from C. If you
--   need it from another language then you must write your own loop around
--   <a>outputStreamWrite</a>.
outputStreamWriteAll :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m CSize

-- | Request an asynchronous write of <i><tt>count</tt></i> bytes from
--   <i><tt>buffer</tt></i> into the stream. When the operation is finished
--   <i><tt>callback</tt></i> will be called. You can then call
--   <a>outputStreamWriteAllFinish</a> to get the result of the operation.
--   
--   This is the asynchronous version of <a>outputStreamWriteAll</a>.
--   
--   Call <a>outputStreamWriteAllFinish</a> to collect the result.
--   
--   Any outstanding I/O request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   Note that no copy of <i><tt>buffer</tt></i> will be made, so it must
--   stay valid until <i><tt>callback</tt></i> is called.
--   
--   <i>Since: 2.44</i>
outputStreamWriteAllAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous stream write operation started with
--   <a>outputStreamWriteAllAsync</a>.
--   
--   As a special exception to the normal conventions for functions that
--   use <a>GError</a>, if this function returns <a>False</a> (and sets
--   <i><tt>error</tt></i>) then <i><tt>bytesWritten</tt></i> will be set
--   to the number of bytes that were successfully written before the error
--   was encountered. This functionality is only available from C. If you
--   need it from another language then you must write your own loop around
--   <a>outputStreamWriteAsync</a>.
--   
--   <i>Since: 2.44</i>
outputStreamWriteAllFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m CSize

-- | Request an asynchronous write of <i><tt>count</tt></i> bytes from
--   <i><tt>buffer</tt></i> into the stream. When the operation is finished
--   <i><tt>callback</tt></i> will be called. You can then call
--   <a>outputStreamWriteFinish</a> to get the result of the operation.
--   
--   During an async request no other sync and async calls are allowed, and
--   will result in <a>IOErrorEnumPending</a> errors.
--   
--   A value of <i><tt>count</tt></i> larger than
--   <tt><i>G_MAXSSIZE</i></tt> will cause a
--   <a>IOErrorEnumInvalidArgument</a> error.
--   
--   On success, the number of bytes written will be passed to the
--   <i><tt>callback</tt></i>. It is not an error if this is not the same
--   as the requested size, as it can happen e.g. on a partial I/O error,
--   but generally we try to write as many bytes as requested.
--   
--   You are guaranteed that this method will never fail with
--   <a>IOErrorEnumWouldBlock</a> - if <i><tt>stream</tt></i> can't accept
--   more data, the method will just wait until this changes.
--   
--   Any outstanding I/O request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   The asynchronous methods have a default fallback that uses threads to
--   implement asynchronicity, so they are optional for inheriting classes.
--   However, if you override one you must override all.
--   
--   For the synchronous, blocking version of this function, see
--   <a>outputStreamWrite</a>.
--   
--   Note that no copy of <i><tt>buffer</tt></i> will be made, so it must
--   stay valid until <i><tt>callback</tt></i> is called. See
--   <a>outputStreamWriteBytesAsync</a> for a <a>Bytes</a> version that
--   will automatically hold a reference to the contents (without copying)
--   for the duration of the call.
outputStreamWriteAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Maybe ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | A wrapper function for <a>outputStreamWrite</a> which takes a
--   <a>Bytes</a> as input. This can be more convenient for use by language
--   bindings or in other cases where the refcounted nature of <a>Bytes</a>
--   is helpful over a bare pointer interface.
--   
--   However, note that this function may still perform partial writes,
--   just like <a>outputStreamWrite</a>. If that occurs, to continue
--   writing, you will need to create a new <a>Bytes</a> containing just
--   the remaining bytes, using <a>bytesNewFromBytes</a>. Passing the same
--   <a>Bytes</a> instance multiple times potentially can result in
--   duplicated data in the output stream.
outputStreamWriteBytes :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Bytes -> Maybe b -> m Int64

-- | This function is similar to <a>outputStreamWriteAsync</a>, but takes a
--   <a>Bytes</a> as input. Due to the refcounted nature of <a>Bytes</a>,
--   this allows the stream to avoid taking a copy of the data.
--   
--   However, note that this function may still perform partial writes,
--   just like <a>outputStreamWriteAsync</a>. If that occurs, to continue
--   writing, you will need to create a new <a>Bytes</a> containing just
--   the remaining bytes, using <a>bytesNewFromBytes</a>. Passing the same
--   <a>Bytes</a> instance multiple times potentially can result in
--   duplicated data in the output stream.
--   
--   For the synchronous, blocking version of this function, see
--   <a>outputStreamWriteBytes</a>.
outputStreamWriteBytesAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Bytes -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a stream write-from-t<a>Bytes</a> operation.
outputStreamWriteBytesFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m Int64

-- | Finishes a stream write operation.
outputStreamWriteFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m Int64

-- | Tries to write the bytes contained in the <i><tt>nVectors</tt></i>
--   <i><tt>vectors</tt></i> into the stream. Will block during the
--   operation.
--   
--   If <i><tt>nVectors</tt></i> is 0 or the sum of all bytes in
--   <i><tt>vectors</tt></i> is 0, returns 0 and does nothing.
--   
--   On success, the number of bytes written to the stream is returned. It
--   is not an error if this is not the same as the requested size, as it
--   can happen e.g. on a partial I/O error, or if there is not enough
--   storage in the stream. All writes block until at least one byte is
--   written or an error occurs; 0 is never returned (unless
--   <i><tt>nVectors</tt></i> is 0 or the sum of all bytes in
--   <i><tt>vectors</tt></i> is 0).
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If an operation was
--   partially finished when the operation was cancelled the partial result
--   will be returned, without an error.
--   
--   Some implementations of <a>outputStreamWritev</a> may have limitations
--   on the aggregate buffer size, and will return
--   <a>IOErrorEnumInvalidArgument</a> if these are exceeded. For example,
--   when writing to a local file on UNIX platforms, the aggregate buffer
--   size must not exceed <tt><i>G_MAXSSIZE</i></tt> bytes.
--   
--   <i>Since: 2.60</i>
outputStreamWritev :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Maybe b -> m CSize

-- | Tries to write the bytes contained in the <i><tt>nVectors</tt></i>
--   <i><tt>vectors</tt></i> into the stream. Will block during the
--   operation.
--   
--   This function is similar to <a>outputStreamWritev</a>, except it tries
--   to write as many bytes as requested, only stopping on an error.
--   
--   On a successful write of all <i><tt>nVectors</tt></i> vectors,
--   <a>True</a> is returned, and <i><tt>bytesWritten</tt></i> is set to
--   the sum of all the sizes of <i><tt>vectors</tt></i>.
--   
--   If there is an error during the operation <a>False</a> is returned and
--   <i><tt>error</tt></i> is set to indicate the error status.
--   
--   As a special exception to the normal conventions for functions that
--   use <a>GError</a>, if this function returns <a>False</a> (and sets
--   <i><tt>error</tt></i>) then <i><tt>bytesWritten</tt></i> will be set
--   to the number of bytes that were successfully written before the error
--   was encountered. This functionality is only available from C. If you
--   need it from another language then you must write your own loop around
--   <a>outputStreamWrite</a>.
--   
--   The content of the individual elements of <i><tt>vectors</tt></i>
--   might be changed by this function.
--   
--   <i>Since: 2.60</i>
outputStreamWritevAll :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Maybe b -> m CSize

-- | Request an asynchronous write of the bytes contained in the
--   <i><tt>nVectors</tt></i> <i><tt>vectors</tt></i> into the stream. When
--   the operation is finished <i><tt>callback</tt></i> will be called. You
--   can then call <a>outputStreamWritevAllFinish</a> to get the result of
--   the operation.
--   
--   This is the asynchronous version of <a>outputStreamWritevAll</a>.
--   
--   Call <a>outputStreamWritevAllFinish</a> to collect the result.
--   
--   Any outstanding I/O request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   Note that no copy of <i><tt>vectors</tt></i> will be made, so it must
--   stay valid until <i><tt>callback</tt></i> is called. The content of
--   the individual elements of <i><tt>vectors</tt></i> might be changed by
--   this function.
--   
--   <i>Since: 2.60</i>
outputStreamWritevAllAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous stream write operation started with
--   <a>outputStreamWritevAllAsync</a>.
--   
--   As a special exception to the normal conventions for functions that
--   use <a>GError</a>, if this function returns <a>False</a> (and sets
--   <i><tt>error</tt></i>) then <i><tt>bytesWritten</tt></i> will be set
--   to the number of bytes that were successfully written before the error
--   was encountered. This functionality is only available from C. If you
--   need it from another language then you must write your own loop around
--   <a>outputStreamWritevAsync</a>.
--   
--   <i>Since: 2.60</i>
outputStreamWritevAllFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m CSize

-- | Request an asynchronous write of the bytes contained in
--   <i><tt>nVectors</tt></i> <i><tt>vectors</tt></i> into the stream. When
--   the operation is finished <i><tt>callback</tt></i> will be called. You
--   can then call <a>outputStreamWritevFinish</a> to get the result of the
--   operation.
--   
--   During an async request no other sync and async calls are allowed, and
--   will result in <a>IOErrorEnumPending</a> errors.
--   
--   On success, the number of bytes written will be passed to the
--   <i><tt>callback</tt></i>. It is not an error if this is not the same
--   as the requested size, as it can happen e.g. on a partial I/O error,
--   but generally we try to write as many bytes as requested.
--   
--   You are guaranteed that this method will never fail with
--   <a>IOErrorEnumWouldBlock</a> — if <i><tt>stream</tt></i> can't accept
--   more data, the method will just wait until this changes.
--   
--   Any outstanding I/O request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   The asynchronous methods have a default fallback that uses threads to
--   implement asynchronicity, so they are optional for inheriting classes.
--   However, if you override one you must override all.
--   
--   For the synchronous, blocking version of this function, see
--   <a>outputStreamWritev</a>.
--   
--   Note that no copy of <i><tt>vectors</tt></i> will be made, so it must
--   stay valid until <i><tt>callback</tt></i> is called.
--   
--   <i>Since: 2.60</i>
outputStreamWritevAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a stream writev operation.
--   
--   <i>Since: 2.60</i>
outputStreamWritevFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m CSize
instance GHC.Classes.Eq GI.Gio.Objects.OutputStream.OutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.OutputStream.OutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.OutputStream.OutputStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.OutputStream.OutputStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.OutputStream.OutputStream o) => GI.Gio.Objects.OutputStream.IsOutputStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.OutputStream.OutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.OutputStream.OutputStream


-- | Like <a>NetworkAddress</a> does with hostnames,
--   <tt>GNetworkService</tt> provides an easy way to resolve a SRV record,
--   and then attempt to connect to one of the hosts that implements that
--   service, handling service priority/weighting, multiple IP addresses,
--   and multiple address families.
--   
--   See <a>SrvTarget</a> for more information about SRV records, and see
--   <a>SocketConnectable</a> for an example of using the connectable
--   interface.
module GI.Gio.Objects.NetworkService

-- | Memory-managed wrapper type.
newtype NetworkService
NetworkService :: ManagedPtr NetworkService -> NetworkService

-- | Type class for types which can be safely cast to
--   <a>NetworkService</a>, for instance with <a>toNetworkService</a>.
class (GObject o, IsDescendantOf NetworkService o) => IsNetworkService o

-- | Cast to <a>NetworkService</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toNetworkService :: (MonadIO m, IsNetworkService o) => o -> m NetworkService

-- | Gets the domain that <i><tt>srv</tt></i> serves. This might be either
--   UTF-8 or ASCII-encoded, depending on what <i><tt>srv</tt></i> was
--   created with.
--   
--   <i>Since: 2.22</i>
networkServiceGetDomain :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text

-- | Gets <i><tt>srv</tt></i>'s protocol name (eg, "tcp").
--   
--   <i>Since: 2.22</i>
networkServiceGetProtocol :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text

-- | Gets the URI scheme used to resolve proxies. By default, the service
--   name is used as scheme.
--   
--   <i>Since: 2.26</i>
networkServiceGetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text

-- | Gets <i><tt>srv</tt></i>'s service name (eg, "ldap").
--   
--   <i>Since: 2.22</i>
networkServiceGetService :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text

-- | Creates a new <a>NetworkService</a> representing the given
--   <i><tt>service</tt></i>, <i><tt>protocol</tt></i>, and
--   <i><tt>domain</tt></i>. This will initially be unresolved; use the
--   <a>SocketConnectable</a> interface to resolve it.
--   
--   <i>Since: 2.22</i>
networkServiceNew :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> m NetworkService

-- | Set's the URI scheme used to resolve proxies. By default, the service
--   name is used as scheme.
--   
--   <i>Since: 2.26</i>
networkServiceSetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>domain</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructNetworkServiceDomain :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>domain</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkService #domain
--   </pre>
getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>protocol</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructNetworkServiceProtocol :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkService #protocol
--   </pre>
getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>scheme</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructNetworkServiceScheme :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>scheme</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkService #scheme
--   </pre>
getNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> m Text

-- | Set the value of the “<tt>scheme</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> networkService [ #scheme <a>:=</a> value ]
--   </pre>
setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>service</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructNetworkServiceService :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>service</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkService #service
--   </pre>
getNetworkServiceService :: (MonadIO m, IsNetworkService o) => o -> m Text
instance GHC.Classes.Eq GI.Gio.Objects.NetworkService.NetworkService
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.NetworkService.NetworkService
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.NetworkService.NetworkService
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.NetworkService.NetworkService)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.NetworkService.NetworkService o) => GI.Gio.Objects.NetworkService.IsNetworkService o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.NetworkService.NetworkService
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.NetworkService.NetworkService


-- | <tt>GNetworkAddress</tt> provides an easy way to resolve a hostname
--   and then attempt to connect to that host, handling the possibility of
--   multiple IP addresses and multiple address families.
--   
--   The enumeration results of resolved addresses *may* be cached as long
--   as this object is kept alive which may have unexpected results if
--   alive for too long.
--   
--   See <a>SocketConnectable</a> for an example of using the connectable
--   interface.
module GI.Gio.Objects.NetworkAddress

-- | Memory-managed wrapper type.
newtype NetworkAddress
NetworkAddress :: ManagedPtr NetworkAddress -> NetworkAddress

-- | Type class for types which can be safely cast to
--   <a>NetworkAddress</a>, for instance with <a>toNetworkAddress</a>.
class (GObject o, IsDescendantOf NetworkAddress o) => IsNetworkAddress o

-- | Cast to <a>NetworkAddress</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toNetworkAddress :: (MonadIO m, IsNetworkAddress o) => o -> m NetworkAddress

-- | Gets <i><tt>addr</tt></i>'s hostname. This might be either UTF-8 or
--   ASCII-encoded, depending on what <i><tt>addr</tt></i> was created
--   with.
--   
--   <i>Since: 2.22</i>
networkAddressGetHostname :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m Text

-- | Gets <i><tt>addr</tt></i>'s port number
--   
--   <i>Since: 2.22</i>
networkAddressGetPort :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m Word16

-- | Gets <i><tt>addr</tt></i>'s scheme
--   
--   <i>Since: 2.26</i>
networkAddressGetScheme :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m (Maybe Text)

-- | Creates a new <a>SocketConnectable</a> for connecting to the given
--   <i><tt>hostname</tt></i> and <i><tt>port</tt></i>.
--   
--   Note that depending on the configuration of the machine, a
--   <i><tt>hostname</tt></i> of <tt>localhost</tt> may refer to the IPv4
--   loopback address only, or to both IPv4 and IPv6; use
--   <a>networkAddressNewLoopback</a> to create a <a>NetworkAddress</a>
--   that is guaranteed to resolve to both addresses.
--   
--   <i>Since: 2.22</i>
networkAddressNew :: (HasCallStack, MonadIO m) => Text -> Word16 -> m NetworkAddress

-- | Creates a new <a>SocketConnectable</a> for connecting to the local
--   host over a loopback connection to the given <i><tt>port</tt></i>.
--   This is intended for use in connecting to local services which may be
--   running on IPv4 or IPv6.
--   
--   The connectable will return IPv4 and IPv6 loopback addresses,
--   regardless of how the host resolves <tt>localhost</tt>. By contrast,
--   <a>networkAddressNew</a> will often only return an IPv4 address when
--   resolving <tt>localhost</tt>, and an IPv6 address for
--   <tt>localhost6</tt>.
--   
--   <a>networkAddressGetHostname</a> will always return <tt>localhost</tt>
--   for a <a>NetworkAddress</a> created with this constructor.
--   
--   <i>Since: 2.44</i>
networkAddressNewLoopback :: (HasCallStack, MonadIO m) => Word16 -> m NetworkAddress

-- | Creates a new <a>SocketConnectable</a> for connecting to the given
--   <i><tt>hostname</tt></i> and <i><tt>port</tt></i>. May fail and return
--   <a>Nothing</a> in case parsing <i><tt>hostAndPort</tt></i> fails.
--   
--   <i><tt>hostAndPort</tt></i> may be in any of a number of recognised
--   formats; an IPv6 address, an IPv4 address, or a domain name (in which
--   case a DNS lookup is performed). Quoting with [] is supported for all
--   address types. A port override may be specified in the usual way with
--   a colon.
--   
--   If no port is specified in <i><tt>hostAndPort</tt></i> then
--   <i><tt>defaultPort</tt></i> will be used as the port number to connect
--   to.
--   
--   In general, <i><tt>hostAndPort</tt></i> is expected to be provided by
--   the user (allowing them to give the hostname, and a port override if
--   necessary) and <i><tt>defaultPort</tt></i> is expected to be provided
--   by the application.
--   
--   (The port component of <i><tt>hostAndPort</tt></i> can also be
--   specified as a service name rather than as a numeric port, but this
--   functionality is deprecated, because it depends on the contents of
--   /etc/services, which is generally quite sparse on platforms other than
--   Linux.)
--   
--   <i>Since: 2.22</i>
networkAddressParse :: (HasCallStack, MonadIO m) => Text -> Word16 -> m NetworkAddress

-- | Creates a new <a>SocketConnectable</a> for connecting to the given
--   <i><tt>uri</tt></i>. May fail and return <a>Nothing</a> in case
--   parsing <i><tt>uri</tt></i> fails.
--   
--   Using this rather than <a>networkAddressNew</a> or
--   <a>networkAddressParse</a> allows <a>SocketClient</a> to determine
--   when to use application-specific proxy protocols.
--   
--   <i>Since: 2.26</i>
networkAddressParseUri :: (HasCallStack, MonadIO m) => Text -> Word16 -> m NetworkAddress

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>hostname</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructNetworkAddressHostname :: (IsNetworkAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>hostname</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkAddress #hostname
--   </pre>
getNetworkAddressHostname :: (MonadIO m, IsNetworkAddress o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>port</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructNetworkAddressPort :: (IsNetworkAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>port</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkAddress #port
--   </pre>
getNetworkAddressPort :: (MonadIO m, IsNetworkAddress o) => o -> m Word32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>scheme</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructNetworkAddressScheme :: (IsNetworkAddress o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>scheme</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkAddress #scheme
--   </pre>
getNetworkAddressScheme :: (MonadIO m, IsNetworkAddress o) => o -> m (Maybe Text)
instance GHC.Classes.Eq GI.Gio.Objects.NetworkAddress.NetworkAddress
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.NetworkAddress.NetworkAddress
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.NetworkAddress.NetworkAddress
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.NetworkAddress.NetworkAddress)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.NetworkAddress.NetworkAddress o) => GI.Gio.Objects.NetworkAddress.IsNetworkAddress o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.NetworkAddress.NetworkAddress
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.NetworkAddress.NetworkAddress


-- | <i>No description available in the introspection data.</i>
module GI.Gio.Objects.NativeVolumeMonitor

-- | Memory-managed wrapper type.
newtype NativeVolumeMonitor
NativeVolumeMonitor :: ManagedPtr NativeVolumeMonitor -> NativeVolumeMonitor

-- | Type class for types which can be safely cast to
--   <a>NativeVolumeMonitor</a>, for instance with
--   <a>toNativeVolumeMonitor</a>.
class (GObject o, IsDescendantOf NativeVolumeMonitor o) => IsNativeVolumeMonitor o

-- | Cast to <a>NativeVolumeMonitor</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toNativeVolumeMonitor :: (MonadIO m, IsNativeVolumeMonitor o) => o -> m NativeVolumeMonitor
instance GHC.Classes.Eq GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor o) => GI.Gio.Objects.NativeVolumeMonitor.IsNativeVolumeMonitor o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor


-- | A socket address of some unknown native type.
--   
--   This corresponds to a general <tt>struct sockaddr</tt> of a type not
--   otherwise handled by GLib.
--   
--   <i>Since: 2.46</i>
module GI.Gio.Objects.NativeSocketAddress

-- | Memory-managed wrapper type.
newtype NativeSocketAddress
NativeSocketAddress :: ManagedPtr NativeSocketAddress -> NativeSocketAddress

-- | Type class for types which can be safely cast to
--   <a>NativeSocketAddress</a>, for instance with
--   <a>toNativeSocketAddress</a>.
class (GObject o, IsDescendantOf NativeSocketAddress o) => IsNativeSocketAddress o

-- | Cast to <a>NativeSocketAddress</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toNativeSocketAddress :: (MonadIO m, IsNativeSocketAddress o) => o -> m NativeSocketAddress

-- | Creates a new <a>NativeSocketAddress</a> for <i><tt>native</tt></i>
--   and <i><tt>len</tt></i>.
--   
--   <i>Since: 2.46</i>
nativeSocketAddressNew :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m NativeSocketAddress
instance GHC.Classes.Eq GI.Gio.Objects.NativeSocketAddress.NativeSocketAddress
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.NativeSocketAddress.NativeSocketAddress
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.NativeSocketAddress.NativeSocketAddress
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.NativeSocketAddress.NativeSocketAddress)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.NativeSocketAddress.NativeSocketAddress o) => GI.Gio.Objects.NativeSocketAddress.IsNativeSocketAddress o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.NativeSocketAddress.NativeSocketAddress
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.NativeSocketAddress.NativeSocketAddress


-- | <tt>GMemoryOutputStream</tt> is a class for using arbitrary memory
--   chunks as output for GIO streaming output operations.
--   
--   As of GLib 2.34, <tt>GMemoryOutputStream</tt> trivially implements
--   <a>PollableOutputStream</a>: it always polls as ready.
module GI.Gio.Objects.MemoryOutputStream

-- | Memory-managed wrapper type.
newtype MemoryOutputStream
MemoryOutputStream :: ManagedPtr MemoryOutputStream -> MemoryOutputStream

-- | Type class for types which can be safely cast to
--   <a>MemoryOutputStream</a>, for instance with
--   <a>toMemoryOutputStream</a>.
class (GObject o, IsDescendantOf MemoryOutputStream o) => IsMemoryOutputStream o

-- | Cast to <a>MemoryOutputStream</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toMemoryOutputStream :: (MonadIO m, IsMemoryOutputStream o) => o -> m MemoryOutputStream

-- | Gets any loaded data from the <i><tt>ostream</tt></i>.
--   
--   Note that the returned pointer may become invalid on the next write or
--   truncate operation on the stream.
memoryOutputStreamGetData :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m (Ptr ())

-- | Returns the number of bytes from the start up to including the last
--   byte written in the stream that has not been truncated away.
--   
--   <i>Since: 2.18</i>
memoryOutputStreamGetDataSize :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m CSize

-- | Gets the size of the currently allocated data area (available from
--   <a>memoryOutputStreamGetData</a>).
--   
--   You probably don't want to use this function on resizable streams. See
--   <a>memoryOutputStreamGetDataSize</a> instead. For resizable streams
--   the size returned by this function is an implementation detail and may
--   be change at any time in response to operations on the stream.
--   
--   If the stream is fixed-sized (ie: no realloc was passed to
--   <tt><i>g_memory_output_stream_new()</i></tt>) then this is the maximum
--   size of the stream and further writes will return
--   <a>IOErrorEnumNoSpace</a>.
--   
--   In any case, if you want the number of bytes currently written to the
--   stream, use <a>memoryOutputStreamGetDataSize</a>.
memoryOutputStreamGetSize :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m CSize

-- | Creates a new <a>MemoryOutputStream</a>, using <a>realloc</a> and
--   <a>free</a> for memory allocation.
--   
--   <i>Since: 2.36</i>
memoryOutputStreamNewResizable :: (HasCallStack, MonadIO m) => m MemoryOutputStream

-- | Returns data from the <i><tt>ostream</tt></i> as a <a>Bytes</a>.
--   <i><tt>ostream</tt></i> must be closed before calling this function.
--   
--   <i>Since: 2.34</i>
memoryOutputStreamStealAsBytes :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m Bytes

-- | Gets any loaded data from the <i><tt>ostream</tt></i>. Ownership of
--   the data is transferred to the caller; when no longer needed it must
--   be freed using the free function set in <i><tt>ostream</tt></i>'s
--   <a>MemoryOutputStream</a>:<tt><i>destroy-function</i></tt> property.
--   
--   <i><tt>ostream</tt></i> must be closed before calling this function.
--   
--   <i>Since: 2.26</i>
memoryOutputStreamStealData :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m (Ptr ())

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>data</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructMemoryOutputStreamData :: (IsMemoryOutputStream o, MonadIO m) => Ptr () -> m (GValueConstruct o)

-- | Get the value of the “<tt>data</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memoryOutputStream #data
--   </pre>
getMemoryOutputStreamData :: (MonadIO m, IsMemoryOutputStream o) => o -> m (Ptr ())

-- | Get the value of the “<tt>data-size</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memoryOutputStream #dataSize
--   </pre>
getMemoryOutputStreamDataSize :: (MonadIO m, IsMemoryOutputStream o) => o -> m CULong

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>size</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructMemoryOutputStreamSize :: (IsMemoryOutputStream o, MonadIO m) => CULong -> m (GValueConstruct o)

-- | Get the value of the “<tt>size</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> memoryOutputStream #size
--   </pre>
getMemoryOutputStreamSize :: (MonadIO m, IsMemoryOutputStream o) => o -> m CULong
instance GHC.Classes.Eq GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream o) => GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream


-- | <tt>GMemoryInputStream</tt> is a class for using arbitrary memory
--   chunks as input for GIO streaming input operations.
--   
--   As of GLib 2.34, <tt>GMemoryInputStream</tt> implements
--   <a>PollableInputStream</a>.
module GI.Gio.Objects.MemoryInputStream

-- | Memory-managed wrapper type.
newtype MemoryInputStream
MemoryInputStream :: ManagedPtr MemoryInputStream -> MemoryInputStream

-- | Type class for types which can be safely cast to
--   <a>MemoryInputStream</a>, for instance with
--   <a>toMemoryInputStream</a>.
class (GObject o, IsDescendantOf MemoryInputStream o) => IsMemoryInputStream o

-- | Cast to <a>MemoryInputStream</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toMemoryInputStream :: (MonadIO m, IsMemoryInputStream o) => o -> m MemoryInputStream

-- | Appends <i><tt>bytes</tt></i> to data that can be read from the input
--   stream.
--   
--   <i>Since: 2.34</i>
memoryInputStreamAddBytes :: (HasCallStack, MonadIO m, IsMemoryInputStream a) => a -> Bytes -> m ()

-- | Appends <i><tt>data</tt></i> to data that can be read from the input
--   stream
memoryInputStreamAddData :: (HasCallStack, MonadIO m, IsMemoryInputStream a) => a -> ByteString -> Maybe DestroyNotify -> m ()

-- | Creates a new empty <a>MemoryInputStream</a>.
memoryInputStreamNew :: (HasCallStack, MonadIO m) => m MemoryInputStream

-- | Creates a new <a>MemoryInputStream</a> with data from the given
--   <i><tt>bytes</tt></i>.
--   
--   <i>Since: 2.34</i>
memoryInputStreamNewFromBytes :: (HasCallStack, MonadIO m) => Bytes -> m MemoryInputStream

-- | Creates a new <a>MemoryInputStream</a> with data in memory of a given
--   size.
memoryInputStreamNewFromData :: (HasCallStack, MonadIO m) => ByteString -> Maybe DestroyNotify -> m MemoryInputStream
instance GHC.Classes.Eq GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.MemoryInputStream.MemoryInputStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.MemoryInputStream.MemoryInputStream o) => GI.Gio.Objects.MemoryInputStream.IsMemoryInputStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.MemoryInputStream.MemoryInputStream


-- | <tt>GInputStream</tt> is a base class for implementing streaming
--   input.
--   
--   It has functions to read from a stream (<a>inputStreamRead</a>), to
--   close a stream (<a>inputStreamClose</a>) and to skip some content
--   (<a>inputStreamSkip</a>).
--   
--   To copy the content of an input stream to an output stream without
--   manually handling the reads and writes, use <a>outputStreamSplice</a>.
--   
--   See the documentation for <a>IOStream</a> for details of thread safety
--   of streaming APIs.
--   
--   All of these functions have async variants too.
module GI.Gio.Objects.InputStream

-- | Memory-managed wrapper type.
newtype InputStream
InputStream :: ManagedPtr InputStream -> InputStream

-- | Type class for types which can be safely cast to <a>InputStream</a>,
--   for instance with <a>toInputStream</a>.
class (GObject o, IsDescendantOf InputStream o) => IsInputStream o

-- | Cast to <a>InputStream</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toInputStream :: (MonadIO m, IsInputStream o) => o -> m InputStream

-- | Clears the pending flag on <i><tt>stream</tt></i>.
inputStreamClearPending :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m ()

-- | Closes the stream, releasing resources related to it.
--   
--   Once the stream is closed, all other operations will return
--   <a>IOErrorEnumClosed</a>. Closing a stream multiple times will not
--   return an error.
--   
--   Streams will be automatically closed when the last reference is
--   dropped, but you might want to call this function to make sure
--   resources are released as early as possible.
--   
--   Some streams might keep the backing store of the stream (e.g. a file
--   descriptor) open after the stream is closed. See the documentation for
--   the individual stream for details.
--   
--   On failure the first error that happened will be reported, but the
--   close operation will finish as much as possible. A stream that failed
--   to close will still return <a>IOErrorEnumClosed</a> for all
--   operations. Still, it is important to check and report the error to
--   the user.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. Cancelling a close will
--   still leave the stream closed, but some streams can use a faster close
--   that doesn't block to e.g. check errors.
inputStreamClose :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe b -> m ()

-- | Requests an asynchronous closes of the stream, releasing resources
--   related to it. When the operation is finished <i><tt>callback</tt></i>
--   will be called. You can then call <a>inputStreamCloseFinish</a> to get
--   the result of the operation.
--   
--   For behaviour details see <a>inputStreamClose</a>.
--   
--   The asynchronous methods have a default fallback that uses threads to
--   implement asynchronicity, so they are optional for inheriting classes.
--   However, if you override one you must override all.
inputStreamCloseAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes closing a stream asynchronously, started from
--   <a>inputStreamCloseAsync</a>.
inputStreamCloseFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m ()

-- | Checks if an input stream has pending actions.
inputStreamHasPending :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m Bool

-- | Checks if an input stream is closed.
inputStreamIsClosed :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m Bool

-- | Tries to read <i><tt>count</tt></i> bytes from the stream into the
--   buffer starting at <i><tt>buffer</tt></i>. Will block during this
--   read.
--   
--   If count is zero returns zero and does nothing. A value of
--   <i><tt>count</tt></i> larger than <tt><i>G_MAXSSIZE</i></tt> will
--   cause a <a>IOErrorEnumInvalidArgument</a> error.
--   
--   On success, the number of bytes read into the buffer is returned. It
--   is not an error if this is not the same as the requested size, as it
--   can happen e.g. near the end of a file. Zero is returned on end of
--   file (or if <i><tt>count</tt></i> is zero), but never otherwise.
--   
--   The returned <i><tt>buffer</tt></i> is not a nul-terminated string, it
--   can contain nul bytes at any position, and this function doesn't
--   nul-terminate the <i><tt>buffer</tt></i>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If an operation was
--   partially finished when the operation was cancelled the partial result
--   will be returned, without an error.
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
inputStreamRead :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m (Int64, ByteString)

-- | Tries to read <i><tt>count</tt></i> bytes from the stream into the
--   buffer starting at <i><tt>buffer</tt></i>. Will block during this
--   read.
--   
--   This function is similar to <a>inputStreamRead</a>, except it tries to
--   read as many bytes as requested, only stopping on an error or end of
--   stream.
--   
--   On a successful read of <i><tt>count</tt></i> bytes, or if we reached
--   the end of the stream, <a>True</a> is returned, and
--   <i><tt>bytesRead</tt></i> is set to the number of bytes read into
--   <i><tt>buffer</tt></i>.
--   
--   If there is an error during the operation <a>False</a> is returned and
--   <i><tt>error</tt></i> is set to indicate the error status.
--   
--   As a special exception to the normal conventions for functions that
--   use <a>GError</a>, if this function returns <a>False</a> (and sets
--   <i><tt>error</tt></i>) then <i><tt>bytesRead</tt></i> will be set to
--   the number of bytes that were successfully read before the error was
--   encountered. This functionality is only available from C. If you need
--   it from another language then you must write your own loop around
--   <a>inputStreamRead</a>.
inputStreamReadAll :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m (ByteString, CSize)

-- | Request an asynchronous read of <i><tt>count</tt></i> bytes from the
--   stream into the buffer starting at <i><tt>buffer</tt></i>.
--   
--   This is the asynchronous equivalent of
--   [method<i><tt>inputStream</tt></i>.read_all].
--   
--   Call [method<i><tt>inputStream</tt></i>.read_all_finish] to collect
--   the result.
--   
--   Any outstanding I/O request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   <i>Since: 2.44</i>
inputStreamReadAllAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ByteString

-- | Finishes an asynchronous stream read operation started with
--   [method<i><tt>inputStream</tt></i>.read_all_async].
--   
--   As a special exception to the normal conventions for functions that
--   use <a>GError</a>, if this function returns <a>False</a> (and sets
--   <i><tt>error</tt></i>) then <i><tt>bytesRead</tt></i> will be set to
--   the number of bytes that were successfully read before the error was
--   encountered. This functionality is only available from C. If you need
--   it from another language then you must write your own loop around
--   <a>inputStreamReadAsync</a>.
--   
--   <i>Since: 2.44</i>
inputStreamReadAllFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m CSize

-- | Request an asynchronous read of <i><tt>count</tt></i> bytes from the
--   stream into the buffer starting at <i><tt>buffer</tt></i>. When the
--   operation is finished <i><tt>callback</tt></i> will be called. You can
--   then call <a>inputStreamReadFinish</a> to get the result of the
--   operation.
--   
--   During an async request no other sync and async calls are allowed on
--   <i><tt>stream</tt></i>, and will result in <a>IOErrorEnumPending</a>
--   errors.
--   
--   A value of <i><tt>count</tt></i> larger than
--   <tt><i>G_MAXSSIZE</i></tt> will cause a
--   <a>IOErrorEnumInvalidArgument</a> error.
--   
--   On success, the number of bytes read into the buffer will be passed to
--   the callback. It is not an error if this is not the same as the
--   requested size, as it can happen e.g. near the end of a file, but
--   generally we try to read as many bytes as requested. Zero is returned
--   on end of file (or if <i><tt>count</tt></i> is zero), but never
--   otherwise.
--   
--   Any outstanding i/o request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   The asynchronous methods have a default fallback that uses threads to
--   implement asynchronicity, so they are optional for inheriting classes.
--   However, if you override one you must override all.
inputStreamReadAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m (Maybe ByteString)

-- | Like <a>inputStreamRead</a>, this tries to read <i><tt>count</tt></i>
--   bytes from the stream in a blocking fashion. However, rather than
--   reading into a user-supplied buffer, this will create a new
--   <a>Bytes</a> containing the data that was read. This may be easier to
--   use from language bindings.
--   
--   If count is zero, returns a zero-length <a>Bytes</a> and does nothing.
--   A value of <i><tt>count</tt></i> larger than
--   <tt><i>G_MAXSSIZE</i></tt> will cause a
--   <a>IOErrorEnumInvalidArgument</a> error.
--   
--   On success, a new <a>Bytes</a> is returned. It is not an error if the
--   size of this object is not the same as the requested size, as it can
--   happen e.g. near the end of a file. A zero-length <a>Bytes</a> is
--   returned on end of file (or if <i><tt>count</tt></i> is zero), but
--   never otherwise.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If an operation was
--   partially finished when the operation was cancelled the partial result
--   will be returned, without an error.
--   
--   On error <a>Nothing</a> is returned and <i><tt>error</tt></i> is set
--   accordingly.
--   
--   <i>Since: 2.34</i>
inputStreamReadBytes :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Maybe b -> m Bytes

-- | Request an asynchronous read of <i><tt>count</tt></i> bytes from the
--   stream into a new <a>Bytes</a>. When the operation is finished
--   <i><tt>callback</tt></i> will be called. You can then call
--   <a>inputStreamReadBytesFinish</a> to get the result of the operation.
--   
--   During an async request no other sync and async calls are allowed on
--   <i><tt>stream</tt></i>, and will result in <a>IOErrorEnumPending</a>
--   errors.
--   
--   A value of <i><tt>count</tt></i> larger than
--   <tt><i>G_MAXSSIZE</i></tt> will cause a
--   <a>IOErrorEnumInvalidArgument</a> error.
--   
--   On success, the new <a>Bytes</a> will be passed to the callback. It is
--   not an error if this is smaller than the requested size, as it can
--   happen e.g. near the end of a file, but generally we try to read as
--   many bytes as requested. Zero is returned on end of file (or if
--   <i><tt>count</tt></i> is zero), but never otherwise.
--   
--   Any outstanding I/O request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   <i>Since: 2.34</i>
inputStreamReadBytesAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous stream read-into-t<a>Bytes</a> operation.
--   
--   <i>Since: 2.34</i>
inputStreamReadBytesFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Bytes

-- | Finishes an asynchronous stream read operation.
inputStreamReadFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Int64

-- | Sets <i><tt>stream</tt></i> to have actions pending. If the pending
--   flag is already set or <i><tt>stream</tt></i> is closed, it will
--   return <a>False</a> and set <i><tt>error</tt></i>.
inputStreamSetPending :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m ()

-- | Tries to skip <i><tt>count</tt></i> bytes from the stream. Will block
--   during the operation.
--   
--   This is identical to <a>inputStreamRead</a>, from a behaviour
--   standpoint, but the bytes that are skipped are not returned to the
--   user. Some streams have an implementation that is more efficient than
--   reading the data.
--   
--   This function is optional for inherited classes, as the default
--   implementation emulates it using read.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If an operation was
--   partially finished when the operation was cancelled the partial result
--   will be returned, without an error.
inputStreamSkip :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Maybe b -> m Int64

-- | Request an asynchronous skip of <i><tt>count</tt></i> bytes from the
--   stream. When the operation is finished <i><tt>callback</tt></i> will
--   be called. You can then call <a>inputStreamSkipFinish</a> to get the
--   result of the operation.
--   
--   During an async request no other sync and async calls are allowed, and
--   will result in <a>IOErrorEnumPending</a> errors.
--   
--   A value of <i><tt>count</tt></i> larger than
--   <tt><i>G_MAXSSIZE</i></tt> will cause a
--   <a>IOErrorEnumInvalidArgument</a> error.
--   
--   On success, the number of bytes skipped will be passed to the
--   callback. It is not an error if this is not the same as the requested
--   size, as it can happen e.g. near the end of a file, but generally we
--   try to skip as many bytes as requested. Zero is returned on end of
--   file (or if <i><tt>count</tt></i> is zero), but never otherwise.
--   
--   Any outstanding i/o request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
--   
--   The asynchronous methods have a default fallback that uses threads to
--   implement asynchronicity, so they are optional for inheriting classes.
--   However, if you override one, you must override all.
inputStreamSkipAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a stream skip operation.
inputStreamSkipFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Int64
instance GHC.Classes.Eq GI.Gio.Objects.InputStream.InputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InputStream.InputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InputStream.InputStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.InputStream.InputStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.InputStream.InputStream o) => GI.Gio.Objects.InputStream.IsInputStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.InputStream.InputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.InputStream.InputStream


-- | An IPv4 or IPv6 socket address. That is, the combination of a
--   <a>InetAddress</a> and a port number.
--   
--   In UNIX terms, <tt>GInetSocketAddress</tt> corresponds to a <a>`struct
--   sockaddr_in` or `struct sockaddr_in6`</a>).
module GI.Gio.Objects.InetSocketAddress

-- | Memory-managed wrapper type.
newtype InetSocketAddress
InetSocketAddress :: ManagedPtr InetSocketAddress -> InetSocketAddress

-- | Type class for types which can be safely cast to
--   <a>InetSocketAddress</a>, for instance with
--   <a>toInetSocketAddress</a>.
class (GObject o, IsDescendantOf InetSocketAddress o) => IsInetSocketAddress o

-- | Cast to <a>InetSocketAddress</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toInetSocketAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetSocketAddress

-- | Gets <i><tt>address</tt></i>'s <a>InetAddress</a>.
--   
--   <i>Since: 2.22</i>
inetSocketAddressGetAddress :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m InetAddress

-- | Gets the <tt>sin6_flowinfo</tt> field from <i><tt>address</tt></i>,
--   which must be an IPv6 address.
--   
--   If not overridden this value will be inherited from
--   <a>InetSocketAddress:address</a>.
--   
--   <i>Since: 2.32</i>
inetSocketAddressGetFlowinfo :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32

-- | Gets <i><tt>address</tt></i>'s port.
--   
--   <i>Since: 2.22</i>
inetSocketAddressGetPort :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word16

-- | Gets the <tt>sin6_scope_id</tt> field from <i><tt>address</tt></i>,
--   which must be an IPv6 address.
--   
--   If not overridden this value will be inherited from
--   <a>InetSocketAddress:address</a>.
--   
--   <i>Since: 2.32</i>
inetSocketAddressGetScopeId :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32

-- | Creates a new <a>InetSocketAddress</a> for <i><tt>address</tt></i> and
--   <i><tt>port</tt></i>.
--   
--   <i>Since: 2.22</i>
inetSocketAddressNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word16 -> m InetSocketAddress

-- | Creates a new <a>InetSocketAddress</a> for <i><tt>address</tt></i> and
--   <i><tt>port</tt></i>.
--   
--   If <i><tt>address</tt></i> is an IPv6 address, it can also contain a
--   scope ID (separated from the address by a <tt>%</tt>). Note that
--   currently this behavior is platform specific. This may change in a
--   future release.
--   
--   <i>Since: 2.40</i>
inetSocketAddressNewFromString :: (HasCallStack, MonadIO m) => Text -> Word32 -> m (Maybe InetSocketAddress)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>address</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructInetSocketAddressAddress :: (IsInetSocketAddress o, MonadIO m, IsInetAddress a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetSocketAddress #address
--   </pre>
getInetSocketAddressAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetAddress

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flowinfo</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructInetSocketAddressFlowinfo :: (IsInetSocketAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>flowinfo</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetSocketAddress #flowinfo
--   </pre>
getInetSocketAddressFlowinfo :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>port</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructInetSocketAddressPort :: (IsInetSocketAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>port</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetSocketAddress #port
--   </pre>
getInetSocketAddressPort :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>scope-id</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructInetSocketAddressScopeId :: (IsInetSocketAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>scope-id</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> inetSocketAddress #scopeId
--   </pre>
getInetSocketAddressScopeId :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32
instance GHC.Classes.Eq GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.InetSocketAddress.InetSocketAddress)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.InetSocketAddress.InetSocketAddress o) => GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.InetSocketAddress.InetSocketAddress


-- | <tt>GIOStream</tt> represents an object that has both read and write
--   streams. Generally the two streams act as separate input and output
--   streams, but they share some common resources and state. For instance,
--   for seekable streams, both streams may use the same position.
--   
--   Examples of <tt>GIOStream</tt> objects are <a>SocketConnection</a>,
--   which represents a two-way network connection; and
--   <a>FileIOStream</a>, which represents a file handle opened in
--   read-write mode.
--   
--   To do the actual reading and writing you need to get the substreams
--   with <a>iOStreamGetInputStream</a> and <a>iOStreamGetOutputStream</a>.
--   
--   The <tt>GIOStream</tt> object owns the input and the output streams,
--   not the other way around, so keeping the substreams alive will not
--   keep the <tt>GIOStream</tt> object alive. If the <tt>GIOStream</tt>
--   object is freed it will be closed, thus closing the substreams, so
--   even if the substreams stay alive they will always return
--   <tt>G_IO_ERROR_CLOSED</tt> for all operations.
--   
--   To close a stream use <a>iOStreamClose</a> which will close the common
--   stream object and also the individual substreams. You can also close
--   the substreams themselves. In most cases this only marks the substream
--   as closed, so further I/O on it fails but common state in the
--   <tt>GIOStream</tt> may still be open. However, some streams may
--   support ‘half-closed’ states where one direction of the stream is
--   actually shut down.
--   
--   Operations on <tt>GIOStream</tt>s cannot be started while another
--   operation on the <tt>GIOStream</tt> or its substreams is in progress.
--   Specifically, an application can read from the <a>InputStream</a> and
--   write to the <a>OutputStream</a> simultaneously (either in separate
--   threads, or as asynchronous operations in the same thread), but an
--   application cannot start any <tt>GIOStream</tt> operation while there
--   is a <tt>GIOStream</tt>, <tt>GInputStream</tt> or
--   <tt>GOutputStream</tt> operation in progress, and an application can’t
--   start any <tt>GInputStream</tt> or <tt>GOutputStream</tt> operation
--   while there is a <tt>GIOStream</tt> operation in progress.
--   
--   This is a product of individual stream operations being associated
--   with a given [type<i><tt>gLib</tt></i>.MainContext] (the
--   thread-default context at the time the operation was started), rather
--   than entire streams being associated with a single
--   <tt>GMainContext</tt>.
--   
--   GIO may run operations on <tt>GIOStream</tt>s from other (worker)
--   threads, and this may be exposed to application code in the behaviour
--   of wrapper streams, such as <a>BufferedInputStream</a> or
--   <a>TlsConnection</a>. With such wrapper APIs, application code may
--   only run operations on the base (wrapped) stream when the wrapper
--   stream is idle. Note that the semantics of such operations may not be
--   well-defined due to the state the wrapper stream leaves the base
--   stream in (though they are guaranteed not to crash).
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.IOStream

-- | Memory-managed wrapper type.
newtype IOStream
IOStream :: ManagedPtr IOStream -> IOStream

-- | Type class for types which can be safely cast to <a>IOStream</a>, for
--   instance with <a>toIOStream</a>.
class (GObject o, IsDescendantOf IOStream o) => IsIOStream o

-- | Cast to <a>IOStream</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toIOStream :: (MonadIO m, IsIOStream o) => o -> m IOStream

-- | Clears the pending flag on <i><tt>stream</tt></i>.
--   
--   <i>Since: 2.22</i>
iOStreamClearPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m ()

-- | Closes the stream, releasing resources related to it. This will also
--   close the individual input and output streams, if they are not already
--   closed.
--   
--   Once the stream is closed, all other operations will return
--   <a>IOErrorEnumClosed</a>. Closing a stream multiple times will not
--   return an error.
--   
--   Closing a stream will automatically flush any outstanding buffers in
--   the stream.
--   
--   Streams will be automatically closed when the last reference is
--   dropped, but you might want to call this function to make sure
--   resources are released as early as possible.
--   
--   Some streams might keep the backing store of the stream (e.g. a file
--   descriptor) open after the stream is closed. See the documentation for
--   the individual stream for details.
--   
--   On failure the first error that happened will be reported, but the
--   close operation will finish as much as possible. A stream that failed
--   to close will still return <a>IOErrorEnumClosed</a> for all
--   operations. Still, it is important to check and report the error to
--   the user, otherwise there might be a loss of data as all data might
--   not be written.
--   
--   If <i><tt>cancellable</tt></i> is not NULL, then the operation can be
--   cancelled by triggering the cancellable object from another thread. If
--   the operation was cancelled, the error <a>IOErrorEnumCancelled</a>
--   will be returned. Cancelling a close will still leave the stream
--   closed, but some streams can use a faster close that doesn't block to
--   e.g. check errors.
--   
--   The default implementation of this method just calls close on the
--   individual input/output streams.
--   
--   <i>Since: 2.22</i>
iOStreamClose :: (HasCallStack, MonadIO m, IsIOStream a, IsCancellable b) => a -> Maybe b -> m ()

-- | Requests an asynchronous close of the stream, releasing resources
--   related to it. When the operation is finished <i><tt>callback</tt></i>
--   will be called. You can then call <a>iOStreamCloseFinish</a> to get
--   the result of the operation.
--   
--   For behaviour details see <a>iOStreamClose</a>.
--   
--   The asynchronous methods have a default fallback that uses threads to
--   implement asynchronicity, so they are optional for inheriting classes.
--   However, if you override one you must override all.
--   
--   <i>Since: 2.22</i>
iOStreamCloseAsync :: (HasCallStack, MonadIO m, IsIOStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Closes a stream.
--   
--   <i>Since: 2.22</i>
iOStreamCloseFinish :: (HasCallStack, MonadIO m, IsIOStream a, IsAsyncResult b) => a -> b -> m ()

-- | Gets the input stream for this object. This is used for reading.
--   
--   <i>Since: 2.22</i>
iOStreamGetInputStream :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m InputStream

-- | Gets the output stream for this object. This is used for writing.
--   
--   <i>Since: 2.22</i>
iOStreamGetOutputStream :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m OutputStream

-- | Checks if a stream has pending actions.
--   
--   <i>Since: 2.22</i>
iOStreamHasPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m Bool

-- | Checks if a stream is closed.
--   
--   <i>Since: 2.22</i>
iOStreamIsClosed :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m Bool

-- | Sets <i><tt>stream</tt></i> to have actions pending. If the pending
--   flag is already set or <i><tt>stream</tt></i> is closed, it will
--   return <a>False</a> and set <i><tt>error</tt></i>.
--   
--   <i>Since: 2.22</i>
iOStreamSetPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m ()

-- | Asynchronously splice the output stream of <i><tt>stream1</tt></i> to
--   the input stream of <i><tt>stream2</tt></i>, and splice the output
--   stream of <i><tt>stream2</tt></i> to the input stream of
--   <i><tt>stream1</tt></i>.
--   
--   When the operation is finished <i><tt>callback</tt></i> will be
--   called. You can then call <a>iOStreamSpliceFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.28</i>
iOStreamSpliceAsync :: (HasCallStack, MonadIO m, IsIOStream a, IsIOStream b, IsCancellable c) => a -> b -> [IOStreamSpliceFlags] -> Int32 -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous io stream splice operation.
--   
--   <i>Since: 2.28</i>
iOStreamSpliceFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()

-- | Get the value of the “<tt>closed</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOStream #closed
--   </pre>
getIOStreamClosed :: (MonadIO m, IsIOStream o) => o -> m Bool

-- | Get the value of the “<tt>input-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOStream #inputStream
--   </pre>
getIOStreamInputStream :: (MonadIO m, IsIOStream o) => o -> m InputStream

-- | Get the value of the “<tt>output-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> iOStream #outputStream
--   </pre>
getIOStreamOutputStream :: (MonadIO m, IsIOStream o) => o -> m OutputStream
instance GHC.Classes.Eq GI.Gio.Objects.IOStream.IOStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.IOStream.IOStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.IOStream.IOStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.IOStream.IOStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.IOStream.IOStream o) => GI.Gio.Objects.IOStream.IsIOStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.IOStream.IOStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.IOStream.IOStream


-- | Base class for output stream implementations that perform some kind of
--   filtering operation on a base stream. Typical examples of filtering
--   operations are character set conversion, compression and byte order
--   flipping.
module GI.Gio.Objects.FilterOutputStream

-- | Memory-managed wrapper type.
newtype FilterOutputStream
FilterOutputStream :: ManagedPtr FilterOutputStream -> FilterOutputStream

-- | Type class for types which can be safely cast to
--   <a>FilterOutputStream</a>, for instance with
--   <a>toFilterOutputStream</a>.
class (GObject o, IsDescendantOf FilterOutputStream o) => IsFilterOutputStream o

-- | Cast to <a>FilterOutputStream</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toFilterOutputStream :: (MonadIO m, IsFilterOutputStream o) => o -> m FilterOutputStream

-- | Gets the base stream for the filter stream.
filterOutputStreamGetBaseStream :: (HasCallStack, MonadIO m, IsFilterOutputStream a) => a -> m OutputStream

-- | Returns whether the base stream will be closed when
--   <i><tt>stream</tt></i> is closed.
filterOutputStreamGetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterOutputStream a) => a -> m Bool

-- | Sets whether the base stream will be closed when
--   <i><tt>stream</tt></i> is closed.
filterOutputStreamSetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterOutputStream a) => a -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>base-stream</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructFilterOutputStreamBaseStream :: (IsFilterOutputStream o, MonadIO m, IsOutputStream a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>base-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> filterOutputStream #baseStream
--   </pre>
getFilterOutputStreamBaseStream :: (MonadIO m, IsFilterOutputStream o) => o -> m OutputStream

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>close-base-stream</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructFilterOutputStreamCloseBaseStream :: (IsFilterOutputStream o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>close-base-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> filterOutputStream #closeBaseStream
--   </pre>
getFilterOutputStreamCloseBaseStream :: (MonadIO m, IsFilterOutputStream o) => o -> m Bool
instance GHC.Classes.Eq GI.Gio.Objects.FilterOutputStream.FilterOutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FilterOutputStream.FilterOutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FilterOutputStream.FilterOutputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FilterOutputStream.FilterOutputStream o) => GI.Gio.Objects.FilterOutputStream.IsFilterOutputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FilterOutputStream.FilterOutputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FilterOutputStream.FilterOutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FilterOutputStream.FilterOutputStream


-- | Base class for input stream implementations that perform some kind of
--   filtering operation on a base stream. Typical examples of filtering
--   operations are character set conversion, compression and byte order
--   flipping.
module GI.Gio.Objects.FilterInputStream

-- | Memory-managed wrapper type.
newtype FilterInputStream
FilterInputStream :: ManagedPtr FilterInputStream -> FilterInputStream

-- | Type class for types which can be safely cast to
--   <a>FilterInputStream</a>, for instance with
--   <a>toFilterInputStream</a>.
class (GObject o, IsDescendantOf FilterInputStream o) => IsFilterInputStream o

-- | Cast to <a>FilterInputStream</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toFilterInputStream :: (MonadIO m, IsFilterInputStream o) => o -> m FilterInputStream

-- | Gets the base stream for the filter stream.
filterInputStreamGetBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> m InputStream

-- | Returns whether the base stream will be closed when
--   <i><tt>stream</tt></i> is closed.
filterInputStreamGetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> m Bool

-- | Sets whether the base stream will be closed when
--   <i><tt>stream</tt></i> is closed.
filterInputStreamSetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>base-stream</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructFilterInputStreamBaseStream :: (IsFilterInputStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>base-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> filterInputStream #baseStream
--   </pre>
getFilterInputStreamBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m InputStream

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>close-base-stream</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructFilterInputStreamCloseBaseStream :: (IsFilterInputStream o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>close-base-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> filterInputStream #closeBaseStream
--   </pre>
getFilterInputStreamCloseBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m Bool

-- | Set the value of the “<tt>close-base-stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> filterInputStream [ #closeBaseStream <a>:=</a> value ]
--   </pre>
setFilterInputStreamCloseBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> Bool -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.FilterInputStream.FilterInputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FilterInputStream.FilterInputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FilterInputStream.FilterInputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FilterInputStream.FilterInputStream o) => GI.Gio.Objects.FilterInputStream.IsFilterInputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FilterInputStream.FilterInputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FilterInputStream.FilterInputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FilterInputStream.FilterInputStream


-- | <tt>GFileOutputStream</tt> provides output streams that write their
--   content to a file.
--   
--   <tt>GFileOutputStream</tt> implements <a>Seekable</a>, which allows
--   the output stream to jump to arbitrary positions in the file and to
--   truncate the file, provided the filesystem of the file supports these
--   operations.
--   
--   To find the position of a file output stream, use <a>seekableTell</a>.
--   To find out if a file output stream supports seeking, use
--   <a>seekableCanSeek</a>.To position a file output stream, use
--   <a>seekableSeek</a>. To find out if a file output stream supports
--   truncating, use <a>seekableCanTruncate</a>. To truncate a file output
--   stream, use <a>seekableTruncate</a>.
module GI.Gio.Objects.FileOutputStream

-- | Memory-managed wrapper type.
newtype FileOutputStream
FileOutputStream :: ManagedPtr FileOutputStream -> FileOutputStream

-- | Type class for types which can be safely cast to
--   <a>FileOutputStream</a>, for instance with <a>toFileOutputStream</a>.
class (GObject o, IsDescendantOf FileOutputStream o) => IsFileOutputStream o

-- | Cast to <a>FileOutputStream</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toFileOutputStream :: (MonadIO m, IsFileOutputStream o) => o -> m FileOutputStream

-- | Gets the entity tag for the file when it has been written. This must
--   be called after the stream has been written and closed, as the etag
--   can change while writing.
fileOutputStreamGetEtag :: (HasCallStack, MonadIO m, IsFileOutputStream a) => a -> m (Maybe Text)

-- | Queries a file output stream for the given <i><tt>attributes</tt></i>.
--   This function blocks while querying the stream. For the asynchronous
--   version of this function, see <a>fileOutputStreamQueryInfoAsync</a>.
--   While the stream is blocked, the stream will set the pending flag
--   internally, and any other operations on the stream will fail with
--   <a>IOErrorEnumPending</a>.
--   
--   Can fail if the stream was already closed (with <i><tt>error</tt></i>
--   being set to <a>IOErrorEnumClosed</a>), the stream has pending
--   operations (with <i><tt>error</tt></i> being set to
--   <a>IOErrorEnumPending</a>), or if querying info is not supported for
--   the stream's interface (with <i><tt>error</tt></i> being set to
--   <a>IOErrorEnumNotSupported</a>). In all cases of failure,
--   <a>Nothing</a> will be returned.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be set, and <a>Nothing</a> will be
--   returned.
fileOutputStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileOutputStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo

-- | Asynchronously queries the <i><tt>stream</tt></i> for a
--   <a>FileInfo</a>. When completed, <i><tt>callback</tt></i> will be
--   called with a <a>AsyncResult</a> which can be used to finish the
--   operation with <a>fileOutputStreamQueryInfoFinish</a>.
--   
--   For the synchronous version of this function, see
--   <a>fileOutputStreamQueryInfo</a>.
fileOutputStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileOutputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finalizes the asynchronous query started by
--   <a>fileOutputStreamQueryInfoAsync</a>.
fileOutputStreamQueryInfoFinish :: (HasCallStack, MonadIO m, IsFileOutputStream a, IsAsyncResult b) => a -> b -> m FileInfo
instance GHC.Classes.Eq GI.Gio.Objects.FileOutputStream.FileOutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileOutputStream.FileOutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileOutputStream.FileOutputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FileOutputStream.FileOutputStream o) => GI.Gio.Objects.FileOutputStream.IsFileOutputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FileOutputStream.FileOutputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FileOutputStream.FileOutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FileOutputStream.FileOutputStream


-- | Monitors a file or directory for changes.
--   
--   To obtain a <tt>GFileMonitor</tt> for a file or directory, use
--   <a>fileMonitor</a>, <a>fileMonitorFile</a>, or
--   <a>fileMonitorDirectory</a>.
--   
--   To get informed about changes to the file or directory you are
--   monitoring, connect to the <a>FileMonitor::changed</a> signal. The
--   signal will be emitted in the thread-default main context (see
--   <a>mainContextPushThreadDefault</a>) of the thread that the monitor
--   was created in (though if the global default main context is blocked,
--   this may cause notifications to be blocked even if the thread-default
--   context is still running).
module GI.Gio.Objects.FileMonitor

-- | Memory-managed wrapper type.
newtype FileMonitor
FileMonitor :: ManagedPtr FileMonitor -> FileMonitor

-- | Type class for types which can be safely cast to <a>FileMonitor</a>,
--   for instance with <a>toFileMonitor</a>.
class (GObject o, IsDescendantOf FileMonitor o) => IsFileMonitor o

-- | Cast to <a>FileMonitor</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toFileMonitor :: (MonadIO m, IsFileMonitor o) => o -> m FileMonitor

-- | Cancels a file monitor.
fileMonitorCancel :: (HasCallStack, MonadIO m, IsFileMonitor a) => a -> m Bool

-- | Emits the <a>FileMonitor::changed</a> signal if a change has taken
--   place. Should be called from file monitor implementations only.
--   
--   Implementations are responsible to call this method from the
--   thread-default main context (see <a>mainContextPushThreadDefault</a>)
--   of the thread that the monitor was created in.
fileMonitorEmitEvent :: (HasCallStack, MonadIO m, IsFileMonitor a, IsFile b, IsFile c) => a -> b -> Maybe c -> FileMonitorEvent -> m ()

-- | Returns whether the monitor is canceled.
fileMonitorIsCancelled :: (HasCallStack, MonadIO m, IsFileMonitor a) => a -> m Bool

-- | Sets the rate limit to which the <i><tt>monitor</tt></i> will report
--   consecutive change events to the same file.
fileMonitorSetRateLimit :: (HasCallStack, MonadIO m, IsFileMonitor a) => a -> Int32 -> m ()

-- | Get the value of the “<tt>cancelled</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileMonitor #cancelled
--   </pre>
getFileMonitorCancelled :: (MonadIO m, IsFileMonitor o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>rate-limit</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructFileMonitorRateLimit :: (IsFileMonitor o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>rate-limit</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileMonitor #rateLimit
--   </pre>
getFileMonitorRateLimit :: (MonadIO m, IsFileMonitor o) => o -> m Int32

-- | Set the value of the “<tt>rate-limit</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> fileMonitor [ #rateLimit <a>:=</a> value ]
--   </pre>
setFileMonitorRateLimit :: (MonadIO m, IsFileMonitor o) => o -> Int32 -> m ()

-- | Emitted when <i><tt>file</tt></i> has been changed.
--   
--   If using <a>FileMonitorFlagsWatchMoves</a> on a directory monitor, and
--   the information is available (and if supported by the backend),
--   <i><tt>eventType</tt></i> may be <a>FileMonitorEventRenamed</a>,
--   <a>FileMonitorEventMovedIn</a> or <a>FileMonitorEventMovedOut</a>.
--   
--   In all cases <i><tt>file</tt></i> will be a child of the monitored
--   directory. For renames, <i><tt>file</tt></i> will be the old name and
--   <i><tt>otherFile</tt></i> is the new name. For "moved in" events,
--   <i><tt>file</tt></i> is the name of the file that appeared and
--   <i><tt>otherFile</tt></i> is the old name that it was moved from (in
--   another directory). For "moved out" events, <i><tt>file</tt></i> is
--   the name of the file that used to be in this directory and
--   <i><tt>otherFile</tt></i> is the name of the file at its new location.
--   
--   It makes sense to treat <a>FileMonitorEventMovedIn</a> as equivalent
--   to <a>FileMonitorEventCreated</a> and <a>FileMonitorEventMovedOut</a>
--   as equivalent to <a>FileMonitorEventDeleted</a>, with extra
--   information. <a>FileMonitorEventRenamed</a> is equivalent to a
--   delete/create pair. This is exactly how the events will be reported in
--   the case that the <a>FileMonitorFlagsWatchMoves</a> flag is not in
--   use.
--   
--   If using the deprecated flag <a>FileMonitorFlagsSendMoved</a> flag and
--   <i><tt>eventType</tt></i> is <a>FileMonitorEventMoved</a>,
--   <i><tt>file</tt></i> will be set to a <a>File</a> containing the old
--   path, and <i><tt>otherFile</tt></i> will be set to a <a>File</a>
--   containing the new path.
--   
--   In all the other cases, <i><tt>otherFile</tt></i> will be set to
--   <tt><i>NULL</i></tt>.
type FileMonitorChangedCallback = File -> Maybe File -> FileMonitorEvent -> IO ()

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> fileMonitor #changed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterFileMonitorChanged :: (IsFileMonitor a, MonadIO m) => a -> ((?self :: a) => FileMonitorChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> fileMonitor #changed callback
--   </pre>
onFileMonitorChanged :: (IsFileMonitor a, MonadIO m) => a -> ((?self :: a) => FileMonitorChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.FileMonitor.FileMonitor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileMonitor.FileMonitor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileMonitor.FileMonitor
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FileMonitor.FileMonitor o) => GI.Gio.Objects.FileMonitor.IsFileMonitor o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FileMonitor.FileMonitor)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FileMonitor.FileMonitor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FileMonitor.FileMonitor


-- | <tt>GFileInputStream</tt> provides input streams that take their
--   content from a file.
--   
--   <tt>GFileInputStream</tt> implements <a>Seekable</a>, which allows the
--   input stream to jump to arbitrary positions in the file, provided the
--   filesystem of the file allows it. To find the position of a file input
--   stream, use <a>seekableTell</a>. To find out if a file input stream
--   supports seeking, use <a>Seekable</a>.<tt><i>can_seek</i></tt>(). To
--   position a file input stream, use
--   <a>Seekable</a>.<tt><i>seek</i></tt>().
module GI.Gio.Objects.FileInputStream

-- | Memory-managed wrapper type.
newtype FileInputStream
FileInputStream :: ManagedPtr FileInputStream -> FileInputStream

-- | Type class for types which can be safely cast to
--   <a>FileInputStream</a>, for instance with <a>toFileInputStream</a>.
class (GObject o, IsDescendantOf FileInputStream o) => IsFileInputStream o

-- | Cast to <a>FileInputStream</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toFileInputStream :: (MonadIO m, IsFileInputStream o) => o -> m FileInputStream

-- | Queries a file input stream the given <i><tt>attributes</tt></i>. This
--   function blocks while querying the stream. For the asynchronous
--   (non-blocking) version of this function, see
--   <a>fileInputStreamQueryInfoAsync</a>. While the stream is blocked, the
--   stream will set the pending flag internally, and any other operations
--   on the stream will fail with <a>IOErrorEnumPending</a>.
fileInputStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo

-- | Queries the stream information asynchronously. When the operation is
--   finished <i><tt>callback</tt></i> will be called. You can then call
--   <a>fileInputStreamQueryInfoFinish</a> to get the result of the
--   operation.
--   
--   For the synchronous version of this function, see
--   <a>fileInputStreamQueryInfo</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be set
fileInputStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous info query operation.
fileInputStreamQueryInfoFinish :: (HasCallStack, MonadIO m, IsFileInputStream a, IsAsyncResult b) => a -> b -> m FileInfo
instance GHC.Classes.Eq GI.Gio.Objects.FileInputStream.FileInputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileInputStream.FileInputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileInputStream.FileInputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FileInputStream.FileInputStream o) => GI.Gio.Objects.FileInputStream.IsFileInputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FileInputStream.FileInputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FileInputStream.FileInputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FileInputStream.FileInputStream


-- | <tt>GFileIcon</tt> specifies an icon by pointing to an image file to
--   be used as icon.
--   
--   It implements <a>LoadableIcon</a>.
module GI.Gio.Objects.FileIcon

-- | Memory-managed wrapper type.
newtype FileIcon
FileIcon :: ManagedPtr FileIcon -> FileIcon

-- | Type class for types which can be safely cast to <a>FileIcon</a>, for
--   instance with <a>toFileIcon</a>.
class (GObject o, IsDescendantOf FileIcon o) => IsFileIcon o

-- | Cast to <a>FileIcon</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toFileIcon :: (MonadIO m, IsFileIcon o) => o -> m FileIcon

-- | Gets the <a>File</a> associated with the given <i><tt>icon</tt></i>.
fileIconGetFile :: (HasCallStack, MonadIO m, IsFileIcon a) => a -> m File

-- | Creates a new icon for a file.
fileIconNew :: (HasCallStack, MonadIO m, IsFile a) => a -> m FileIcon

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>file</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructFileIconFile :: (IsFileIcon o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>file</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> fileIcon #file
--   </pre>
getFileIconFile :: (MonadIO m, IsFileIcon o) => o -> m File
instance GHC.Classes.Eq GI.Gio.Objects.FileIcon.FileIcon
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileIcon.FileIcon
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileIcon.FileIcon
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FileIcon.FileIcon o) => GI.Gio.Objects.FileIcon.IsFileIcon o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FileIcon.FileIcon)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FileIcon.FileIcon
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FileIcon.FileIcon


-- | <tt>GFileIOStream</tt> provides I/O streams that both read and write
--   to the same file handle.
--   
--   <tt>GFileIOStream</tt> implements <a>Seekable</a>, which allows the
--   I/O stream to jump to arbitrary positions in the file and to truncate
--   the file, provided the filesystem of the file supports these
--   operations.
--   
--   To find the position of a file I/O stream, use <a>seekableTell</a>.
--   
--   To find out if a file I/O stream supports seeking, use
--   <a>seekableCanSeek</a>. To position a file I/O stream, use
--   <a>seekableSeek</a>. To find out if a file I/O stream supports
--   truncating, use <a>seekableCanTruncate</a>. To truncate a file I/O
--   stream, use <a>seekableTruncate</a>.
--   
--   The default implementation of all the <tt>GFileIOStream</tt>
--   operations and the implementation of <a>Seekable</a> just call into
--   the same operations on the output stream.
--   
--   <i>Since: 2.22</i>
module GI.Gio.Objects.FileIOStream

-- | Memory-managed wrapper type.
newtype FileIOStream
FileIOStream :: ManagedPtr FileIOStream -> FileIOStream

-- | Type class for types which can be safely cast to <a>FileIOStream</a>,
--   for instance with <a>toFileIOStream</a>.
class (GObject o, IsDescendantOf FileIOStream o) => IsFileIOStream o

-- | Cast to <a>FileIOStream</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toFileIOStream :: (MonadIO m, IsFileIOStream o) => o -> m FileIOStream

-- | Gets the entity tag for the file when it has been written. This must
--   be called after the stream has been written and closed, as the etag
--   can change while writing.
--   
--   <i>Since: 2.22</i>
fileIOStreamGetEtag :: (HasCallStack, MonadIO m, IsFileIOStream a) => a -> m (Maybe Text)

-- | Queries a file io stream for the given <i><tt>attributes</tt></i>.
--   This function blocks while querying the stream. For the asynchronous
--   version of this function, see <a>fileIOStreamQueryInfoAsync</a>. While
--   the stream is blocked, the stream will set the pending flag
--   internally, and any other operations on the stream will fail with
--   <a>IOErrorEnumPending</a>.
--   
--   Can fail if the stream was already closed (with <i><tt>error</tt></i>
--   being set to <a>IOErrorEnumClosed</a>), the stream has pending
--   operations (with <i><tt>error</tt></i> being set to
--   <a>IOErrorEnumPending</a>), or if querying info is not supported for
--   the stream's interface (with <i><tt>error</tt></i> being set to
--   <a>IOErrorEnumNotSupported</a>). I all cases of failure,
--   <a>Nothing</a> will be returned.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be set, and <a>Nothing</a> will be
--   returned.
--   
--   <i>Since: 2.22</i>
fileIOStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileIOStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo

-- | Asynchronously queries the <i><tt>stream</tt></i> for a
--   <a>FileInfo</a>. When completed, <i><tt>callback</tt></i> will be
--   called with a <a>AsyncResult</a> which can be used to finish the
--   operation with <a>fileIOStreamQueryInfoFinish</a>.
--   
--   For the synchronous version of this function, see
--   <a>fileIOStreamQueryInfo</a>.
--   
--   <i>Since: 2.22</i>
fileIOStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileIOStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finalizes the asynchronous query started by
--   <a>fileIOStreamQueryInfoAsync</a>.
--   
--   <i>Since: 2.22</i>
fileIOStreamQueryInfoFinish :: (HasCallStack, MonadIO m, IsFileIOStream a, IsAsyncResult b) => a -> b -> m FileInfo
instance GHC.Classes.Eq GI.Gio.Objects.FileIOStream.FileIOStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileIOStream.FileIOStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileIOStream.FileIOStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FileIOStream.FileIOStream o) => GI.Gio.Objects.FileIOStream.IsFileIOStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FileIOStream.FileIOStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FileIOStream.FileIOStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FileIOStream.FileIOStream


-- | <tt>GFileEnumerator</tt> allows you to operate on a set of <a>File</a>
--   objects, returning a <a>FileInfo</a> structure for each file
--   enumerated (e.g. <a>fileEnumerateChildren</a> will return a
--   <tt>GFileEnumerator</tt> for each of the children within a directory).
--   
--   To get the next file's information from a <tt>GFileEnumerator</tt>,
--   use <a>fileEnumeratorNextFile</a> or its asynchronous version,
--   <a>fileEnumeratorNextFilesAsync</a>. Note that the asynchronous
--   version will return a list of <a>FileInfo</a> objects, whereas the
--   synchronous will only return the next file in the enumerator.
--   
--   The ordering of returned files is unspecified for non-Unix platforms;
--   for more information, see <a>dirReadName</a>. On Unix, when operating
--   on local files, returned files will be sorted by inode number.
--   Effectively you can assume that the ordering of returned files will be
--   stable between successive calls (and applications) assuming the
--   directory is unchanged.
--   
--   If your application needs a specific ordering, such as by name or
--   modification time, you will have to implement that in your application
--   code.
--   
--   To close a <tt>GFileEnumerator</tt>, use <a>fileEnumeratorClose</a>,
--   or its asynchronous version, <a>fileEnumeratorCloseAsync</a>. Once a
--   <tt>GFileEnumerator</tt> is closed, no further actions may be
--   performed on it, and it should be freed with <a>objectUnref</a>.
module GI.Gio.Objects.FileEnumerator

-- | Memory-managed wrapper type.
newtype FileEnumerator
FileEnumerator :: ManagedPtr FileEnumerator -> FileEnumerator

-- | Type class for types which can be safely cast to
--   <a>FileEnumerator</a>, for instance with <a>toFileEnumerator</a>.
class (GObject o, IsDescendantOf FileEnumerator o) => IsFileEnumerator o

-- | Cast to <a>FileEnumerator</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toFileEnumerator :: (MonadIO m, IsFileEnumerator o) => o -> m FileEnumerator

-- | Releases all resources used by this enumerator, making the enumerator
--   return <a>IOErrorEnumClosed</a> on all calls.
--   
--   This will be automatically called when the last reference is dropped,
--   but you might want to call this function to make sure resources are
--   released as early as possible.
fileEnumeratorClose :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously closes the file enumerator.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned in
--   <a>fileEnumeratorCloseFinish</a>.
fileEnumeratorCloseAsync :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes closing a file enumerator, started from
--   <a>fileEnumeratorCloseAsync</a>.
--   
--   If the file enumerator was already closed when
--   <a>fileEnumeratorCloseAsync</a> was called, then this function will
--   report <a>IOErrorEnumClosed</a> in <i><tt>error</tt></i>, and return
--   <a>False</a>. If the file enumerator had pending operation when the
--   close operation was started, then this function will report
--   <a>IOErrorEnumPending</a>, and return <a>False</a>. If
--   <i><tt>cancellable</tt></i> was not <a>Nothing</a>, then the operation
--   may have been cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be set, and <a>False</a> will be
--   returned.
fileEnumeratorCloseFinish :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsAsyncResult b) => a -> b -> m ()

-- | Return a new <a>File</a> which refers to the file named by
--   <i><tt>info</tt></i> in the source directory of
--   <i><tt>enumerator</tt></i>. This function is primarily intended to be
--   used inside loops with <a>fileEnumeratorNextFile</a>.
--   
--   To use this, <a>FILE_ATTRIBUTE_STANDARD_NAME</a> must have been listed
--   in the attributes list used when creating the <a>FileEnumerator</a>.
--   
--   This is a convenience method that's equivalent to:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   gchar *name = g_file_info_get_name (info);
--   GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr),
--                                    name);
--   </pre>
--   
--   <i>Since: 2.36</i>
fileEnumeratorGetChild :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsFileInfo b) => a -> b -> m File

-- | Get the <a>File</a> container which is being enumerated.
--   
--   <i>Since: 2.18</i>
fileEnumeratorGetContainer :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> m File

-- | Checks if the file enumerator has pending operations.
fileEnumeratorHasPending :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> m Bool

-- | Checks if the file enumerator has been closed.
fileEnumeratorIsClosed :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> m Bool

-- | This is a version of <a>fileEnumeratorNextFile</a> that's easier to
--   use correctly from C programs. With <a>fileEnumeratorNextFile</a>, the
--   gboolean return value signifies "end of iteration or error", which
--   requires allocation of a temporary <a>GError</a>.
--   
--   In contrast, with this function, a <a>False</a> return from
--   <a>fileEnumeratorIterate</a> *always* means "error". End of iteration
--   is signaled by <i><tt>outInfo</tt></i> or <i><tt>outChild</tt></i>
--   being <a>Nothing</a>.
--   
--   Another crucial difference is that the references for
--   <i><tt>outInfo</tt></i> and <i><tt>outChild</tt></i> are owned by
--   <i><tt>direnum</tt></i> (they are cached as hidden properties). You
--   must not unref them in your own code. This makes memory management
--   significantly easier for C code in combination with loops.
--   
--   Finally, this function optionally allows retrieving a <a>File</a> as
--   well.
--   
--   You must specify at least one of <i><tt>outInfo</tt></i> or
--   <i><tt>outChild</tt></i>.
--   
--   The code pattern for correctly using <a>fileEnumeratorIterate</a> from
--   C is:
--   
--   <pre>
--   direnum = g_file_enumerate_children (file, ...);
--   while (TRUE)
--     {
--       GFileInfo *info;
--       if (!g_file_enumerator_iterate (direnum, &amp;info, NULL, cancellable, error))
--         goto out;
--       if (!info)
--         break;
--       ... do stuff with "info"; do not unref it! ...
--     }
--   
--   out:
--     g_object_unref (direnum); // Note: frees the last @info
--   </pre>
--   
--   <i>Since: 2.44</i>
fileEnumeratorIterate :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Maybe b -> m (FileInfo, File)

-- | Returns information for the next file in the enumerated object. Will
--   block until the information is available. The <a>FileInfo</a> returned
--   from this function will contain attributes that match the attribute
--   string that was passed when the <a>FileEnumerator</a> was created.
--   
--   See the documentation of <a>FileEnumerator</a> for information about
--   the order of returned files.
--   
--   On error, returns <a>Nothing</a> and sets <i><tt>error</tt></i> to the
--   error. If the enumerator is at the end, <a>Nothing</a> will be
--   returned and <i><tt>error</tt></i> will be unset.
fileEnumeratorNextFile :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Maybe b -> m (Maybe FileInfo)

-- | Request information for a number of files from the enumerator
--   asynchronously. When all I/O for the operation is finished the
--   <i><tt>callback</tt></i> will be called with the requested
--   information.
--   
--   See the documentation of <a>FileEnumerator</a> for information about
--   the order of returned files.
--   
--   Once the end of the enumerator is reached, or if an error occurs, the
--   <i><tt>callback</tt></i> will be called with an empty list. In this
--   case, the previous call to <a>fileEnumeratorNextFilesAsync</a> will
--   typically have returned fewer than <i><tt>numFiles</tt></i> items.
--   
--   If a request is cancelled the callback will be called with
--   <a>IOErrorEnumCancelled</a>.
--   
--   This leads to the following pseudo-code usage:
--   
--   <pre>
--   g_autoptr(GFile) dir = get_directory ();
--   g_autoptr(GFileEnumerator) enumerator = NULL;
--   g_autolist(GFileInfo) files = NULL;
--   g_autoptr(GError) local_error = NULL;
--   
--   enumerator = yield g_file_enumerate_children_async (dir,
--                                                       G_FILE_ATTRIBUTE_STANDARD_NAME ","
--                                                       G_FILE_ATTRIBUTE_STANDARD_TYPE,
--                                                       G_FILE_QUERY_INFO_NONE,
--                                                       G_PRIORITY_DEFAULT,
--                                                       cancellable,
--                                                       …,
--                                                       &amp;local_error);
--   if (enumerator == NULL)
--     g_error ("Error enumerating: %s", local_error-&gt;message);
--   
--   // Loop until no files are returned, either because the end of the enumerator
--   // has been reached, or an error was returned.
--   do
--     {
--       files = yield g_file_enumerator_next_files_async (enumerator,
--                                                         5,  // number of files to request
--                                                         G_PRIORITY_DEFAULT,
--                                                         cancellable,
--                                                         …,
--                                                         &amp;local_error);
--   
--       // Process the returned files, but don’t assume that exactly 5 were returned.
--       for (GList *l = files; l != NULL; l = l-&gt;next)
--         {
--           GFileInfo *info = l-&gt;data;
--           handle_file_info (info);
--         }
--     }
--   while (files != NULL);
--   
--   if (local_error != NULL &amp;&amp;
--       !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
--     g_error ("Error while enumerating: %s", local_error-&gt;message);
--   </pre>
--   
--   During an async request no other sync and async calls are allowed, and
--   will result in <a>IOErrorEnumPending</a> errors.
--   
--   Any outstanding I/O request with higher priority (lower numerical
--   value) will be executed before an outstanding request with lower
--   priority. Default priority is <a>PRIORITY_DEFAULT</a>.
fileEnumeratorNextFilesAsync :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Int32 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes the asynchronous operation started with
--   <a>fileEnumeratorNextFilesAsync</a>.
fileEnumeratorNextFilesFinish :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsAsyncResult b) => a -> b -> m [FileInfo]

-- | Sets the file enumerator as having pending operations.
fileEnumeratorSetPending :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>container</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructFileEnumeratorContainer :: (IsFileEnumerator o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
instance GHC.Classes.Eq GI.Gio.Objects.FileEnumerator.FileEnumerator
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileEnumerator.FileEnumerator
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileEnumerator.FileEnumerator
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.FileEnumerator.FileEnumerator o) => GI.Gio.Objects.FileEnumerator.IsFileEnumerator o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.FileEnumerator.FileEnumerator)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.FileEnumerator.FileEnumerator
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.FileEnumerator.FileEnumerator


-- | <tt>GDebugControllerDBus</tt> is an implementation of
--   <a>DebugController</a> which exposes debug settings as a D-Bus object.
--   
--   It is a <a>Initable</a> object, and will register an object at
--   <tt>/org/gtk/Debugging</tt> on the bus given as
--   <a>DebugControllerDBus:connection</a> once it’s initialized. The
--   object will be unregistered when the last reference to the
--   <tt>GDebugControllerDBus</tt> is dropped.
--   
--   This D-Bus object can be used by remote processes to enable or disable
--   debug output in this process. Remote processes calling
--   <tt>org.gtk.Debugging.SetDebugEnabled()</tt> will affect the value of
--   <a>DebugController:debugEnabled</a> and, by default,
--   <a>logGetDebugEnabled</a>.
--   
--   By default, no processes are allowed to call
--   <tt>SetDebugEnabled()</tt> unless a
--   <a>DebugControllerDBus::authorize</a> signal handler is installed.
--   This is because the process may be privileged, or might expose
--   sensitive information in its debug output. You may want to restrict
--   the ability to enable debug output to privileged users or processes.
--   
--   One option is to install a D-Bus security policy which restricts
--   access to <tt>SetDebugEnabled()</tt>, installing something like the
--   following in <tt>$datadir/dbus-1/system.d/</tt>:
--   
--   <h3><i>xml code</i></h3>
--   
--   <pre>
--   &lt;?xml version="1.0"?&gt; &lt;!--*-nxml-*--&gt;
--   &lt;!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
--        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
--   &lt;busconfig&gt;
--     &lt;policy user="root"&gt;
--       &lt;allow send_destination="com.example.MyService" send_interface="org.gtk.Debugging"/&gt;
--     &lt;/policy&gt;
--     &lt;policy context="default"&gt;
--       &lt;deny send_destination="com.example.MyService" send_interface="org.gtk.Debugging"/&gt;
--     &lt;/policy&gt;
--   &lt;/busconfig&gt;
--   </pre>
--   
--   This will prevent the <tt>SetDebugEnabled()</tt> method from being
--   called by all except root. It will not prevent the
--   <tt>DebugEnabled</tt> property from being read, as it’s accessed
--   through the <tt>org.freedesktop.DBus.Properties</tt> interface.
--   
--   Another option is to use polkit to allow or deny requests on a
--   case-by-case basis, allowing for the possibility of dynamic
--   authorisation. To do this, connect to the
--   <a>DebugControllerDBus::authorize</a> signal and query polkit in it:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   g_autoptr(GError) child_error = NULL;
--   g_autoptr(GDBusConnection) connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
--   gulong debug_controller_authorize_id = 0;
--   
--   // Set up the debug controller.
--   debug_controller = G_DEBUG_CONTROLLER (g_debug_controller_dbus_new (priv-&gt;connection, NULL, &amp;child_error));
--   if (debug_controller == NULL)
--     {
--       g_error ("Could not register debug controller on bus: %s",
--                child_error-&gt;message);
--     }
--   
--   debug_controller_authorize_id = g_signal_connect (debug_controller,
--                                                     "authorize",
--                                                     G_CALLBACK (debug_controller_authorize_cb),
--                                                     self);
--   
--   static gboolean
--   debug_controller_authorize_cb (GDebugControllerDBus  *debug_controller,
--                                  GDBusMethodInvocation *invocation,
--                                  gpointer               user_data)
--   {
--     g_autoptr(PolkitAuthority) authority = NULL;
--     g_autoptr(PolkitSubject) subject = NULL;
--     g_autoptr(PolkitAuthorizationResult) auth_result = NULL;
--     g_autoptr(GError) local_error = NULL;
--     GDBusMessage *message;
--     GDBusMessageFlags message_flags;
--     PolkitCheckAuthorizationFlags flags = POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE;
--   
--     message = g_dbus_method_invocation_get_message (invocation);
--     message_flags = g_dbus_message_get_flags (message);
--   
--     authority = polkit_authority_get_sync (NULL, &amp;local_error);
--     if (authority == NULL)
--       {
--         g_warning ("Failed to get polkit authority: %s", local_error-&gt;message);
--         return FALSE;
--       }
--   
--     if (message_flags &amp; G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION)
--       flags |= POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION;
--   
--     subject = polkit_system_bus_name_new (g_dbus_method_invocation_get_sender (invocation));
--   
--     auth_result = polkit_authority_check_authorization_sync (authority,
--                                                              subject,
--                                                              "com.example.MyService.set-debug-enabled",
--                                                              NULL,
--                                                              flags,
--                                                              NULL,
--                                                              &amp;local_error);
--     if (auth_result == NULL)
--       {
--         g_warning ("Failed to get check polkit authorization: %s", local_error-&gt;message);
--         return FALSE;
--       }
--   
--     return polkit_authorization_result_get_is_authorized (auth_result);
--   }
--   </pre>
--   
--   <i>Since: 2.72</i>
module GI.Gio.Objects.DebugControllerDBus

-- | Memory-managed wrapper type.
newtype DebugControllerDBus
DebugControllerDBus :: ManagedPtr DebugControllerDBus -> DebugControllerDBus

-- | Type class for types which can be safely cast to
--   <a>DebugControllerDBus</a>, for instance with
--   <a>toDebugControllerDBus</a>.
class (GObject o, IsDescendantOf DebugControllerDBus o) => IsDebugControllerDBus o

-- | Cast to <a>DebugControllerDBus</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toDebugControllerDBus :: (MonadIO m, IsDebugControllerDBus o) => o -> m DebugControllerDBus

-- | Create a new <a>DebugControllerDBus</a> and synchronously initialize
--   it.
--   
--   Initializing the object will export the debug object on
--   <i><tt>connection</tt></i>. The object will remain registered until
--   the last reference to the <a>DebugControllerDBus</a> is dropped.
--   
--   Initialization may fail if registering the object on
--   <i><tt>connection</tt></i> fails.
--   
--   <i>Since: 2.72</i>
debugControllerDBusNew :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> m (Maybe DebugControllerDBus)

-- | Stop the debug controller, unregistering its object from the bus.
--   
--   Any pending method calls to the object will complete successfully, but
--   new ones will return an error. This method will block until all
--   pending <a>DebugControllerDBus::authorize</a> signals have been
--   handled. This is expected to not take long, as it will just be waiting
--   for threads to join. If any <a>DebugControllerDBus::authorize</a>
--   signal handlers are still executing in other threads, this will block
--   until after they have returned.
--   
--   This method will be called automatically when the final reference to
--   the <a>DebugControllerDBus</a> is dropped. You may want to call it
--   explicitly to know when the controller has been fully removed from the
--   bus, or to break reference count cycles.
--   
--   Calling this method from within a
--   <a>DebugControllerDBus::authorize</a> signal handler will cause a
--   deadlock and must not be done.
--   
--   <i>Since: 2.72</i>
debugControllerDBusStop :: (HasCallStack, MonadIO m, IsDebugControllerDBus a) => a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>connection</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDebugControllerDBusConnection :: (IsDebugControllerDBus o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>connection</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> debugControllerDBus #connection
--   </pre>
getDebugControllerDBusConnection :: (MonadIO m, IsDebugControllerDBus o) => o -> m (Maybe DBusConnection)

-- | Emitted when a D-Bus peer is trying to change the debug settings and
--   used to determine if that is authorized.
--   
--   This signal is emitted in a dedicated worker thread, so handlers are
--   allowed to perform blocking I/O. This means that, for example, it is
--   appropriate to call
--   <tt>polkit_authority_check_authorization_sync()</tt> to check
--   authorization using polkit.
--   
--   If <a>False</a> is returned then no further handlers are run and the
--   request to change the debug settings is rejected.
--   
--   Otherwise, if <a>True</a> is returned, signal emission continues. If
--   no handlers return <a>False</a>, then the debug settings are allowed
--   to be changed.
--   
--   Signal handlers must not modify <i><tt>invocation</tt></i>, or cause
--   it to return a value.
--   
--   The default class handler just returns <a>True</a>.
--   
--   <i>Since: 2.72</i>
type DebugControllerDBusAuthorizeCallback = DBusMethodInvocation -> IO Bool

-- | Connect a signal handler for the <a>authorize</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> debugControllerDBus #authorize callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDebugControllerDBusAuthorize :: (IsDebugControllerDBus a, MonadIO m) => a -> ((?self :: a) => DebugControllerDBusAuthorizeCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>authorize</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> debugControllerDBus #authorize callback
--   </pre>
onDebugControllerDBusAuthorize :: (IsDebugControllerDBus a, MonadIO m) => a -> ((?self :: a) => DebugControllerDBusAuthorizeCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DebugControllerDBus.DebugControllerDBus
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DebugControllerDBus.DebugControllerDBus
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DebugControllerDBus.DebugControllerDBus
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DebugControllerDBus.DebugControllerDBus o) => GI.Gio.Objects.DebugControllerDBus.IsDebugControllerDBus o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DebugControllerDBus.DebugControllerDBus)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DebugControllerDBus.DebugControllerDBus
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DebugControllerDBus.DebugControllerDBus


-- | Data output stream implements <a>OutputStream</a> and includes
--   functions for writing data directly to an output stream.
module GI.Gio.Objects.DataOutputStream

-- | Memory-managed wrapper type.
newtype DataOutputStream
DataOutputStream :: ManagedPtr DataOutputStream -> DataOutputStream

-- | Type class for types which can be safely cast to
--   <a>DataOutputStream</a>, for instance with <a>toDataOutputStream</a>.
class (GObject o, IsDescendantOf DataOutputStream o) => IsDataOutputStream o

-- | Cast to <a>DataOutputStream</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toDataOutputStream :: (MonadIO m, IsDataOutputStream o) => o -> m DataOutputStream

-- | Gets the byte order for the stream.
dataOutputStreamGetByteOrder :: (HasCallStack, MonadIO m, IsDataOutputStream a) => a -> m DataStreamByteOrder

-- | Creates a new data output stream for <i><tt>baseStream</tt></i>.
dataOutputStreamNew :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m DataOutputStream

-- | Puts a byte into the output stream.
dataOutputStreamPutByte :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word8 -> Maybe b -> m ()

-- | Puts a signed 16-bit integer into the output stream.
dataOutputStreamPutInt16 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int16 -> Maybe b -> m ()

-- | Puts a signed 32-bit integer into the output stream.
dataOutputStreamPutInt32 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> m ()

-- | Puts a signed 64-bit integer into the stream.
dataOutputStreamPutInt64 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int64 -> Maybe b -> m ()

-- | Puts a string into the output stream.
dataOutputStreamPutString :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Text -> Maybe b -> m ()

-- | Puts an unsigned 16-bit integer into the output stream.
dataOutputStreamPutUint16 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word16 -> Maybe b -> m ()

-- | Puts an unsigned 32-bit integer into the stream.
dataOutputStreamPutUint32 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word32 -> Maybe b -> m ()

-- | Puts an unsigned 64-bit integer into the stream.
dataOutputStreamPutUint64 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word64 -> Maybe b -> m ()

-- | Sets the byte order of the data output stream to
--   <i><tt>order</tt></i>.
dataOutputStreamSetByteOrder :: (HasCallStack, MonadIO m, IsDataOutputStream a) => a -> DataStreamByteOrder -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>byte-order</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDataOutputStreamByteOrder :: (IsDataOutputStream o, MonadIO m) => DataStreamByteOrder -> m (GValueConstruct o)

-- | Get the value of the “<tt>byte-order</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dataOutputStream #byteOrder
--   </pre>
getDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> m DataStreamByteOrder

-- | Set the value of the “<tt>byte-order</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dataOutputStream [ #byteOrder <a>:=</a> value ]
--   </pre>
setDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> DataStreamByteOrder -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.DataOutputStream.DataOutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DataOutputStream.DataOutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DataOutputStream.DataOutputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DataOutputStream.DataOutputStream o) => GI.Gio.Objects.DataOutputStream.IsDataOutputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DataOutputStream.DataOutputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DataOutputStream.DataOutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DataOutputStream.DataOutputStream


-- | Data input stream implements <a>InputStream</a> and includes functions
--   for reading structured data directly from a binary input stream.
module GI.Gio.Objects.DataInputStream

-- | Memory-managed wrapper type.
newtype DataInputStream
DataInputStream :: ManagedPtr DataInputStream -> DataInputStream

-- | Type class for types which can be safely cast to
--   <a>DataInputStream</a>, for instance with <a>toDataInputStream</a>.
class (GObject o, IsDescendantOf DataInputStream o) => IsDataInputStream o

-- | Cast to <a>DataInputStream</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toDataInputStream :: (MonadIO m, IsDataInputStream o) => o -> m DataInputStream

-- | Gets the byte order for the data input stream.
dataInputStreamGetByteOrder :: (HasCallStack, MonadIO m, IsDataInputStream a) => a -> m DataStreamByteOrder

-- | Gets the current newline type for the <i><tt>stream</tt></i>.
dataInputStreamGetNewlineType :: (HasCallStack, MonadIO m, IsDataInputStream a) => a -> m DataStreamNewlineType

-- | Creates a new data input stream for the <i><tt>baseStream</tt></i>.
dataInputStreamNew :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m DataInputStream

-- | Reads an unsigned 8-bit/1-byte value from <i><tt>stream</tt></i>.
dataInputStreamReadByte :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Word8

-- | Reads a 16-bit/2-byte value from <i><tt>stream</tt></i>.
--   
--   In order to get the correct byte order for this read operation, see
--   <a>dataInputStreamGetByteOrder</a> and
--   <a>dataInputStreamSetByteOrder</a>.
dataInputStreamReadInt16 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Int16

-- | Reads a signed 32-bit/4-byte value from <i><tt>stream</tt></i>.
--   
--   In order to get the correct byte order for this read operation, see
--   <a>dataInputStreamGetByteOrder</a> and
--   <a>dataInputStreamSetByteOrder</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
dataInputStreamReadInt32 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Int32

-- | Reads a 64-bit/8-byte value from <i><tt>stream</tt></i>.
--   
--   In order to get the correct byte order for this read operation, see
--   <a>dataInputStreamGetByteOrder</a> and
--   <a>dataInputStreamSetByteOrder</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
dataInputStreamReadInt64 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Int64

-- | Reads a line from the data input stream. Note that no encoding checks
--   or conversion is performed; the input is not guaranteed to be UTF-8,
--   and may in fact have embedded NUL characters.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
dataInputStreamReadLine :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m (Maybe ByteString, CSize)

-- | The asynchronous version of <a>dataInputStreamReadLine</a>. It is an
--   error to have two outstanding calls to this function.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>dataInputStreamReadLineFinish</a> to get
--   the result of the operation.
--   
--   <i>Since: 2.20</i>
dataInputStreamReadLineAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous call started by
--   <a>dataInputStreamReadLineAsync</a>. Note the warning about string
--   encoding in <a>dataInputStreamReadLine</a> applies here as well.
--   
--   <i>Since: 2.20</i>
dataInputStreamReadLineFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Maybe ByteString, CSize)

-- | Finish an asynchronous call started by
--   <a>dataInputStreamReadLineAsync</a>.
--   
--   <i>Since: 2.30</i>
dataInputStreamReadLineFinishUtf8 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Maybe Text, CSize)

-- | Reads a UTF-8 encoded line from the data input stream.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   <i>Since: 2.30</i>
dataInputStreamReadLineUtf8 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m (Maybe Text, CSize)

-- | Reads an unsigned 16-bit/2-byte value from <i><tt>stream</tt></i>.
--   
--   In order to get the correct byte order for this read operation, see
--   <a>dataInputStreamGetByteOrder</a> and
--   <a>dataInputStreamSetByteOrder</a>.
dataInputStreamReadUint16 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Word16

-- | Reads an unsigned 32-bit/4-byte value from <i><tt>stream</tt></i>.
--   
--   In order to get the correct byte order for this read operation, see
--   <a>dataInputStreamGetByteOrder</a> and
--   <a>dataInputStreamSetByteOrder</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
dataInputStreamReadUint32 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Word32

-- | Reads an unsigned 64-bit/8-byte value from <i><tt>stream</tt></i>.
--   
--   In order to get the correct byte order for this read operation, see
--   <a>dataInputStreamGetByteOrder</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
dataInputStreamReadUint64 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Word64

-- | Reads a string from the data input stream, up to the first occurrence
--   of any of the stop characters.
--   
--   Note that, in contrast to <a>dataInputStreamReadUntilAsync</a>, this
--   function consumes the stop character that it finds.
--   
--   Don't use this function in new code. Its functionality is inconsistent
--   with <a>dataInputStreamReadUntilAsync</a>. Both functions will be
--   marked as deprecated in a future release. Use
--   <a>dataInputStreamReadUpto</a> instead, but note that that function
--   does not consume the stop character.

-- | <i>Deprecated: (Since version 2.56)Use <a>dataInputStreamReadUpto</a>
--   instead, which has moreconsistent behaviour regarding the stop
--   character.</i>
dataInputStreamReadUntil :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Maybe b -> m (Text, CSize)

-- | The asynchronous version of <a>dataInputStreamReadUntil</a>. It is an
--   error to have two outstanding calls to this function.
--   
--   Note that, in contrast to <a>dataInputStreamReadUntil</a>, this
--   function does not consume the stop character that it finds. You must
--   read it for yourself.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>dataInputStreamReadUntilFinish</a> to get
--   the result of the operation.
--   
--   Don't use this function in new code. Its functionality is inconsistent
--   with <a>dataInputStreamReadUntil</a>. Both functions will be marked as
--   deprecated in a future release. Use
--   <a>dataInputStreamReadUptoAsync</a> instead.
--   
--   <i>Since: 2.20</i>

-- | <i>Deprecated: (Since version 2.56)Use
--   <a>dataInputStreamReadUptoAsync</a> instead, whichhas more consistent
--   behaviour regarding the stop character.</i>
dataInputStreamReadUntilAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous call started by
--   <a>dataInputStreamReadUntilAsync</a>.
--   
--   <i>Since: 2.20</i>

-- | <i>Deprecated: (Since version 2.56)Use
--   <a>dataInputStreamReadUptoFinish</a> instead, whichhas more consistent
--   behaviour regarding the stop character.</i>
dataInputStreamReadUntilFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, CSize)

-- | Reads a string from the data input stream, up to the first occurrence
--   of any of the stop characters.
--   
--   In contrast to <a>dataInputStreamReadUntil</a>, this function does not
--   consume the stop character. You have to use
--   <a>dataInputStreamReadByte</a> to get it before calling
--   <a>dataInputStreamReadUpto</a> again.
--   
--   Note that <i><tt>stopChars</tt></i> may contain '\0' if
--   <i><tt>stopCharsLen</tt></i> is specified.
--   
--   The returned string will always be nul-terminated on success.
--   
--   <i>Since: 2.26</i>
dataInputStreamReadUpto :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Maybe b -> m (Text, CSize)

-- | The asynchronous version of <a>dataInputStreamReadUpto</a>. It is an
--   error to have two outstanding calls to this function.
--   
--   In contrast to <a>dataInputStreamReadUntil</a>, this function does not
--   consume the stop character. You have to use
--   <a>dataInputStreamReadByte</a> to get it before calling
--   <a>dataInputStreamReadUpto</a> again.
--   
--   Note that <i><tt>stopChars</tt></i> may contain '\0' if
--   <i><tt>stopCharsLen</tt></i> is specified.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>dataInputStreamReadUptoFinish</a> to get
--   the result of the operation.
--   
--   <i>Since: 2.26</i>
dataInputStreamReadUptoAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous call started by
--   <a>dataInputStreamReadUptoAsync</a>.
--   
--   Note that this function does not consume the stop character. You have
--   to use <a>dataInputStreamReadByte</a> to get it before calling
--   <a>dataInputStreamReadUptoAsync</a> again.
--   
--   The returned string will always be nul-terminated on success.
--   
--   <i>Since: 2.24</i>
dataInputStreamReadUptoFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, CSize)

-- | This function sets the byte order for the given
--   <i><tt>stream</tt></i>. All subsequent reads from the
--   <i><tt>stream</tt></i> will be read in the given
--   <i><tt>order</tt></i>.
dataInputStreamSetByteOrder :: (HasCallStack, MonadIO m, IsDataInputStream a) => a -> DataStreamByteOrder -> m ()

-- | Sets the newline type for the <i><tt>stream</tt></i>.
--   
--   Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If
--   a read chunk ends in "CR" we must read an additional byte to know if
--   this is "CR" or "CR LF", and this might block if there is no more data
--   available.
dataInputStreamSetNewlineType :: (HasCallStack, MonadIO m, IsDataInputStream a) => a -> DataStreamNewlineType -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>byte-order</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDataInputStreamByteOrder :: (IsDataInputStream o, MonadIO m) => DataStreamByteOrder -> m (GValueConstruct o)

-- | Get the value of the “<tt>byte-order</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dataInputStream #byteOrder
--   </pre>
getDataInputStreamByteOrder :: (MonadIO m, IsDataInputStream o) => o -> m DataStreamByteOrder

-- | Set the value of the “<tt>byte-order</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dataInputStream [ #byteOrder <a>:=</a> value ]
--   </pre>
setDataInputStreamByteOrder :: (MonadIO m, IsDataInputStream o) => o -> DataStreamByteOrder -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>newline-type</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDataInputStreamNewlineType :: (IsDataInputStream o, MonadIO m) => DataStreamNewlineType -> m (GValueConstruct o)

-- | Get the value of the “<tt>newline-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dataInputStream #newlineType
--   </pre>
getDataInputStreamNewlineType :: (MonadIO m, IsDataInputStream o) => o -> m DataStreamNewlineType

-- | Set the value of the “<tt>newline-type</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dataInputStream [ #newlineType <a>:=</a> value ]
--   </pre>
setDataInputStreamNewlineType :: (MonadIO m, IsDataInputStream o) => o -> DataStreamNewlineType -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.DataInputStream.DataInputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DataInputStream.DataInputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DataInputStream.DataInputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DataInputStream.DataInputStream o) => GI.Gio.Objects.DataInputStream.IsDataInputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DataInputStream.DataInputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DataInputStream.DataInputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DataInputStream.DataInputStream


-- | <tt>GDBusServer</tt> is a helper for listening to and accepting D-Bus
--   connections. This can be used to create a new D-Bus server, allowing
--   two peers to use the D-Bus protocol for their own specialized
--   communication. A server instance provided in this way will not perform
--   message routing or implement the <a>`org.freedesktop.DBus`
--   interface</a>.
--   
--   To just export an object on a well-known name on a message bus, such
--   as the session or system bus, you should instead use
--   <a>busOwnName</a>.
--   
--   An example of peer-to-peer communication with GDBus can be found in
--   <a>gdbus-example-peer.c</a>.
--   
--   Note that a minimal <tt>GDBusServer</tt> will accept connections from
--   any peer. In many use-cases it will be necessary to add a
--   <a>DBusAuthObserver</a> that only accepts connections that have
--   successfully authenticated as the same user that is running the
--   <tt>GDBusServer</tt>. Since GLib 2.68 this can be achieved more simply
--   by passing the
--   <tt>G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER</tt> flag to
--   the server.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.DBusServer

-- | Memory-managed wrapper type.
newtype DBusServer
DBusServer :: ManagedPtr DBusServer -> DBusServer

-- | Type class for types which can be safely cast to <a>DBusServer</a>,
--   for instance with <a>toDBusServer</a>.
class (GObject o, IsDescendantOf DBusServer o) => IsDBusServer o

-- | Cast to <a>DBusServer</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDBusServer :: (MonadIO m, IsDBusServer o) => o -> m DBusServer

-- | Gets a <a>D-Bus address</a> string that can be used by clients to
--   connect to <i><tt>server</tt></i>.
--   
--   This is valid and non-empty if initializing the <a>DBusServer</a>
--   succeeded.
--   
--   <i>Since: 2.26</i>
dBusServerGetClientAddress :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Text

-- | Gets the flags for <i><tt>server</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusServerGetFlags :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m [DBusServerFlags]

-- | Gets the GUID for <i><tt>server</tt></i>, as provided to
--   <a>dBusServerNewSync</a>.
--   
--   <i>Since: 2.26</i>
dBusServerGetGuid :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Text

-- | Gets whether <i><tt>server</tt></i> is active.
--   
--   <i>Since: 2.26</i>
dBusServerIsActive :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Bool

-- | Creates a new D-Bus server that listens on the first address in
--   <i><tt>address</tt></i> that works.
--   
--   Once constructed, you can use <a>dBusServerGetClientAddress</a> to get
--   a D-Bus address string that clients can use to connect.
--   
--   To have control over the available authentication mechanisms and the
--   users that are authorized to connect, it is strongly recommended to
--   provide a non-<a>Nothing</a> <a>DBusAuthObserver</a>.
--   
--   Connect to the <a>DBusServer::newConnection</a> signal to handle
--   incoming connections.
--   
--   The returned <a>DBusServer</a> isn't active - you have to start it
--   with <a>dBusServerStart</a>.
--   
--   <a>DBusServer</a> is used in this <a>example</a>.
--   
--   This is a synchronous failable constructor. There is currently no
--   asynchronous version.
--   
--   <i>Since: 2.26</i>
dBusServerNewSync :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) => Text -> [DBusServerFlags] -> Text -> Maybe a -> Maybe b -> m DBusServer

-- | Starts <i><tt>server</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusServerStart :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m ()

-- | Stops <i><tt>server</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusServerStop :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m ()

-- | Get the value of the “<tt>active</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusServer #active
--   </pre>
getDBusServerActive :: (MonadIO m, IsDBusServer o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>address</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusServerAddress :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusServer #address
--   </pre>
getDBusServerAddress :: (MonadIO m, IsDBusServer o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>authentication-observer</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructDBusServerAuthenticationObserver :: (IsDBusServer o, MonadIO m, IsDBusAuthObserver a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>authentication-observer</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusServer #authenticationObserver
--   </pre>
getDBusServerAuthenticationObserver :: (MonadIO m, IsDBusServer o) => o -> m (Maybe DBusAuthObserver)

-- | Get the value of the “<tt>client-address</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusServer #clientAddress
--   </pre>
getDBusServerClientAddress :: (MonadIO m, IsDBusServer o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusServerFlags :: (IsDBusServer o, MonadIO m) => [DBusServerFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusServer #flags
--   </pre>
getDBusServerFlags :: (MonadIO m, IsDBusServer o) => o -> m [DBusServerFlags]

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>guid</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusServerGuid :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>guid</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusServer #guid
--   </pre>
getDBusServerGuid :: (MonadIO m, IsDBusServer o) => o -> m Text

-- | Emitted when a new authenticated connection has been made. Use
--   <a>dBusConnectionGetPeerCredentials</a> to figure out what identity
--   (if any), was authenticated.
--   
--   If you want to accept the connection, take a reference to the
--   <i><tt>connection</tt></i> object and return <a>True</a>. When you are
--   done with the connection call <a>dBusConnectionClose</a> and give up
--   your reference. Note that the other peer may disconnect at any time -
--   a typical thing to do when accepting a connection is to listen to the
--   <a>DBusConnection::closed</a> signal.
--   
--   If <a>DBusServer:flags</a> contains <a>DBusServerFlagsRunInThread</a>
--   then the signal is emitted in a new thread dedicated to the
--   connection. Otherwise the signal is emitted in the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) of the thread that
--   <i><tt>server</tt></i> was constructed in.
--   
--   You are guaranteed that signal handlers for this signal runs before
--   incoming messages on <i><tt>connection</tt></i> are processed. This
--   means that it's suitable to call
--   <tt><i>g_dbus_connection_register_object()</i></tt> or similar from
--   the signal handler.
--   
--   <i>Since: 2.26</i>
type DBusServerNewConnectionCallback = DBusConnection -> IO Bool

-- | Connect a signal handler for the <a>newConnection</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusServer #newConnection callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> ((?self :: a) => DBusServerNewConnectionCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>newConnection</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusServer #newConnection callback
--   </pre>
onDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> ((?self :: a) => DBusServerNewConnectionCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DBusServer.DBusServer
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusServer.DBusServer
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusServer.DBusServer
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusServer.DBusServer o) => GI.Gio.Objects.DBusServer.IsDBusServer o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusServer.DBusServer)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusServer.DBusServer
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusServer.DBusServer


-- | <tt>GDBusProxy</tt> is a base class used for proxies to access a D-Bus
--   interface on a remote object. A <tt>GDBusProxy</tt> can be constructed
--   for both well-known and unique names.
--   
--   By default, <tt>GDBusProxy</tt> will cache all properties (and listen
--   to changes) of the remote object, and proxy all signals that get
--   emitted. This behaviour can be changed by passing suitable
--   [flags<i><tt>gio</tt></i>.DBusProxyFlags] when the proxy is created.
--   If the proxy is for a well-known name, the property cache is flushed
--   when the name owner vanishes and reloaded when a name owner appears.
--   
--   The unique name owner of the proxy’s name is tracked and can be read
--   from <a>DBusProxy:gNameOwner</a>. Connect to the <a>Object::notify</a>
--   signal to get notified of changes. Additionally, only signals and
--   property changes emitted from the current name owner are considered
--   and calls are always sent to the current name owner. This avoids a
--   number of race conditions when the name is lost by one owner and
--   claimed by another. However, if no name owner currently exists, then
--   calls will be sent to the well-known name which may result in the
--   message bus launching an owner (unless
--   <tt>G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START</tt> is set).
--   
--   If the proxy is for a stateless D-Bus service, where the name owner
--   may be started and stopped between calls, the
--   <a>DBusProxy:gNameOwner</a> tracking of <tt>GDBusProxy</tt> will cause
--   the proxy to drop signal and property changes from the service after
--   it has restarted for the first time. When interacting with a stateless
--   D-Bus service, do not use <tt>GDBusProxy</tt> — use direct D-Bus
--   method calls and signal connections.
--   
--   The generic <a>DBusProxy::gPropertiesChanged</a> and
--   <a>DBusProxy::gSignal</a> signals are not very convenient to work
--   with. Therefore, the recommended way of working with proxies is to
--   subclass <tt>GDBusProxy</tt>, and have more natural properties and
--   signals in your derived class. This <a>example</a> shows how this can
--   easily be done using the <a>`gdbus-codegen`</a> tool.
--   
--   A <tt>GDBusProxy</tt> instance can be used from multiple threads but
--   note that all signals (e.g. <a>DBusProxy::gSignal</a>,
--   <a>DBusProxy::gPropertiesChanged</a> and <a>Object::notify</a>) are
--   emitted in the thread-default main context (see
--   <a>mainContextPushThreadDefault</a>) of the thread where the instance
--   was constructed.
--   
--   <h2>A watch proxy example</h2>
--   
--   An example using a proxy for a well-known name can be found in
--   <a>`gdbus-example-watch-proxy.c`</a>.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.DBusProxy

-- | Memory-managed wrapper type.
newtype DBusProxy
DBusProxy :: ManagedPtr DBusProxy -> DBusProxy

-- | Type class for types which can be safely cast to <a>DBusProxy</a>, for
--   instance with <a>toDBusProxy</a>.
class (GObject o, IsDescendantOf DBusProxy o) => IsDBusProxy o

-- | Cast to <a>DBusProxy</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDBusProxy :: (MonadIO m, IsDBusProxy o) => o -> m DBusProxy

-- | Asynchronously invokes the <i><tt>methodName</tt></i> method on
--   <i><tt>proxy</tt></i>.
--   
--   If <i><tt>methodName</tt></i> contains any dots, then
--   <i><tt>name</tt></i> is split into interface and method name parts.
--   This allows using <i><tt>proxy</tt></i> for invoking methods on other
--   interfaces.
--   
--   If the <a>DBusConnection</a> associated with <i><tt>proxy</tt></i> is
--   closed then the operation will fail with <a>IOErrorEnumClosed</a>. If
--   <i><tt>cancellable</tt></i> is canceled, the operation will fail with
--   <a>IOErrorEnumCancelled</a>. If <i><tt>parameters</tt></i> contains a
--   value not compatible with the D-Bus protocol, the operation fails with
--   <a>IOErrorEnumInvalidArgument</a>.
--   
--   If the <i><tt>parameters</tt></i> <a>GVariant</a> is floating, it is
--   consumed. This allows convenient 'inline' use of
--   <tt><i>g_variant_new()</i></tt>, e.g.:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_dbus_proxy_call (proxy,
--                      "TwoStrings",
--                      g_variant_new ("(ss)",
--                                     "Thing One",
--                                     "Thing Two"),
--                      G_DBUS_CALL_FLAGS_NONE,
--                      -1,
--                      NULL,
--                      (GAsyncReadyCallback) two_strings_done,
--                      &amp;data);
--   </pre>
--   
--   If <i><tt>proxy</tt></i> has an expected interface (see
--   <a>DBusProxy:gInterfaceInfo</a>) and <i><tt>methodName</tt></i> is
--   referenced by it, then the return value is checked against the return
--   type.
--   
--   This is an asynchronous method. When the operation is finished,
--   <i><tt>callback</tt></i> will be invoked in the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) of the thread you
--   are calling this method from. You can then call
--   <a>dBusProxyCallFinish</a> to get the result of the operation. See
--   <a>dBusProxyCallSync</a> for the synchronous version of this method.
--   
--   If <i><tt>callback</tt></i> is <a>Nothing</a> then the D-Bus method
--   call message will be sent with the
--   <a>DBusMessageFlagsNoReplyExpected</a> flag set.
--   
--   <i>Since: 2.26</i>
dBusProxyCall :: (HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) => a -> Text -> Maybe GVariant -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusProxyCall</a>.
--   
--   <i>Since: 2.26</i>
dBusProxyCallFinish :: (HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) => a -> b -> m GVariant

-- | Synchronously invokes the <i><tt>methodName</tt></i> method on
--   <i><tt>proxy</tt></i>.
--   
--   If <i><tt>methodName</tt></i> contains any dots, then
--   <i><tt>name</tt></i> is split into interface and method name parts.
--   This allows using <i><tt>proxy</tt></i> for invoking methods on other
--   interfaces.
--   
--   If the <a>DBusConnection</a> associated with <i><tt>proxy</tt></i> is
--   disconnected then the operation will fail with
--   <a>IOErrorEnumClosed</a>. If <i><tt>cancellable</tt></i> is canceled,
--   the operation will fail with <a>IOErrorEnumCancelled</a>. If
--   <i><tt>parameters</tt></i> contains a value not compatible with the
--   D-Bus protocol, the operation fails with
--   <a>IOErrorEnumInvalidArgument</a>.
--   
--   If the <i><tt>parameters</tt></i> <a>GVariant</a> is floating, it is
--   consumed. This allows convenient 'inline' use of
--   <tt><i>g_variant_new()</i></tt>, e.g.:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_dbus_proxy_call_sync (proxy,
--                           "TwoStrings",
--                           g_variant_new ("(ss)",
--                                          "Thing One",
--                                          "Thing Two"),
--                           G_DBUS_CALL_FLAGS_NONE,
--                           -1,
--                           NULL,
--                           &amp;error);
--   </pre>
--   
--   The calling thread is blocked until a reply is received. See
--   <a>dBusProxyCall</a> for the asynchronous version of this method.
--   
--   If <i><tt>proxy</tt></i> has an expected interface (see
--   <a>DBusProxy:gInterfaceInfo</a>) and <i><tt>methodName</tt></i> is
--   referenced by it, then the return value is checked against the return
--   type.
--   
--   <i>Since: 2.26</i>
dBusProxyCallSync :: (HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) => a -> Text -> Maybe GVariant -> [DBusCallFlags] -> Int32 -> Maybe b -> m GVariant

-- | Like <a>dBusProxyCall</a> but also takes a <a>UnixFDList</a> object.
--   
--   This method is only available on UNIX.
--   
--   <i>Since: 2.30</i>
dBusProxyCallWithUnixFdList :: (HasCallStack, MonadIO m, IsDBusProxy a, IsUnixFDList b, IsCancellable c) => a -> Text -> Maybe GVariant -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusProxyCallWithUnixFdList</a>.
--   
--   <i>Since: 2.30</i>
dBusProxyCallWithUnixFdListFinish :: (HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) => a -> b -> m (GVariant, Maybe UnixFDList)

-- | Like <a>dBusProxyCallSync</a> but also takes and returns
--   <a>UnixFDList</a> objects.
--   
--   This method is only available on UNIX.
--   
--   <i>Since: 2.30</i>
dBusProxyCallWithUnixFdListSync :: (HasCallStack, MonadIO m, IsDBusProxy a, IsUnixFDList b, IsCancellable c) => a -> Text -> Maybe GVariant -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe c -> m (GVariant, Maybe UnixFDList)

-- | Looks up the value for a property from the cache. This call does no
--   blocking IO.
--   
--   If <i><tt>proxy</tt></i> has an expected interface (see
--   <a>DBusProxy:gInterfaceInfo</a>) and <i><tt>propertyName</tt></i> is
--   referenced by it, then <i><tt>value</tt></i> is checked against the
--   type of the property.
--   
--   <i>Since: 2.26</i>
dBusProxyGetCachedProperty :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Text -> m (Maybe GVariant)

-- | Gets the names of all cached properties on <i><tt>proxy</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusProxyGetCachedPropertyNames :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe [Text])

-- | Gets the connection <i><tt>proxy</tt></i> is for.
--   
--   <i>Since: 2.26</i>
dBusProxyGetConnection :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m DBusConnection

-- | Gets the timeout to use if -1 (specifying default timeout) is passed
--   as <i><tt>timeoutMsec</tt></i> in the <a>dBusProxyCall</a> and
--   <a>dBusProxyCallSync</a> functions.
--   
--   See the <a>DBusProxy:gDefaultTimeout</a> property for more details.
--   
--   <i>Since: 2.26</i>
dBusProxyGetDefaultTimeout :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Int32

-- | Gets the flags that <i><tt>proxy</tt></i> was constructed with.
--   
--   <i>Since: 2.26</i>
dBusProxyGetFlags :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m [DBusProxyFlags]

-- | Returns the <a>DBusInterfaceInfo</a>, if any, specifying the interface
--   that <i><tt>proxy</tt></i> conforms to. See the
--   <a>DBusProxy:gInterfaceInfo</a> property for more details.
--   
--   <i>Since: 2.26</i>
dBusProxyGetInterfaceInfo :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe DBusInterfaceInfo)

-- | Gets the D-Bus interface name <i><tt>proxy</tt></i> is for.
--   
--   <i>Since: 2.26</i>
dBusProxyGetInterfaceName :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Text

-- | Gets the name that <i><tt>proxy</tt></i> was constructed for.
--   
--   When connected to a message bus, this will usually be
--   non-<a>Nothing</a>. However, it may be <a>Nothing</a> for a proxy that
--   communicates using a peer-to-peer pattern.
--   
--   <i>Since: 2.26</i>
dBusProxyGetName :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe Text)

-- | The unique name that owns the name that <i><tt>proxy</tt></i> is for
--   or <a>Nothing</a> if no-one currently owns that name. You may connect
--   to the <a>Object::notify</a> signal to track changes to the
--   <a>DBusProxy:gNameOwner</a> property.
--   
--   <i>Since: 2.26</i>
dBusProxyGetNameOwner :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe Text)

-- | Gets the object path <i><tt>proxy</tt></i> is for.
--   
--   <i>Since: 2.26</i>
dBusProxyGetObjectPath :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Text

-- | Creates a proxy for accessing <i><tt>interfaceName</tt></i> on the
--   remote object at <i><tt>objectPath</tt></i> owned by
--   <i><tt>name</tt></i> at <i><tt>connection</tt></i> and asynchronously
--   loads D-Bus properties unless the
--   <a>DBusProxyFlagsDoNotLoadProperties</a> flag is used. Connect to the
--   <a>DBusProxy::gPropertiesChanged</a> signal to get notified about
--   property changes.
--   
--   If the <a>DBusProxyFlagsDoNotConnectSignals</a> flag is not set, also
--   sets up match rules for signals. Connect to the
--   <a>DBusProxy::gSignal</a> signal to handle signals from the remote
--   object.
--   
--   If both <a>DBusProxyFlagsDoNotLoadProperties</a> and
--   <a>DBusProxyFlagsDoNotConnectSignals</a> are set, this constructor is
--   guaranteed to complete immediately without blocking.
--   
--   If <i><tt>name</tt></i> is a well-known name and the
--   <a>DBusProxyFlagsDoNotAutoStart</a> and
--   <a>DBusProxyFlagsDoNotAutoStartAtConstruction</a> flags aren't set and
--   no name owner currently exists, the message bus will be requested to
--   launch a name owner for the name.
--   
--   This is a failable asynchronous constructor - when the proxy is ready,
--   <i><tt>callback</tt></i> will be invoked and you can use
--   <a>dBusProxyNewFinish</a> to get the result.
--   
--   See <a>dBusProxyNewSync</a> and for a synchronous version of this
--   constructor.
--   
--   <a>DBusProxy</a> is used in this
--   [example][class<i><tt>gio</tt></i>.DBusProxy<tt><i>a</i></tt>-watch-proxy-example].
--   
--   <i>Since: 2.26</i>
dBusProxyNew :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Maybe Text -> Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes creating a <a>DBusProxy</a>.
--   
--   <i>Since: 2.26</i>
dBusProxyNewFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusProxy

-- | Like <a>dBusProxyNew</a> but takes a <a>BusType</a> instead of a
--   <a>DBusConnection</a>.
--   
--   <a>DBusProxy</a> is used in this
--   [example][class<i><tt>gio</tt></i>.DBusProxy<tt><i>a</i></tt>-watch-proxy-example].
--   
--   <i>Since: 2.26</i>
dBusProxyNewForBus :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Text -> Text -> Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes creating a <a>DBusProxy</a>.
--   
--   <i>Since: 2.26</i>
dBusProxyNewForBusFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusProxy

-- | Like <a>dBusProxyNewSync</a> but takes a <a>BusType</a> instead of a
--   <a>DBusConnection</a>.
--   
--   <a>DBusProxy</a> is used in this
--   [example][class<i><tt>gio</tt></i>.DBusProxy<tt><i>a</i></tt>-watch-proxy-example].
--   
--   <i>Since: 2.26</i>
dBusProxyNewForBusSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Text -> Text -> Text -> Maybe a -> m DBusProxy

-- | Creates a proxy for accessing <i><tt>interfaceName</tt></i> on the
--   remote object at <i><tt>objectPath</tt></i> owned by
--   <i><tt>name</tt></i> at <i><tt>connection</tt></i> and synchronously
--   loads D-Bus properties unless the
--   <a>DBusProxyFlagsDoNotLoadProperties</a> flag is used.
--   
--   If the <a>DBusProxyFlagsDoNotConnectSignals</a> flag is not set, also
--   sets up match rules for signals. Connect to the
--   <a>DBusProxy::gSignal</a> signal to handle signals from the remote
--   object.
--   
--   If both <a>DBusProxyFlagsDoNotLoadProperties</a> and
--   <a>DBusProxyFlagsDoNotConnectSignals</a> are set, this constructor is
--   guaranteed to return immediately without blocking.
--   
--   If <i><tt>name</tt></i> is a well-known name and the
--   <a>DBusProxyFlagsDoNotAutoStart</a> and
--   <a>DBusProxyFlagsDoNotAutoStartAtConstruction</a> flags aren't set and
--   no name owner currently exists, the message bus will be requested to
--   launch a name owner for the name.
--   
--   This is a synchronous failable constructor. See <a>dBusProxyNew</a>
--   and <a>dBusProxyNewFinish</a> for the asynchronous version.
--   
--   <a>DBusProxy</a> is used in this
--   [example][class<i><tt>gio</tt></i>.DBusProxy<tt><i>a</i></tt>-watch-proxy-example].
--   
--   <i>Since: 2.26</i>
dBusProxyNewSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Maybe Text -> Text -> Text -> Maybe b -> m DBusProxy

-- | If <i><tt>value</tt></i> is not <a>Nothing</a>, sets the cached value
--   for the property with name <i><tt>propertyName</tt></i> to the value
--   in <i><tt>value</tt></i>.
--   
--   If <i><tt>value</tt></i> is <a>Nothing</a>, then the cached value is
--   removed from the property cache.
--   
--   If <i><tt>proxy</tt></i> has an expected interface (see
--   <a>DBusProxy:gInterfaceInfo</a>) and <i><tt>propertyName</tt></i> is
--   referenced by it, then <i><tt>value</tt></i> is checked against the
--   type of the property.
--   
--   If the <i><tt>value</tt></i> <a>GVariant</a> is floating, it is
--   consumed. This allows convenient 'inline' use of
--   <tt><i>g_variant_new()</i></tt>, e.g.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_dbus_proxy_set_cached_property (proxy,
--                                     "SomeProperty",
--                                     g_variant_new ("(si)",
--                                                   "A String",
--                                                   42));
--   </pre>
--   
--   Normally you will not need to use this method since
--   <i><tt>proxy</tt></i> is tracking changes using the
--   <tt>org.freedesktop.DBus.Properties.PropertiesChanged</tt> D-Bus
--   signal. However, for performance reasons an object may decide to not
--   use this signal for some properties and instead use a proprietary
--   out-of-band mechanism to transmit changes.
--   
--   As a concrete example, consider an object with a property
--   <tt>ChatroomParticipants</tt> which is an array of strings. Instead of
--   transmitting the same (long) array every time the property changes, it
--   is more efficient to only transmit the delta using e.g. signals
--   <tt>ChatroomParticipantJoined(String name)</tt> and
--   <tt>ChatroomParticipantParted(String name)</tt>.
--   
--   <i>Since: 2.26</i>
dBusProxySetCachedProperty :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Text -> Maybe GVariant -> m ()

-- | Sets the timeout to use if -1 (specifying default timeout) is passed
--   as <i><tt>timeoutMsec</tt></i> in the <a>dBusProxyCall</a> and
--   <a>dBusProxyCallSync</a> functions.
--   
--   See the <a>DBusProxy:gDefaultTimeout</a> property for more details.
--   
--   <i>Since: 2.26</i>
dBusProxySetDefaultTimeout :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Int32 -> m ()

-- | Ensure that interactions with <i><tt>proxy</tt></i> conform to the
--   given interface. See the <a>DBusProxy:gInterfaceInfo</a> property for
--   more details.
--   
--   <i>Since: 2.26</i>
dBusProxySetInterfaceInfo :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Maybe DBusInterfaceInfo -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-bus-type</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDBusProxyGBusType :: (IsDBusProxy o, MonadIO m) => BusType -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-connection</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusProxyGConnection :: (IsDBusProxy o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-connection</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gConnection
--   </pre>
getDBusProxyGConnection :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe DBusConnection)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-default-timeout</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructDBusProxyGDefaultTimeout :: (IsDBusProxy o, MonadIO m) => Int32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-default-timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gDefaultTimeout
--   </pre>
getDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> m Int32

-- | Set the value of the “<tt>g-default-timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusProxy [ #gDefaultTimeout <a>:=</a> value ]
--   </pre>
setDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> Int32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusProxyGFlags :: (IsDBusProxy o, MonadIO m) => [DBusProxyFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gFlags
--   </pre>
getDBusProxyGFlags :: (MonadIO m, IsDBusProxy o) => o -> m [DBusProxyFlags]

-- | Set the value of the “<tt>g-interface-info</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #gInterfaceInfo
--   </pre>
clearDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-interface-info</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructDBusProxyGInterfaceInfo :: (IsDBusProxy o, MonadIO m) => DBusInterfaceInfo -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-interface-info</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gInterfaceInfo
--   </pre>
getDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe DBusInterfaceInfo)

-- | Set the value of the “<tt>g-interface-info</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusProxy [ #gInterfaceInfo <a>:=</a> value ]
--   </pre>
setDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> DBusInterfaceInfo -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-interface-name</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructDBusProxyGInterfaceName :: (IsDBusProxy o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-interface-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gInterfaceName
--   </pre>
getDBusProxyGInterfaceName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-name</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusProxyGName :: (IsDBusProxy o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gName
--   </pre>
getDBusProxyGName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)

-- | Get the value of the “<tt>g-name-owner</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gNameOwner
--   </pre>
getDBusProxyGNameOwner :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-object-path</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusProxyGObjectPath :: (IsDBusProxy o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-object-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusProxy #gObjectPath
--   </pre>
getDBusProxyGObjectPath :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)

-- | Emitted when one or more D-Bus properties on <i><tt>proxy</tt></i>
--   changes. The local cache has already been updated when this signal
--   fires. Note that both <i><tt>changedProperties</tt></i> and
--   <i><tt>invalidatedProperties</tt></i> are guaranteed to never be
--   <a>Nothing</a> (either may be empty though).
--   
--   If the proxy has the flag
--   <a>DBusProxyFlagsGetInvalidatedProperties</a> set, then
--   <i><tt>invalidatedProperties</tt></i> will always be empty.
--   
--   This signal corresponds to the <tt>PropertiesChanged</tt> D-Bus signal
--   on the <tt>org.freedesktop.DBus.Properties</tt> interface.
--   
--   <i>Since: 2.26</i>
type DBusProxyGPropertiesChangedCallback = GVariant -> [Text] -> IO ()

-- | Connect a signal handler for the <a>gPropertiesChanged</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusProxy #gPropertiesChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> ((?self :: a) => DBusProxyGPropertiesChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>gPropertiesChanged</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusProxy #gPropertiesChanged callback
--   </pre>
onDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> ((?self :: a) => DBusProxyGPropertiesChangedCallback) -> m SignalHandlerId

-- | Emitted when a signal from the remote object and interface that
--   <i><tt>proxy</tt></i> is for, has been received.
--   
--   Since 2.72 this signal supports detailed connections. You can connect
--   to the detailed signal <tt>g-signal::x</tt> in order to receive
--   callbacks only when signal <tt>x</tt> is received from the remote
--   object.
--   
--   <i>Since: 2.26</i>
type DBusProxyGSignalCallback = Maybe Text -> Text -> GVariant -> IO ()

-- | Connect a signal handler for the <a>gSignal</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> dBusProxy #gSignal callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>g-signal::detail</tt>”
--   instead.
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => DBusProxyGSignalCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>gSignal</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> dBusProxy #gSignal callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>g-signal::detail</tt>”
--   instead.
onDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => DBusProxyGSignalCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DBusProxy.DBusProxy
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusProxy.DBusProxy
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusProxy.DBusProxy
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusProxy.DBusProxy o) => GI.Gio.Objects.DBusProxy.IsDBusProxy o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusProxy.DBusProxy)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusProxy.DBusProxy
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusProxy.DBusProxy


-- | A <tt>GDBusObjectSkeleton</tt> instance is essentially a group of
--   D-Bus interfaces. The set of exported interfaces on the object may be
--   dynamic and change at runtime.
--   
--   This type is intended to be used with <a>DBusObjectManager</a>.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.DBusObjectSkeleton

-- | Memory-managed wrapper type.
newtype DBusObjectSkeleton
DBusObjectSkeleton :: ManagedPtr DBusObjectSkeleton -> DBusObjectSkeleton

-- | Type class for types which can be safely cast to
--   <a>DBusObjectSkeleton</a>, for instance with
--   <a>toDBusObjectSkeleton</a>.
class (GObject o, IsDescendantOf DBusObjectSkeleton o) => IsDBusObjectSkeleton o

-- | Cast to <a>DBusObjectSkeleton</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toDBusObjectSkeleton :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m DBusObjectSkeleton

-- | Adds <i><tt>interface_</tt></i> to <i><tt>object</tt></i>.
--   
--   If <i><tt>object</tt></i> already contains a
--   <a>DBusInterfaceSkeleton</a> with the same interface name, it is
--   removed before <i><tt>interface_</tt></i> is added.
--   
--   Note that <i><tt>object</tt></i> takes its own reference on
--   <i><tt>interface_</tt></i> and holds it until removed.
--   
--   <i>Since: 2.30</i>
dBusObjectSkeletonAddInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m ()

-- | This method simply calls <a>dBusInterfaceSkeletonFlush</a> on all
--   interfaces belonging to <i><tt>object</tt></i>. See that method for
--   when flushing is useful.
--   
--   <i>Since: 2.30</i>
dBusObjectSkeletonFlush :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> m ()

-- | Creates a new <a>DBusObjectSkeleton</a>.
--   
--   <i>Since: 2.30</i>
dBusObjectSkeletonNew :: (HasCallStack, MonadIO m) => Text -> m DBusObjectSkeleton

-- | Removes <i><tt>interface_</tt></i> from <i><tt>object</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectSkeletonRemoveInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m ()

-- | Removes the <a>DBusInterface</a> with <i><tt>interfaceName</tt></i>
--   from <i><tt>object</tt></i>.
--   
--   If no D-Bus interface of the given interface exists, this function
--   does nothing.
--   
--   <i>Since: 2.30</i>
dBusObjectSkeletonRemoveInterfaceByName :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m ()

-- | Sets the object path for <i><tt>object</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectSkeletonSetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m ()

-- | Set the value of the “<tt>g-object-path</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #gObjectPath
--   </pre>
clearDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-object-path</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusObjectSkeletonGObjectPath :: (IsDBusObjectSkeleton o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-object-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectSkeleton #gObjectPath
--   </pre>
getDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>g-object-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusObjectSkeleton [ #gObjectPath <a>:=</a> value ]
--   </pre>
setDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> Text -> m ()

-- | Emitted when a method is invoked by a remote caller and used to
--   determine if the method call is authorized.
--   
--   This signal is like <a>DBusInterfaceSkeleton</a>'s
--   <a>DBusInterfaceSkeleton::gAuthorizeMethod</a> signal, except that it
--   is for the enclosing object.
--   
--   The default class handler just returns <a>True</a>.
--   
--   <i>Since: 2.30</i>
type DBusObjectSkeletonAuthorizeMethodCallback = DBusInterfaceSkeleton -> DBusMethodInvocation -> IO Bool

-- | Connect a signal handler for the <a>authorizeMethod</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusObjectSkeleton #authorizeMethod callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusObjectSkeletonAuthorizeMethodCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>authorizeMethod</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObjectSkeleton #authorizeMethod callback
--   </pre>
onDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusObjectSkeletonAuthorizeMethodCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton o) => GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton


-- | A <tt>GDBusObjectProxy</tt> is an object used to represent a remote
--   object with one or more D-Bus interfaces. Normally, you don’t
--   instantiate a <tt>GDBusObjectProxy</tt> yourself — typically
--   <a>DBusObjectManagerClient</a> is used to obtain it.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.DBusObjectProxy

-- | Memory-managed wrapper type.
newtype DBusObjectProxy
DBusObjectProxy :: ManagedPtr DBusObjectProxy -> DBusObjectProxy

-- | Type class for types which can be safely cast to
--   <a>DBusObjectProxy</a>, for instance with <a>toDBusObjectProxy</a>.
class (GObject o, IsDescendantOf DBusObjectProxy o) => IsDBusObjectProxy o

-- | Cast to <a>DBusObjectProxy</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toDBusObjectProxy :: (MonadIO m, IsDBusObjectProxy o) => o -> m DBusObjectProxy

-- | Gets the connection that <i><tt>proxy</tt></i> is for.
--   
--   <i>Since: 2.30</i>
dBusObjectProxyGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectProxy a) => a -> m DBusConnection

-- | Creates a new <a>DBusObjectProxy</a> for the given connection and
--   object path.
--   
--   <i>Since: 2.30</i>
dBusObjectProxyNew :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> m DBusObjectProxy

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-connection</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusObjectProxyGConnection :: (IsDBusObjectProxy o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-connection</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectProxy #gConnection
--   </pre>
getDBusObjectProxyGConnection :: (MonadIO m, IsDBusObjectProxy o) => o -> m (Maybe DBusConnection)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-object-path</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusObjectProxyGObjectPath :: (IsDBusObjectProxy o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-object-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectProxy #gObjectPath
--   </pre>
getDBusObjectProxyGObjectPath :: (MonadIO m, IsDBusObjectProxy o) => o -> m (Maybe Text)
instance GHC.Classes.Eq GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy o) => GI.Gio.Objects.DBusObjectProxy.IsDBusObjectProxy o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy


-- | <tt>GDBusObjectManagerServer</tt> is used to export <a>DBusObject</a>
--   instances using the standardized
--   <a>`org.freedesktop.DBus.ObjectManager`</a> interface. For example,
--   remote D-Bus clients can get all objects and properties in a single
--   call. Additionally, any change in the object hierarchy is broadcast
--   using signals. This means that D-Bus clients can keep caches up to
--   date by only listening to D-Bus signals.
--   
--   The recommended path to export an object manager at is the path form
--   of the well-known name of a D-Bus service, or below. For example, if a
--   D-Bus service is available at the well-known name
--   <tt>net.example.ExampleService1</tt>, the object manager should
--   typically be exported at <tt>/net/example/ExampleService1</tt>, or
--   below (to allow for multiple object managers in a service).
--   
--   It is supported, but not recommended, to export an object manager at
--   the root path, <tt>/</tt>.
--   
--   See <a>DBusObjectManagerClient</a> for the client-side code that is
--   intended to be used with <tt>GDBusObjectManagerServer</tt> or any
--   D-Bus object implementing the
--   <tt>org.freedesktop.DBus.ObjectManager</tt> interface.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.DBusObjectManagerServer

-- | Memory-managed wrapper type.
newtype DBusObjectManagerServer
DBusObjectManagerServer :: ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer

-- | Type class for types which can be safely cast to
--   <a>DBusObjectManagerServer</a>, for instance with
--   <a>toDBusObjectManagerServer</a>.
class (GObject o, IsDescendantOf DBusObjectManagerServer o) => IsDBusObjectManagerServer o

-- | Cast to <a>DBusObjectManagerServer</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toDBusObjectManagerServer :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m DBusObjectManagerServer

-- | Exports <i><tt>object</tt></i> on <i><tt>manager</tt></i>.
--   
--   If there is already a <a>DBusObject</a> exported at the object path,
--   then the old object is removed.
--   
--   The object path for <i><tt>object</tt></i> must be in the hierarchy
--   rooted by the object path for <i><tt>manager</tt></i>.
--   
--   Note that <i><tt>manager</tt></i> will take a reference on
--   <i><tt>object</tt></i> for as long as it is exported.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerServerExport :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m ()

-- | Like <a>dBusObjectManagerServerExport</a> but appends a string of the
--   form _N (with N being a natural number) to <i><tt>object</tt></i>'s
--   object path if an object with the given path already exists. As such,
--   the <a>DBusObjectProxy:gObjectPath</a> property of
--   <i><tt>object</tt></i> may be modified.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerServerExportUniquely :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m ()

-- | Gets the <a>DBusConnection</a> used by <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerServerGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a) => a -> m (Maybe DBusConnection)

-- | Returns whether <i><tt>object</tt></i> is currently exported on
--   <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.34</i>
dBusObjectManagerServerIsExported :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m Bool

-- | Creates a new <a>DBusObjectManagerServer</a> object.
--   
--   The returned server isn't yet exported on any connection. To do so,
--   use <a>dBusObjectManagerServerSetConnection</a>. Normally you want to
--   export all of your objects before doing so to avoid
--   <a>InterfacesAdded</a> signals being emitted.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerServerNew :: (HasCallStack, MonadIO m) => Text -> m DBusObjectManagerServer

-- | Exports all objects managed by <i><tt>manager</tt></i> on
--   <i><tt>connection</tt></i>. If <i><tt>connection</tt></i> is
--   <a>Nothing</a>, stops exporting objects.
dBusObjectManagerServerSetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusConnection b) => a -> Maybe b -> m ()

-- | If <i><tt>manager</tt></i> has an object at <i><tt>path</tt></i>,
--   removes the object. Otherwise does nothing.
--   
--   Note that <i><tt>objectPath</tt></i> must be in the hierarchy rooted
--   by the object path for <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerServerUnexport :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a) => a -> Text -> m Bool

-- | Set the value of the “<tt>connection</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #connection
--   </pre>
clearDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>connection</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDBusObjectManagerServerConnection :: (IsDBusObjectManagerServer o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>connection</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerServer #connection
--   </pre>
getDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe DBusConnection)

-- | Set the value of the “<tt>connection</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusObjectManagerServer [ #connection <a>:=</a> value ]
--   </pre>
setDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o, IsDBusConnection a) => o -> a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>object-path</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusObjectManagerServerObjectPath :: (IsDBusObjectManagerServer o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>object-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerServer #objectPath
--   </pre>
getDBusObjectManagerServerObjectPath :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe Text)
instance GHC.Classes.Eq GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer o) => GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer


-- | <tt>GDBusObjectManagerClient</tt> is used to create, monitor and
--   delete object proxies for remote objects exported by a
--   <a>DBusObjectManagerServer</a> (or any code implementing the
--   <a>org.freedesktop.DBus.ObjectManager</a> interface).
--   
--   Once an instance of this type has been created, you can connect to the
--   <a>DBusObjectManager::objectAdded</a> and
--   <a>signal<i><tt>gio</tt></i>.DBusObjectManager[objectRemoved</a>
--   signals] and inspect the <a>DBusObjectProxy</a> objects returned by
--   <a>dBusObjectManagerGetObjects</a>.
--   
--   If the name for a <tt>GDBusObjectManagerClient</tt> is not owned by
--   anyone at object construction time, the default behavior is to request
--   the message bus to launch an owner for the name. This behavior can be
--   disabled using the
--   <tt>G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START</tt> flag.
--   It’s also worth noting that this only works if the name of interest is
--   activatable in the first place. E.g. in some cases it is not possible
--   to launch an owner for the requested name. In this case,
--   <tt>GDBusObjectManagerClient</tt> object construction still succeeds
--   but there will be no object proxies (e.g.
--   <a>dBusObjectManagerGetObjects</a> returns the empty list) and the
--   <a>DBusObjectManagerClient:nameOwner</a> property is <tt>NULL</tt>.
--   
--   The owner of the requested name can come and go (for example consider
--   a system service being restarted) – <tt>GDBusObjectManagerClient</tt>
--   handles this case too; simply connect to the <a>Object::notify</a>
--   signal to watch for changes on the
--   <a>DBusObjectManagerClient:nameOwner</a> property. When the name owner
--   vanishes, the behavior is that
--   <a>DBusObjectManagerClient:nameOwner</a> is set to <tt>NULL</tt> (this
--   includes emission of the <a>Object::notify</a> signal) and then
--   <a>DBusObjectManager::objectRemoved</a> signals are synthesized for
--   all currently existing object proxies. Since
--   <a>DBusObjectManagerClient:nameOwner</a> is <tt>NULL</tt> when this
--   happens, you can use this information to disambiguate a synthesized
--   signal from a genuine signal caused by object removal on the remote
--   <a>DBusObjectManager</a>. Similarly, when a new name owner appears,
--   <a>DBusObjectManager::objectAdded</a> signals are synthesized while
--   <a>DBusObjectManagerClient:nameOwner</a> is still <tt>NULL</tt>. Only
--   when all object proxies have been added, the
--   <a>DBusObjectManagerClient:nameOwner</a> is set to the new name owner
--   (this includes emission of the <a>Object::notify</a> signal).
--   Furthermore, you are guaranteed that
--   <a>DBusObjectManagerClient:nameOwner</a> will alternate between a name
--   owner (e.g. <tt>:1.42</tt>) and <tt>NULL</tt> even in the case where
--   the name of interest is atomically replaced
--   
--   Ultimately, <tt>GDBusObjectManagerClient</tt> is used to obtain
--   <a>DBusProxy</a> instances. All signals (including the
--   <tt>org.freedesktop.DBus.Properties::PropertiesChanged</tt> signal)
--   delivered to <a>DBusProxy</a> instances are guaranteed to originate
--   from the name owner. This guarantee along with the behavior described
--   above, means that certain race conditions including the “half the
--   proxy is from the old owner and the other half is from the new owner”
--   problem cannot happen.
--   
--   To avoid having the application connect to signals on the returned
--   <a>DBusObjectProxy</a> and <a>DBusProxy</a> objects, the
--   <a>DBusObject::interfaceAdded</a>,
--   <a>DBusObject::interfaceRemoved</a>,
--   <a>DBusProxy::gPropertiesChanged</a> and <a>DBusProxy::gSignal</a>
--   signals are also emitted on the <tt>GDBusObjectManagerClient</tt>
--   instance managing these objects. The signals emitted are
--   <a>DBusObjectManager::interfaceAdded</a>,
--   <a>DBusObjectManager::interfaceRemoved</a>,
--   <a>DBusObjectManagerClient::interfaceProxyPropertiesChanged</a> and
--   <a>DBusObjectManagerClient::interfaceProxySignal</a>.
--   
--   Note that all callbacks and signals are emitted in the thread-default
--   main context (see <a>mainContextPushThreadDefault</a>) that the
--   <tt>GDBusObjectManagerClient</tt> object was constructed in.
--   Additionally, the <a>DBusObjectProxy</a> and <a>DBusProxy</a> objects
--   originating from the <tt>GDBusObjectManagerClient</tt> object will be
--   created in the same context and, consequently, will deliver signals in
--   the same main loop.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.DBusObjectManagerClient

-- | Memory-managed wrapper type.
newtype DBusObjectManagerClient
DBusObjectManagerClient :: ManagedPtr DBusObjectManagerClient -> DBusObjectManagerClient

-- | Type class for types which can be safely cast to
--   <a>DBusObjectManagerClient</a>, for instance with
--   <a>toDBusObjectManagerClient</a>.
class (GObject o, IsDescendantOf DBusObjectManagerClient o) => IsDBusObjectManagerClient o

-- | Cast to <a>DBusObjectManagerClient</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toDBusObjectManagerClient :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m DBusObjectManagerClient

-- | Gets the <a>DBusConnection</a> used by <i><tt>manager</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m DBusConnection

-- | Gets the flags that <i><tt>manager</tt></i> was constructed with.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientGetFlags :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m [DBusObjectManagerClientFlags]

-- | Gets the name that <i><tt>manager</tt></i> is for, or <a>Nothing</a>
--   if not a message bus connection.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientGetName :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m Text

-- | The unique name that owns the name that <i><tt>manager</tt></i> is for
--   or <a>Nothing</a> if no-one currently owns that name. You can connect
--   to the <a>Object::notify</a> signal to track changes to the
--   <a>DBusObjectManagerClient:nameOwner</a> property.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientGetNameOwner :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m (Maybe Text)

-- | Asynchronously creates a new <a>DBusObjectManagerClient</a> object.
--   
--   This is an asynchronous failable constructor. When the result is
--   ready, <i><tt>callback</tt></i> will be invoked in the thread-default
--   main context (see <a>mainContextPushThreadDefault</a>) of the thread
--   you are calling this method from. You can then call
--   <a>dBusObjectManagerClientNewFinish</a> to get the result. See
--   <a>dBusObjectManagerClientNewSync</a> for the synchronous version.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientNew :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusObjectManagerClientFlags] -> Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusObjectManagerClientNew</a>.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientNewFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusObjectManagerClient

-- | Like <a>dBusObjectManagerClientNew</a> but takes a <a>BusType</a>
--   instead of a <a>DBusConnection</a>.
--   
--   This is an asynchronous failable constructor. When the result is
--   ready, <i><tt>callback</tt></i> will be invoked in the thread-default
--   main context (see <a>mainContextPushThreadDefault</a>) of the thread
--   you are calling this method from. You can then call
--   <a>dBusObjectManagerClientNewForBusFinish</a> to get the result. See
--   <a>dBusObjectManagerClientNewForBusSync</a> for the synchronous
--   version.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientNewForBus :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusObjectManagerClientFlags] -> Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with
--   <a>dBusObjectManagerClientNewForBus</a>.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientNewForBusFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusObjectManagerClient

-- | Like <a>dBusObjectManagerClientNewSync</a> but takes a <a>BusType</a>
--   instead of a <a>DBusConnection</a>.
--   
--   This is a synchronous failable constructor - the calling thread is
--   blocked until a reply is received. See
--   <a>dBusObjectManagerClientNewForBus</a> for the asynchronous version.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientNewForBusSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusObjectManagerClientFlags] -> Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe a -> m DBusObjectManagerClient

-- | Creates a new <a>DBusObjectManagerClient</a> object.
--   
--   This is a synchronous failable constructor - the calling thread is
--   blocked until a reply is received. See
--   <a>dBusObjectManagerClientNew</a> for the asynchronous version.
--   
--   <i>Since: 2.30</i>
dBusObjectManagerClientNewSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusObjectManagerClientFlags] -> Maybe Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe b -> m DBusObjectManagerClient

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>bus-type</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDBusObjectManagerClientBusType :: (IsDBusObjectManagerClient o, MonadIO m) => BusType -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>connection</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDBusObjectManagerClientConnection :: (IsDBusObjectManagerClient o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>connection</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #connection
--   </pre>
getDBusObjectManagerClientConnection :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m DBusConnection

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusObjectManagerClientFlags :: (IsDBusObjectManagerClient o, MonadIO m) => [DBusObjectManagerClientFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #flags
--   </pre>
getDBusObjectManagerClientFlags :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m [DBusObjectManagerClientFlags]

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>get-proxy-type-destroy-notify</tt>” property. This is rarely
--   needed directly, but it is used by <a>new</a>.
constructDBusObjectManagerClientGetProxyTypeDestroyNotify :: (IsDBusObjectManagerClient o, MonadIO m) => Ptr () -> m (GValueConstruct o)

-- | Get the value of the “<tt>get-proxy-type-destroy-notify</tt>”
--   property. When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #getProxyTypeDestroyNotify
--   </pre>
getDBusObjectManagerClientGetProxyTypeDestroyNotify :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ())

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>get-proxy-type-func</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructDBusObjectManagerClientGetProxyTypeFunc :: (IsDBusObjectManagerClient o, MonadIO m) => Ptr () -> m (GValueConstruct o)

-- | Get the value of the “<tt>get-proxy-type-func</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #getProxyTypeFunc
--   </pre>
getDBusObjectManagerClientGetProxyTypeFunc :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ())

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>get-proxy-type-user-data</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructDBusObjectManagerClientGetProxyTypeUserData :: (IsDBusObjectManagerClient o, MonadIO m) => Ptr () -> m (GValueConstruct o)

-- | Get the value of the “<tt>get-proxy-type-user-data</tt>” property.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #getProxyTypeUserData
--   </pre>
getDBusObjectManagerClientGetProxyTypeUserData :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ())

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>name</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusObjectManagerClientName :: (IsDBusObjectManagerClient o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>name</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #name
--   </pre>
getDBusObjectManagerClientName :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m Text

-- | Get the value of the “<tt>name-owner</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #nameOwner
--   </pre>
getDBusObjectManagerClientNameOwner :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>object-path</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusObjectManagerClientObjectPath :: (IsDBusObjectManagerClient o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>object-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusObjectManagerClient #objectPath
--   </pre>
getDBusObjectManagerClientObjectPath :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Maybe Text)

-- | Emitted when one or more D-Bus properties on proxy changes. The local
--   cache has already been updated when this signal fires. Note that both
--   <i><tt>changedProperties</tt></i> and
--   <i><tt>invalidatedProperties</tt></i> are guaranteed to never be
--   <a>Nothing</a> (either may be empty though).
--   
--   This signal exists purely as a convenience to avoid having to connect
--   signals to all interface proxies managed by <i><tt>manager</tt></i>.
--   
--   This signal is emitted in the thread-default main context (see
--   <a>mainContextPushThreadDefault</a>) that <i><tt>manager</tt></i> was
--   constructed in.
--   
--   <i>Since: 2.30</i>
type DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback = DBusObjectProxy -> DBusProxy -> GVariant -> [Text] -> IO ()

-- | Connect a signal handler for the
--   <a>interfaceProxyPropertiesChanged</a> signal, to be run after the
--   default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> dBusObjectManagerClient #interfaceProxyPropertiesChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectManagerClientInterfaceProxyPropertiesChanged :: (IsDBusObjectManagerClient a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the
--   <a>interfaceProxyPropertiesChanged</a> signal, to be run before the
--   default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>on</a> dBusObjectManagerClient #interfaceProxyPropertiesChanged callback
--   </pre>
onDBusObjectManagerClientInterfaceProxyPropertiesChanged :: (IsDBusObjectManagerClient a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback) -> m SignalHandlerId

-- | Emitted when a D-Bus signal is received on
--   <i><tt>interfaceProxy</tt></i>.
--   
--   This signal exists purely as a convenience to avoid having to connect
--   signals to all interface proxies managed by <i><tt>manager</tt></i>.
--   
--   This signal is emitted in the thread-default main context (see
--   <a>mainContextPushThreadDefault</a>) that <i><tt>manager</tt></i> was
--   constructed in.
--   
--   <i>Since: 2.30</i>
type DBusObjectManagerClientInterfaceProxySignalCallback = DBusObjectProxy -> DBusProxy -> Text -> Text -> GVariant -> IO ()

-- | Connect a signal handler for the <a>interfaceProxySignal</a> signal,
--   to be run after the default handler. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusObjectManagerClient #interfaceProxySignal callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusObjectManagerClientInterfaceProxySignal :: (IsDBusObjectManagerClient a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerClientInterfaceProxySignalCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>interfaceProxySignal</a> signal,
--   to be run before the default handler. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusObjectManagerClient #interfaceProxySignal callback
--   </pre>
onDBusObjectManagerClientInterfaceProxySignal :: (IsDBusObjectManagerClient a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerClientInterfaceProxySignalCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient o) => GI.Gio.Objects.DBusObjectManagerClient.IsDBusObjectManagerClient o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient


-- | Instances of the <tt>GDBusMethodInvocation</tt> class are used when
--   handling D-Bus method calls. It provides a way to asynchronously
--   return results and errors.
--   
--   The normal way to obtain a <tt>GDBusMethodInvocation</tt> object is to
--   receive it as an argument to the <tt>handle_method_call()</tt>
--   function in a [type<i><tt>gio</tt></i>.DBusInterfaceVTable] that was
--   passed to <a>dBusConnectionRegisterObject</a>.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.DBusMethodInvocation

-- | Memory-managed wrapper type.
newtype DBusMethodInvocation
DBusMethodInvocation :: ManagedPtr DBusMethodInvocation -> DBusMethodInvocation

-- | Type class for types which can be safely cast to
--   <a>DBusMethodInvocation</a>, for instance with
--   <a>toDBusMethodInvocation</a>.
class (GObject o, IsDescendantOf DBusMethodInvocation o) => IsDBusMethodInvocation o

-- | Cast to <a>DBusMethodInvocation</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toDBusMethodInvocation :: (MonadIO m, IsDBusMethodInvocation o) => o -> m DBusMethodInvocation

-- | Gets the <a>DBusConnection</a> the method was invoked on.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetConnection :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m DBusConnection

-- | Gets the name of the D-Bus interface the method was invoked on.
--   
--   This can be <tt>NULL</tt> if it was not specified by the sender. See
--   [callback<i><tt>gio</tt></i>.DBusInterfaceMethodCallFunc] or the
--   <a>D-Bus Specification</a> for details on when this can happen and how
--   it should be handled.
--   
--   If this method call is a property Get, Set or GetAll call that has
--   been redirected to the method call handler then
--   "org.freedesktop.DBus.Properties" will be returned. See
--   <a>DBusInterfaceVTable</a> for more information.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetInterfaceName :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m (Maybe Text)

-- | Gets the <a>DBusMessage</a> for the method invocation. This is useful
--   if you need to use low-level protocol features, such as UNIX file
--   descriptor passing, that cannot be properly expressed in the
--   <a>GVariant</a> API.
--   
--   See this
--   [server][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-d-bus-server]
--   and
--   [client][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-for-file-descriptor-passing]
--   for an example of how to use this low-level API to send and receive
--   UNIX file descriptors.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetMessage :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m DBusMessage

-- | Gets information about the method call, if any.
--   
--   If this method invocation is a property Get, Set or GetAll call that
--   has been redirected to the method call handler then <a>Nothing</a>
--   will be returned. See <a>dBusMethodInvocationGetPropertyInfo</a> and
--   <a>DBusInterfaceVTable</a> for more information.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetMethodInfo :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m (Maybe DBusMethodInfo)

-- | Gets the name of the method that was invoked.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetMethodName :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m Text

-- | Gets the object path the method was invoked on.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetObjectPath :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m Text

-- | Gets the parameters of the method invocation. If there are no input
--   parameters then this will return a GVariant with 0 children rather
--   than NULL.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetParameters :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m GVariant

-- | Gets information about the property that this method call is for, if
--   any.
--   
--   This will only be set in the case of an invocation in response to a
--   property Get or Set call that has been directed to the method call
--   handler for an object on account of its <tt><i>property_get()</i></tt>
--   or <tt><i>property_set()</i></tt> vtable pointers being unset.
--   
--   See <a>DBusInterfaceVTable</a> for more information.
--   
--   If the call was GetAll, <a>Nothing</a> will be returned.
--   
--   <i>Since: 2.38</i>
dBusMethodInvocationGetPropertyInfo :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m (Maybe DBusPropertyInfo)

-- | Gets the bus name that invoked the method.
--   
--   This can return <a>Nothing</a> if not specified by the caller, e.g. on
--   peer-to-peer connections.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationGetSender :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m (Maybe Text)

-- | Finishes handling a D-Bus method call by returning an error.
--   
--   This method will take ownership of <i><tt>invocation</tt></i>. See
--   <a>DBusInterfaceVTable</a> for more information about the ownership of
--   <i><tt>invocation</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationReturnDbusError :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> Text -> Text -> m ()

-- | Like <tt><i>g_dbus_method_invocation_return_error()</i></tt> but
--   without <tt><i>printf()</i></tt>-style formatting.
--   
--   This method will take ownership of <i><tt>invocation</tt></i>. See
--   <a>DBusInterfaceVTable</a> for more information about the ownership of
--   <i><tt>invocation</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationReturnErrorLiteral :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> Word32 -> Int32 -> Text -> m ()

-- | Like <tt><i>g_dbus_method_invocation_return_error()</i></tt> but takes
--   a <a>GError</a> instead of the error domain, error code and message.
--   
--   This method will take ownership of <i><tt>invocation</tt></i>. See
--   <a>DBusInterfaceVTable</a> for more information about the ownership of
--   <i><tt>invocation</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationReturnGerror :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> GError -> m ()

-- | Finishes handling a D-Bus method call by returning
--   <i><tt>parameters</tt></i>. If the <i><tt>parameters</tt></i> GVariant
--   is floating, it is consumed.
--   
--   It is an error if <i><tt>parameters</tt></i> is not of the right
--   format: it must be a tuple containing the out-parameters of the D-Bus
--   method. Even if the method has a single out-parameter, it must be
--   contained in a tuple. If the method has no out-parameters,
--   <i><tt>parameters</tt></i> may be <a>Nothing</a> or an empty tuple.
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GDBusMethodInvocation *invocation = some_invocation;
--   g_autofree gchar *result_string = NULL;
--   g_autoptr (GError) error = NULL;
--   
--   result_string = calculate_result (&amp;error);
--   
--   if (error != NULL)
--     g_dbus_method_invocation_return_gerror (invocation, error);
--   else
--     g_dbus_method_invocation_return_value (invocation,
--                                            g_variant_new ("(s)", result_string));
--   
--   // Do not free @invocation here; returning a value does that
--   </pre>
--   
--   This method will take ownership of <i><tt>invocation</tt></i>. See
--   <a>DBusInterfaceVTable</a> for more information about the ownership of
--   <i><tt>invocation</tt></i>.
--   
--   Since 2.48, if the method call requested for a reply not to be sent
--   then this call will sink <i><tt>parameters</tt></i> and free
--   <i><tt>invocation</tt></i>, but otherwise do nothing (as per the
--   recommendations of the D-Bus specification).
--   
--   <i>Since: 2.26</i>
dBusMethodInvocationReturnValue :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> Maybe GVariant -> m ()

-- | Like <a>dBusMethodInvocationReturnValue</a> but also takes a
--   <a>UnixFDList</a>.
--   
--   This method is only available on UNIX.
--   
--   This method will take ownership of <i><tt>invocation</tt></i>. See
--   <a>DBusInterfaceVTable</a> for more information about the ownership of
--   <i><tt>invocation</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusMethodInvocationReturnValueWithUnixFdList :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a, IsUnixFDList b) => a -> Maybe GVariant -> Maybe b -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation o) => GI.Gio.Objects.DBusMethodInvocation.IsDBusMethodInvocation o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation


-- | <tt>GDBusMenuModel</tt> is an implementation of <a>MenuModel</a> that
--   can be used as a proxy for a menu model that is exported over D-Bus
--   with <a>dBusConnectionExportMenuModel</a>.
module GI.Gio.Objects.DBusMenuModel

-- | Memory-managed wrapper type.
newtype DBusMenuModel
DBusMenuModel :: ManagedPtr DBusMenuModel -> DBusMenuModel

-- | Type class for types which can be safely cast to <a>DBusMenuModel</a>,
--   for instance with <a>toDBusMenuModel</a>.
class (GObject o, IsDescendantOf DBusMenuModel o) => IsDBusMenuModel o

-- | Cast to <a>DBusMenuModel</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDBusMenuModel :: (MonadIO m, IsDBusMenuModel o) => o -> m DBusMenuModel

-- | Obtains a <a>DBusMenuModel</a> for the menu model which is exported at
--   the given <i><tt>busName</tt></i> and <i><tt>objectPath</tt></i>.
--   
--   The thread default main context is taken at the time of this call. All
--   signals on the menu model (and any linked models) are reported with
--   respect to this context. All calls on the returned menu model (and
--   linked models) must also originate from this same context, with the
--   thread default main context unchanged.
--   
--   <i>Since: 2.32</i>
dBusMenuModelGet :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Maybe Text -> Text -> m DBusMenuModel
instance GHC.Classes.Eq GI.Gio.Objects.DBusMenuModel.DBusMenuModel
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusMenuModel.DBusMenuModel
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusMenuModel.DBusMenuModel
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusMenuModel.DBusMenuModel o) => GI.Gio.Objects.DBusMenuModel.IsDBusMenuModel o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusMenuModel.DBusMenuModel)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusMenuModel.DBusMenuModel
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusMenuModel.DBusMenuModel


-- | Abstract base class for D-Bus interfaces on the service side.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Objects.DBusInterfaceSkeleton

-- | Memory-managed wrapper type.
newtype DBusInterfaceSkeleton
DBusInterfaceSkeleton :: ManagedPtr DBusInterfaceSkeleton -> DBusInterfaceSkeleton

-- | Type class for types which can be safely cast to
--   <a>DBusInterfaceSkeleton</a>, for instance with
--   <a>toDBusInterfaceSkeleton</a>.
class (GObject o, IsDescendantOf DBusInterfaceSkeleton o) => IsDBusInterfaceSkeleton o

-- | Cast to <a>DBusInterfaceSkeleton</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toDBusInterfaceSkeleton :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m DBusInterfaceSkeleton

-- | Exports <i><tt>interface_</tt></i> at <i><tt>objectPath</tt></i> on
--   <i><tt>connection</tt></i>.
--   
--   This can be called multiple times to export the same
--   <i><tt>interface_</tt></i> onto multiple connections however the
--   <i><tt>objectPath</tt></i> provided must be the same for all
--   connections.
--   
--   Use <a>dBusInterfaceSkeletonUnexport</a> to unexport the object.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonExport :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> Text -> m ()

-- | If <i><tt>interface_</tt></i> has outstanding changes, request for
--   these changes to be emitted immediately.
--   
--   For example, an exported D-Bus interface may queue up property changes
--   and emit the
--   <tt>org.freedesktop.DBus.Properties.PropertiesChanged</tt> signal
--   later (e.g. in an idle handler). This technique is useful for
--   collapsing multiple property changes into one.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonFlush :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m ()

-- | Gets the first connection that <i><tt>interface_</tt></i> is exported
--   on, if any.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonGetConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m (Maybe DBusConnection)

-- | Gets a list of the connections that <i><tt>interface_</tt></i> is
--   exported on.
--   
--   <i>Since: 2.32</i>
dBusInterfaceSkeletonGetConnections :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m [DBusConnection]

-- | Gets the <a>DBusInterfaceSkeletonFlags</a> that describes what the
--   behavior of <i><tt>interface_</tt></i>
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonGetFlags :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m [DBusInterfaceSkeletonFlags]

-- | Gets D-Bus introspection information for the D-Bus interface
--   implemented by <i><tt>interface_</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonGetInfo :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m DBusInterfaceInfo

-- | Gets the object path that <i><tt>interface_</tt></i> is exported on,
--   if any.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonGetObjectPath :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m (Maybe Text)

-- | Gets all D-Bus properties for <i><tt>interface_</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonGetProperties :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m GVariant

-- | Gets the interface vtable for the D-Bus interface implemented by
--   <i><tt>interface_</tt></i>. The returned function pointers should
--   expect <i><tt>interface_</tt></i> itself to be passed as
--   <i><tt>userData</tt></i>.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonGetVtable :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m DBusInterfaceVTable

-- | Checks if <i><tt>interface_</tt></i> is exported on
--   <i><tt>connection</tt></i>.
--   
--   <i>Since: 2.32</i>
dBusInterfaceSkeletonHasConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> m Bool

-- | Sets flags describing what the behavior of <i><tt>skeleton</tt></i>
--   should be.
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonSetFlags :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> [DBusInterfaceSkeletonFlags] -> m ()

-- | Stops exporting <i><tt>interface_</tt></i> on all connections it is
--   exported on.
--   
--   To unexport <i><tt>interface_</tt></i> from only a single connection,
--   use <a>dBusInterfaceSkeletonUnexportFromConnection</a>
--   
--   <i>Since: 2.30</i>
dBusInterfaceSkeletonUnexport :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m ()

-- | Stops exporting <i><tt>interface_</tt></i> on
--   <i><tt>connection</tt></i>.
--   
--   To stop exporting on all connections the interface is exported on, use
--   <a>dBusInterfaceSkeletonUnexport</a>.
--   
--   <i>Since: 2.32</i>
dBusInterfaceSkeletonUnexportFromConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>g-flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusInterfaceSkeletonGFlags :: (IsDBusInterfaceSkeleton o, MonadIO m) => [DBusInterfaceSkeletonFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>g-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusInterfaceSkeleton #gFlags
--   </pre>
getDBusInterfaceSkeletonGFlags :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m [DBusInterfaceSkeletonFlags]

-- | Set the value of the “<tt>g-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusInterfaceSkeleton [ #gFlags <a>:=</a> value ]
--   </pre>
setDBusInterfaceSkeletonGFlags :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> [DBusInterfaceSkeletonFlags] -> m ()

-- | Emitted when a method is invoked by a remote caller and used to
--   determine if the method call is authorized.
--   
--   Note that this signal is emitted in a thread dedicated to handling the
--   method call so handlers are allowed to perform blocking IO. This means
--   that it is appropriate to call e.g.
--   <a>polkit_authority_check_authorization_sync()</a> with the
--   <a>POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION</a> flag
--   set.
--   
--   If <a>False</a> is returned then no further handlers are run and the
--   signal handler must take a reference to <i><tt>invocation</tt></i> and
--   finish handling the call (e.g. return an error via
--   <tt><i>g_dbus_method_invocation_return_error()</i></tt>).
--   
--   Otherwise, if <a>True</a> is returned, signal emission continues. If
--   no handlers return <a>False</a>, then the method is dispatched. If
--   <i><tt>interface</tt></i> has an enclosing <a>DBusObjectSkeleton</a>,
--   then the <a>DBusObjectSkeleton::authorizeMethod</a> signal handlers
--   run before the handlers for this signal.
--   
--   The default class handler just returns <a>True</a>.
--   
--   Please note that the common case is optimized: if no signals handlers
--   are connected and the default class handler isn't overridden (for both
--   <i><tt>interface</tt></i> and the enclosing <a>DBusObjectSkeleton</a>,
--   if any) and <a>DBusInterfaceSkeleton:gFlags</a> does not have the
--   <a>DBusInterfaceSkeletonFlagsHandleMethodInvocationsInThread</a> flags
--   set, no dedicated thread is ever used and the call will be handled in
--   the same thread as the object that <i><tt>interface</tt></i> belongs
--   to was exported in.
--   
--   <i>Since: 2.30</i>
type DBusInterfaceSkeletonGAuthorizeMethodCallback = DBusMethodInvocation -> IO Bool

-- | Connect a signal handler for the <a>gAuthorizeMethod</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusInterfaceSkeleton #gAuthorizeMethod callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusInterfaceSkeletonGAuthorizeMethodCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>gAuthorizeMethod</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusInterfaceSkeleton #gAuthorizeMethod callback
--   </pre>
onDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusInterfaceSkeletonGAuthorizeMethodCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton o) => GI.Gio.Objects.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton


-- | The <tt>GDBusConnection</tt> type is used for D-Bus connections to
--   remote peers such as a message buses.
--   
--   It is a low-level API that offers a lot of flexibility. For instance,
--   it lets you establish a connection over any transport that can by
--   represented as a <a>IOStream</a>.
--   
--   This class is rarely used directly in D-Bus clients. If you are
--   writing a D-Bus client, it is often easier to use the
--   <a>busOwnName</a>, <a>busWatchName</a> or <a>dBusProxyNewForBus</a>
--   APIs.
--   
--   As an exception to the usual GLib rule that a particular object must
--   not be used by two threads at the same time, <tt>GDBusConnection</tt>s
--   methods may be called from any thread. This is so that <a>busGet</a>
--   and <a>busGetSync</a> can safely return the same
--   <tt>GDBusConnection</tt> when called from any thread.
--   
--   Most of the ways to obtain a <tt>GDBusConnection</tt> automatically
--   initialize it (i.e. connect to D-Bus): for instance,
--   <a>dBusConnectionNew</a> and <a>busGet</a>, and the synchronous
--   versions of those methods, give you an initialized connection.
--   Language bindings for GIO should use
--   <a>Initable</a>.<tt><i>new</i></tt>() or
--   <a>AsyncInitable</a>.<tt><i>new_async</i></tt>(), which also
--   initialize the connection.
--   
--   If you construct an uninitialized <tt>GDBusConnection</tt>, such as
--   via <a>Object</a>.<tt><i>new</i></tt>(), you must initialize it via
--   <a>initableInit</a> or <a>asyncInitableInitAsync</a> before using its
--   methods or properties. Calling methods or accessing properties on a
--   <tt>GDBusConnection</tt> that has not completed initialization
--   successfully is considered to be invalid, and leads to undefined
--   behaviour. In particular, if initialization fails with a
--   <tt>GError</tt>, the only valid thing you can do with that
--   <tt>GDBusConnection</tt> is to free it with <a>objectUnref</a>.
--   
--   <h2>An example D-Bus server</h2>
--   
--   Here is an example for a D-Bus server: <a>gdbus-example-server.c</a>
--   
--   <h2>An example for exporting a subtree</h2>
--   
--   Here is an example for exporting a subtree:
--   <a>gdbus-example-subtree.c</a>
--   
--   <h2>An example for file descriptor passing</h2>
--   
--   Here is an example for passing UNIX file descriptors:
--   <a>gdbus-unix-fd-client.c</a>
--   
--   <h2>An example for exporting a GObject</h2>
--   
--   Here is an example for exporting a <a>Object</a>:
--   <a>gdbus-example-export.c</a>
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.DBusConnection

-- | Memory-managed wrapper type.
newtype DBusConnection
DBusConnection :: ManagedPtr DBusConnection -> DBusConnection

-- | Type class for types which can be safely cast to
--   <a>DBusConnection</a>, for instance with <a>toDBusConnection</a>.
class (GObject o, IsDescendantOf DBusConnection o) => IsDBusConnection o

-- | Cast to <a>DBusConnection</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDBusConnection :: (MonadIO m, IsDBusConnection o) => o -> m DBusConnection

-- | Adds a message filter. Filters are handlers that are run on all
--   incoming and outgoing messages, prior to standard dispatch. Filters
--   are run in the order that they were added. The same handler can be
--   added as a filter more than once, in which case it will be run more
--   than once. Filters added during a filter callback won't be run on the
--   message being processed. Filter functions are allowed to modify and
--   even drop messages.
--   
--   Note that filters are run in a dedicated message handling thread so
--   they can't block and, generally, can't do anything but signal a worker
--   thread. Also note that filters are rarely needed - use API such as
--   <a>dBusConnectionSendMessageWithReply</a>,
--   <a>dBusConnectionSignalSubscribe</a> or <a>dBusConnectionCall</a>
--   instead.
--   
--   If a filter consumes an incoming message the message is not dispatched
--   anywhere else - not even the standard dispatch machinery (that API
--   such as <a>dBusConnectionSignalSubscribe</a> and
--   <a>dBusConnectionSendMessageWithReply</a> relies on) will see the
--   message. Similarly, if a filter consumes an outgoing message, the
--   message will not be sent to the other peer.
--   
--   If <i><tt>userDataFreeFunc</tt></i> is non-<a>Nothing</a>, it will be
--   called (in the thread-default main context of the thread you are
--   calling this method from) at some point after <i><tt>userData</tt></i>
--   is no longer needed. (It is not guaranteed to be called synchronously
--   when the filter is removed, and may be called after
--   <i><tt>connection</tt></i> has been destroyed.)
--   
--   <i>Since: 2.26</i>
dBusConnectionAddFilter :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> DBusMessageFilterFunction -> m Word32

-- | Asynchronously invokes the <i><tt>methodName</tt></i> method on the
--   <i><tt>interfaceName</tt></i> D-Bus interface on the remote object at
--   <i><tt>objectPath</tt></i> owned by <i><tt>busName</tt></i>.
--   
--   If <i><tt>connection</tt></i> is closed then the operation will fail
--   with <a>IOErrorEnumClosed</a>. If <i><tt>cancellable</tt></i> is
--   canceled, the operation will fail with <a>IOErrorEnumCancelled</a>. If
--   <i><tt>parameters</tt></i> contains a value not compatible with the
--   D-Bus protocol, the operation fails with
--   <a>IOErrorEnumInvalidArgument</a>.
--   
--   If <i><tt>replyType</tt></i> is non-<a>Nothing</a> then the reply will
--   be checked for having this type and an error will be raised if it does
--   not match. Said another way, if you give a <i><tt>replyType</tt></i>
--   then any non-<a>Nothing</a> return value will be of this type. Unless
--   it’s <tt><i>G_VARIANT_TYPE_UNIT</i></tt>, the
--   <i><tt>replyType</tt></i> will be a tuple containing one or more
--   values.
--   
--   If the <i><tt>parameters</tt></i> <a>GVariant</a> is floating, it is
--   consumed. This allows convenient 'inline' use of
--   <tt><i>g_variant_new()</i></tt>, e.g.:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_dbus_connection_call (connection,
--                           "org.freedesktop.StringThings",
--                           "/org/freedesktop/StringThings",
--                           "org.freedesktop.StringThings",
--                           "TwoStrings",
--                           g_variant_new ("(ss)",
--                                          "Thing One",
--                                          "Thing Two"),
--                           NULL,
--                           G_DBUS_CALL_FLAGS_NONE,
--                           -1,
--                           NULL,
--                           (GAsyncReadyCallback) two_strings_done,
--                           NULL);
--   </pre>
--   
--   This is an asynchronous method. When the operation is finished,
--   <i><tt>callback</tt></i> will be invoked in the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) of the thread you
--   are calling this method from. You can then call
--   <a>dBusConnectionCallFinish</a> to get the result of the operation.
--   See <a>dBusConnectionCallSync</a> for the synchronous version of this
--   function.
--   
--   If <i><tt>callback</tt></i> is <a>Nothing</a> then the D-Bus method
--   call message will be sent with the
--   <a>DBusMessageFlagsNoReplyExpected</a> flag set.
--   
--   <i>Since: 2.26</i>
dBusConnectionCall :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> Maybe VariantType -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusConnectionCall</a>.
--   
--   <i>Since: 2.26</i>
dBusConnectionCallFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m GVariant

-- | Synchronously invokes the <i><tt>methodName</tt></i> method on the
--   <i><tt>interfaceName</tt></i> D-Bus interface on the remote object at
--   <i><tt>objectPath</tt></i> owned by <i><tt>busName</tt></i>.
--   
--   If <i><tt>connection</tt></i> is closed then the operation will fail
--   with <a>IOErrorEnumClosed</a>. If <i><tt>cancellable</tt></i> is
--   canceled, the operation will fail with <a>IOErrorEnumCancelled</a>. If
--   <i><tt>parameters</tt></i> contains a value not compatible with the
--   D-Bus protocol, the operation fails with
--   <a>IOErrorEnumInvalidArgument</a>.
--   
--   If <i><tt>replyType</tt></i> is non-<a>Nothing</a> then the reply will
--   be checked for having this type and an error will be raised if it does
--   not match. Said another way, if you give a <i><tt>replyType</tt></i>
--   then any non-<a>Nothing</a> return value will be of this type.
--   
--   If the <i><tt>parameters</tt></i> <a>GVariant</a> is floating, it is
--   consumed. This allows convenient 'inline' use of
--   <tt><i>g_variant_new()</i></tt>, e.g.:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   g_dbus_connection_call_sync (connection,
--                                "org.freedesktop.StringThings",
--                                "/org/freedesktop/StringThings",
--                                "org.freedesktop.StringThings",
--                                "TwoStrings",
--                                g_variant_new ("(ss)",
--                                               "Thing One",
--                                               "Thing Two"),
--                                NULL,
--                                G_DBUS_CALL_FLAGS_NONE,
--                                -1,
--                                NULL,
--                                &amp;error);
--   </pre>
--   
--   The calling thread is blocked until a reply is received. See
--   <a>dBusConnectionCall</a> for the asynchronous version of this method.
--   
--   <i>Since: 2.26</i>
dBusConnectionCallSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> Maybe VariantType -> [DBusCallFlags] -> Int32 -> Maybe b -> m GVariant

-- | Like <a>dBusConnectionCall</a> but also takes a <a>UnixFDList</a>
--   object.
--   
--   The file descriptors normally correspond to
--   <tt><i>G_VARIANT_TYPE_HANDLE</i></tt> values in the body of the
--   message. For example, if a message contains two file descriptors,
--   <i><tt>fdList</tt></i> would have length 2, and
--   <tt>g_variant_new_handle (0)</tt> and <tt>g_variant_new_handle
--   (1)</tt> would appear somewhere in the body of the message (not
--   necessarily in that order!) to represent the file descriptors at
--   indexes 0 and 1 respectively.
--   
--   When designing D-Bus APIs that are intended to be interoperable,
--   please note that non-GDBus implementations of D-Bus can usually only
--   access file descriptors if they are referenced in this way by a value
--   of type <tt><i>G_VARIANT_TYPE_HANDLE</i></tt> in the body of the
--   message.
--   
--   This method is only available on UNIX.
--   
--   <i>Since: 2.30</i>
dBusConnectionCallWithUnixFdList :: (HasCallStack, MonadIO m, IsDBusConnection a, IsUnixFDList b, IsCancellable c) => a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> Maybe VariantType -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with
--   <a>dBusConnectionCallWithUnixFdList</a>.
--   
--   The file descriptors normally correspond to
--   <tt><i>G_VARIANT_TYPE_HANDLE</i></tt> values in the body of the
--   message. For example, if <a>variantGetHandle</a> returns 5, that is
--   intended to be a reference to the file descriptor that can be accessed
--   by <tt>g_unix_fd_list_get (*out_fd_list, 5, ...)</tt>.
--   
--   When designing D-Bus APIs that are intended to be interoperable,
--   please note that non-GDBus implementations of D-Bus can usually only
--   access file descriptors if they are referenced in this way by a value
--   of type <tt><i>G_VARIANT_TYPE_HANDLE</i></tt> in the body of the
--   message.
--   
--   <i>Since: 2.30</i>
dBusConnectionCallWithUnixFdListFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m (GVariant, Maybe UnixFDList)

-- | Like <a>dBusConnectionCallSync</a> but also takes and returns
--   <a>UnixFDList</a> objects. See <a>dBusConnectionCallWithUnixFdList</a>
--   and <a>dBusConnectionCallWithUnixFdListFinish</a> for more details.
--   
--   This method is only available on UNIX.
--   
--   <i>Since: 2.30</i>
dBusConnectionCallWithUnixFdListSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsUnixFDList b, IsCancellable c) => a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> Maybe VariantType -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe c -> m (GVariant, Maybe UnixFDList)

-- | Closes <i><tt>connection</tt></i>. Note that this never causes the
--   process to exit (this might only happen if the other end of a shared
--   message bus connection disconnects, see
--   <a>DBusConnection:exitOnClose</a>).
--   
--   Once the connection is closed, operations such as sending a message
--   will return with the error <a>IOErrorEnumClosed</a>. Closing a
--   connection will not automatically flush the connection so queued
--   messages may be lost. Use <a>dBusConnectionFlush</a> if you need such
--   guarantees.
--   
--   If <i><tt>connection</tt></i> is already closed, this method fails
--   with <a>IOErrorEnumClosed</a>.
--   
--   When <i><tt>connection</tt></i> has been closed, the
--   <a>DBusConnection::closed</a> signal is emitted in the thread-default
--   main context (see <a>mainContextPushThreadDefault</a>) of the thread
--   that <i><tt>connection</tt></i> was constructed in.
--   
--   This is an asynchronous method. When the operation is finished,
--   <i><tt>callback</tt></i> will be invoked in the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) of the thread you
--   are calling this method from. You can then call
--   <a>dBusConnectionCloseFinish</a> to get the result of the operation.
--   See <a>dBusConnectionCloseSync</a> for the synchronous version.
--   
--   <i>Since: 2.26</i>
dBusConnectionClose :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusConnectionClose</a>.
--   
--   <i>Since: 2.26</i>
dBusConnectionCloseFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Synchronously closes <i><tt>connection</tt></i>. The calling thread is
--   blocked until this is done. See <a>dBusConnectionClose</a> for the
--   asynchronous version of this method and more details about what it
--   does.
--   
--   <i>Since: 2.26</i>
dBusConnectionCloseSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> m ()

-- | Emits a signal.
--   
--   If the parameters GVariant is floating, it is consumed.
--   
--   This can only fail if <i><tt>parameters</tt></i> is not compatible
--   with the D-Bus protocol (<a>IOErrorEnumInvalidArgument</a>), or if
--   <i><tt>connection</tt></i> has been closed (<a>IOErrorEnumClosed</a>).
--   
--   <i>Since: 2.26</i>
dBusConnectionEmitSignal :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> m ()

-- | Exports <i><tt>actionGroup</tt></i> on <i><tt>connection</tt></i> at
--   <i><tt>objectPath</tt></i>.
--   
--   The implemented D-Bus API should be considered private. It is subject
--   to change in the future.
--   
--   A given object path can only have one action group exported on it. If
--   this constraint is violated, the export will fail and 0 will be
--   returned (with <i><tt>error</tt></i> set accordingly).
--   
--   You can unexport the action group using
--   <a>dBusConnectionUnexportActionGroup</a> with the return value of this
--   function.
--   
--   The thread default main context is taken at the time of this call. All
--   incoming action activations and state change requests are reported
--   from this context. Any changes on the action group that cause it to
--   emit signals must also come from this same context. Since incoming
--   action activations and state change requests are rather likely to
--   cause changes on the action group, this effectively limits a given
--   action group to being exported from only one main context.
--   
--   <i>Since: 2.32</i>
dBusConnectionExportActionGroup :: (HasCallStack, MonadIO m, IsDBusConnection a, IsActionGroup b) => a -> Text -> b -> m Word32

-- | Exports <i><tt>menu</tt></i> on <i><tt>connection</tt></i> at
--   <i><tt>objectPath</tt></i>.
--   
--   The implemented D-Bus API should be considered private. It is subject
--   to change in the future.
--   
--   An object path can only have one menu model exported on it. If this
--   constraint is violated, the export will fail and 0 will be returned
--   (with <i><tt>error</tt></i> set accordingly).
--   
--   Exporting menus with sections containing more than
--   <a>MENU_EXPORTER_MAX_SECTION_SIZE</a> items is not supported and
--   results in undefined behavior.
--   
--   You can unexport the menu model using
--   <a>dBusConnectionUnexportMenuModel</a> with the return value of this
--   function.
--   
--   <i>Since: 2.32</i>
dBusConnectionExportMenuModel :: (HasCallStack, MonadIO m, IsDBusConnection a, IsMenuModel b) => a -> Text -> b -> m Word32

-- | Asynchronously flushes <i><tt>connection</tt></i>, that is, writes all
--   queued outgoing messages to the transport and then flushes the
--   transport (using <a>outputStreamFlushAsync</a>). This is useful in
--   programs that want to emit a D-Bus signal and then exit immediately.
--   Without flushing the connection, there is no guarantee that the
--   message has been sent to the networking buffers in the OS kernel.
--   
--   This is an asynchronous method. When the operation is finished,
--   <i><tt>callback</tt></i> will be invoked in the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) of the thread you
--   are calling this method from. You can then call
--   <a>dBusConnectionFlushFinish</a> to get the result of the operation.
--   See <a>dBusConnectionFlushSync</a> for the synchronous version.
--   
--   <i>Since: 2.26</i>
dBusConnectionFlush :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusConnectionFlush</a>.
--   
--   <i>Since: 2.26</i>
dBusConnectionFlushFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Synchronously flushes <i><tt>connection</tt></i>. The calling thread
--   is blocked until this is done. See <a>dBusConnectionFlush</a> for the
--   asynchronous version of this method and more details about what it
--   does.
--   
--   <i>Since: 2.26</i>
dBusConnectionFlushSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> m ()

-- | Gets the capabilities negotiated with the remote peer
--   
--   <i>Since: 2.26</i>
dBusConnectionGetCapabilities :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m [DBusCapabilityFlags]

-- | Gets whether the process is terminated when <i><tt>connection</tt></i>
--   is closed by the remote peer. See <a>DBusConnection:exitOnClose</a>
--   for more details.
--   
--   <i>Since: 2.26</i>
dBusConnectionGetExitOnClose :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Bool

-- | Gets the flags used to construct this connection
--   
--   <i>Since: 2.60</i>
dBusConnectionGetFlags :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m [DBusConnectionFlags]

-- | The GUID of the peer performing the role of server when
--   authenticating. See <a>DBusConnection:guid</a> for more details.
--   
--   <i>Since: 2.26</i>
dBusConnectionGetGuid :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Text

-- | Retrieves the last serial number assigned to a <a>DBusMessage</a> on
--   the current thread. This includes messages sent via both low-level API
--   such as <a>dBusConnectionSendMessage</a> as well as high-level API
--   such as <a>dBusConnectionEmitSignal</a>, <a>dBusConnectionCall</a> or
--   <a>dBusProxyCall</a>.
--   
--   <i>Since: 2.34</i>
dBusConnectionGetLastSerial :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Word32

-- | Gets the credentials of the authenticated peer. This will always
--   return <a>Nothing</a> unless <i><tt>connection</tt></i> acted as a
--   server (e.g. <a>DBusConnectionFlagsAuthenticationServer</a> was
--   passed) when set up and the client passed credentials as part of the
--   authentication process.
--   
--   In a message bus setup, the message bus is always the server and each
--   application is a client. So this method will always return
--   <a>Nothing</a> for message bus clients.
--   
--   <i>Since: 2.26</i>
dBusConnectionGetPeerCredentials :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m (Maybe Credentials)

-- | Gets the underlying stream used for IO.
--   
--   While the <a>DBusConnection</a> is active, it will interact with this
--   stream from a worker thread, so it is not safe to interact with the
--   stream directly.
--   
--   <i>Since: 2.26</i>
dBusConnectionGetStream :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m IOStream

-- | Gets the unique name of <i><tt>connection</tt></i> as assigned by the
--   message bus. This can also be used to figure out if
--   <i><tt>connection</tt></i> is a message bus connection.
--   
--   <i>Since: 2.26</i>
dBusConnectionGetUniqueName :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m (Maybe Text)

-- | Gets whether <i><tt>connection</tt></i> is closed.
--   
--   <i>Since: 2.26</i>
dBusConnectionIsClosed :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Bool

-- | Asynchronously sets up a D-Bus connection for exchanging D-Bus
--   messages with the end represented by <i><tt>stream</tt></i>.
--   
--   If <i><tt>stream</tt></i> is a <a>SocketConnection</a>, then the
--   corresponding <a>Socket</a> will be put into non-blocking mode.
--   
--   The D-Bus connection will interact with <i><tt>stream</tt></i> from a
--   worker thread. As a result, the caller should not interact with
--   <i><tt>stream</tt></i> after this method has been called, except by
--   calling <a>objectUnref</a> on it.
--   
--   If <i><tt>observer</tt></i> is not <a>Nothing</a> it may be used to
--   control the authentication process.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   invoked. You can then call <a>dBusConnectionNewFinish</a> to get the
--   result of the operation.
--   
--   This is an asynchronous failable constructor. See
--   <a>dBusConnectionNewSync</a> for the synchronous version.
--   
--   <i>Since: 2.26</i>
dBusConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsDBusAuthObserver b, IsCancellable c) => a -> Maybe Text -> [DBusConnectionFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusConnectionNew</a>.
--   
--   <i>Since: 2.26</i>
dBusConnectionNewFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusConnection

-- | Asynchronously connects and sets up a D-Bus client connection for
--   exchanging D-Bus messages with an endpoint specified by
--   <i><tt>address</tt></i> which must be in the <a>D-Bus address
--   format</a>.
--   
--   This constructor can only be used to initiate client-side connections
--   - use <a>dBusConnectionNew</a> if you need to act as the server. In
--   particular, <i><tt>flags</tt></i> cannot contain the
--   <a>DBusConnectionFlagsAuthenticationServer</a>,
--   <a>DBusConnectionFlagsAuthenticationAllowAnonymous</a> or
--   <a>DBusConnectionFlagsAuthenticationRequireSameUser</a> flags.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   invoked. You can then call <a>dBusConnectionNewForAddressFinish</a> to
--   get the result of the operation.
--   
--   If <i><tt>observer</tt></i> is not <a>Nothing</a> it may be used to
--   control the authentication process.
--   
--   This is an asynchronous failable constructor. See
--   <a>dBusConnectionNewForAddressSync</a> for the synchronous version.
--   
--   <i>Since: 2.26</i>
dBusConnectionNewForAddress :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) => Text -> [DBusConnectionFlags] -> Maybe a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dBusConnectionNewForAddress</a>.
--   
--   <i>Since: 2.26</i>
dBusConnectionNewForAddressFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusConnection

-- | Synchronously connects and sets up a D-Bus client connection for
--   exchanging D-Bus messages with an endpoint specified by
--   <i><tt>address</tt></i> which must be in the <a>D-Bus address
--   format</a>.
--   
--   This constructor can only be used to initiate client-side connections
--   - use <a>dBusConnectionNewSync</a> if you need to act as the server.
--   In particular, <i><tt>flags</tt></i> cannot contain the
--   <a>DBusConnectionFlagsAuthenticationServer</a>,
--   <a>DBusConnectionFlagsAuthenticationAllowAnonymous</a> or
--   <a>DBusConnectionFlagsAuthenticationRequireSameUser</a> flags.
--   
--   This is a synchronous failable constructor. See
--   <a>dBusConnectionNewForAddress</a> for the asynchronous version.
--   
--   If <i><tt>observer</tt></i> is not <a>Nothing</a> it may be used to
--   control the authentication process.
--   
--   <i>Since: 2.26</i>
dBusConnectionNewForAddressSync :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) => Text -> [DBusConnectionFlags] -> Maybe a -> Maybe b -> m DBusConnection

-- | Synchronously sets up a D-Bus connection for exchanging D-Bus messages
--   with the end represented by <i><tt>stream</tt></i>.
--   
--   If <i><tt>stream</tt></i> is a <a>SocketConnection</a>, then the
--   corresponding <a>Socket</a> will be put into non-blocking mode.
--   
--   The D-Bus connection will interact with <i><tt>stream</tt></i> from a
--   worker thread. As a result, the caller should not interact with
--   <i><tt>stream</tt></i> after this method has been called, except by
--   calling <a>objectUnref</a> on it.
--   
--   If <i><tt>observer</tt></i> is not <a>Nothing</a> it may be used to
--   control the authentication process.
--   
--   This is a synchronous failable constructor. See
--   <a>dBusConnectionNew</a> for the asynchronous version.
--   
--   <i>Since: 2.26</i>
dBusConnectionNewSync :: (HasCallStack, MonadIO m, IsIOStream a, IsDBusAuthObserver b, IsCancellable c) => a -> Maybe Text -> [DBusConnectionFlags] -> Maybe b -> Maybe c -> m DBusConnection

-- | Version of <tt><i>g_dbus_connection_register_object()</i></tt> using
--   closures instead of a <a>DBusInterfaceVTable</a> for easier binding in
--   other languages.
--   
--   Note that the reference counting semantics of the function wrapped by
--   <i><tt>methodCallClosure</tt></i> are the same as those of
--   [callback<i><tt>gio</tt></i>.DBusInterfaceMethodCallFunc]: ownership
--   of a reference to the <a>DBusMethodInvocation</a> is transferred to
--   the function.
--   
--   <i>Since: 2.46</i>

-- | <i>Deprecated: (Since version 2.84)Deprecated in favour
--   of<a>dBusConnectionRegisterObjectWithClosures2</a>, which has
--   morebinding-friendly reference counting semantics.</i>
dBusConnectionRegisterObject :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> DBusInterfaceInfo -> Maybe (GClosure b) -> Maybe (GClosure c) -> Maybe (GClosure d) -> m Word32

-- | Version of <a>dBusConnectionRegisterObject</a> using closures instead
--   of a [type<i><tt>gio</tt></i>.DBusInterfaceVTable] for easier binding
--   in other languages.
--   
--   In contrast to <a>dBusConnectionRegisterObject</a> and
--   <a>DBusConnection</a>.<tt><i>register_object_with_closures</i></tt>(),
--   the reference counting semantics of the function wrapped by
--   <i><tt>methodCallClosure</tt></i> are *not* the same as those of
--   [callback<i><tt>gio</tt></i>.DBusInterfaceMethodCallFunc]. Ownership
--   of a reference to the <a>DBusMethodInvocation</a> is *not* transferred
--   to the function. Bindings must ensure that they add a reference to the
--   <a>DBusMethodInvocation</a> before calling any
--   <tt>g_dbus_method_invocation_return_*()</tt> methods on it. This
--   should be automatic as a result of the introspection annotations on
--   those methods.
--   
--   <i>Since: 2.84</i>
dBusConnectionRegisterObjectWithClosures2 :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> DBusInterfaceInfo -> Maybe (GClosure b) -> Maybe (GClosure c) -> Maybe (GClosure d) -> m Word32

-- | Registers a whole subtree of dynamic objects.
--   
--   The <i><tt>enumerate</tt></i> and <i><tt>introspection</tt></i>
--   functions in <i><tt>vtable</tt></i> are used to convey, to remote
--   callers, what nodes exist in the subtree rooted by
--   <i><tt>objectPath</tt></i>.
--   
--   When handling remote calls into any node in the subtree, first the
--   <i><tt>enumerate</tt></i> function is used to check if the node
--   exists. If the node exists or the
--   <a>DBusSubtreeFlagsDispatchToUnenumeratedNodes</a> flag is set the
--   <i><tt>introspection</tt></i> function is used to check if the node
--   supports the requested method. If so, the <i><tt>dispatch</tt></i>
--   function is used to determine where to dispatch the call. The
--   collected <a>DBusInterfaceVTable</a> and <tt><i>gpointer</i></tt> will
--   be used to call into the interface vtable for processing the request.
--   
--   All calls into user-provided code will be invoked in the
--   thread-default main context (see <a>mainContextPushThreadDefault</a>)
--   of the thread you are calling this method from.
--   
--   If an existing subtree is already registered at
--   <i><tt>objectPath</tt></i> or then <i><tt>error</tt></i> is set to
--   <a>IOErrorEnumExists</a>.
--   
--   Note that it is valid to register regular objects (using
--   <tt><i>g_dbus_connection_register_object()</i></tt>) in a subtree
--   registered with <a>dBusConnectionRegisterSubtree</a> - if so, the
--   subtree handler is tried as the last resort. One way to think about a
--   subtree handler is to consider it a fallback handler for object paths
--   not registered via <tt><i>g_dbus_connection_register_object()</i></tt>
--   or other bindings.
--   
--   Note that <i><tt>vtable</tt></i> will be copied so you cannot change
--   it after registration.
--   
--   See this
--   [server][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-for-exporting-a-subtree]
--   for an example of how to use this method.
--   
--   <i>Since: 2.26</i>
dBusConnectionRegisterSubtree :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> DBusSubtreeVTable -> [DBusSubtreeFlags] -> Ptr () -> DestroyNotify -> m Word32

-- | Removes a filter.
--   
--   Note that since filters run in a different thread, there is a race
--   condition where it is possible that the filter will be running even
--   after calling <a>dBusConnectionRemoveFilter</a>, so you cannot just
--   free data that the filter might be using. Instead, you should pass a
--   <a>DestroyNotify</a> to <a>dBusConnectionAddFilter</a>, which will be
--   called when it is guaranteed that the data is no longer needed.
--   
--   <i>Since: 2.26</i>
dBusConnectionRemoveFilter :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()

-- | Asynchronously sends <i><tt>message</tt></i> to the peer represented
--   by <i><tt>connection</tt></i>.
--   
--   Unless <i><tt>flags</tt></i> contain the
--   <a>DBusSendMessageFlagsPreserveSerial</a> flag, the serial number will
--   be assigned by <i><tt>connection</tt></i> and set on
--   <i><tt>message</tt></i> via <a>dBusMessageSetSerial</a>. If
--   <i><tt>outSerial</tt></i> is not <a>Nothing</a>, then the serial
--   number used will be written to this location prior to submitting the
--   message to the underlying transport. While it has a <tt>volatile</tt>
--   qualifier, this is a historical artifact and the argument passed to it
--   should not be <tt>volatile</tt>.
--   
--   If <i><tt>connection</tt></i> is closed then the operation will fail
--   with <a>IOErrorEnumClosed</a>. If <i><tt>message</tt></i> is not
--   well-formed, the operation fails with
--   <a>IOErrorEnumInvalidArgument</a>.
--   
--   See this
--   [server][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-d-bus-server]
--   and
--   [client][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-for-file-descriptor-passing]
--   for an example of how to use this low-level API to send and receive
--   UNIX file descriptors.
--   
--   Note that <i><tt>message</tt></i> must be unlocked, unless
--   <i><tt>flags</tt></i> contain the
--   <a>DBusSendMessageFlagsPreserveSerial</a> flag.
--   
--   <i>Since: 2.26</i>
dBusConnectionSendMessage :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) => a -> b -> [DBusSendMessageFlags] -> m Word32

-- | Asynchronously sends <i><tt>message</tt></i> to the peer represented
--   by <i><tt>connection</tt></i>.
--   
--   Unless <i><tt>flags</tt></i> contain the
--   <a>DBusSendMessageFlagsPreserveSerial</a> flag, the serial number will
--   be assigned by <i><tt>connection</tt></i> and set on
--   <i><tt>message</tt></i> via <a>dBusMessageSetSerial</a>. If
--   <i><tt>outSerial</tt></i> is not <a>Nothing</a>, then the serial
--   number used will be written to this location prior to submitting the
--   message to the underlying transport. While it has a <tt>volatile</tt>
--   qualifier, this is a historical artifact and the argument passed to it
--   should not be <tt>volatile</tt>.
--   
--   If <i><tt>connection</tt></i> is closed then the operation will fail
--   with <a>IOErrorEnumClosed</a>. If <i><tt>cancellable</tt></i> is
--   canceled, the operation will fail with <a>IOErrorEnumCancelled</a>. If
--   <i><tt>message</tt></i> is not well-formed, the operation fails with
--   <a>IOErrorEnumInvalidArgument</a>.
--   
--   This is an asynchronous method. When the operation is finished,
--   <i><tt>callback</tt></i> will be invoked in the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) of the thread you
--   are calling this method from. You can then call
--   <a>dBusConnectionSendMessageWithReplyFinish</a> to get the result of
--   the operation. See <a>dBusConnectionSendMessageWithReplySync</a> for
--   the synchronous version.
--   
--   Note that <i><tt>message</tt></i> must be unlocked, unless
--   <i><tt>flags</tt></i> contain the
--   <a>DBusSendMessageFlagsPreserveSerial</a> flag.
--   
--   See this
--   [server][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-d-bus-server]
--   and
--   [client][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-for-file-descriptor-passing]
--   for an example of how to use this low-level API to send and receive
--   UNIX file descriptors.
--   
--   <i>Since: 2.26</i>
dBusConnectionSendMessageWithReply :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b, IsCancellable c) => a -> b -> [DBusSendMessageFlags] -> Int32 -> Maybe c -> Maybe AsyncReadyCallback -> m Word32

-- | Finishes an operation started with
--   <a>dBusConnectionSendMessageWithReply</a>.
--   
--   Note that <i><tt>error</tt></i> is only set if a local in-process
--   error occurred. That is to say that the returned <a>DBusMessage</a>
--   object may be of type <a>DBusMessageTypeError</a>. Use
--   <a>dBusMessageToGerror</a> to transcode this to a <a>GError</a>.
--   
--   See this
--   [server][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-d-bus-server]
--   and
--   [client][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-for-file-descriptor-passing]
--   for an example of how to use this low-level API to send and receive
--   UNIX file descriptors.
--   
--   <i>Since: 2.26</i>
dBusConnectionSendMessageWithReplyFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m DBusMessage

-- | Synchronously sends <i><tt>message</tt></i> to the peer represented by
--   <i><tt>connection</tt></i> and blocks the calling thread until a reply
--   is received or the timeout is reached. See
--   <a>dBusConnectionSendMessageWithReply</a> for the asynchronous version
--   of this method.
--   
--   Unless <i><tt>flags</tt></i> contain the
--   <a>DBusSendMessageFlagsPreserveSerial</a> flag, the serial number will
--   be assigned by <i><tt>connection</tt></i> and set on
--   <i><tt>message</tt></i> via <a>dBusMessageSetSerial</a>. If
--   <i><tt>outSerial</tt></i> is not <a>Nothing</a>, then the serial
--   number used will be written to this location prior to submitting the
--   message to the underlying transport. While it has a <tt>volatile</tt>
--   qualifier, this is a historical artifact and the argument passed to it
--   should not be <tt>volatile</tt>.
--   
--   If <i><tt>connection</tt></i> is closed then the operation will fail
--   with <a>IOErrorEnumClosed</a>. If <i><tt>cancellable</tt></i> is
--   canceled, the operation will fail with <a>IOErrorEnumCancelled</a>. If
--   <i><tt>message</tt></i> is not well-formed, the operation fails with
--   <a>IOErrorEnumInvalidArgument</a>.
--   
--   Note that <i><tt>error</tt></i> is only set if a local in-process
--   error occurred. That is to say that the returned <a>DBusMessage</a>
--   object may be of type <a>DBusMessageTypeError</a>. Use
--   <a>dBusMessageToGerror</a> to transcode this to a <a>GError</a>.
--   
--   See this
--   [server][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-d-bus-server]
--   and
--   [client][class<i><tt>gio</tt></i>.DBusConnection<tt><i>an</i></tt>-example-for-file-descriptor-passing]
--   for an example of how to use this low-level API to send and receive
--   UNIX file descriptors.
--   
--   Note that <i><tt>message</tt></i> must be unlocked, unless
--   <i><tt>flags</tt></i> contain the
--   <a>DBusSendMessageFlagsPreserveSerial</a> flag.
--   
--   <i>Since: 2.26</i>
dBusConnectionSendMessageWithReplySync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b, IsCancellable c) => a -> b -> [DBusSendMessageFlags] -> Int32 -> Maybe c -> m (DBusMessage, Word32)

-- | Sets whether the process should be terminated when
--   <i><tt>connection</tt></i> is closed by the remote peer. See
--   <a>DBusConnection:exitOnClose</a> for more details.
--   
--   Note that this function should be used with care. Most modern UNIX
--   desktops tie the notion of a user session with the session bus, and
--   expect all of a user's applications to quit when their bus connection
--   goes away. If you are setting <i><tt>exitOnClose</tt></i> to
--   <a>False</a> for the shared session bus connection, you should make
--   sure that your application exits when the user session ends.
--   
--   <i>Since: 2.26</i>
dBusConnectionSetExitOnClose :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Bool -> m ()

-- | Subscribes to signals on <i><tt>connection</tt></i> and invokes
--   <i><tt>callback</tt></i> whenever the signal is received. Note that
--   <i><tt>callback</tt></i> will be invoked in the thread-default main
--   context (see <a>mainContextPushThreadDefault</a>) of the thread you
--   are calling this method from.
--   
--   If <i><tt>connection</tt></i> is not a message bus connection,
--   <i><tt>sender</tt></i> must be <a>Nothing</a>.
--   
--   If <i><tt>sender</tt></i> is a well-known name note that
--   <i><tt>callback</tt></i> is invoked with the unique name for the owner
--   of <i><tt>sender</tt></i>, not the well-known name as one would
--   expect. This is because the message bus rewrites the name. As such, to
--   avoid certain race conditions, users should be tracking the name owner
--   of the well-known name and use that when processing the received
--   signal.
--   
--   If one of <a>DBusSignalFlagsMatchArg0Namespace</a> or
--   <a>DBusSignalFlagsMatchArg0Path</a> are given, <i><tt>arg0</tt></i> is
--   interpreted as part of a namespace or path. The first argument of a
--   signal is matched against that part as specified by D-Bus.
--   
--   If <i><tt>userDataFreeFunc</tt></i> is non-<a>Nothing</a>, it will be
--   called (in the thread-default main context of the thread you are
--   calling this method from) at some point after <i><tt>userData</tt></i>
--   is no longer needed. (It is not guaranteed to be called synchronously
--   when the signal is unsubscribed from, and may be called after
--   <i><tt>connection</tt></i> has been destroyed.)
--   
--   As <i><tt>callback</tt></i> is potentially invoked in a different
--   thread from where it’s emitted, it’s possible for this to happen after
--   <a>dBusConnectionSignalUnsubscribe</a> has been called in another
--   thread. Due to this, <i><tt>userData</tt></i> should have a strong
--   reference which is freed with <i><tt>userDataFreeFunc</tt></i>, rather
--   than pointing to data whose lifecycle is tied to the signal
--   subscription. For example, if a <a>Object</a> is used to store the
--   subscription ID from <a>dBusConnectionSignalSubscribe</a>, a strong
--   reference to that <a>Object</a> must be passed to
--   <i><tt>userData</tt></i>, and <a>objectUnref</a> passed to
--   <i><tt>userDataFreeFunc</tt></i>. You are responsible for breaking the
--   resulting reference count cycle by explicitly unsubscribing from the
--   signal when dropping the last external reference to the <a>Object</a>.
--   Alternatively, a weak reference may be used.
--   
--   It is guaranteed that if you unsubscribe from a signal using
--   <a>dBusConnectionSignalUnsubscribe</a> from the same thread which made
--   the corresponding <a>dBusConnectionSignalSubscribe</a> call,
--   <i><tt>callback</tt></i> will not be invoked after
--   <a>dBusConnectionSignalUnsubscribe</a> returns.
--   
--   The returned subscription identifier is an opaque value which is
--   guaranteed to never be zero.
--   
--   This function can never fail.
--   
--   <i>Since: 2.26</i>
dBusConnectionSignalSubscribe :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> [DBusSignalFlags] -> DBusSignalCallback -> m Word32

-- | Unsubscribes from signals.
--   
--   Note that there may still be D-Bus traffic to process (relating to
--   this signal subscription) in the current thread-default
--   <a>MainContext</a> after this function has returned. You should
--   continue to iterate the <a>MainContext</a> until the
--   <a>DestroyNotify</a> function passed to
--   <a>dBusConnectionSignalSubscribe</a> is called, in order to avoid
--   memory leaks through callbacks queued on the <a>MainContext</a> after
--   it’s stopped being iterated. Alternatively, any idle source with a
--   priority lower than <a>PRIORITY_DEFAULT</a> that was scheduled after
--   unsubscription, also indicates that all resources of this subscription
--   are released.
--   
--   <i>Since: 2.26</i>
dBusConnectionSignalUnsubscribe :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()

-- | If <i><tt>connection</tt></i> was created with
--   <a>DBusConnectionFlagsDelayMessageProcessing</a>, this method starts
--   processing messages. Does nothing on if <i><tt>connection</tt></i>
--   wasn't created with this flag or if the method has already been
--   called.
--   
--   <i>Since: 2.26</i>
dBusConnectionStartMessageProcessing :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m ()

-- | Reverses the effect of a previous call to
--   <a>dBusConnectionExportActionGroup</a>.
--   
--   It is an error to call this function with an ID that wasn’t returned
--   from <a>dBusConnectionExportActionGroup</a> or to call it with the
--   same ID more than once.
--   
--   <i>Since: 2.32</i>
dBusConnectionUnexportActionGroup :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()

-- | Reverses the effect of a previous call to
--   <a>dBusConnectionExportMenuModel</a>.
--   
--   It is an error to call this function with an ID that wasn't returned
--   from <a>dBusConnectionExportMenuModel</a> or to call it with the same
--   ID more than once.
--   
--   <i>Since: 2.32</i>
dBusConnectionUnexportMenuModel :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()

-- | Unregisters an object.
--   
--   <i>Since: 2.26</i>
dBusConnectionUnregisterObject :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m Bool

-- | Unregisters a subtree.
--   
--   <i>Since: 2.26</i>
dBusConnectionUnregisterSubtree :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>address</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusConnectionAddress :: (IsDBusConnection o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>authentication-observer</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructDBusConnectionAuthenticationObserver :: (IsDBusConnection o, MonadIO m, IsDBusAuthObserver a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>capabilities</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusConnection #capabilities
--   </pre>
getDBusConnectionCapabilities :: (MonadIO m, IsDBusConnection o) => o -> m [DBusCapabilityFlags]

-- | Get the value of the “<tt>closed</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusConnection #closed
--   </pre>
getDBusConnectionClosed :: (MonadIO m, IsDBusConnection o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>exit-on-close</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDBusConnectionExitOnClose :: (IsDBusConnection o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>exit-on-close</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusConnection #exitOnClose
--   </pre>
getDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> m Bool

-- | Set the value of the “<tt>exit-on-close</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dBusConnection [ #exitOnClose <a>:=</a> value ]
--   </pre>
setDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusConnectionFlags :: (IsDBusConnection o, MonadIO m) => [DBusConnectionFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusConnection #flags
--   </pre>
getDBusConnectionFlags :: (MonadIO m, IsDBusConnection o) => o -> m [DBusConnectionFlags]

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>guid</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusConnectionGuid :: (IsDBusConnection o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>guid</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusConnection #guid
--   </pre>
getDBusConnectionGuid :: (MonadIO m, IsDBusConnection o) => o -> m Text

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>stream</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructDBusConnectionStream :: (IsDBusConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>stream</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusConnection #stream
--   </pre>
getDBusConnectionStream :: (MonadIO m, IsDBusConnection o) => o -> m IOStream

-- | Get the value of the “<tt>unique-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dBusConnection #uniqueName
--   </pre>
getDBusConnectionUniqueName :: (MonadIO m, IsDBusConnection o) => o -> m (Maybe Text)

-- | Emitted when the connection is closed.
--   
--   The cause of this event can be
--   
--   <ul>
--   <li>If <a>dBusConnectionClose</a> is called. In this case
--   <i><tt>remotePeerVanished</tt></i> is set to <a>False</a> and
--   <i><tt>error</tt></i> is <a>Nothing</a>.</li>
--   <li>If the remote peer closes the connection. In this case
--   <i><tt>remotePeerVanished</tt></i> is set to <a>True</a> and
--   <i><tt>error</tt></i> is set.</li>
--   <li>If the remote peer sends invalid or malformed data. In this case
--   <i><tt>remotePeerVanished</tt></i> is set to <a>False</a> and
--   <i><tt>error</tt></i> is set.</li>
--   </ul>
--   
--   Upon receiving this signal, you should give up your reference to
--   <i><tt>connection</tt></i>. You are guaranteed that this signal is
--   emitted only once.
--   
--   <i>Since: 2.26</i>
type DBusConnectionClosedCallback = Bool -> Maybe GError -> IO ()

-- | Connect a signal handler for the <a>closed</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> dBusConnection #closed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> ((?self :: a) => DBusConnectionClosedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>closed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> dBusConnection #closed callback
--   </pre>
onDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> ((?self :: a) => DBusConnectionClosedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DBusConnection.DBusConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusConnection.DBusConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusConnection.DBusConnection
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusConnection.DBusConnection o) => GI.Gio.Objects.DBusConnection.IsDBusConnection o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusConnection.DBusConnection)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusConnection.DBusConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusConnection.DBusConnection


-- | <tt>GDBusAuthObserver</tt> provides a mechanism for participating in
--   how a <a>DBusServer</a> (or a <a>DBusConnection</a>) authenticates
--   remote peers.
--   
--   Simply instantiate a <tt>GDBusAuthObserver</tt> and connect to the
--   signals you are interested in. Note that new signals may be added in
--   the future.
--   
--   <h2>Controlling Authentication Mechanisms</h2>
--   
--   By default, a <tt>GDBusServer</tt> or server-side
--   <tt>GDBusConnection</tt> will allow any authentication mechanism to be
--   used. If you only want to allow D-Bus connections with the
--   <tt>EXTERNAL</tt> mechanism, which makes use of credentials passing
--   and is the recommended mechanism for modern Unix platforms such as
--   Linux and the BSD family, you would use a signal handler like this:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static gboolean
--   on_allow_mechanism (GDBusAuthObserver *observer,
--                       const gchar       *mechanism,
--                       gpointer           user_data)
--   {
--     if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
--       {
--         return TRUE;
--       }
--   
--     return FALSE;
--   }
--   </pre>
--   
--   <h2>Controlling Authorization</h2>
--   
--   By default, a <tt>GDBusServer</tt> or server-side
--   <tt>GDBusConnection</tt> will accept connections from any successfully
--   authenticated user (but not from anonymous connections using the
--   <tt>ANONYMOUS</tt> mechanism). If you only want to allow D-Bus
--   connections from processes owned by the same uid as the server, since
--   GLib 2.68, you should use the
--   <tt>G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER</tt> flag.
--   It’s equivalent to the following signal handler:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static gboolean
--   on_authorize_authenticated_peer (GDBusAuthObserver *observer,
--                                    GIOStream         *stream,
--                                    GCredentials      *credentials,
--                                    gpointer           user_data)
--   {
--     gboolean authorized;
--   
--     authorized = FALSE;
--     if (credentials != NULL)
--       {
--         GCredentials *own_credentials;
--         own_credentials = g_credentials_new ();
--         if (g_credentials_is_same_user (credentials, own_credentials, NULL))
--           authorized = TRUE;
--         g_object_unref (own_credentials);
--       }
--   
--     return authorized;
--   }
--   </pre>
--   
--   <i>Since: 2.26</i>
module GI.Gio.Objects.DBusAuthObserver

-- | Memory-managed wrapper type.
newtype DBusAuthObserver
DBusAuthObserver :: ManagedPtr DBusAuthObserver -> DBusAuthObserver

-- | Type class for types which can be safely cast to
--   <a>DBusAuthObserver</a>, for instance with <a>toDBusAuthObserver</a>.
class (GObject o, IsDescendantOf DBusAuthObserver o) => IsDBusAuthObserver o

-- | Cast to <a>DBusAuthObserver</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toDBusAuthObserver :: (MonadIO m, IsDBusAuthObserver o) => o -> m DBusAuthObserver

-- | Emits the <a>DBusAuthObserver::allowMechanism</a> signal on
--   <i><tt>observer</tt></i>.
--   
--   <i>Since: 2.34</i>
dBusAuthObserverAllowMechanism :: (HasCallStack, MonadIO m, IsDBusAuthObserver a) => a -> Text -> m Bool

-- | Emits the <a>DBusAuthObserver::authorizeAuthenticatedPeer</a> signal
--   on <i><tt>observer</tt></i>.
--   
--   <i>Since: 2.26</i>
dBusAuthObserverAuthorizeAuthenticatedPeer :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsIOStream b, IsCredentials c) => a -> b -> Maybe c -> m Bool

-- | Creates a new <a>DBusAuthObserver</a> object.
--   
--   <i>Since: 2.26</i>
dBusAuthObserverNew :: (HasCallStack, MonadIO m) => m DBusAuthObserver

-- | Emitted to check if <i><tt>mechanism</tt></i> is allowed to be used.
--   
--   <i>Since: 2.34</i>
type DBusAuthObserverAllowMechanismCallback = Text -> IO Bool

-- | Connect a signal handler for the <a>allowMechanism</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusAuthObserver #allowMechanism callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusAuthObserverAllowMechanism :: (IsDBusAuthObserver a, MonadIO m) => a -> ((?self :: a) => DBusAuthObserverAllowMechanismCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>allowMechanism</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusAuthObserver #allowMechanism callback
--   </pre>
onDBusAuthObserverAllowMechanism :: (IsDBusAuthObserver a, MonadIO m) => a -> ((?self :: a) => DBusAuthObserverAllowMechanismCallback) -> m SignalHandlerId

-- | Emitted to check if a peer that is successfully authenticated is
--   authorized.
--   
--   <i>Since: 2.26</i>
type DBusAuthObserverAuthorizeAuthenticatedPeerCallback = IOStream -> Maybe Credentials -> IO Bool

-- | Connect a signal handler for the <a>authorizeAuthenticatedPeer</a>
--   signal, to be run after the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>after</a> dBusAuthObserver #authorizeAuthenticatedPeer callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDBusAuthObserverAuthorizeAuthenticatedPeer :: (IsDBusAuthObserver a, MonadIO m) => a -> ((?self :: a) => DBusAuthObserverAuthorizeAuthenticatedPeerCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>authorizeAuthenticatedPeer</a>
--   signal, to be run before the default handler. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>on</a> dBusAuthObserver #authorizeAuthenticatedPeer callback
--   </pre>
onDBusAuthObserverAuthorizeAuthenticatedPeer :: (IsDBusAuthObserver a, MonadIO m) => a -> ((?self :: a) => DBusAuthObserverAuthorizeAuthenticatedPeerCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver o) => GI.Gio.Objects.DBusAuthObserver.IsDBusAuthObserver o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver


-- | <tt>GDBusActionGroup</tt> is an implementation of the
--   <a>ActionGroup</a> interface.
--   
--   <tt>GDBusActionGroup</tt> can be used as a proxy for an action group
--   that is exported over D-Bus with
--   <a>dBusConnectionExportActionGroup</a>.
module GI.Gio.Objects.DBusActionGroup

-- | Memory-managed wrapper type.
newtype DBusActionGroup
DBusActionGroup :: ManagedPtr DBusActionGroup -> DBusActionGroup

-- | Type class for types which can be safely cast to
--   <a>DBusActionGroup</a>, for instance with <a>toDBusActionGroup</a>.
class (GObject o, IsDescendantOf DBusActionGroup o) => IsDBusActionGroup o

-- | Cast to <a>DBusActionGroup</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toDBusActionGroup :: (MonadIO m, IsDBusActionGroup o) => o -> m DBusActionGroup

-- | Obtains a <a>DBusActionGroup</a> for the action group which is
--   exported at the given <i><tt>busName</tt></i> and
--   <i><tt>objectPath</tt></i>.
--   
--   The thread default main context is taken at the time of this call. All
--   signals on the menu model (and any linked models) are reported with
--   respect to this context. All calls on the returned menu model (and
--   linked models) must also originate from this same context, with the
--   thread default main context unchanged.
--   
--   This call is non-blocking. The returned action group may or may not
--   already be filled in. The correct thing to do is connect the signals
--   for the action group to monitor for changes and then to call
--   <a>actionGroupListActions</a> to get the initial list.
--   
--   <i>Since: 2.32</i>
dBusActionGroupGet :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Maybe Text -> Text -> m DBusActionGroup
instance GHC.Classes.Eq GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DBusActionGroup.DBusActionGroup o) => GI.Gio.Objects.DBusActionGroup.IsDBusActionGroup o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.DBusActionGroup.DBusActionGroup)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DBusActionGroup.DBusActionGroup


-- | Converter output stream implements <a>OutputStream</a> and allows
--   conversion of data of various types during reading.
--   
--   As of GLib 2.34, <tt>GConverterOutputStream</tt> implements
--   <a>PollableOutputStream</a>.
module GI.Gio.Objects.ConverterOutputStream

-- | Memory-managed wrapper type.
newtype ConverterOutputStream
ConverterOutputStream :: ManagedPtr ConverterOutputStream -> ConverterOutputStream

-- | Type class for types which can be safely cast to
--   <a>ConverterOutputStream</a>, for instance with
--   <a>toConverterOutputStream</a>.
class (GObject o, IsDescendantOf ConverterOutputStream o) => IsConverterOutputStream o

-- | Cast to <a>ConverterOutputStream</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toConverterOutputStream :: (MonadIO m, IsConverterOutputStream o) => o -> m ConverterOutputStream

-- | Gets the <a>Converter</a> that is used by
--   <i><tt>converterStream</tt></i>.
--   
--   <i>Since: 2.24</i>
converterOutputStreamGetConverter :: (HasCallStack, MonadIO m, IsConverterOutputStream a) => a -> m Converter

-- | Creates a new converter output stream for the
--   <i><tt>baseStream</tt></i>.
converterOutputStreamNew :: (HasCallStack, MonadIO m, IsOutputStream a, IsConverter b) => a -> b -> m ConverterOutputStream

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>converter</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructConverterOutputStreamConverter :: (IsConverterOutputStream o, MonadIO m, IsConverter a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>converter</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> converterOutputStream #converter
--   </pre>
getConverterOutputStreamConverter :: (MonadIO m, IsConverterOutputStream o) => o -> m Converter
instance GHC.Classes.Eq GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream o) => GI.Gio.Objects.ConverterOutputStream.IsConverterOutputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream


-- | Converter input stream implements <a>InputStream</a> and allows
--   conversion of data of various types during reading.
--   
--   As of GLib 2.34, <tt>GConverterInputStream</tt> implements
--   <a>PollableInputStream</a>.
module GI.Gio.Objects.ConverterInputStream

-- | Memory-managed wrapper type.
newtype ConverterInputStream
ConverterInputStream :: ManagedPtr ConverterInputStream -> ConverterInputStream

-- | Type class for types which can be safely cast to
--   <a>ConverterInputStream</a>, for instance with
--   <a>toConverterInputStream</a>.
class (GObject o, IsDescendantOf ConverterInputStream o) => IsConverterInputStream o

-- | Cast to <a>ConverterInputStream</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toConverterInputStream :: (MonadIO m, IsConverterInputStream o) => o -> m ConverterInputStream

-- | Gets the <a>Converter</a> that is used by
--   <i><tt>converterStream</tt></i>.
--   
--   <i>Since: 2.24</i>
converterInputStreamGetConverter :: (HasCallStack, MonadIO m, IsConverterInputStream a) => a -> m Converter

-- | Creates a new converter input stream for the
--   <i><tt>baseStream</tt></i>.
converterInputStreamNew :: (HasCallStack, MonadIO m, IsInputStream a, IsConverter b) => a -> b -> m ConverterInputStream

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>converter</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructConverterInputStreamConverter :: (IsConverterInputStream o, MonadIO m, IsConverter a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>converter</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> converterInputStream #converter
--   </pre>
getConverterInputStreamConverter :: (MonadIO m, IsConverterInputStream o) => o -> m Converter
instance GHC.Classes.Eq GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ConverterInputStream.ConverterInputStream o) => GI.Gio.Objects.ConverterInputStream.IsConverterInputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ConverterInputStream.ConverterInputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ConverterInputStream.ConverterInputStream


-- | <tt>GBytesIcon</tt> specifies an image held in memory in a common
--   format (usually PNG) to be used as icon.
--   
--   <i>Since: 2.38</i>
module GI.Gio.Objects.BytesIcon

-- | Memory-managed wrapper type.
newtype BytesIcon
BytesIcon :: ManagedPtr BytesIcon -> BytesIcon

-- | Type class for types which can be safely cast to <a>BytesIcon</a>, for
--   instance with <a>toBytesIcon</a>.
class (GObject o, IsDescendantOf BytesIcon o) => IsBytesIcon o

-- | Cast to <a>BytesIcon</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toBytesIcon :: (MonadIO m, IsBytesIcon o) => o -> m BytesIcon

-- | Gets the <a>Bytes</a> associated with the given <i><tt>icon</tt></i>.
--   
--   <i>Since: 2.38</i>
bytesIconGetBytes :: (HasCallStack, MonadIO m, IsBytesIcon a) => a -> m Bytes

-- | Creates a new icon for a bytes.
--   
--   This cannot fail, but loading and interpreting the bytes may fail
--   later on (for example, if <a>loadableIconLoad</a> is called) if the
--   image is invalid.
--   
--   <i>Since: 2.38</i>
bytesIconNew :: (HasCallStack, MonadIO m) => Bytes -> m BytesIcon

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>bytes</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructBytesIconBytes :: (IsBytesIcon o, MonadIO m) => Bytes -> m (GValueConstruct o)

-- | Get the value of the “<tt>bytes</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> bytesIcon #bytes
--   </pre>
getBytesIconBytes :: (MonadIO m, IsBytesIcon o) => o -> m Bytes
instance GHC.Classes.Eq GI.Gio.Objects.BytesIcon.BytesIcon
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.BytesIcon.BytesIcon
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.BytesIcon.BytesIcon
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.BytesIcon.BytesIcon o) => GI.Gio.Objects.BytesIcon.IsBytesIcon o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.BytesIcon.BytesIcon)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.BytesIcon.BytesIcon
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.BytesIcon.BytesIcon


-- | Buffered output stream implements <a>FilterOutputStream</a> and
--   provides for buffered writes.
--   
--   By default, <tt>GBufferedOutputStream</tt>'s buffer size is set at 4
--   kilobytes.
--   
--   To create a buffered output stream, use
--   <a>bufferedOutputStreamNew</a>, or <a>bufferedOutputStreamNewSized</a>
--   to specify the buffer's size at construction.
--   
--   To get the size of a buffer within a buffered input stream, use
--   <a>bufferedOutputStreamGetBufferSize</a>. To change the size of a
--   buffered output stream's buffer, use
--   <a>bufferedOutputStreamSetBufferSize</a>. Note that the buffer's size
--   cannot be reduced below the size of the data within the buffer.
module GI.Gio.Objects.BufferedOutputStream

-- | Memory-managed wrapper type.
newtype BufferedOutputStream
BufferedOutputStream :: ManagedPtr BufferedOutputStream -> BufferedOutputStream

-- | Type class for types which can be safely cast to
--   <a>BufferedOutputStream</a>, for instance with
--   <a>toBufferedOutputStream</a>.
class (GObject o, IsDescendantOf BufferedOutputStream o) => IsBufferedOutputStream o

-- | Cast to <a>BufferedOutputStream</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toBufferedOutputStream :: (MonadIO m, IsBufferedOutputStream o) => o -> m BufferedOutputStream

-- | Checks if the buffer automatically grows as data is added.
bufferedOutputStreamGetAutoGrow :: (HasCallStack, MonadIO m, IsBufferedOutputStream a) => a -> m Bool

-- | Gets the size of the buffer in the <i><tt>stream</tt></i>.
bufferedOutputStreamGetBufferSize :: (HasCallStack, MonadIO m, IsBufferedOutputStream a) => a -> m CSize

-- | Creates a new buffered output stream for a base stream.
bufferedOutputStreamNew :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m BufferedOutputStream

-- | Creates a new buffered output stream with a given buffer size.
bufferedOutputStreamNewSized :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> CSize -> m BufferedOutputStream

-- | Sets whether or not the <i><tt>stream</tt></i>'s buffer should
--   automatically grow. If <i><tt>autoGrow</tt></i> is true, then each
--   write will just make the buffer larger, and you must manually flush
--   the buffer to actually write out the data to the underlying stream.
bufferedOutputStreamSetAutoGrow :: (HasCallStack, MonadIO m, IsBufferedOutputStream a) => a -> Bool -> m ()

-- | Sets the size of the internal buffer to <i><tt>size</tt></i>.
bufferedOutputStreamSetBufferSize :: (HasCallStack, MonadIO m, IsBufferedOutputStream a) => a -> CSize -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>auto-grow</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructBufferedOutputStreamAutoGrow :: (IsBufferedOutputStream o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>auto-grow</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> bufferedOutputStream #autoGrow
--   </pre>
getBufferedOutputStreamAutoGrow :: (MonadIO m, IsBufferedOutputStream o) => o -> m Bool

-- | Set the value of the “<tt>auto-grow</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> bufferedOutputStream [ #autoGrow <a>:=</a> value ]
--   </pre>
setBufferedOutputStreamAutoGrow :: (MonadIO m, IsBufferedOutputStream o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>buffer-size</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructBufferedOutputStreamBufferSize :: (IsBufferedOutputStream o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>buffer-size</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> bufferedOutputStream #bufferSize
--   </pre>
getBufferedOutputStreamBufferSize :: (MonadIO m, IsBufferedOutputStream o) => o -> m Word32

-- | Set the value of the “<tt>buffer-size</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> bufferedOutputStream [ #bufferSize <a>:=</a> value ]
--   </pre>
setBufferedOutputStreamBufferSize :: (MonadIO m, IsBufferedOutputStream o) => o -> Word32 -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream o) => GI.Gio.Objects.BufferedOutputStream.IsBufferedOutputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream


-- | Buffered input stream implements <a>FilterInputStream</a> and provides
--   for buffered reads.
--   
--   By default, <tt>GBufferedInputStream</tt>'s buffer size is set at 4
--   kilobytes.
--   
--   To create a buffered input stream, use <a>bufferedInputStreamNew</a>,
--   or <a>bufferedInputStreamNewSized</a> to specify the buffer's size at
--   construction.
--   
--   To get the size of a buffer within a buffered input stream, use
--   <a>bufferedInputStreamGetBufferSize</a>. To change the size of a
--   buffered input stream's buffer, use
--   <a>bufferedInputStreamSetBufferSize</a>. Note that the buffer's size
--   cannot be reduced below the size of the data within the buffer.
module GI.Gio.Objects.BufferedInputStream

-- | Memory-managed wrapper type.
newtype BufferedInputStream
BufferedInputStream :: ManagedPtr BufferedInputStream -> BufferedInputStream

-- | Type class for types which can be safely cast to
--   <a>BufferedInputStream</a>, for instance with
--   <a>toBufferedInputStream</a>.
class (GObject o, IsDescendantOf BufferedInputStream o) => IsBufferedInputStream o

-- | Cast to <a>BufferedInputStream</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toBufferedInputStream :: (MonadIO m, IsBufferedInputStream o) => o -> m BufferedInputStream

-- | Tries to read <i><tt>count</tt></i> bytes from the stream into the
--   buffer. Will block during this read.
--   
--   If <i><tt>count</tt></i> is zero, returns zero and does nothing. A
--   value of <i><tt>count</tt></i> larger than <tt>G_MAXSSIZE</tt> will
--   cause a [error<i><tt>gio</tt></i>.IOErrorEnum.INVALID_ARGUMENT] error.
--   
--   On success, the number of bytes read into the buffer is returned. It
--   is not an error if this is not the same as the requested size, as it
--   can happen e.g. near the end of a file. Zero is returned on end of
--   file (or if <i><tt>count</tt></i> is zero), but never otherwise.
--   
--   If <i><tt>count</tt></i> is -1 then the attempted read size is equal
--   to the number of bytes that are required to fill the buffer.
--   
--   If <i><tt>cancellable</tt></i> is not <tt>NULL</tt>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   [error<i><tt>gio</tt></i>.IOErrorEnum.CANCELLED] will be returned. If
--   an operation was partially finished when the operation was cancelled
--   the partial result will be returned, without an error.
--   
--   On error <tt>-1</tt> is returned and <i><tt>error</tt></i> is set
--   accordingly.
--   
--   For the asynchronous, non-blocking, version of this function, see
--   <a>bufferedInputStreamFillAsync</a>.
bufferedInputStreamFill :: (HasCallStack, MonadIO m, IsBufferedInputStream a, IsCancellable b) => a -> Int64 -> Maybe b -> m Int64

-- | Reads data into <i><tt>stream</tt></i>'s buffer asynchronously, up to
--   <i><tt>count</tt></i> size. <i><tt>ioPriority</tt></i> can be used to
--   prioritize reads. For the synchronous version of this function, see
--   <a>bufferedInputStreamFill</a>.
--   
--   If <i><tt>count</tt></i> is <tt>-1</tt> then the attempted read size
--   is equal to the number of bytes that are required to fill the buffer.
bufferedInputStreamFillAsync :: (HasCallStack, MonadIO m, IsBufferedInputStream a, IsCancellable b) => a -> Int64 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous read.
bufferedInputStreamFillFinish :: (HasCallStack, MonadIO m, IsBufferedInputStream a, IsAsyncResult b) => a -> b -> m Int64

-- | Gets the size of the available data within the stream.
bufferedInputStreamGetAvailable :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> m CSize

-- | Gets the size of the input buffer.
bufferedInputStreamGetBufferSize :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> m CSize

-- | Creates a new <a>InputStream</a> from the given
--   <i><tt>baseStream</tt></i>, with a buffer set to the default size (4
--   kilobytes).
bufferedInputStreamNew :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m BufferedInputStream

-- | Creates a new <a>BufferedInputStream</a> from the given
--   <i><tt>baseStream</tt></i>, with a buffer set to <i><tt>size</tt></i>.
bufferedInputStreamNewSized :: (HasCallStack, MonadIO m, IsInputStream a) => a -> CSize -> m BufferedInputStream

-- | Peeks in the buffered input, copying <i><tt>count</tt></i> bytes of
--   data from <i><tt>offset</tt></i> bytes in the buffered input into
--   <i><tt>buffer</tt></i>.
bufferedInputStreamPeek :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> ByteString -> CSize -> m CSize

-- | Returns the buffer with the currently available bytes. The returned
--   buffer must not be modified and will become invalid when reading from
--   the stream or filling the buffer.
bufferedInputStreamPeekBuffer :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> m ByteString

-- | Tries to read a single byte from the stream or the buffer. Will block
--   during this read.
--   
--   On success, the byte read from the stream is returned. On end of
--   stream <tt>-1</tt> is returned but it's not an exceptional error and
--   <i><tt>error</tt></i> is not set.
--   
--   If <i><tt>cancellable</tt></i> is not <tt>NULL</tt>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   [error<i><tt>gio</tt></i>.IOErrorEnum.CANCELLED] will be returned. If
--   an operation was partially finished when the operation was cancelled
--   the partial result will be returned, without an error.
--   
--   On error <tt>-1</tt> is returned and <i><tt>error</tt></i> is set
--   accordingly.
bufferedInputStreamReadByte :: (HasCallStack, MonadIO m, IsBufferedInputStream a, IsCancellable b) => a -> Maybe b -> m Int32

-- | Sets the size of the internal buffer of <i><tt>stream</tt></i> to
--   <i><tt>size</tt></i>, or to the size of the contents of the buffer.
--   The buffer can never be resized smaller than its current contents.
bufferedInputStreamSetBufferSize :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> CSize -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>buffer-size</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructBufferedInputStreamBufferSize :: (IsBufferedInputStream o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>buffer-size</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> bufferedInputStream #bufferSize
--   </pre>
getBufferedInputStreamBufferSize :: (MonadIO m, IsBufferedInputStream o) => o -> m Word32

-- | Set the value of the “<tt>buffer-size</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> bufferedInputStream [ #bufferSize <a>:=</a> value ]
--   </pre>
setBufferedInputStreamBufferSize :: (MonadIO m, IsBufferedInputStream o) => o -> Word32 -> m ()
instance GHC.Classes.Eq GI.Gio.Objects.BufferedInputStream.BufferedInputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.BufferedInputStream.BufferedInputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.BufferedInputStream.BufferedInputStream
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.BufferedInputStream.BufferedInputStream o) => GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.BufferedInputStream.BufferedInputStream)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.BufferedInputStream.BufferedInputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.BufferedInputStream.BufferedInputStream


-- | <tt>GApplicationCommandLine</tt> represents a command-line invocation
--   of an application.
--   
--   It is created by <a>Application</a> and emitted in the
--   <a>Application::commandLine</a> signal and virtual function.
--   
--   The class contains the list of arguments that the program was invoked
--   with. It is also possible to query if the commandline invocation was
--   local (ie: the current process is running in direct response to the
--   invocation) or remote (ie: some other process forwarded the
--   commandline to this process).
--   
--   The <tt>GApplicationCommandLine</tt> object can provide the
--   <i><tt>argc</tt></i> and <i><tt>argv</tt></i> parameters for use with
--   the <a>OptionContext</a> command-line parsing API, with the
--   <a>applicationCommandLineGetArguments</a> function. See
--   <a>gapplication-example-cmdline3.c</a> for an example.
--   
--   The exit status of the originally-invoked process may be set and
--   messages can be printed to stdout or stderr of that process.
--   
--   For remote invocation, the originally-invoked process exits when
--   <a>applicationCommandLineDone</a> method is called. This method is
--   also automatically called when the object is disposed.
--   
--   The main use for <tt>GApplicationCommandLine</tt> (and the
--   <a>Application::commandLine</a> signal) is 'Emacs server' like use
--   cases: You can set the <tt>EDITOR</tt> environment variable to have
--   e.g. git use your favourite editor to edit commit messages, and if you
--   already have an instance of the editor running, the editing will
--   happen in the running instance, instead of opening a new one. An
--   important aspect of this use case is that the process that gets
--   started by git does not return until the editing is done.
--   
--   Normally, the commandline is completely handled in the
--   <a>Application::commandLine</a> handler. The launching instance exits
--   once the signal handler in the primary instance has returned, and the
--   return value of the signal handler becomes the exit status of the
--   launching instance.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static int
--   command_line (GApplication            *application,
--                 GApplicationCommandLine *cmdline)
--   {
--     gchar **argv;
--     gint argc;
--     gint i;
--   
--     argv = g_application_command_line_get_arguments (cmdline, &amp;argc);
--   
--     g_application_command_line_print (cmdline,
--                                       "This text is written back\n"
--                                       "to stdout of the caller\n");
--   
--     for (i = 0; i &lt; argc; i++)
--       g_print ("argument %d: %s\n", i, argv[i]);
--   
--     g_strfreev (argv);
--   
--     return 0;
--   }
--   </pre>
--   
--   The complete example can be found here:
--   <a>gapplication-example-cmdline.c</a>
--   
--   In more complicated cases, the handling of the commandline can be
--   split between the launcher and the primary instance.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static gboolean
--    test_local_cmdline (GApplication   *application,
--                        gchar        ***arguments,
--                        gint           *exit_status)
--   {
--     gint i, j;
--     gchar **argv;
--   
--     argv = *arguments;
--   
--     if (argv[0] == NULL)
--       {
--         *exit_status = 0;
--         return FALSE;
--       }
--   
--     i = 1;
--     while (argv[i])
--       {
--         if (g_str_has_prefix (argv[i], "--local-"))
--           {
--             g_print ("handling argument %s locally\n", argv[i]);
--             g_free (argv[i]);
--             for (j = i; argv[j]; j++)
--               argv[j] = argv[j + 1];
--           }
--         else
--           {
--             g_print ("not handling argument %s locally\n", argv[i]);
--             i++;
--           }
--       }
--   
--     *exit_status = 0;
--   
--     return FALSE;
--   }
--   
--   static void
--   test_application_class_init (TestApplicationClass *class)
--   {
--     G_APPLICATION_CLASS (class)-&gt;local_command_line = test_local_cmdline;
--   
--     ...
--   }
--   </pre>
--   
--   In this example of split commandline handling, options that start with
--   <tt>--local-</tt> are handled locally, all other options are passed to
--   the <a>Application::commandLine</a> handler which runs in the primary
--   instance.
--   
--   The complete example can be found here:
--   <a>gapplication-example-cmdline2.c</a>
--   
--   If handling the commandline requires a lot of work, it may be better
--   to defer it.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static gboolean
--   my_cmdline_handler (gpointer data)
--   {
--     GApplicationCommandLine *cmdline = data;
--   
--     // do the heavy lifting in an idle
--   
--     g_application_command_line_set_exit_status (cmdline, 0);
--     g_object_unref (cmdline); // this releases the application
--   
--     return G_SOURCE_REMOVE;
--   }
--   
--   static int
--   command_line (GApplication            *application,
--                 GApplicationCommandLine *cmdline)
--   {
--     // keep the application running until we are done with this commandline
--     g_application_hold (application);
--   
--     g_object_set_data_full (G_OBJECT (cmdline),
--                             "application", application,
--                             (GDestroyNotify)g_application_release);
--   
--     g_object_ref (cmdline);
--     g_idle_add (my_cmdline_handler, cmdline);
--   
--     return 0;
--   }
--   </pre>
--   
--   In this example the commandline is not completely handled before the
--   <a>Application::commandLine</a> handler returns. Instead, we keep a
--   reference to the <tt>GApplicationCommandLine</tt> object and handle it
--   later (in this example, in an idle). Note that it is necessary to hold
--   the application until you are done with the commandline.
--   
--   The complete example can be found here:
--   <a>gapplication-example-cmdline3.c</a>
module GI.Gio.Objects.ApplicationCommandLine

-- | Memory-managed wrapper type.
newtype ApplicationCommandLine
ApplicationCommandLine :: ManagedPtr ApplicationCommandLine -> ApplicationCommandLine

-- | Type class for types which can be safely cast to
--   <a>ApplicationCommandLine</a>, for instance with
--   <a>toApplicationCommandLine</a>.
class (GObject o, IsDescendantOf ApplicationCommandLine o) => IsApplicationCommandLine o

-- | Cast to <a>ApplicationCommandLine</a>, for types for which this is
--   known to be safe. For general casts, use <a>castTo</a>.
toApplicationCommandLine :: (MonadIO m, IsApplicationCommandLine o) => o -> m ApplicationCommandLine

-- | Creates a <a>File</a> corresponding to a filename that was given as
--   part of the invocation of <i><tt>cmdline</tt></i>.
--   
--   This differs from <a>fileNewForCommandlineArg</a> in that it resolves
--   relative pathnames using the current working directory of the invoking
--   process rather than the local process.
--   
--   <i>Since: 2.36</i>
applicationCommandLineCreateFileForArg :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> [Char] -> m File

-- | Signals that command line processing is completed.
--   
--   For remote invocation, it causes the invoking process to terminate.
--   
--   For local invocation, it does nothing.
--   
--   This method should be called in the <a>Application::commandLine</a>
--   handler, after the exit status is set and all messages are printed.
--   
--   After this call, <a>applicationCommandLineSetExitStatus</a> has no
--   effect. Subsequent calls to this method are no-ops.
--   
--   This method is automatically called when the
--   <a>ApplicationCommandLine</a> object is disposed — so you can omit the
--   call in non-garbage collected languages.
--   
--   <i>Since: 2.80</i>
applicationCommandLineDone :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m ()

-- | Gets the list of arguments that was passed on the command line.
--   
--   The strings in the array may contain non-UTF-8 data on UNIX (such as
--   filenames or arguments given in the system locale) but are always in
--   UTF-8 on Windows.
--   
--   If you wish to use the return value with <a>OptionContext</a>, you
--   must use <a>optionContextParseStrv</a>.
--   
--   The return value is <a>Nothing</a>-terminated and should be freed
--   using <a>strfreev</a>.
--   
--   <i>Since: 2.28</i>
applicationCommandLineGetArguments :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m [[Char]]

-- | Gets the working directory of the command line invocation. The string
--   may contain non-utf8 data.
--   
--   It is possible that the remote application did not send a working
--   directory, so this may be <a>Nothing</a>.
--   
--   The return value should not be modified or freed and is valid for as
--   long as <i><tt>cmdline</tt></i> exists.
--   
--   <i>Since: 2.28</i>
applicationCommandLineGetCwd :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m (Maybe [Char])

-- | Gets the contents of the 'environ' variable of the command line
--   invocation, as would be returned by <a>getEnviron</a>, ie as a
--   <a>Nothing</a>-terminated list of strings in the form 'NAME=VALUE'.
--   The strings may contain non-utf8 data.
--   
--   The remote application usually does not send an environment. Use
--   <a>ApplicationFlagsSendEnvironment</a> to affect that. Even with this
--   flag set it is possible that the environment is still not available
--   (due to invocation messages from other applications).
--   
--   The return value should not be modified or freed and is valid for as
--   long as <i><tt>cmdline</tt></i> exists.
--   
--   See <a>applicationCommandLineGetenv</a> if you are only interested in
--   the value of a single environment variable.
--   
--   <i>Since: 2.28</i>
applicationCommandLineGetEnviron :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m (Maybe [[Char]])

-- | Gets the exit status of <i><tt>cmdline</tt></i>. See
--   <a>applicationCommandLineSetExitStatus</a> for more information.
--   
--   <i>Since: 2.28</i>
applicationCommandLineGetExitStatus :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m Int32

-- | Determines if <i><tt>cmdline</tt></i> represents a remote invocation.
--   
--   <i>Since: 2.28</i>
applicationCommandLineGetIsRemote :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m Bool

-- | Gets the options that were passed to
--   <tt><i>g_application_command_line()</i></tt>.
--   
--   If you did not override <tt><i>local_command_line()</i></tt> then
--   these are the same options that were parsed according to the
--   <tt><i>GOptionEntrys</i></tt> added to the application with
--   <a>applicationAddMainOptionEntries</a> and possibly modified from your
--   GApplication<a>handleLocalOptions</a> handler.
--   
--   If no options were sent then an empty dictionary is returned so that
--   you don't need to check for <a>Nothing</a>.
--   
--   The data has been passed via an untrusted external process, so the
--   types of all values must be checked before being used.
--   
--   <i>Since: 2.40</i>
applicationCommandLineGetOptionsDict :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m VariantDict

-- | Gets the platform data associated with the invocation of
--   <i><tt>cmdline</tt></i>.
--   
--   This is a <a>GVariant</a> dictionary containing information about the
--   context in which the invocation occurred. It typically contains
--   information like the current working directory and the startup
--   notification ID.
--   
--   It comes from an untrusted external process and hence the types of all
--   values must be validated before being used.
--   
--   For local invocation, it will be <a>Nothing</a>.
--   
--   <i>Since: 2.28</i>
applicationCommandLineGetPlatformData :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m (Maybe GVariant)

-- | Gets the stdin of the invoking process.
--   
--   The <a>InputStream</a> can be used to read data passed to the standard
--   input of the invoking process. This doesn't work on all platforms.
--   Presently, it is only available on UNIX when using a D-Bus daemon
--   capable of passing file descriptors. If stdin is not available then
--   <a>Nothing</a> will be returned. In the future, support may be
--   expanded to other platforms.
--   
--   You must only call this function once per commandline invocation.
--   
--   <i>Since: 2.34</i>
applicationCommandLineGetStdin :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m (Maybe InputStream)

-- | Gets the value of a particular environment variable of the command
--   line invocation, as would be returned by <a>getenv</a>. The strings
--   may contain non-utf8 data.
--   
--   The remote application usually does not send an environment. Use
--   <a>ApplicationFlagsSendEnvironment</a> to affect that. Even with this
--   flag set it is possible that the environment is still not available
--   (due to invocation messages from other applications).
--   
--   The return value should not be modified or freed and is valid for as
--   long as <i><tt>cmdline</tt></i> exists.
--   
--   <i>Since: 2.28</i>
applicationCommandLineGetenv :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> [Char] -> m (Maybe Text)

-- | Prints a message using the stdout print handler in the invoking
--   process.
--   
--   Unlike <tt><i>g_application_command_line_print()</i></tt>,
--   <i><tt>message</tt></i> is not a <tt>printf()</tt>-style format
--   string. Use this function if <i><tt>message</tt></i> contains text you
--   don't have control over, that could include <tt>printf()</tt> escape
--   sequences.
--   
--   <i>Since: 2.80</i>
applicationCommandLinePrintLiteral :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Text -> m ()

-- | Prints a message using the stderr print handler in the invoking
--   process.
--   
--   Unlike <tt><i>g_application_command_line_printerr()</i></tt>,
--   <i><tt>message</tt></i> is not a <tt>printf()</tt>-style format
--   string. Use this function if <i><tt>message</tt></i> contains text you
--   don't have control over, that could include <tt>printf()</tt> escape
--   sequences.
--   
--   <i>Since: 2.80</i>
applicationCommandLinePrinterrLiteral :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Text -> m ()

-- | Sets the exit status that will be used when the invoking process
--   exits.
--   
--   The return value of the <a>Application::commandLine</a> signal is
--   passed to this function when the handler returns. This is the usual
--   way of setting the exit status.
--   
--   In the event that you want the remote invocation to continue running
--   and want to decide on the exit status in the future, you can use this
--   call. For the case of a remote invocation, the remote process will
--   typically exit when the last reference is dropped on
--   <i><tt>cmdline</tt></i>. The exit status of the remote process will be
--   equal to the last value that was set with this function.
--   
--   In the case that the commandline invocation is local, the situation is
--   slightly more complicated. If the commandline invocation results in
--   the mainloop running (ie: because the use-count of the application
--   increased to a non-zero value) then the application is considered to
--   have been 'successful' in a certain sense, and the exit status is
--   always zero. If the application use count is zero, though, the exit
--   status of the local <a>ApplicationCommandLine</a> is used.
--   
--   This method is a no-op if <a>applicationCommandLineDone</a> has been
--   called.
--   
--   <i>Since: 2.28</i>
applicationCommandLineSetExitStatus :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Int32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>arguments</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructApplicationCommandLineArguments :: (IsApplicationCommandLine o, MonadIO m) => GVariant -> m (GValueConstruct o)

-- | Get the value of the “<tt>is-remote</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> applicationCommandLine #isRemote
--   </pre>
getApplicationCommandLineIsRemote :: (MonadIO m, IsApplicationCommandLine o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>options</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructApplicationCommandLineOptions :: (IsApplicationCommandLine o, MonadIO m) => GVariant -> m (GValueConstruct o)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>platform-data</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructApplicationCommandLinePlatformData :: (IsApplicationCommandLine o, MonadIO m) => GVariant -> m (GValueConstruct o)
instance GHC.Classes.Eq GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine o) => GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine


-- | <tt>GApplication</tt> is the core class for application support.
--   
--   A <tt>GApplication</tt> is the foundation of an application. It wraps
--   some low-level platform-specific services and is intended to act as
--   the foundation for higher-level application classes such as
--   <tt>GtkApplication</tt> or <tt>MxApplication</tt>. In general, you
--   should not use this class outside of a higher level framework.
--   
--   <tt>GApplication</tt> provides convenient life-cycle management by
--   maintaining a "use count" for the primary application instance. The
--   use count can be changed using <a>applicationHold</a> and
--   <a>applicationRelease</a>. If it drops to zero, the application exits.
--   Higher-level classes such as <tt>GtkApplication</tt> employ the use
--   count to ensure that the application stays alive as long as it has any
--   opened windows.
--   
--   Another feature that <tt>GApplication</tt> (optionally) provides is
--   process uniqueness. Applications can make use of this functionality by
--   providing a unique application ID. If given, only one application with
--   this ID can be running at a time per session. The session concept is
--   platform-dependent, but corresponds roughly to a graphical desktop
--   login. When your application is launched again, its arguments are
--   passed through platform communication to the already running program.
--   The already running instance of the program is called the "primary
--   instance"; for non-unique applications this is always the current
--   instance. On Linux, the D-Bus session bus is used for communication.
--   
--   The use of <tt>GApplication</tt> differs from some other commonly-used
--   uniqueness libraries (such as libunique) in important ways. The
--   application is not expected to manually register itself and check if
--   it is the primary instance. Instead, the <tt><i>main()</i></tt>
--   function of a <tt>GApplication</tt> should do very little more than
--   instantiating the application instance, possibly connecting signal
--   handlers, then calling <a>applicationRun</a>. All checks for
--   uniqueness are done internally. If the application is the primary
--   instance then the startup signal is emitted and the mainloop runs. If
--   the application is not the primary instance then a signal is sent to
--   the primary instance and <a>applicationRun</a> promptly returns. See
--   the code examples below.
--   
--   If used, the expected form of an application identifier is the same as
--   that of a <a>D-Bus well-known bus name</a>. Examples include:
--   <tt>com.example.MyApp</tt>,
--   <tt>org.example.internal_apps.Calculator</tt>,
--   <tt>org._7_zip.Archiver</tt>. For details on valid application
--   identifiers, see <a>applicationIdIsValid</a>.
--   
--   On Linux, the application identifier is claimed as a well-known bus
--   name on the user's session bus. This means that the uniqueness of your
--   application is scoped to the current session. It also means that your
--   application may provide additional services (through registration of
--   other object paths) at that bus name. The registration of these object
--   paths should be done with the shared GDBus session bus. Note that due
--   to the internal architecture of GDBus, method calls can be dispatched
--   at any time (even if a main loop is not running). For this reason, you
--   must ensure that any object paths that you wish to register are
--   registered before <a>Application</a> attempts to acquire the bus name
--   of your application (which happens in <a>applicationRegister</a>).
--   Unfortunately, this means that you cannot use
--   <a>Application:isRemote</a> to decide if you want to register object
--   paths.
--   
--   <tt>GApplication</tt> also implements the <a>ActionGroup</a> and
--   <a>ActionMap</a> interfaces and lets you easily export actions by
--   adding them with <a>actionMapAddAction</a>. When invoking an action by
--   calling <a>actionGroupActivateAction</a> on the application, it is
--   always invoked in the primary instance. The actions are also exported
--   on the session bus, and GIO provides the <a>DBusActionGroup</a>
--   wrapper to conveniently access them remotely. GIO provides a
--   <a>DBusMenuModel</a> wrapper for remote access to exported
--   <a>MenuModel</a>s.
--   
--   Note: Due to the fact that actions are exported on the session bus,
--   using <tt>maybe</tt> parameters is not supported, since D-Bus does not
--   support <tt>maybe</tt> types.
--   
--   There is a number of different entry points into a
--   <tt>GApplication</tt>:
--   
--   <ul>
--   <li>via 'Activate' (i.e. just starting the application)</li>
--   <li>via 'Open' (i.e. opening some files)</li>
--   <li>by handling a command-line</li>
--   <li>via activating an action</li>
--   </ul>
--   
--   The <a>Application::startup</a> signal lets you handle the application
--   initialization for all of these in a single place.
--   
--   Regardless of which of these entry points is used to start the
--   application, <tt>GApplication</tt> passes some ‘platform data’ from
--   the launching instance to the primary instance, in the form of a
--   <a>GVariant</a> dictionary mapping strings to variants. To use
--   platform data, override the
--   <a>Application</a>.<tt><i>before_emit</i></tt>() or
--   <a>Application</a>.<tt><i>after_emit</i></tt>() virtual functions in
--   your <tt>GApplication</tt> subclass. When dealing with
--   <a>ApplicationCommandLine</a> objects, the platform data is directly
--   available via <a>applicationCommandLineGetCwd</a>,
--   <a>applicationCommandLineGetEnviron</a> and
--   <a>applicationCommandLineGetPlatformData</a>.
--   
--   As the name indicates, the platform data may vary depending on the
--   operating system, but it always includes the current directory (key
--   <tt>cwd</tt>), and optionally the environment (ie the set of
--   environment variables and their values) of the calling process (key
--   <tt>environ</tt>). The environment is only added to the platform data
--   if the <tt>G_APPLICATION_SEND_ENVIRONMENT</tt> flag is set.
--   <tt>GApplication</tt> subclasses can add their own platform data by
--   overriding the <a>Application</a>.<tt><i>add_platform_data</i></tt>()
--   virtual function. For instance, <tt>GtkApplication</tt> adds startup
--   notification data in this way.
--   
--   To parse commandline arguments you may handle the
--   <a>Application::commandLine</a> signal or override the
--   <a>Application</a>.<tt><i>local_command_line</i></tt>() virtual
--   function, to parse them in either the primary instance or the local
--   instance, respectively.
--   
--   For an example of opening files with a <tt>GApplication</tt>, see
--   <a>gapplication-example-open.c</a>.
--   
--   For an example of using actions with <tt>GApplication</tt>, see
--   <a>gapplication-example-actions.c</a>.
--   
--   For an example of using extra D-Bus hooks with <tt>GApplication</tt>,
--   see <a>gapplication-example-dbushooks.c</a>.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Objects.Application

-- | Memory-managed wrapper type.
newtype Application
Application :: ManagedPtr Application -> Application

-- | Type class for types which can be safely cast to <a>Application</a>,
--   for instance with <a>toApplication</a>.
class (GObject o, IsDescendantOf Application o) => IsApplication o

-- | Cast to <a>Application</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toApplication :: (MonadIO m, IsApplication o) => o -> m Application

-- | Activates the application.
--   
--   In essence, this results in the <a>Application::activate</a> signal
--   being emitted in the primary instance.
--   
--   The application must be registered before calling this function.
--   
--   <i>Since: 2.28</i>
applicationActivate :: (HasCallStack, MonadIO m, IsApplication a) => a -> m ()

-- | Add an option to be handled by <i><tt>application</tt></i>.
--   
--   Calling this function is the equivalent of calling
--   <a>applicationAddMainOptionEntries</a> with a single
--   <a>OptionEntry</a> that has its arg_data member set to <a>Nothing</a>.
--   
--   The parsed arguments will be packed into a <a>VariantDict</a> which is
--   passed to <a>Application::handleLocalOptions</a>. If
--   <a>ApplicationFlagsHandlesCommandLine</a> is set, then it will also be
--   sent to the primary instance. See
--   <a>applicationAddMainOptionEntries</a> for more details.
--   
--   See <a>OptionEntry</a> for more documentation of the arguments.
--   
--   <i>Since: 2.42</i>
applicationAddMainOption :: (HasCallStack, MonadIO m, IsApplication a) => a -> Text -> Int8 -> [OptionFlags] -> OptionArg -> Text -> Maybe Text -> m ()

-- | Adds main option entries to be handled by <i><tt>application</tt></i>.
--   
--   This function is comparable to <a>optionContextAddMainEntries</a>.
--   
--   After the commandline arguments are parsed, the
--   <a>Application::handleLocalOptions</a> signal will be emitted. At this
--   point, the application can inspect the values pointed to by
--   <i><tt>argData</tt></i> in the given <tt><i>GOptionEntrys</i></tt>.
--   
--   Unlike <a>OptionContext</a>, <a>Application</a> supports giving a
--   <a>Nothing</a> <i><tt>argData</tt></i> for a non-callback
--   <a>OptionEntry</a>. This results in the argument in question being
--   packed into a <a>VariantDict</a> which is also passed to
--   <a>Application::handleLocalOptions</a>, where it can be inspected and
--   modified. If <a>ApplicationFlagsHandlesCommandLine</a> is set, then
--   the resulting dictionary is sent to the primary instance, where
--   <a>applicationCommandLineGetOptionsDict</a> will return it. As it has
--   been passed outside the process at this point, the types of all values
--   in the options dict must be checked before being used. This "packing"
--   is done according to the type of the argument -- booleans for normal
--   flags, strings for strings, bytestrings for filenames, etc. The
--   packing only occurs if the flag is given (ie: we do not pack a "false"
--   <a>GVariant</a> in the case that a flag is missing).
--   
--   In general, it is recommended that all commandline arguments are
--   parsed locally. The options dictionary should then be used to transmit
--   the result of the parsing to the primary instance, where
--   <tt><i>g_variant_dict_lookup()</i></tt> can be used. For local
--   options, it is possible to either use <i><tt>argData</tt></i> in the
--   usual way, or to consult (and potentially remove) the option from the
--   options dictionary.
--   
--   This function is new in GLib 2.40. Before then, the only real choice
--   was to send all of the commandline arguments (options and all) to the
--   primary instance for handling. <a>Application</a> ignored them
--   completely on the local side. Calling this function "opts in" to the
--   new behaviour, and in particular, means that unrecognized options will
--   be treated as errors. Unrecognized options have never been ignored
--   when <a>ApplicationFlagsHandlesCommandLine</a> is unset.
--   
--   If <a>Application::handleLocalOptions</a> needs to see the list of
--   filenames, then the use of <a>OPTION_REMAINING</a> is recommended. If
--   <i><tt>argData</tt></i> is <a>Nothing</a> then <a>OPTION_REMAINING</a>
--   can be used as a key into the options dictionary. If you do use
--   <a>OPTION_REMAINING</a> then you need to handle these arguments for
--   yourself because once they are consumed, they will no longer be
--   visible to the default handling (which treats them as filenames to be
--   opened).
--   
--   It is important to use the proper GVariant format when retrieving the
--   options with <tt><i>g_variant_dict_lookup()</i></tt>: * for
--   <a>OptionArgNone</a>, use <tt>b</tt> * for <a>OptionArgString</a>, use
--   <tt>&amp;s</tt> * for <a>OptionArgInt</a>, use <tt>i</tt> * for
--   <a>OptionArgInt64</a>, use <tt>x</tt> * for <a>OptionArgDouble</a>,
--   use <tt>d</tt> * for <a>OptionArgFilename</a>, use <tt>^&amp;ay</tt> *
--   for <a>OptionArgStringArray</a>, use <tt>^a&amp;s</tt> * for
--   <a>OptionArgFilenameArray</a>, use <tt>^a&amp;ay</tt>
--   
--   <i>Since: 2.40</i>
applicationAddMainOptionEntries :: (HasCallStack, MonadIO m, IsApplication a) => a -> [OptionEntry] -> m ()

-- | Adds a <a>OptionGroup</a> to the commandline handling of
--   <i><tt>application</tt></i>.
--   
--   This function is comparable to <a>optionContextAddGroup</a>.
--   
--   Unlike <a>applicationAddMainOptionEntries</a>, this function does not
--   deal with <a>Nothing</a> <i><tt>argData</tt></i> and never transmits
--   options to the primary instance.
--   
--   The reason for that is because, by the time the options arrive at the
--   primary instance, it is typically too late to do anything with them.
--   Taking the GTK option group as an example: GTK will already have been
--   initialised by the time the <a>Application::commandLine</a> handler
--   runs. In the case that this is not the first-running instance of the
--   application, the existing instance may already have been running for a
--   very long time.
--   
--   This means that the options from <a>OptionGroup</a> are only really
--   usable in the case that the instance of the application being run is
--   the first instance. Passing options like <tt>--display=</tt> or
--   <tt>--gdk-debug=</tt> on future runs will have no effect on the
--   existing primary instance.
--   
--   Calling this function will cause the options in the supplied option
--   group to be parsed, but it does not cause you to be "opted in" to the
--   new functionality whereby unrecognized options are rejected even if
--   <a>ApplicationFlagsHandlesCommandLine</a> was given.
--   
--   <i>Since: 2.40</i>
applicationAddOptionGroup :: (HasCallStack, MonadIO m, IsApplication a) => a -> OptionGroup -> m ()

-- | Marks <i><tt>application</tt></i> as busy (see
--   <a>applicationMarkBusy</a>) while <i><tt>property</tt></i> on
--   <i><tt>object</tt></i> is <a>True</a>.
--   
--   The binding holds a reference to <i><tt>application</tt></i> while it
--   is active, but not to <i><tt>object</tt></i>. Instead, the binding is
--   destroyed when <i><tt>object</tt></i> is finalized.
--   
--   <i>Since: 2.44</i>
applicationBindBusyProperty :: (HasCallStack, MonadIO m, IsApplication a, IsObject b) => a -> b -> Text -> m ()

-- | Gets the unique identifier for <i><tt>application</tt></i>.
--   
--   <i>Since: 2.28</i>
applicationGetApplicationId :: (HasCallStack, MonadIO m, IsApplication a) => a -> m (Maybe Text)

-- | Gets the <a>DBusConnection</a> being used by the application, or
--   <a>Nothing</a>.
--   
--   If <a>Application</a> is using its D-Bus backend then this function
--   will return the <a>DBusConnection</a> being used for uniqueness and
--   communication with the desktop environment and other instances of the
--   application.
--   
--   If <a>Application</a> is not using D-Bus then this function will
--   return <a>Nothing</a>. This includes the situation where the D-Bus
--   backend would normally be in use but we were unable to connect to the
--   bus.
--   
--   This function must not be called before the application has been
--   registered. See <a>applicationGetIsRegistered</a>.
--   
--   <i>Since: 2.34</i>
applicationGetDbusConnection :: (HasCallStack, MonadIO m, IsApplication a) => a -> m (Maybe DBusConnection)

-- | Gets the D-Bus object path being used by the application, or
--   <a>Nothing</a>.
--   
--   If <a>Application</a> is using its D-Bus backend then this function
--   will return the D-Bus object path that <a>Application</a> is using. If
--   the application is the primary instance then there is an object
--   published at this path. If the application is not the primary instance
--   then the result of this function is undefined.
--   
--   If <a>Application</a> is not using D-Bus then this function will
--   return <a>Nothing</a>. This includes the situation where the D-Bus
--   backend would normally be in use but we were unable to connect to the
--   bus.
--   
--   This function must not be called before the application has been
--   registered. See <a>applicationGetIsRegistered</a>.
--   
--   <i>Since: 2.34</i>
applicationGetDbusObjectPath :: (HasCallStack, MonadIO m, IsApplication a) => a -> m (Maybe Text)

-- | Returns the default <a>Application</a> instance for this process.
--   
--   Normally there is only one <a>Application</a> per process and it
--   becomes the default when it is created. You can exercise more control
--   over this by using <a>applicationSetDefault</a>.
--   
--   If there is no default application then <a>Nothing</a> is returned.
--   
--   <i>Since: 2.32</i>
applicationGetDefault :: (HasCallStack, MonadIO m) => m (Maybe Application)

-- | Gets the flags for <i><tt>application</tt></i>.
--   
--   See <a>ApplicationFlags</a>.
--   
--   <i>Since: 2.28</i>
applicationGetFlags :: (HasCallStack, MonadIO m, IsApplication a) => a -> m [ApplicationFlags]

-- | Gets the current inactivity timeout for the application.
--   
--   This is the amount of time (in milliseconds) after the last call to
--   <a>applicationRelease</a> before the application stops running.
--   
--   <i>Since: 2.28</i>
applicationGetInactivityTimeout :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Word32

-- | Gets the application's current busy state, as set through
--   <a>applicationMarkBusy</a> or <a>applicationBindBusyProperty</a>.
--   
--   <i>Since: 2.44</i>
applicationGetIsBusy :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Bool

-- | Checks if <i><tt>application</tt></i> is registered.
--   
--   An application is registered if <a>applicationRegister</a> has been
--   successfully called.
--   
--   <i>Since: 2.28</i>
applicationGetIsRegistered :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Bool

-- | Checks if <i><tt>application</tt></i> is remote.
--   
--   If <i><tt>application</tt></i> is remote then it means that another
--   instance of application already exists (the 'primary' instance). Calls
--   to perform actions on <i><tt>application</tt></i> will result in the
--   actions being performed by the primary instance.
--   
--   The value of this property cannot be accessed before
--   <a>applicationRegister</a> has been called. See
--   <a>applicationGetIsRegistered</a>.
--   
--   <i>Since: 2.28</i>
applicationGetIsRemote :: (HasCallStack, MonadIO m, IsApplication a) => a -> m Bool

-- | Gets the resource base path of <i><tt>application</tt></i>.
--   
--   See <a>applicationSetResourceBasePath</a> for more information.
--   
--   <i>Since: 2.42</i>
applicationGetResourceBasePath :: (HasCallStack, MonadIO m, IsApplication a) => a -> m (Maybe Text)

-- | Gets the version of <i><tt>application</tt></i>.
--   
--   <i>Since: 2.80</i>
applicationGetVersion :: (HasCallStack, MonadIO m, IsApplication a) => a -> m (Maybe Text)

-- | Increases the use count of <i><tt>application</tt></i>.
--   
--   Use this function to indicate that the application has a reason to
--   continue to run. For example, <a>applicationHold</a> is called by GTK
--   when a toplevel window is on the screen.
--   
--   To cancel the hold, call <a>applicationRelease</a>.
applicationHold :: (HasCallStack, MonadIO m, IsApplication a) => a -> m ()

-- | Checks if <i><tt>applicationId</tt></i> is a valid application
--   identifier.
--   
--   A valid ID is required for calls to <a>applicationNew</a> and
--   <a>applicationSetApplicationId</a>.
--   
--   Application identifiers follow the same format as <a>D-Bus well-known
--   bus names</a>. For convenience, the restrictions on application
--   identifiers are reproduced here:
--   
--   <ul>
--   <li>Application identifiers are composed of 1 or more elements
--   separated by a period (<tt>.</tt>) character. All elements must
--   contain at least one character.</li>
--   <li>Each element must only contain the ASCII characters
--   <tt>[A-Z][a-z][0-9]_-</tt>, with <tt>-</tt> discouraged in new
--   application identifiers. Each element must not begin with a
--   digit.</li>
--   <li>Application identifiers must contain at least one <tt>.</tt>
--   (period) character (and thus at least two elements).</li>
--   <li>Application identifiers must not begin with a <tt>.</tt> (period)
--   character.</li>
--   <li>Application identifiers must not exceed 255 characters.</li>
--   </ul>
--   
--   Note that the hyphen (<tt>-</tt>) character is allowed in application
--   identifiers, but is problematic or not allowed in various
--   specifications and APIs that refer to D-Bus, such as <a>Flatpak
--   application IDs</a>, the <a>`DBusActivatable` interface in the Desktop
--   Entry Specification</a>, and the convention that an application's
--   "main" interface and object path resemble its application identifier
--   and bus name. To avoid situations that require special-case handling,
--   it is recommended that new application identifiers consistently
--   replace hyphens with underscores.
--   
--   Like D-Bus interface names, application identifiers should start with
--   the reversed DNS domain name of the author of the interface (in
--   lower-case), and it is conventional for the rest of the application
--   identifier to consist of words run together, with initial capital
--   letters.
--   
--   As with D-Bus interface names, if the author's DNS domain name
--   contains hyphen/minus characters they should be replaced by
--   underscores, and if it contains leading digits they should be escaped
--   by prepending an underscore. For example, if the owner of 7-zip.org
--   used an application identifier for an archiving application, it might
--   be named <tt>org._7_zip.Archiver</tt>.
applicationIdIsValid :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Increases the busy count of <i><tt>application</tt></i>.
--   
--   Use this function to indicate that the application is busy, for
--   instance while a long running operation is pending.
--   
--   The busy state will be exposed to other processes, so a session shell
--   will use that information to indicate the state to the user (e.g. with
--   a spinner).
--   
--   To cancel the busy indication, use <a>applicationUnmarkBusy</a>.
--   
--   The application must be registered before calling this function.
--   
--   <i>Since: 2.38</i>
applicationMarkBusy :: (HasCallStack, MonadIO m, IsApplication a) => a -> m ()

-- | Creates a new <a>Application</a> instance.
--   
--   If non-<a>Nothing</a>, the application id must be valid. See
--   <a>applicationIdIsValid</a>.
--   
--   If no application ID is given then some features of <a>Application</a>
--   (most notably application uniqueness) will be disabled.
applicationNew :: (HasCallStack, MonadIO m) => Maybe Text -> [ApplicationFlags] -> m (Maybe Application)

-- | Opens the given files.
--   
--   In essence, this results in the <a>Application::open</a> signal being
--   emitted in the primary instance.
--   
--   <i><tt>nFiles</tt></i> must be greater than zero.
--   
--   <i><tt>hint</tt></i> is simply passed through to the <a>open</a>
--   signal. It is intended to be used by applications that have multiple
--   modes for opening files (eg: "view" vs "edit", etc). Unless you have a
--   need for this functionality, you should use "".
--   
--   The application must be registered before calling this function and it
--   must have the <a>ApplicationFlagsHandlesOpen</a> flag set.
--   
--   <i>Since: 2.28</i>
applicationOpen :: (HasCallStack, MonadIO m, IsApplication a) => a -> [File] -> Text -> m ()

-- | Immediately quits the application.
--   
--   Upon return to the mainloop, <a>applicationRun</a> will return,
--   calling only the 'shutdown' function before doing so.
--   
--   The hold count is ignored. Take care if your code has called
--   <a>applicationHold</a> on the application and is therefore still
--   expecting it to exist. (Note that you may have called
--   <a>applicationHold</a> indirectly, for example through
--   <tt><i>gtk_application_add_window()</i></tt>.)
--   
--   The result of calling <a>applicationRun</a> again after it returns is
--   unspecified.
--   
--   <i>Since: 2.32</i>
applicationQuit :: (HasCallStack, MonadIO m, IsApplication a) => a -> m ()

-- | Attempts registration of the application.
--   
--   This is the point at which the application discovers if it is the
--   primary instance or merely acting as a remote for an already-existing
--   primary instance. This is implemented by attempting to acquire the
--   application identifier as a unique bus name on the session bus using
--   GDBus.
--   
--   If there is no application ID or if <a>ApplicationFlagsNonUnique</a>
--   was given, then this process will always become the primary instance.
--   
--   Due to the internal architecture of GDBus, method calls can be
--   dispatched at any time (even if a main loop is not running). For this
--   reason, you must ensure that any object paths that you wish to
--   register are registered before calling this function.
--   
--   If the application has already been registered then <a>True</a> is
--   returned with no work performed.
--   
--   The <a>Application::startup</a> signal is emitted if registration
--   succeeds and <i><tt>application</tt></i> is the primary instance
--   (including the non-unique case).
--   
--   In the event of an error (such as <i><tt>cancellable</tt></i> being
--   cancelled, or a failure to connect to the session bus), <a>False</a>
--   is returned and <i><tt>error</tt></i> is set appropriately.
--   
--   Note: the return value of this function is not an indicator that this
--   instance is or is not the primary instance of the application. See
--   <a>applicationGetIsRemote</a> for that.
--   
--   <i>Since: 2.28</i>
applicationRegister :: (HasCallStack, MonadIO m, IsApplication a, IsCancellable b) => a -> Maybe b -> m ()

-- | Decrease the use count of <i><tt>application</tt></i>.
--   
--   When the use count reaches zero, the application will stop running.
--   
--   Never call this function except to cancel the effect of a previous
--   call to <a>applicationHold</a>.
applicationRelease :: (HasCallStack, MonadIO m, IsApplication a) => a -> m ()

-- | Runs the application.
--   
--   This function is intended to be run from <tt><i>main()</i></tt> and
--   its return value is intended to be returned by <tt><i>main()</i></tt>.
--   Although you are expected to pass the <i><tt>argc</tt></i>,
--   <i><tt>argv</tt></i> parameters from <tt><i>main()</i></tt> to this
--   function, it is possible to pass <a>Nothing</a> if
--   <i><tt>argv</tt></i> is not available or commandline handling is not
--   required. Note that on Windows, <i><tt>argc</tt></i> and
--   <i><tt>argv</tt></i> are ignored, and
--   <tt><i>g_win32_get_command_line()</i></tt> is called internally (for
--   proper support of Unicode commandline arguments).
--   
--   <a>Application</a> will attempt to parse the commandline arguments.
--   You can add commandline flags to the list of recognised options by way
--   of <a>applicationAddMainOptionEntries</a>. After this, the
--   <a>Application::handleLocalOptions</a> signal is emitted, from which
--   the application can inspect the values of its
--   <tt><i>GOptionEntrys</i></tt>.
--   
--   <a>Application::handleLocalOptions</a> is a good place to handle
--   options such as <tt>--version</tt>, where an immediate reply from the
--   local process is desired (instead of communicating with an
--   already-running instance). A <a>Application::handleLocalOptions</a>
--   handler can stop further processing by returning a non-negative value,
--   which then becomes the exit status of the process.
--   
--   What happens next depends on the flags: if
--   <a>ApplicationFlagsHandlesCommandLine</a> was specified then the
--   remaining commandline arguments are sent to the primary instance,
--   where a <a>Application::commandLine</a> signal is emitted. Otherwise,
--   the remaining commandline arguments are assumed to be a list of files.
--   If there are no files listed, the application is activated via the
--   <a>Application::activate</a> signal. If there are one or more files,
--   and <a>ApplicationFlagsHandlesOpen</a> was specified then the files
--   are opened via the <a>Application::open</a> signal.
--   
--   If you are interested in doing more complicated local handling of the
--   commandline then you should implement your own <a>Application</a>
--   subclass and override <tt><i>local_command_line()</i></tt>. In this
--   case, you most likely want to return <a>True</a> from your
--   <tt><i>local_command_line()</i></tt> implementation to suppress the
--   default handling. See
--   [gapplication-example-cmdline2.c][https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c]
--   for an example.
--   
--   If, after the above is done, the use count of the application is zero
--   then the exit status is returned immediately. If the use count is
--   non-zero then the default main context is iterated until the use count
--   falls to zero, at which point 0 is returned.
--   
--   If the <a>ApplicationFlagsIsService</a> flag is set, then the service
--   will run for as much as 10 seconds with a use count of zero while
--   waiting for the message that caused the activation to arrive. After
--   that, if the use count falls to zero the application will exit
--   immediately, except in the case that
--   <a>applicationSetInactivityTimeout</a> is in use.
--   
--   This function sets the prgname (<a>setPrgname</a>), if not already
--   set, to the basename of argv[0].
--   
--   Much like <a>mainLoopRun</a>, this function will acquire the main
--   context for the duration that the application is running.
--   
--   Since 2.40, applications that are not explicitly flagged as services
--   or launchers (ie: neither <a>ApplicationFlagsIsService</a> or
--   <a>ApplicationFlagsIsLauncher</a> are given as flags) will check (from
--   the default handler for local_command_line) if
--   "--gapplication-service" was given in the command line. If this flag
--   is present then normal commandline processing is interrupted and the
--   <a>ApplicationFlagsIsService</a> flag is set. This provides a
--   "compromise" solution whereby running an application directly from the
--   commandline will invoke it in the normal way (which can be useful for
--   debugging) while still allowing applications to be D-Bus activated in
--   service mode. The D-Bus service file should invoke the executable with
--   "--gapplication-service" as the sole commandline argument. This
--   approach is suitable for use by most graphical applications but should
--   not be used from applications like editors that need precise control
--   over when processes invoked via the commandline will exit and what
--   their exit status will be.
--   
--   <i>Since: 2.28</i>
applicationRun :: (HasCallStack, MonadIO m, IsApplication a) => a -> Maybe [[Char]] -> m Int32

-- | Sends a notification on behalf of <i><tt>application</tt></i> to the
--   desktop shell. There is no guarantee that the notification is
--   displayed immediately, or even at all.
--   
--   Notifications may persist after the application exits. It will be
--   D-Bus-activated when the notification or one of its actions is
--   activated.
--   
--   Modifying <i><tt>notification</tt></i> after this call has no effect.
--   However, the object can be reused for a later call to this function.
--   
--   <i><tt>id</tt></i> may be any string that uniquely identifies the
--   event for the application. It does not need to be in any special
--   format. For example, "new-message" might be appropriate for a
--   notification about new messages.
--   
--   If a previous notification was sent with the same <i><tt>id</tt></i>,
--   it will be replaced with <i><tt>notification</tt></i> and shown again
--   as if it was a new notification. This works even for notifications
--   sent from a previous execution of the application, as long as
--   <i><tt>id</tt></i> is the same string.
--   
--   <i><tt>id</tt></i> may be <tt>NULL</tt>, but it is impossible to
--   replace or withdraw notifications without an id.
--   
--   If <i><tt>notification</tt></i> is no longer relevant, it can be
--   withdrawn with <a>applicationWithdrawNotification</a>.
--   
--   It is an error to call this function if <i><tt>application</tt></i>
--   has no application ID.
--   
--   <i>Since: 2.40</i>
applicationSendNotification :: (HasCallStack, MonadIO m, IsApplication a, IsNotification b) => a -> Maybe Text -> b -> m ()

-- | This used to be how actions were associated with a <a>Application</a>.
--   Now there is <a>ActionMap</a> for that.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.32)Use the <a>ActionMap</a> interface
--   instead. Never evermix use of this API with use of <a>ActionMap</a> on
--   the same <i><tt>application</tt></i>or things will go very badly
--   wrong. This function is known tointroduce buggy behaviour (ie: signals
--   not emitted on changes to theaction group), so you should really use
--   <a>ActionMap</a> instead.</i>
applicationSetActionGroup :: (HasCallStack, MonadIO m, IsApplication a, IsActionGroup b) => a -> Maybe b -> m ()

-- | Sets the unique identifier for <i><tt>application</tt></i>.
--   
--   The application id can only be modified if <i><tt>application</tt></i>
--   has not yet been registered.
--   
--   If non-<a>Nothing</a>, the application id must be valid. See
--   <a>applicationIdIsValid</a>.
--   
--   <i>Since: 2.28</i>
applicationSetApplicationId :: (HasCallStack, MonadIO m, IsApplication a) => a -> Maybe Text -> m ()

-- | Sets or unsets the default application for the process, as returned by
--   <a>applicationGetDefault</a>.
--   
--   This function does not take its own reference on
--   <i><tt>application</tt></i>. If <i><tt>application</tt></i> is
--   destroyed then the default application will revert back to
--   <a>Nothing</a>.
--   
--   <i>Since: 2.32</i>
applicationSetDefault :: (HasCallStack, MonadIO m, IsApplication a) => Maybe a -> m ()

-- | Sets the flags for <i><tt>application</tt></i>.
--   
--   The flags can only be modified if <i><tt>application</tt></i> has not
--   yet been registered.
--   
--   See <a>ApplicationFlags</a>.
--   
--   <i>Since: 2.28</i>
applicationSetFlags :: (HasCallStack, MonadIO m, IsApplication a) => a -> [ApplicationFlags] -> m ()

-- | Sets the current inactivity timeout for the application.
--   
--   This is the amount of time (in milliseconds) after the last call to
--   <a>applicationRelease</a> before the application stops running.
--   
--   This call has no side effects of its own. The value set here is only
--   used for next time <a>applicationRelease</a> drops the use count to
--   zero. Any timeouts currently in progress are not impacted.
--   
--   <i>Since: 2.28</i>
applicationSetInactivityTimeout :: (HasCallStack, MonadIO m, IsApplication a) => a -> Word32 -> m ()

-- | Adds a description to the <i><tt>application</tt></i> option context.
--   
--   See <a>optionContextSetDescription</a> for more information.
--   
--   <i>Since: 2.56</i>
applicationSetOptionContextDescription :: (HasCallStack, MonadIO m, IsApplication a) => a -> Maybe Text -> m ()

-- | Sets the parameter string to be used by the commandline handling of
--   <i><tt>application</tt></i>.
--   
--   This function registers the argument to be passed to
--   <tt><i>g_option_context_new()</i></tt> when the internal
--   <a>OptionContext</a> of <i><tt>application</tt></i> is created.
--   
--   See <tt><i>g_option_context_new()</i></tt> for more information about
--   <i><tt>parameterString</tt></i>.
--   
--   <i>Since: 2.56</i>
applicationSetOptionContextParameterString :: (HasCallStack, MonadIO m, IsApplication a) => a -> Maybe Text -> m ()

-- | Adds a summary to the <i><tt>application</tt></i> option context.
--   
--   See <a>optionContextSetSummary</a> for more information.
--   
--   <i>Since: 2.56</i>
applicationSetOptionContextSummary :: (HasCallStack, MonadIO m, IsApplication a) => a -> Maybe Text -> m ()

-- | Sets (or unsets) the base resource path of
--   <i><tt>application</tt></i>.
--   
--   The path is used to automatically load various [application
--   resources]t<a>Resource</a> such as menu layouts and action
--   descriptions. The various types of resources will be found at fixed
--   names relative to the given base path.
--   
--   By default, the resource base path is determined from the application
--   ID by prefixing '/' and replacing each '.' with '/'. This is done at
--   the time that the <a>Application</a> object is constructed. Changes to
--   the application ID after that point will not have an impact on the
--   resource base path.
--   
--   As an example, if the application has an ID of "org.example.app" then
--   the default resource base path will be "/org/example/app". If this is
--   a <tt><i>GtkApplication</i></tt> (and you have not manually changed
--   the path) then Gtk will then search for the menus of the application
--   at "/org/example/app/gtk/menus.ui".
--   
--   See <a>Resource</a> for more information about adding resources to
--   your application.
--   
--   You can disable automatic resource loading functionality by setting
--   the path to <a>Nothing</a>.
--   
--   Changing the resource base path once the application is running is not
--   recommended. The point at which the resource path is consulted for
--   forming paths for various purposes is unspecified. When writing a
--   sub-class of <a>Application</a> you should either set the
--   <a>Application:resourceBasePath</a> property at construction time, or
--   call this function during the instance initialization. Alternatively,
--   you can call this function in the
--   <a>ApplicationClass</a>.<tt><i>startup</i></tt> virtual function,
--   before chaining up to the parent implementation.
--   
--   <i>Since: 2.42</i>
applicationSetResourceBasePath :: (HasCallStack, MonadIO m, IsApplication a) => a -> Maybe Text -> m ()

-- | Sets the version number of <i><tt>application</tt></i>. This will be
--   used to implement a <tt>--version</tt> command line argument
--   
--   The application version can only be modified if
--   <i><tt>application</tt></i> has not yet been registered.
--   
--   <i>Since: 2.80</i>
applicationSetVersion :: (HasCallStack, MonadIO m, IsApplication a) => a -> Text -> m ()

-- | Destroys a binding between <i><tt>property</tt></i> and the busy state
--   of <i><tt>application</tt></i> that was previously created with
--   <a>applicationBindBusyProperty</a>.
--   
--   <i>Since: 2.44</i>
applicationUnbindBusyProperty :: (HasCallStack, MonadIO m, IsApplication a, IsObject b) => a -> b -> Text -> m ()

-- | Decreases the busy count of <i><tt>application</tt></i>.
--   
--   When the busy count reaches zero, the new state will be propagated to
--   other processes.
--   
--   This function must only be called to cancel the effect of a previous
--   call to <a>applicationMarkBusy</a>.
--   
--   <i>Since: 2.38</i>
applicationUnmarkBusy :: (HasCallStack, MonadIO m, IsApplication a) => a -> m ()

-- | Withdraws a notification that was sent with
--   <a>applicationSendNotification</a>.
--   
--   This call does nothing if a notification with <i><tt>id</tt></i>
--   doesn't exist or the notification was never sent.
--   
--   This function works even for notifications sent in previous executions
--   of this application, as long <i><tt>id</tt></i> is the same as it was
--   for the sent notification.
--   
--   Note that notifications are dismissed when the user clicks on one of
--   the buttons in a notification or triggers its default action, so there
--   is no need to explicitly withdraw the notification in that case.
--   
--   <i>Since: 2.40</i>
applicationWithdrawNotification :: (HasCallStack, MonadIO m, IsApplication a) => a -> Text -> m ()

-- | Set the value of the “<tt>action-group</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #actionGroup
--   </pre>
clearApplicationActionGroup :: (MonadIO m, IsApplication o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>action-group</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructApplicationActionGroup :: (IsApplication o, MonadIO m, IsActionGroup a) => a -> m (GValueConstruct o)

-- | Set the value of the “<tt>action-group</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> application [ #actionGroup <a>:=</a> value ]
--   </pre>
setApplicationActionGroup :: (MonadIO m, IsApplication o, IsActionGroup a) => o -> a -> m ()

-- | Set the value of the “<tt>application-id</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #applicationId
--   </pre>
clearApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>application-id</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructApplicationApplicationId :: (IsApplication o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>application-id</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #applicationId
--   </pre>
getApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>application-id</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> application [ #applicationId <a>:=</a> value ]
--   </pre>
setApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>flags</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructApplicationFlags :: (IsApplication o, MonadIO m) => [ApplicationFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #flags
--   </pre>
getApplicationFlags :: (MonadIO m, IsApplication o) => o -> m [ApplicationFlags]

-- | Set the value of the “<tt>flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> application [ #flags <a>:=</a> value ]
--   </pre>
setApplicationFlags :: (MonadIO m, IsApplication o) => o -> [ApplicationFlags] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>inactivity-timeout</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructApplicationInactivityTimeout :: (IsApplication o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>inactivity-timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #inactivityTimeout
--   </pre>
getApplicationInactivityTimeout :: (MonadIO m, IsApplication o) => o -> m Word32

-- | Set the value of the “<tt>inactivity-timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> application [ #inactivityTimeout <a>:=</a> value ]
--   </pre>
setApplicationInactivityTimeout :: (MonadIO m, IsApplication o) => o -> Word32 -> m ()

-- | Get the value of the “<tt>is-busy</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #isBusy
--   </pre>
getApplicationIsBusy :: (MonadIO m, IsApplication o) => o -> m Bool

-- | Get the value of the “<tt>is-registered</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #isRegistered
--   </pre>
getApplicationIsRegistered :: (MonadIO m, IsApplication o) => o -> m Bool

-- | Get the value of the “<tt>is-remote</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #isRemote
--   </pre>
getApplicationIsRemote :: (MonadIO m, IsApplication o) => o -> m Bool

-- | Set the value of the “<tt>resource-base-path</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #resourceBasePath
--   </pre>
clearApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>resource-base-path</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructApplicationResourceBasePath :: (IsApplication o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>resource-base-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #resourceBasePath
--   </pre>
getApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>resource-base-path</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> application [ #resourceBasePath <a>:=</a> value ]
--   </pre>
setApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>version</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructApplicationVersion :: (IsApplication o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>version</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> application #version
--   </pre>
getApplicationVersion :: (MonadIO m, IsApplication o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>version</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> application [ #version <a>:=</a> value ]
--   </pre>
setApplicationVersion :: (MonadIO m, IsApplication o) => o -> Text -> m ()

-- | The <a>activate</a> signal is emitted on the primary instance when an
--   activation occurs. See <a>applicationActivate</a>.
type ApplicationActivateCallback = IO ()

-- | Connect a signal handler for the <a>activate</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> application #activate callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterApplicationActivate :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationActivateCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>activate</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> application #activate callback
--   </pre>
onApplicationActivate :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationActivateCallback) -> m SignalHandlerId

-- | The <a>commandLine</a> signal is emitted on the primary instance when
--   a commandline is not handled locally. See <a>applicationRun</a> and
--   the <a>ApplicationCommandLine</a> documentation for more information.
type ApplicationCommandLineCallback = ApplicationCommandLine -> IO Int32

-- | Connect a signal handler for the <a>commandLine</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> application #commandLine callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterApplicationCommandLine :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationCommandLineCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>commandLine</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> application #commandLine callback
--   </pre>
onApplicationCommandLine :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationCommandLineCallback) -> m SignalHandlerId

-- | The <a>handleLocalOptions</a> signal is emitted on the local instance
--   after the parsing of the commandline options has occurred.
--   
--   You can add options to be recognised during commandline option parsing
--   using <a>applicationAddMainOptionEntries</a> and
--   <a>applicationAddOptionGroup</a>.
--   
--   Signal handlers can inspect <i><tt>options</tt></i> (along with values
--   pointed to from the <i><tt>argData</tt></i> of an installed
--   <tt><i>GOptionEntrys</i></tt>) in order to decide to perform certain
--   actions, including direct local handling (which may be useful for
--   options like --version).
--   
--   In the event that the application is marked
--   <a>ApplicationFlagsHandlesCommandLine</a> the "normal processing" will
--   send the <i><tt>options</tt></i> dictionary to the primary instance
--   where it can be read with <a>applicationCommandLineGetOptionsDict</a>.
--   The signal handler can modify the dictionary before returning, and the
--   modified dictionary will be sent.
--   
--   In the event that <a>ApplicationFlagsHandlesCommandLine</a> is not
--   set, "normal processing" will treat the remaining uncollected command
--   line arguments as filenames or URIs. If there are no arguments, the
--   application is activated by <a>applicationActivate</a>. One or more
--   arguments results in a call to <a>applicationOpen</a>.
--   
--   If you want to handle the local commandline arguments for yourself by
--   converting them to calls to <a>applicationOpen</a> or
--   <a>actionGroupActivateAction</a> then you must be sure to register the
--   application first. You should probably not call
--   <a>applicationActivate</a> for yourself, however: just return -1 and
--   allow the default handler to do it for you. This will ensure that the
--   <tt>--gapplication-service</tt> switch works properly (i.e. no
--   activation in that case).
--   
--   Note that this signal is emitted from the default implementation of
--   <tt><i>local_command_line()</i></tt>. If you override that function
--   and don't chain up then this signal will never be emitted.
--   
--   You can override <tt><i>local_command_line()</i></tt> if you need more
--   powerful capabilities than what is provided here, but this should not
--   normally be required.
--   
--   <i>Since: 2.40</i>
type ApplicationHandleLocalOptionsCallback = VariantDict -> IO Int32

-- | Connect a signal handler for the <a>handleLocalOptions</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> application #handleLocalOptions callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterApplicationHandleLocalOptions :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationHandleLocalOptionsCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>handleLocalOptions</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> application #handleLocalOptions callback
--   </pre>
onApplicationHandleLocalOptions :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationHandleLocalOptionsCallback) -> m SignalHandlerId

-- | The <a>nameLost</a> signal is emitted only on the registered primary
--   instance when a new instance has taken over. This can only happen if
--   the application is using the <a>ApplicationFlagsAllowReplacement</a>
--   flag.
--   
--   The default handler for this signal calls <a>applicationQuit</a>.
--   
--   <i>Since: 2.60</i>
type ApplicationNameLostCallback = IO Bool

-- | Connect a signal handler for the <a>nameLost</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> application #nameLost callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterApplicationNameLost :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameLostCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>nameLost</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> application #nameLost callback
--   </pre>
onApplicationNameLost :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameLostCallback) -> m SignalHandlerId

-- | The <a>open</a> signal is emitted on the primary instance when there
--   are files to open. See <a>applicationOpen</a> for more information.
type ApplicationOpenCallback = [File] -> Text -> IO ()

-- | Connect a signal handler for the <a>open</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> application #open callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterApplicationOpen :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationOpenCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>open</a> signal, to be run before
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>on</a> application #open callback
--   </pre>
onApplicationOpen :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationOpenCallback) -> m SignalHandlerId

-- | The <a>shutdown</a> signal is emitted only on the registered primary
--   instance immediately after the main loop terminates.
type ApplicationShutdownCallback = IO ()

-- | Connect a signal handler for the <a>shutdown</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> application #shutdown callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterApplicationShutdown :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationShutdownCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>shutdown</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> application #shutdown callback
--   </pre>
onApplicationShutdown :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationShutdownCallback) -> m SignalHandlerId

-- | The <a>startup</a> signal is emitted on the primary instance
--   immediately after registration. See <a>applicationRegister</a>.
type ApplicationStartupCallback = IO ()

-- | Connect a signal handler for the <a>startup</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> application #startup callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterApplicationStartup :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationStartupCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>startup</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> application #startup callback
--   </pre>
onApplicationStartup :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationStartupCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.Application.Application
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Application.Application
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Application.Application
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Application.Application o) => GI.Gio.Objects.Application.IsApplication o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Application.Application)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Application.Application
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Application.Application


-- | Integrating the launch with the launching application. This is used to
--   handle for instance startup notification and launching the new
--   application on the same screen as the launching window.
module GI.Gio.Objects.AppLaunchContext

-- | Memory-managed wrapper type.
newtype AppLaunchContext
AppLaunchContext :: ManagedPtr AppLaunchContext -> AppLaunchContext

-- | Type class for types which can be safely cast to
--   <a>AppLaunchContext</a>, for instance with <a>toAppLaunchContext</a>.
class (GObject o, IsDescendantOf AppLaunchContext o) => IsAppLaunchContext o

-- | Cast to <a>AppLaunchContext</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toAppLaunchContext :: (MonadIO m, IsAppLaunchContext o) => o -> m AppLaunchContext

-- | Gets the display string for the <i><tt>context</tt></i>. This is used
--   to ensure new applications are started on the same display as the
--   launching application, by setting the <tt>DISPLAY</tt> environment
--   variable.
appLaunchContextGetDisplay :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b, IsFile c) => a -> b -> [c] -> m (Maybe Text)

-- | Gets the complete environment variable list to be passed to the child
--   process when <i><tt>context</tt></i> is used to launch an application.
--   This is a <tt>NULL</tt>-terminated array of strings, where each string
--   has the form <tt>KEY=VALUE</tt>.
--   
--   <i>Since: 2.32</i>
appLaunchContextGetEnvironment :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> m [[Char]]

-- | Initiates startup notification for the application and returns the
--   <tt>XDG_ACTIVATION_TOKEN</tt> or <tt>DESKTOP_STARTUP_ID</tt> for the
--   launched operation, if supported.
--   
--   The returned token may be referred to equivalently as an ‘activation
--   token’ (using Wayland terminology) or a ‘startup sequence ID’ (using
--   X11 terminology). The two <a>are interoperable</a>.
--   
--   Activation tokens are defined in the <a>XDG Activation Protocol</a>,
--   and startup notification IDs are defined in the <a>freedesktop.org
--   Startup Notification Protocol</a>.
--   
--   Support for the XDG Activation Protocol was added in GLib 2.76. Since
--   GLib 2.82 <i><tt>info</tt></i> and <i><tt>files</tt></i> can be
--   <tt>NULL</tt>. If that’s not supported by the backend, the returned
--   token will be <tt>NULL</tt>.
appLaunchContextGetStartupNotifyId :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b, IsFile c) => a -> Maybe b -> [c] -> m (Maybe Text)

-- | Called when an application has failed to launch, so that it can cancel
--   the application startup notification started in
--   <a>appLaunchContextGetStartupNotifyId</a>.
appLaunchContextLaunchFailed :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> Text -> m ()

-- | Creates a new application launch context. This is not normally used,
--   instead you instantiate a subclass of this, such as
--   <a>`GdkAppLaunchContext`</a>.
appLaunchContextNew :: (HasCallStack, MonadIO m) => m AppLaunchContext

-- | Arranges for <i><tt>variable</tt></i> to be set to
--   <i><tt>value</tt></i> in the child’s environment when
--   <i><tt>context</tt></i> is used to launch an application.
--   
--   <i>Since: 2.32</i>
appLaunchContextSetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> [Char] -> [Char] -> m ()

-- | Arranges for <i><tt>variable</tt></i> to be unset in the child’s
--   environment when <i><tt>context</tt></i> is used to launch an
--   application.
--   
--   <i>Since: 2.32</i>
appLaunchContextUnsetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> [Char] -> m ()

-- | The <a>AppLaunchContext::launchFailed</a> signal is emitted when a
--   <a>AppInfo</a> launch fails. The startup notification id is provided,
--   so that the launcher can cancel the startup notification.
--   
--   Because a launch operation may involve spawning multiple instances of
--   the target application, you should expect this signal to be emitted
--   multiple times, one for each spawned instance.
--   
--   <i>Since: 2.36</i>
type AppLaunchContextLaunchFailedCallback = Text -> IO ()

-- | Connect a signal handler for the <a>launchFailed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> appLaunchContext #launchFailed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchFailedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>launchFailed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> appLaunchContext #launchFailed callback
--   </pre>
onAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchFailedCallback) -> m SignalHandlerId

-- | The <a>AppLaunchContext::launchStarted</a> signal is emitted when a
--   <a>AppInfo</a> is about to be launched. If non-null the
--   <i><tt>platformData</tt></i> is an GVariant dictionary mapping strings
--   to variants (ie <tt>a{sv}</tt>), which contains additional,
--   platform-specific data about this launch. On UNIX, at least the
--   <tt>startup-notification-id</tt> keys will be present.
--   
--   The value of the <tt>startup-notification-id</tt> key (type
--   <tt>s</tt>) is a startup notification ID corresponding to the format
--   from the
--   &lt;<a>https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt</a>
--   startup-notification specification&gt;. It allows tracking the
--   progress of the launchee through startup.
--   
--   It is guaranteed that this signal is followed by either a
--   <a>AppLaunchContext::launched</a> or
--   <a>AppLaunchContext::launchFailed</a> signal.
--   
--   Because a launch operation may involve spawning multiple instances of
--   the target application, you should expect this signal to be emitted
--   multiple times, one for each spawned instance.
--   
--   <i>Since: 2.72</i>
type AppLaunchContextLaunchStartedCallback = AppInfo -> Maybe GVariant -> IO ()

-- | Connect a signal handler for the <a>launchStarted</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> appLaunchContext #launchStarted callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterAppLaunchContextLaunchStarted :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchStartedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>launchStarted</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> appLaunchContext #launchStarted callback
--   </pre>
onAppLaunchContextLaunchStarted :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchStartedCallback) -> m SignalHandlerId

-- | The <a>AppLaunchContext::launched</a> signal is emitted when a
--   <a>AppInfo</a> is successfully launched.
--   
--   Because a launch operation may involve spawning multiple instances of
--   the target application, you should expect this signal to be emitted
--   multiple times, one time for each spawned instance.
--   
--   The <i><tt>platformData</tt></i> is an GVariant dictionary mapping
--   strings to variants (ie <tt>a{sv}</tt>), which contains additional,
--   platform-specific data about this launch. On UNIX, at least the
--   <tt>pid</tt> and <tt>startup-notification-id</tt> keys will be
--   present.
--   
--   Since 2.72 the <tt>pid</tt> may be 0 if the process id wasn’t known
--   (for example if the process was launched via D-Bus). The <tt>pid</tt>
--   may not be set at all in subsequent releases.
--   
--   On Windows, <tt>pid</tt> is guaranteed to be valid only for the
--   duration of the <a>AppLaunchContext::launched</a> signal emission;
--   after the signal is emitted, GLib will call <a>spawnClosePid</a>. If
--   you need to keep the [alias<i><tt>gLib</tt></i>.Pid] after the signal
--   has been emitted, then you can duplicate <tt>pid</tt> using
--   <tt>DuplicateHandle()</tt>.
--   
--   <i>Since: 2.36</i>
type AppLaunchContextLaunchedCallback = AppInfo -> GVariant -> IO ()

-- | Connect a signal handler for the <a>launched</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> appLaunchContext #launched callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>launched</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> appLaunchContext #launched callback
--   </pre>
onAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.AppLaunchContext.AppLaunchContext o) => GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.AppLaunchContext.AppLaunchContext)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.AppLaunchContext.AppLaunchContext


-- | The <tt>GVolume</tt> interface represents user-visible objects that
--   can be mounted. For example, a file system partition on a USB flash
--   drive, or an optical disc inserted into a disc drive.
--   
--   If a <tt>GVolume</tt> is currently mounted, the corresponding
--   <a>Mount</a> can be retrieved using <a>volumeGetMount</a>.
--   
--   Mounting a <tt>GVolume</tt> instance is an asynchronous operation. For
--   more information about asynchronous operations, see <a>AsyncResult</a>
--   and <a>Task</a>. To mount a <tt>GVolume</tt>, first call
--   <a>volumeMount</a> with (at least) the <tt>GVolume</tt> instance,
--   optionally a <a>MountOperation</a> object and a
--   [type<i><tt>gio</tt></i>.AsyncReadyCallback].
--   
--   Typically, one will only want to pass <tt>NULL</tt> for the
--   <a>MountOperation</a> if automounting all volumes when a desktop
--   session starts since it’s not desirable to put up a lot of dialogs
--   asking for credentials.
--   
--   The callback will be fired when the operation has resolved (either
--   with success or failure), and a <a>AsyncResult</a> instance will be
--   passed to the callback. That callback should then call
--   <a>volumeMountFinish</a> with the <tt>GVolume</tt> instance and the
--   <a>AsyncResult</a> data to see if the operation was completed
--   successfully. If a [type<i><tt>gLib</tt></i>.Error] is present when
--   <a>volumeMountFinish</a> is called, then it will be filled with any
--   error information.
--   
--   Note, when <a>porting from GnomeVFS</a>, <tt>GVolume</tt> is the moral
--   equivalent of <tt>GnomeVFSDrive</tt>.
--   
--   <h2>Volume Identifiers</h2>
--   
--   It is sometimes necessary to directly access the underlying operating
--   system object behind a volume (e.g. for passing a volume to an
--   application via the command line). For this purpose, GIO allows to
--   obtain an ‘identifier’ for the volume. There can be different kinds of
--   identifiers, such as Hal UDIs, filesystem labels, traditional Unix
--   devices (e.g. <tt>/dev/sda2</tt>), UUIDs. GIO uses predefined strings
--   as names for the different kinds of identifiers:
--   <tt>G_VOLUME_IDENTIFIER_KIND_UUID</tt>,
--   <tt>G_VOLUME_IDENTIFIER_KIND_LABEL</tt>, etc. Use
--   <a>volumeGetIdentifier</a> to obtain an identifier for a volume.
--   
--   Note that <tt>G_VOLUME_IDENTIFIER_KIND_HAL_UDI</tt> will only be
--   available when the GVFS hal volume monitor is in use. Other volume
--   monitors will generally be able to provide the
--   <tt>G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE</tt> identifier, which can be
--   used to obtain a hal device by means of
--   <tt>libhal_manager_find_device_string_match()</tt>.
module GI.Gio.Interfaces.Volume

-- | Memory-managed wrapper type.
newtype Volume
Volume :: ManagedPtr Volume -> Volume

-- | Type class for types which can be safely cast to <a>Volume</a>, for
--   instance with <a>toVolume</a>.
class (GObject o, IsDescendantOf Volume o) => IsVolume o

-- | Cast to <a>Volume</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toVolume :: (MonadIO m, IsVolume o) => o -> m Volume

-- | Checks if a volume can be ejected.
volumeCanEject :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Bool

-- | Checks if a volume can be mounted.
volumeCanMount :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Bool

-- | Ejects a volume. This is an asynchronous operation, and is finished by
--   calling <a>volumeEjectFinish</a> with the <i><tt>volume</tt></i> and
--   <a>AsyncResult</a> returned in the <i><tt>callback</tt></i>.

-- | <i>Deprecated: (Since version 2.22)Use <a>volumeEjectWithOperation</a>
--   instead.</i>
volumeEject :: (HasCallStack, MonadIO m, IsVolume a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes ejecting a volume. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>volumeEjectWithOperationFinish</a> instead.</i>
volumeEjectFinish :: (HasCallStack, MonadIO m, IsVolume a, IsAsyncResult b) => a -> b -> m ()

-- | Ejects a volume. This is an asynchronous operation, and is finished by
--   calling <a>volumeEjectWithOperationFinish</a> with the
--   <i><tt>volume</tt></i> and <a>AsyncResult</a> data returned in the
--   <i><tt>callback</tt></i>.
--   
--   <i>Since: 2.22</i>
volumeEjectWithOperation :: (HasCallStack, MonadIO m, IsVolume a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes ejecting a volume. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.
--   
--   <i>Since: 2.22</i>
volumeEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsVolume a, IsAsyncResult b) => a -> b -> m ()

-- | Gets the kinds of <a>identifiers</a> that <i><tt>volume</tt></i> has.
--   Use <a>volumeGetIdentifier</a> to obtain the identifiers themselves.
volumeEnumerateIdentifiers :: (HasCallStack, MonadIO m, IsVolume a) => a -> m [Text]

-- | Gets the activation root for a <a>Volume</a> if it is known ahead of
--   mount time. Returns <a>Nothing</a> otherwise. If not <a>Nothing</a>
--   and if <i><tt>volume</tt></i> is mounted, then the result of
--   <a>mountGetRoot</a> on the <a>Mount</a> object obtained from
--   <a>volumeGetMount</a> will always either be equal or a prefix of what
--   this function returns. In other words, in code
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   GMount *mount;
--   GFile *mount_root
--   GFile *volume_activation_root;
--   
--   mount = g_volume_get_mount (volume); // mounted, so never NULL
--   mount_root = g_mount_get_root (mount);
--   volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL
--   </pre>
--   
--   then the expression
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   (g_file_has_prefix (volume_activation_root, mount_root) ||
--    g_file_equal (volume_activation_root, mount_root))
--   </pre>
--   
--   will always be <a>True</a>.
--   
--   Activation roots are typically used in <a>VolumeMonitor</a>
--   implementations to find the underlying mount to shadow, see
--   <a>mountIsShadowed</a> for more details.
--   
--   <i>Since: 2.18</i>
volumeGetActivationRoot :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe File)

-- | Gets the drive for the <i><tt>volume</tt></i>.
volumeGetDrive :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe Drive)

-- | Gets the icon for <i><tt>volume</tt></i>.
volumeGetIcon :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Icon

-- | Gets the identifier of the given kind for <i><tt>volume</tt></i>. See
--   the <a>introduction</a> for more information about volume identifiers.
volumeGetIdentifier :: (HasCallStack, MonadIO m, IsVolume a) => a -> Text -> m (Maybe Text)

-- | Gets the mount for the <i><tt>volume</tt></i>.
volumeGetMount :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe Mount)

-- | Gets the name of <i><tt>volume</tt></i>.
volumeGetName :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Text

-- | Gets the sort key for <i><tt>volume</tt></i>, if any.
--   
--   <i>Since: 2.32</i>
volumeGetSortKey :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe Text)

-- | Gets the symbolic icon for <i><tt>volume</tt></i>.
--   
--   <i>Since: 2.34</i>
volumeGetSymbolicIcon :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Icon

-- | Gets the UUID for the <i><tt>volume</tt></i>. The reference is
--   typically based on the file system UUID for the volume in question and
--   should be considered an opaque string. Returns <a>Nothing</a> if there
--   is no UUID available.
volumeGetUuid :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe Text)

-- | Mounts a volume. This is an asynchronous operation, and is finished by
--   calling <a>volumeMountFinish</a> with the <i><tt>volume</tt></i> and
--   <a>AsyncResult</a> returned in the <i><tt>callback</tt></i>.
volumeMount :: (HasCallStack, MonadIO m, IsVolume a, IsMountOperation b, IsCancellable c) => a -> [MountMountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes mounting a volume. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.
--   
--   If the mount operation succeeded, <a>volumeGetMount</a> on
--   <i><tt>volume</tt></i> is guaranteed to return the mount right after
--   calling this function; there's no need to listen for the 'mount-added'
--   signal on <a>VolumeMonitor</a>.
volumeMountFinish :: (HasCallStack, MonadIO m, IsVolume a, IsAsyncResult b) => a -> b -> m ()

-- | Returns whether the volume should be automatically mounted.
volumeShouldAutomount :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Bool

-- | Emitted when the volume has been changed.
type VolumeChangedCallback = IO ()

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> volume #changed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeChanged :: (IsVolume a, MonadIO m) => a -> ((?self :: a) => VolumeChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> volume #changed callback
--   </pre>
onVolumeChanged :: (IsVolume a, MonadIO m) => a -> ((?self :: a) => VolumeChangedCallback) -> m SignalHandlerId

-- | This signal is emitted when the <a>Volume</a> have been removed. If
--   the recipient is holding references to the object they should release
--   them so the object can be finalized.
type VolumeRemovedCallback = IO ()

-- | Connect a signal handler for the <a>removed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> volume #removed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterVolumeRemoved :: (IsVolume a, MonadIO m) => a -> ((?self :: a) => VolumeRemovedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>removed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> volume #removed callback
--   </pre>
onVolumeRemoved :: (IsVolume a, MonadIO m) => a -> ((?self :: a) => VolumeRemovedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.Volume.Volume
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Volume.Volume
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Volume.Volume
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Volume.Volume)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Volume.Volume o) => GI.Gio.Interfaces.Volume.IsVolume o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Volume.Volume
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Volume.Volume


-- | <tt>GTlsServerConnection</tt> is the server-side subclass of
--   <a>TlsConnection</a>, representing a server-side TLS connection.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Interfaces.TlsServerConnection

-- | Memory-managed wrapper type.
newtype TlsServerConnection
TlsServerConnection :: ManagedPtr TlsServerConnection -> TlsServerConnection

-- | Type class for types which can be safely cast to
--   <a>TlsServerConnection</a>, for instance with
--   <a>toTlsServerConnection</a>.
class (GObject o, IsDescendantOf TlsServerConnection o) => IsTlsServerConnection o

-- | Cast to <a>TlsServerConnection</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toTlsServerConnection :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsServerConnection

-- | Creates a new <a>TlsServerConnection</a> wrapping
--   <i><tt>baseIoStream</tt></i> (which must have pollable input and
--   output streams).
--   
--   See the documentation for <a>TlsConnection:baseIoStream</a> for
--   restrictions on when application code can run operations on the
--   <i><tt>baseIoStream</tt></i> after this function has returned.
--   
--   <i>Since: 2.28</i>
tlsServerConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsTlsCertificate b) => a -> Maybe b -> m TlsServerConnection

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>authentication-mode</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructTlsServerConnectionAuthenticationMode :: (IsTlsServerConnection o, MonadIO m) => TlsAuthenticationMode -> m (GValueConstruct o)

-- | Get the value of the “<tt>authentication-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsServerConnection #authenticationMode
--   </pre>
getTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsAuthenticationMode

-- | Set the value of the “<tt>authentication-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsServerConnection [ #authenticationMode <a>:=</a> value ]
--   </pre>
setTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> TlsAuthenticationMode -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection o) => GI.Gio.Interfaces.TlsServerConnection.IsTlsServerConnection o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection


-- | <tt>GTlsFileDatabase</tt> is implemented by <a>TlsDatabase</a> objects
--   which load their certificate information from a file. It is an
--   interface which TLS library specific subtypes implement.
--   
--   <i>Since: 2.30</i>
module GI.Gio.Interfaces.TlsFileDatabase

-- | Memory-managed wrapper type.
newtype TlsFileDatabase
TlsFileDatabase :: ManagedPtr TlsFileDatabase -> TlsFileDatabase

-- | Type class for types which can be safely cast to
--   <a>TlsFileDatabase</a>, for instance with <a>toTlsFileDatabase</a>.
class (GObject o, IsDescendantOf TlsFileDatabase o) => IsTlsFileDatabase o

-- | Cast to <a>TlsFileDatabase</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toTlsFileDatabase :: (MonadIO m, IsTlsFileDatabase o) => o -> m TlsFileDatabase

-- | Creates a new <a>TlsFileDatabase</a> which uses anchor certificate
--   authorities in <i><tt>anchors</tt></i> to verify certificate chains.
--   
--   The certificates in <i><tt>anchors</tt></i> must be PEM encoded.
--   
--   <i>Since: 2.30</i>
tlsFileDatabaseNew :: (HasCallStack, MonadIO m) => [Char] -> m TlsFileDatabase

-- | Set the value of the “<tt>anchors</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #anchors
--   </pre>
clearTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>anchors</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructTlsFileDatabaseAnchors :: (IsTlsFileDatabase o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>anchors</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsFileDatabase #anchors
--   </pre>
getTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>anchors</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsFileDatabase [ #anchors <a>:=</a> value ]
--   </pre>
setTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> Text -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase o) => GI.Gio.Interfaces.TlsFileDatabase.IsTlsFileDatabase o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase


-- | <tt>GTlsClientConnection</tt> is the client-side subclass of
--   <a>TlsConnection</a>, representing a client-side TLS connection.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Interfaces.TlsClientConnection

-- | Memory-managed wrapper type.
newtype TlsClientConnection
TlsClientConnection :: ManagedPtr TlsClientConnection -> TlsClientConnection

-- | Type class for types which can be safely cast to
--   <a>TlsClientConnection</a>, for instance with
--   <a>toTlsClientConnection</a>.
class (GObject o, IsDescendantOf TlsClientConnection o) => IsTlsClientConnection o

-- | Cast to <a>TlsClientConnection</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toTlsClientConnection :: (MonadIO m, IsTlsClientConnection o) => o -> m TlsClientConnection

-- | Possibly copies session state from one connection to another, for use
--   in TLS session resumption. This is not normally needed, but may be
--   used when the same session needs to be used between different
--   endpoints, as is required by some protocols, such as FTP over TLS.
--   <i><tt>source</tt></i> should have already completed a handshake and,
--   since TLS 1.3, it should have been used to read data at least once.
--   <i><tt>conn</tt></i> should not have completed a handshake.
--   
--   It is not possible to know whether a call to this function will
--   actually do anything. Because session resumption is normally used only
--   for performance benefit, the TLS backend might not implement this
--   function. Even if implemented, it may not actually succeed in allowing
--   <i><tt>conn</tt></i> to resume <i><tt>source</tt></i>'s TLS session,
--   because the server may not have sent a session resumption token to
--   <i><tt>source</tt></i>, or it may refuse to accept the token from
--   <i><tt>conn</tt></i>. There is no way to know whether a call to this
--   function is actually successful.
--   
--   Using this function is not required to benefit from session
--   resumption. If the TLS backend supports session resumption, the
--   session will be resumed automatically if it is possible to do so
--   without weakening the privacy guarantees normally provided by TLS,
--   without need to call this function. For example, with TLS 1.3, a
--   session ticket will be automatically copied from any
--   <a>TlsClientConnection</a> that has previously received session
--   tickets from the server, provided a ticket is available that has not
--   previously been used for session resumption, since session ticket
--   reuse would be a privacy weakness. Using this function causes the
--   ticket to be copied without regard for privacy considerations.
--   
--   <i>Since: 2.46</i>
tlsClientConnectionCopySessionState :: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsTlsClientConnection b) => a -> b -> m ()

-- | Gets the list of distinguished names of the Certificate Authorities
--   that the server will accept certificates from. This will be set during
--   the TLS handshake if the server requests a certificate. Otherwise, it
--   will be <a>Nothing</a>.
--   
--   Each item in the list is a <a>ByteArray</a> which contains the
--   complete subject DN of the certificate authority.
--   
--   <i>Since: 2.28</i>
tlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m [ByteString]

-- | Gets <i><tt>conn</tt></i>'s expected server identity
--   
--   <i>Since: 2.28</i>
tlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m (Maybe SocketConnectable)

-- | SSL 3.0 is no longer supported. See
--   <a>tlsClientConnectionSetUseSsl3</a> for details.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.56)SSL 3.0 is insecure.</i>
tlsClientConnectionGetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m Bool

-- | Gets <i><tt>conn</tt></i>'s validation flags
--   
--   This function does not work as originally designed and is impossible
--   to use correctly. See <a>TlsClientConnection:validationFlags</a> for
--   more information.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.72)Do not attempt to ignore validation
--   errors.</i>
tlsClientConnectionGetValidationFlags :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m [TlsCertificateFlags]

-- | Creates a new <a>TlsClientConnection</a> wrapping
--   <i><tt>baseIoStream</tt></i> (which must have pollable input and
--   output streams) which is assumed to communicate with the server
--   identified by <i><tt>serverIdentity</tt></i>.
--   
--   See the documentation for <a>TlsConnection:baseIoStream</a> for
--   restrictions on when application code can run operations on the
--   <i><tt>baseIoStream</tt></i> after this function has returned.
--   
--   <i>Since: 2.28</i>
tlsClientConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsSocketConnectable b) => a -> Maybe b -> m TlsClientConnection

-- | Sets <i><tt>conn</tt></i>'s expected server identity, which is used
--   both to tell servers on virtual hosts which certificate to present,
--   and also to let <i><tt>conn</tt></i> know what name to look for in the
--   certificate when performing <a>TlsCertificateFlagsBadIdentity</a>
--   validation, if enabled.
--   
--   <i>Since: 2.28</i>
tlsClientConnectionSetServerIdentity :: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsSocketConnectable b) => a -> b -> m ()

-- | Since GLib 2.42.1, SSL 3.0 is no longer supported.
--   
--   From GLib 2.42.1 through GLib 2.62, this function could be used to
--   force use of TLS 1.0, the lowest-supported TLS protocol version at the
--   time. In the past, this was needed to connect to broken TLS servers
--   that exhibited protocol version intolerance. Such servers are no
--   longer common, and using TLS 1.0 is no longer considered acceptable.
--   
--   Since GLib 2.64, this function does nothing.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.56)SSL 3.0 is insecure.</i>
tlsClientConnectionSetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> Bool -> m ()

-- | Sets <i><tt>conn</tt></i>'s validation flags, to override the default
--   set of checks performed when validating a server certificate. By
--   default, <a>TlsCertificateFlagsValidateAll</a> is used.
--   
--   This function does not work as originally designed and is impossible
--   to use correctly. See <a>TlsClientConnection:validationFlags</a> for
--   more information.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.72)Do not attempt to ignore validation
--   errors.</i>
tlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> [TlsCertificateFlags] -> m ()

-- | Get the value of the “<tt>accepted-cas</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsClientConnection #acceptedCas
--   </pre>
getTlsClientConnectionAcceptedCas :: (MonadIO m, IsTlsClientConnection o) => o -> m [Ptr ()]

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>server-identity</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTlsClientConnectionServerIdentity :: (IsTlsClientConnection o, MonadIO m, IsSocketConnectable a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>server-identity</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsClientConnection #serverIdentity
--   </pre>
getTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o) => o -> m (Maybe SocketConnectable)

-- | Set the value of the “<tt>server-identity</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsClientConnection [ #serverIdentity <a>:=</a> value ]
--   </pre>
setTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o, IsSocketConnectable a) => o -> a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>use-ssl3</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructTlsClientConnectionUseSsl3 :: (IsTlsClientConnection o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>use-ssl3</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsClientConnection #useSsl3
--   </pre>
getTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> m Bool

-- | Set the value of the “<tt>use-ssl3</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsClientConnection [ #useSsl3 <a>:=</a> value ]
--   </pre>
setTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> Bool -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>validation-flags</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructTlsClientConnectionValidationFlags :: (IsTlsClientConnection o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>validation-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> tlsClientConnection #validationFlags
--   </pre>
getTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> m [TlsCertificateFlags]

-- | Set the value of the “<tt>validation-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> tlsClientConnection [ #validationFlags <a>:=</a> value ]
--   </pre>
setTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> [TlsCertificateFlags] -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection o) => GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection


-- | TLS (Transport Layer Security, aka SSL) and DTLS backend. This is an
--   internal type used to coordinate the different classes implemented by
--   a TLS backend.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Interfaces.TlsBackend

-- | Memory-managed wrapper type.
newtype TlsBackend
TlsBackend :: ManagedPtr TlsBackend -> TlsBackend

-- | Type class for types which can be safely cast to <a>TlsBackend</a>,
--   for instance with <a>toTlsBackend</a>.
class (GObject o, IsDescendantOf TlsBackend o) => IsTlsBackend o

-- | Cast to <a>TlsBackend</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toTlsBackend :: (MonadIO m, IsTlsBackend o) => o -> m TlsBackend

-- | Gets the <a>GType</a> of <i><tt>backend</tt></i>'s
--   <a>TlsCertificate</a> implementation.
--   
--   <i>Since: 2.28</i>
tlsBackendGetCertificateType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType

-- | Gets the <a>GType</a> of <i><tt>backend</tt></i>'s
--   <a>TlsClientConnection</a> implementation.
--   
--   <i>Since: 2.28</i>
tlsBackendGetClientConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType

-- | Gets the default <a>TlsBackend</a> for the system.
--   
--   <i>Since: 2.28</i>
tlsBackendGetDefault :: (HasCallStack, MonadIO m) => m TlsBackend

-- | Gets the default <a>TlsDatabase</a> used to verify TLS connections.
--   
--   <i>Since: 2.30</i>
tlsBackendGetDefaultDatabase :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m TlsDatabase

-- | Gets the <a>GType</a> of <i><tt>backend</tt></i>’s
--   <a>DtlsClientConnection</a> implementation.
--   
--   <i>Since: 2.48</i>
tlsBackendGetDtlsClientConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType

-- | Gets the <a>GType</a> of <i><tt>backend</tt></i>’s
--   <a>DtlsServerConnection</a> implementation.
--   
--   <i>Since: 2.48</i>
tlsBackendGetDtlsServerConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType

-- | Gets the <a>GType</a> of <i><tt>backend</tt></i>'s
--   <a>TlsFileDatabase</a> implementation.
--   
--   <i>Since: 2.30</i>
tlsBackendGetFileDatabaseType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType

-- | Gets the <a>GType</a> of <i><tt>backend</tt></i>'s
--   <a>TlsServerConnection</a> implementation.
--   
--   <i>Since: 2.28</i>
tlsBackendGetServerConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType

-- | Set the default <a>TlsDatabase</a> used to verify TLS connections
--   
--   Any subsequent call to <a>tlsBackendGetDefaultDatabase</a> will return
--   the database set in this call. Existing databases and connections are
--   not modified.
--   
--   Setting a <a>Nothing</a> default database will reset to using the
--   system default database as if <a>tlsBackendSetDefaultDatabase</a> had
--   never been called.
--   
--   <i>Since: 2.60</i>
tlsBackendSetDefaultDatabase :: (HasCallStack, MonadIO m, IsTlsBackend a, IsTlsDatabase b) => a -> Maybe b -> m ()

-- | Checks if DTLS is supported. DTLS support may not be available even if
--   TLS support is available, and vice-versa.
--   
--   <i>Since: 2.48</i>
tlsBackendSupportsDtls :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m Bool

-- | Checks if TLS is supported; if this returns <a>False</a> for the
--   default <a>TlsBackend</a>, it means no "real" TLS backend is
--   available.
--   
--   <i>Since: 2.28</i>
tlsBackendSupportsTls :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m Bool
instance GHC.Classes.Eq GI.Gio.Interfaces.TlsBackend.TlsBackend
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsBackend.TlsBackend
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsBackend.TlsBackend
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.TlsBackend.TlsBackend)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.TlsBackend.TlsBackend o) => GI.Gio.Interfaces.TlsBackend.IsTlsBackend o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.TlsBackend.TlsBackend
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.TlsBackend.TlsBackend


-- | Objects that describe one or more potential socket endpoints implement
--   <tt>GSocketConnectable</tt>. Callers can then use
--   <a>socketConnectableEnumerate</a> to get a
--   <a>SocketAddressEnumerator</a> to try out each socket address in turn
--   until one succeeds, as shown in the sample code below.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   MyConnectionType *
--   connect_to_host (const char    *hostname,
--                    guint16        port,
--                    GCancellable  *cancellable,
--                    GError       **error)
--   {
--     MyConnection *conn = NULL;
--     GSocketConnectable *addr;
--     GSocketAddressEnumerator *enumerator;
--     GSocketAddress *sockaddr;
--     GError *conn_error = NULL;
--   
--     addr = g_network_address_new (hostname, port);
--     enumerator = g_socket_connectable_enumerate (addr);
--     g_object_unref (addr);
--   
--     // Try each sockaddr until we succeed. Record the first connection error,
--     // but not any further ones (since they'll probably be basically the same
--     // as the first).
--     while (!conn &amp;&amp; (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
--       {
--         conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &amp;conn_error);
--         g_object_unref (sockaddr);
--       }
--     g_object_unref (enumerator);
--   
--     if (conn)
--       {
--         if (conn_error)
--           {
--             // We couldn't connect to the first address, but we succeeded
--             // in connecting to a later address.
--             g_error_free (conn_error);
--           }
--         return conn;
--       }
--     else if (error)
--       {
--         /// Either initial lookup failed, or else the caller cancelled us.
--         if (conn_error)
--           g_error_free (conn_error);
--         return NULL;
--       }
--     else
--       {
--         g_error_propagate (error, conn_error);
--         return NULL;
--       }
--   }
--   </pre>
module GI.Gio.Interfaces.SocketConnectable

-- | Memory-managed wrapper type.
newtype SocketConnectable
SocketConnectable :: ManagedPtr SocketConnectable -> SocketConnectable

-- | Type class for types which can be safely cast to
--   <a>SocketConnectable</a>, for instance with
--   <a>toSocketConnectable</a>.
class (GObject o, IsDescendantOf SocketConnectable o) => IsSocketConnectable o

-- | Cast to <a>SocketConnectable</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toSocketConnectable :: (MonadIO m, IsSocketConnectable o) => o -> m SocketConnectable

-- | Creates a <a>SocketAddressEnumerator</a> for
--   <i><tt>connectable</tt></i>.
--   
--   <i>Since: 2.22</i>
socketConnectableEnumerate :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m SocketAddressEnumerator

-- | Creates a <a>SocketAddressEnumerator</a> for
--   <i><tt>connectable</tt></i> that will return a <a>ProxyAddress</a> for
--   each of its addresses that you must connect to via a proxy.
--   
--   If <i><tt>connectable</tt></i> does not implement
--   <a>socketConnectableProxyEnumerate</a>, this will fall back to calling
--   <a>socketConnectableEnumerate</a>.
--   
--   <i>Since: 2.26</i>
socketConnectableProxyEnumerate :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m SocketAddressEnumerator

-- | Format a <a>SocketConnectable</a> as a string. This is a
--   human-readable format for use in debugging output, and is not a stable
--   serialization format. It is not suitable for use in user interfaces as
--   it exposes too much information for a user.
--   
--   If the <a>SocketConnectable</a> implementation does not support string
--   formatting, the implementation’s type name will be returned as a
--   fallback.
--   
--   <i>Since: 2.48</i>
socketConnectableToString :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m Text
instance GHC.Classes.Eq GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.SocketConnectable.SocketConnectable)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.SocketConnectable.SocketConnectable o) => GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.SocketConnectable.SocketConnectable


-- | <tt>GProxyResolver</tt> provides synchronous and asynchronous network
--   proxy resolution. <tt>GProxyResolver</tt> is used within
--   <a>SocketClient</a> through the method
--   <a>socketConnectableProxyEnumerate</a>.
--   
--   Implementations of <tt>GProxyResolver</tt> based on <a>libproxy</a>
--   and GNOME settings can be found in <a>glib-networking</a>. GIO comes
--   with an implementation for use inside Flatpak portals.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Interfaces.ProxyResolver

-- | Memory-managed wrapper type.
newtype ProxyResolver
ProxyResolver :: ManagedPtr ProxyResolver -> ProxyResolver

-- | Type class for types which can be safely cast to <a>ProxyResolver</a>,
--   for instance with <a>toProxyResolver</a>.
class (GObject o, IsDescendantOf ProxyResolver o) => IsProxyResolver o

-- | Cast to <a>ProxyResolver</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toProxyResolver :: (MonadIO m, IsProxyResolver o) => o -> m ProxyResolver

-- | Gets the default <a>ProxyResolver</a> for the system.
--   
--   <i>Since: 2.26</i>
proxyResolverGetDefault :: (HasCallStack, MonadIO m) => m ProxyResolver

-- | Checks if <i><tt>resolver</tt></i> can be used on this system. (This
--   is used internally; <a>proxyResolverGetDefault</a> will only return a
--   proxy resolver that returns <a>True</a> for this method.)
--   
--   <i>Since: 2.26</i>
proxyResolverIsSupported :: (HasCallStack, MonadIO m, IsProxyResolver a) => a -> m Bool

-- | Looks into the system proxy configuration to determine what proxy, if
--   any, to use to connect to <i><tt>uri</tt></i>. The returned proxy URIs
--   are of the form
--   <tt>&lt;protocol&gt;://[user[:password]@]host[:port]</tt> or
--   <tt>direct://</tt>, where <tt>&lt;protocol&gt;</tt> could be http,
--   rtsp, socks or other proxying protocol.
--   
--   If you don't know what network protocol is being used on the socket,
--   you should use <tt>none</tt> as the URI protocol. In this case, the
--   resolver might still return a generic proxy type (such as SOCKS), but
--   would not return protocol-specific proxy types (such as http).
--   
--   <tt>direct://</tt> is used when no proxy is needed. Direct connection
--   should not be attempted unless it is part of the returned array of
--   proxies.
--   
--   <i>Since: 2.26</i>
proxyResolverLookup :: (HasCallStack, MonadIO m, IsProxyResolver a, IsCancellable b) => a -> Text -> Maybe b -> m [Text]

-- | Asynchronous lookup of proxy. See <a>proxyResolverLookup</a> for more
--   details.
--   
--   <i>Since: 2.26</i>
proxyResolverLookupAsync :: (HasCallStack, MonadIO m, IsProxyResolver a, IsCancellable b) => a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Call this function to obtain the array of proxy URIs when
--   <a>proxyResolverLookupAsync</a> is complete. See
--   <a>proxyResolverLookup</a> for more details.
--   
--   <i>Since: 2.26</i>
proxyResolverLookupFinish :: (HasCallStack, MonadIO m, IsProxyResolver a, IsAsyncResult b) => a -> b -> m [Text]
instance GHC.Classes.Eq GI.Gio.Interfaces.ProxyResolver.ProxyResolver
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.ProxyResolver.ProxyResolver
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.ProxyResolver.ProxyResolver
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.ProxyResolver.ProxyResolver)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.ProxyResolver.ProxyResolver o) => GI.Gio.Interfaces.ProxyResolver.IsProxyResolver o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.ProxyResolver.ProxyResolver
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.ProxyResolver.ProxyResolver


-- | A <tt>GProxy</tt> handles connecting to a remote host via a given type
--   of proxy server. It is implemented by the <tt>gio-proxy</tt> extension
--   point. The extensions are named after their proxy protocol name. As an
--   example, a SOCKS5 proxy implementation can be retrieved with the name
--   <tt>socks5</tt> using the function
--   <a>iOExtensionPointGetExtensionByName</a>.
--   
--   <i>Since: 2.26</i>
module GI.Gio.Interfaces.Proxy

-- | Memory-managed wrapper type.
newtype Proxy
Proxy :: ManagedPtr Proxy -> Proxy

-- | Type class for types which can be safely cast to <a>Proxy</a>, for
--   instance with <a>toProxy</a>.
class (GObject o, IsDescendantOf Proxy o) => IsProxy o

-- | Cast to <a>Proxy</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toProxy :: (MonadIO m, IsProxy o) => o -> m Proxy

-- | Given <i><tt>connection</tt></i> to communicate with a proxy (eg, a
--   <a>SocketConnection</a> that is connected to the proxy server), this
--   does the necessary handshake to connect to
--   <i><tt>proxyAddress</tt></i>, and if required, wraps the
--   <a>IOStream</a> to handle proxy payload.
--   
--   <i>Since: 2.26</i>
proxyConnect :: (HasCallStack, MonadIO m, IsProxy a, IsIOStream b, IsProxyAddress c, IsCancellable d) => a -> b -> c -> Maybe d -> m IOStream

-- | Asynchronous version of <a>proxyConnect</a>.
--   
--   <i>Since: 2.26</i>
proxyConnectAsync :: (HasCallStack, MonadIO m, IsProxy a, IsIOStream b, IsProxyAddress c, IsCancellable d) => a -> b -> c -> Maybe d -> Maybe AsyncReadyCallback -> m ()

-- | See <a>proxyConnect</a>.
--   
--   <i>Since: 2.26</i>
proxyConnectFinish :: (HasCallStack, MonadIO m, IsProxy a, IsAsyncResult b) => a -> b -> m IOStream

-- | Find the <tt>gio-proxy</tt> extension point for a proxy implementation
--   that supports the specified protocol.
--   
--   <i>Since: 2.26</i>
proxyGetDefaultForProtocol :: (HasCallStack, MonadIO m) => Text -> m (Maybe Proxy)

-- | Some proxy protocols expect to be passed a hostname, which they will
--   resolve to an IP address themselves. Others, like SOCKS4, do not allow
--   this. This function will return <a>False</a> if <i><tt>proxy</tt></i>
--   is implementing such a protocol. When <a>False</a> is returned, the
--   caller should resolve the destination hostname first, and then pass a
--   <a>ProxyAddress</a> containing the stringified IP address to
--   <a>proxyConnect</a> or <a>proxyConnectAsync</a>.
--   
--   <i>Since: 2.26</i>
proxySupportsHostname :: (HasCallStack, MonadIO m, IsProxy a) => a -> m Bool
instance GHC.Classes.Eq GI.Gio.Interfaces.Proxy.Proxy
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Proxy.Proxy
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Proxy.Proxy
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Proxy.Proxy)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Proxy.Proxy o) => GI.Gio.Interfaces.Proxy.IsProxy o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Proxy.Proxy
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Proxy.Proxy


-- | <tt>GPollableOutputStream</tt> is implemented by <a>OutputStream</a>s
--   that can be polled for readiness to write. This can be used when
--   interfacing with a non-GIO API that expects UNIX-file-descriptor-style
--   asynchronous I/O rather than GIO-style.
--   
--   Some classes may implement <tt>GPollableOutputStream</tt> but have
--   only certain instances of that class be pollable. If
--   <a>pollableOutputStreamCanPoll</a> returns false, then the behavior of
--   other <tt>GPollableOutputStream</tt> methods is undefined.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Interfaces.PollableOutputStream

-- | Memory-managed wrapper type.
newtype PollableOutputStream
PollableOutputStream :: ManagedPtr PollableOutputStream -> PollableOutputStream

-- | Type class for types which can be safely cast to
--   <a>PollableOutputStream</a>, for instance with
--   <a>toPollableOutputStream</a>.
class (GObject o, IsDescendantOf PollableOutputStream o) => IsPollableOutputStream o

-- | Cast to <a>PollableOutputStream</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toPollableOutputStream :: (MonadIO m, IsPollableOutputStream o) => o -> m PollableOutputStream

-- | Checks if <i><tt>stream</tt></i> is actually pollable. Some classes
--   may implement <a>PollableOutputStream</a> but have only certain
--   instances of that class be pollable. If this method returns
--   <a>False</a>, then the behavior of other <a>PollableOutputStream</a>
--   methods is undefined.
--   
--   For any given stream, the value returned by this method is constant; a
--   stream cannot switch from pollable to non-pollable or vice versa.
--   
--   <i>Since: 2.28</i>
pollableOutputStreamCanPoll :: (HasCallStack, MonadIO m, IsPollableOutputStream a) => a -> m Bool

-- | Creates a <a>Source</a> that triggers when <i><tt>stream</tt></i> can
--   be written, or <i><tt>cancellable</tt></i> is triggered or an error
--   occurs. The callback on the source is of the <a>PollableSourceFunc</a>
--   type.
--   
--   As with <a>pollableOutputStreamIsWritable</a>, it is possible that the
--   stream may not actually be writable even after the source triggers, so
--   you should use <a>pollableOutputStreamWriteNonblocking</a> rather than
--   <a>outputStreamWrite</a> from the callback.
--   
--   The behaviour of this method is undefined if
--   <a>pollableOutputStreamCanPoll</a> returns <a>False</a> for
--   <i><tt>stream</tt></i>.
--   
--   <i>Since: 2.28</i>
pollableOutputStreamCreateSource :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> Maybe b -> m Source

-- | Checks if <i><tt>stream</tt></i> can be written.
--   
--   Note that some stream types may not be able to implement this 100%
--   reliably, and it is possible that a call to <a>outputStreamWrite</a>
--   after this returns <a>True</a> would still block. To guarantee
--   non-blocking behavior, you should always use
--   <a>pollableOutputStreamWriteNonblocking</a>, which will return a
--   <a>IOErrorEnumWouldBlock</a> error rather than blocking.
--   
--   The behaviour of this method is undefined if
--   <a>pollableOutputStreamCanPoll</a> returns <a>False</a> for
--   <i><tt>stream</tt></i>.
--   
--   <i>Since: 2.28</i>
pollableOutputStreamIsWritable :: (HasCallStack, MonadIO m, IsPollableOutputStream a) => a -> m Bool

-- | Attempts to write up to <i><tt>count</tt></i> bytes from
--   <i><tt>buffer</tt></i> to <i><tt>stream</tt></i>, as with
--   <a>outputStreamWrite</a>. If <i><tt>stream</tt></i> is not currently
--   writable, this will immediately return <a>IOErrorEnumWouldBlock</a>,
--   and you can use <a>pollableOutputStreamCreateSource</a> to create a
--   <a>Source</a> that will be triggered when <i><tt>stream</tt></i> is
--   writable.
--   
--   Note that since this method never blocks, you cannot actually use
--   <i><tt>cancellable</tt></i> to cancel it. However, it will return an
--   error if <i><tt>cancellable</tt></i> has already been cancelled when
--   you call, which may happen if you call this method after a source
--   triggers due to having been cancelled.
--   
--   Also note that if <a>IOErrorEnumWouldBlock</a> is returned some
--   underlying transports like D/TLS require that you re-send the same
--   <i><tt>buffer</tt></i> and <i><tt>count</tt></i> in the next write
--   call.
--   
--   The behaviour of this method is undefined if
--   <a>pollableOutputStreamCanPoll</a> returns <a>False</a> for
--   <i><tt>stream</tt></i>.
pollableOutputStreamWriteNonblocking :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> Maybe ByteString -> Maybe b -> m Int64

-- | Attempts to write the bytes contained in the <i><tt>nVectors</tt></i>
--   <i><tt>vectors</tt></i> to <i><tt>stream</tt></i>, as with
--   <a>outputStreamWritev</a>. If <i><tt>stream</tt></i> is not currently
--   writable, this will immediately return
--   %<i><tt>gPOLLABLERETURNWOULDBLOCK</tt></i>, and you can use
--   <a>pollableOutputStreamCreateSource</a> to create a <a>Source</a> that
--   will be triggered when <i><tt>stream</tt></i> is writable.
--   <i><tt>error</tt></i> will *not* be set in that case.
--   
--   Note that since this method never blocks, you cannot actually use
--   <i><tt>cancellable</tt></i> to cancel it. However, it will return an
--   error if <i><tt>cancellable</tt></i> has already been cancelled when
--   you call, which may happen if you call this method after a source
--   triggers due to having been cancelled.
--   
--   Also note that if <a>PollableReturnWouldBlock</a> is returned some
--   underlying transports like D/TLS require that you re-send the same
--   <i><tt>vectors</tt></i> and <i><tt>nVectors</tt></i> in the next write
--   call.
--   
--   The behaviour of this method is undefined if
--   <a>pollableOutputStreamCanPoll</a> returns <a>False</a> for
--   <i><tt>stream</tt></i>.
--   
--   <i>Since: 2.60</i>
pollableOutputStreamWritevNonblocking :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> [OutputVector] -> Maybe b -> m (PollableReturn, CSize)
instance GHC.Classes.Eq GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream o) => GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream


-- | <tt>GPollableInputStream</tt> is implemented by <a>InputStream</a>s
--   that can be polled for readiness to read. This can be used when
--   interfacing with a non-GIO API that expects UNIX-file-descriptor-style
--   asynchronous I/O rather than GIO-style.
--   
--   Some classes may implement <tt>GPollableInputStream</tt> but have only
--   certain instances of that class be pollable. If
--   <a>pollableInputStreamCanPoll</a> returns false, then the behavior of
--   other <tt>GPollableInputStream</tt> methods is undefined.
--   
--   <i>Since: 2.28</i>
module GI.Gio.Interfaces.PollableInputStream

-- | Memory-managed wrapper type.
newtype PollableInputStream
PollableInputStream :: ManagedPtr PollableInputStream -> PollableInputStream

-- | Type class for types which can be safely cast to
--   <a>PollableInputStream</a>, for instance with
--   <a>toPollableInputStream</a>.
class (GObject o, IsDescendantOf PollableInputStream o) => IsPollableInputStream o

-- | Cast to <a>PollableInputStream</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toPollableInputStream :: (MonadIO m, IsPollableInputStream o) => o -> m PollableInputStream

-- | Checks if <i><tt>stream</tt></i> is actually pollable. Some classes
--   may implement <a>PollableInputStream</a> but have only certain
--   instances of that class be pollable. If this method returns
--   <a>False</a>, then the behavior of other <a>PollableInputStream</a>
--   methods is undefined.
--   
--   For any given stream, the value returned by this method is constant; a
--   stream cannot switch from pollable to non-pollable or vice versa.
--   
--   <i>Since: 2.28</i>
pollableInputStreamCanPoll :: (HasCallStack, MonadIO m, IsPollableInputStream a) => a -> m Bool

-- | Creates a <a>Source</a> that triggers when <i><tt>stream</tt></i> can
--   be read, or <i><tt>cancellable</tt></i> is triggered or an error
--   occurs. The callback on the source is of the <a>PollableSourceFunc</a>
--   type.
--   
--   As with <a>pollableInputStreamIsReadable</a>, it is possible that the
--   stream may not actually be readable even after the source triggers, so
--   you should use <a>pollableInputStreamReadNonblocking</a> rather than
--   <a>inputStreamRead</a> from the callback.
--   
--   The behaviour of this method is undefined if
--   <a>pollableInputStreamCanPoll</a> returns <a>False</a> for
--   <i><tt>stream</tt></i>.
--   
--   <i>Since: 2.28</i>
pollableInputStreamCreateSource :: (HasCallStack, MonadIO m, IsPollableInputStream a, IsCancellable b) => a -> Maybe b -> m Source

-- | Checks if <i><tt>stream</tt></i> can be read.
--   
--   Note that some stream types may not be able to implement this 100%
--   reliably, and it is possible that a call to <a>inputStreamRead</a>
--   after this returns <a>True</a> would still block. To guarantee
--   non-blocking behavior, you should always use
--   <a>pollableInputStreamReadNonblocking</a>, which will return a
--   <a>IOErrorEnumWouldBlock</a> error rather than blocking.
--   
--   The behaviour of this method is undefined if
--   <a>pollableInputStreamCanPoll</a> returns <a>False</a> for
--   <i><tt>stream</tt></i>.
--   
--   <i>Since: 2.28</i>
pollableInputStreamIsReadable :: (HasCallStack, MonadIO m, IsPollableInputStream a) => a -> m Bool

-- | Attempts to read up to <i><tt>count</tt></i> bytes from
--   <i><tt>stream</tt></i> into <i><tt>buffer</tt></i>, as with
--   <a>inputStreamRead</a>. If <i><tt>stream</tt></i> is not currently
--   readable, this will immediately return <a>IOErrorEnumWouldBlock</a>,
--   and you can use <a>pollableInputStreamCreateSource</a> to create a
--   <a>Source</a> that will be triggered when <i><tt>stream</tt></i> is
--   readable.
--   
--   Note that since this method never blocks, you cannot actually use
--   <i><tt>cancellable</tt></i> to cancel it. However, it will return an
--   error if <i><tt>cancellable</tt></i> has already been cancelled when
--   you call, which may happen if you call this method after a source
--   triggers due to having been cancelled.
--   
--   The behaviour of this method is undefined if
--   <a>pollableInputStreamCanPoll</a> returns <a>False</a> for
--   <i><tt>stream</tt></i>.
pollableInputStreamReadNonblocking :: (HasCallStack, MonadIO m, IsPollableInputStream a, IsCancellable b) => a -> Maybe ByteString -> Maybe b -> m (Int64, Maybe ByteString)
instance GHC.Classes.Eq GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.PollableInputStream.PollableInputStream)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.PollableInputStream.PollableInputStream o) => GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.PollableInputStream.PollableInputStream


-- | <tt>GNetworkMonitor</tt> provides an easy-to-use cross-platform API
--   for monitoring network connectivity. On Linux, the available
--   implementations are based on the kernel's netlink interface and on
--   NetworkManager.
--   
--   There is also an implementation for use inside Flatpak sandboxes.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Interfaces.NetworkMonitor

-- | Memory-managed wrapper type.
newtype NetworkMonitor
NetworkMonitor :: ManagedPtr NetworkMonitor -> NetworkMonitor

-- | Type class for types which can be safely cast to
--   <a>NetworkMonitor</a>, for instance with <a>toNetworkMonitor</a>.
class (GObject o, IsDescendantOf NetworkMonitor o) => IsNetworkMonitor o

-- | Cast to <a>NetworkMonitor</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toNetworkMonitor :: (MonadIO m, IsNetworkMonitor o) => o -> m NetworkMonitor

-- | Attempts to determine whether or not the host pointed to by
--   <i><tt>connectable</tt></i> can be reached, without actually trying to
--   connect to it.
--   
--   This may return <a>True</a> even when
--   <a>NetworkMonitor:networkAvailable</a> is <a>False</a>, if, for
--   example, <i><tt>monitor</tt></i> can determine that
--   <i><tt>connectable</tt></i> refers to a host on a local network.
--   
--   If <i><tt>monitor</tt></i> believes that an attempt to connect to
--   <i><tt>connectable</tt></i> will succeed, it will return <a>True</a>.
--   Otherwise, it will return <a>False</a> and set <i><tt>error</tt></i>
--   to an appropriate error (such as <a>IOErrorEnumHostUnreachable</a>).
--   
--   Note that although this does not attempt to connect to
--   <i><tt>connectable</tt></i>, it may still block for a brief period of
--   time (eg, trying to do multicast DNS on the local network), so if you
--   do not want to block, you should use
--   <a>networkMonitorCanReachAsync</a>.
--   
--   <i>Since: 2.32</i>
networkMonitorCanReach :: (HasCallStack, MonadIO m, IsNetworkMonitor a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> m ()

-- | Asynchronously attempts to determine whether or not the host pointed
--   to by <i><tt>connectable</tt></i> can be reached, without actually
--   trying to connect to it.
--   
--   For more details, see <a>networkMonitorCanReach</a>.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>networkMonitorCanReachFinish</a> to get
--   the result of the operation.
networkMonitorCanReachAsync :: (HasCallStack, MonadIO m, IsNetworkMonitor a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async network connectivity test. See
--   <a>networkMonitorCanReachAsync</a>.
networkMonitorCanReachFinish :: (HasCallStack, MonadIO m, IsNetworkMonitor a, IsAsyncResult b) => a -> b -> m ()

-- | Gets a more detailed networking state than
--   <a>networkMonitorGetNetworkAvailable</a>.
--   
--   If <a>NetworkMonitor:networkAvailable</a> is <a>False</a>, then the
--   connectivity state will be <a>NetworkConnectivityLocal</a>.
--   
--   If <a>NetworkMonitor:networkAvailable</a> is <a>True</a>, then the
--   connectivity state will be <a>NetworkConnectivityFull</a> (if there is
--   full Internet connectivity), <a>NetworkConnectivityLimited</a> (if the
--   host has a default route, but appears to be unable to actually reach
--   the full Internet), or <a>NetworkConnectivityPortal</a> (if the host
--   is trapped behind a "captive portal" that requires some sort of login
--   or acknowledgement before allowing full Internet access).
--   
--   Note that in the case of <a>NetworkConnectivityLimited</a> and
--   <a>NetworkConnectivityPortal</a>, it is possible that some sites are
--   reachable but others are not. In this case, applications can attempt
--   to connect to remote servers, but should gracefully fall back to their
--   "offline" behavior if the connection attempt fails.
--   
--   <i>Since: 2.44</i>
networkMonitorGetConnectivity :: (HasCallStack, MonadIO m, IsNetworkMonitor a) => a -> m NetworkConnectivity

-- | Gets the default <a>NetworkMonitor</a> for the system.
--   
--   <i>Since: 2.32</i>
networkMonitorGetDefault :: (HasCallStack, MonadIO m) => m NetworkMonitor

-- | Checks if the network is available. "Available" here means that the
--   system has a default route available for at least one of IPv4 or IPv6.
--   It does not necessarily imply that the public Internet is reachable.
--   See <a>NetworkMonitor:networkAvailable</a> for more details.
--   
--   <i>Since: 2.32</i>
networkMonitorGetNetworkAvailable :: (HasCallStack, MonadIO m, IsNetworkMonitor a) => a -> m Bool

-- | Checks if the network is metered. See
--   <a>NetworkMonitor:networkMetered</a> for more details.
--   
--   <i>Since: 2.46</i>
networkMonitorGetNetworkMetered :: (HasCallStack, MonadIO m, IsNetworkMonitor a) => a -> m Bool

-- | Get the value of the “<tt>connectivity</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkMonitor #connectivity
--   </pre>
getNetworkMonitorConnectivity :: (MonadIO m, IsNetworkMonitor o) => o -> m NetworkConnectivity

-- | Get the value of the “<tt>network-available</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkMonitor #networkAvailable
--   </pre>
getNetworkMonitorNetworkAvailable :: (MonadIO m, IsNetworkMonitor o) => o -> m Bool

-- | Get the value of the “<tt>network-metered</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> networkMonitor #networkMetered
--   </pre>
getNetworkMonitorNetworkMetered :: (MonadIO m, IsNetworkMonitor o) => o -> m Bool

-- | Emitted when the network configuration changes.
--   
--   <i>Since: 2.32</i>
type NetworkMonitorNetworkChangedCallback = Bool -> IO ()

-- | Connect a signal handler for the <a>networkChanged</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> networkMonitor #networkChanged callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterNetworkMonitorNetworkChanged :: (IsNetworkMonitor a, MonadIO m) => a -> ((?self :: a) => NetworkMonitorNetworkChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>networkChanged</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> networkMonitor #networkChanged callback
--   </pre>
onNetworkMonitorNetworkChanged :: (IsNetworkMonitor a, MonadIO m) => a -> ((?self :: a) => NetworkMonitorNetworkChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor o) => GI.Gio.Interfaces.NetworkMonitor.IsNetworkMonitor o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor


-- | The <tt>GMount</tt> interface represents a user-visible mount, such as
--   a mounted file system.
--   
--   <tt>GMount</tt> is a ‘mounted’ filesystem that you can access. Mounted
--   is in quotes because it’s not the same as a UNIX mount, it might be a
--   GVFS mount, but you can still access the files on it if you use GIO.
--   
--   A <tt>GMount</tt> might be associated with a <a>Volume</a> (such as a
--   USB flash drive) which hosts it.
--   
--   Unmounting a <tt>GMount</tt> instance is an asynchronous operation.
--   For more information about asynchronous operations, see
--   <a>AsyncResult</a> and <a>Task</a>. To unmount a <tt>GMount</tt>
--   instance, first call <a>mountUnmountWithOperation</a> with (at least)
--   the <tt>GMount</tt> instance and a
--   [type<i><tt>gio</tt></i>.AsyncReadyCallback]. The callback will be
--   fired when the operation has resolved (either with success or
--   failure), and a <a>AsyncResult</a> structure will be passed to the
--   callback. That callback should then call
--   <a>mountUnmountWithOperationFinish</a> with the <tt>GMount</tt> and
--   the <a>AsyncResult</a> data to see if the operation was completed
--   successfully. If an <tt>error</tt> is present when
--   <a>mountUnmountWithOperationFinish</a> is called, then it will be
--   filled with any error information.
--   
--   Note, when <a>porting from GnomeVFS</a>, <tt>GMount</tt> is the moral
--   equivalent of <tt>GnomeVFSVolume</tt>.
module GI.Gio.Interfaces.Mount

-- | Memory-managed wrapper type.
newtype Mount
Mount :: ManagedPtr Mount -> Mount

-- | Type class for types which can be safely cast to <a>Mount</a>, for
--   instance with <a>toMount</a>.
class (GObject o, IsDescendantOf Mount o) => IsMount o

-- | Cast to <a>Mount</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toMount :: (MonadIO m, IsMount o) => o -> m Mount

-- | Checks if <i><tt>mount</tt></i> can be ejected.
mountCanEject :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool

-- | Checks if <i><tt>mount</tt></i> can be unmounted.
mountCanUnmount :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool

-- | Ejects a mount. This is an asynchronous operation, and is finished by
--   calling <a>mountEjectFinish</a> with the <i><tt>mount</tt></i> and
--   <a>AsyncResult</a> data returned in the <i><tt>callback</tt></i>.

-- | <i>Deprecated: (Since version 2.22)Use <a>mountEjectWithOperation</a>
--   instead.</i>
mountEject :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes ejecting a mount. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>mountEjectWithOperationFinish</a> instead.</i>
mountEjectFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()

-- | Ejects a mount. This is an asynchronous operation, and is finished by
--   calling <a>mountEjectWithOperationFinish</a> with the
--   <i><tt>mount</tt></i> and <a>AsyncResult</a> data returned in the
--   <i><tt>callback</tt></i>.
--   
--   <i>Since: 2.22</i>
mountEjectWithOperation :: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes ejecting a mount. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.
--   
--   <i>Since: 2.22</i>
mountEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()

-- | Gets the default location of <i><tt>mount</tt></i>. The default
--   location of the given <i><tt>mount</tt></i> is a path that reflects
--   the main entry point for the user (e.g. the home directory, or the
--   root of the volume).
mountGetDefaultLocation :: (HasCallStack, MonadIO m, IsMount a) => a -> m File

-- | Gets the drive for the <i><tt>mount</tt></i>.
--   
--   This is a convenience method for getting the <a>Volume</a> and then
--   using that object to get the <a>Drive</a>.
mountGetDrive :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Drive)

-- | Gets the icon for <i><tt>mount</tt></i>.
mountGetIcon :: (HasCallStack, MonadIO m, IsMount a) => a -> m Icon

-- | Gets the name of <i><tt>mount</tt></i>.
mountGetName :: (HasCallStack, MonadIO m, IsMount a) => a -> m Text

-- | Gets the root directory on <i><tt>mount</tt></i>.
mountGetRoot :: (HasCallStack, MonadIO m, IsMount a) => a -> m File

-- | Gets the sort key for <i><tt>mount</tt></i>, if any.
--   
--   <i>Since: 2.32</i>
mountGetSortKey :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Text)

-- | Gets the symbolic icon for <i><tt>mount</tt></i>.
--   
--   <i>Since: 2.34</i>
mountGetSymbolicIcon :: (HasCallStack, MonadIO m, IsMount a) => a -> m Icon

-- | Gets the UUID for the <i><tt>mount</tt></i>. The reference is
--   typically based on the file system UUID for the mount in question and
--   should be considered an opaque string. Returns <a>Nothing</a> if there
--   is no UUID available.
mountGetUuid :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Text)

-- | Gets the volume for the <i><tt>mount</tt></i>.
mountGetVolume :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Volume)

-- | Tries to guess the type of content stored on <i><tt>mount</tt></i>.
--   Returns one or more textual identifiers of well-known content types
--   (typically prefixed with "x-content/"), e.g. x-content/image-dcf for
--   camera memory cards. See the <a>shared-mime-info</a> specification for
--   more on x-content types.
--   
--   This is an asynchronous operation (see
--   <a>mountGuessContentTypeSync</a> for the synchronous version), and is
--   finished by calling <a>mountGuessContentTypeFinish</a> with the
--   <i><tt>mount</tt></i> and <a>AsyncResult</a> data returned in the
--   <i><tt>callback</tt></i>.
--   
--   <i>Since: 2.18</i>
mountGuessContentType :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> Bool -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes guessing content types of <i><tt>mount</tt></i>. If any
--   errors occurred during the operation, <i><tt>error</tt></i> will be
--   set to contain the errors and <a>False</a> will be returned. In
--   particular, you may get an <a>IOErrorEnumNotSupported</a> if the mount
--   does not support content guessing.
--   
--   <i>Since: 2.18</i>
mountGuessContentTypeFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m [Text]

-- | Tries to guess the type of content stored on <i><tt>mount</tt></i>.
--   Returns one or more textual identifiers of well-known content types
--   (typically prefixed with "x-content/"), e.g. x-content/image-dcf for
--   camera memory cards. See the <a>shared-mime-info</a> specification for
--   more on x-content types.
--   
--   This is a synchronous operation and as such may block doing IO; see
--   <a>mountGuessContentType</a> for the asynchronous version.
--   
--   <i>Since: 2.18</i>
mountGuessContentTypeSync :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> Bool -> Maybe b -> m [Text]

-- | Determines if <i><tt>mount</tt></i> is shadowed. Applications or
--   libraries should avoid displaying <i><tt>mount</tt></i> in the user
--   interface if it is shadowed.
--   
--   A mount is said to be shadowed if there exists one or more user
--   visible objects (currently <a>Mount</a> objects) with a root that is
--   inside the root of <i><tt>mount</tt></i>.
--   
--   One application of shadow mounts is when exposing a single file system
--   that is used to address several logical volumes. In this situation, a
--   <a>VolumeMonitor</a> implementation would create two <a>Volume</a>
--   objects (for example, one for the camera functionality of the device
--   and one for a SD card reader on the device) with activation URIs
--   <tt>gphoto2://[usb:001,002]/store1/</tt> and
--   <tt>gphoto2://[usb:001,002]/store2/</tt>. When the underlying mount
--   (with root <tt>gphoto2://[usb:001,002]/</tt>) is mounted, said
--   <a>VolumeMonitor</a> implementation would create two <a>Mount</a>
--   objects (each with their root matching the corresponding volume
--   activation root) that would shadow the original mount.
--   
--   The proxy monitor in GVfs 2.26 and later, automatically creates and
--   manage shadow mounts (and shadows the underlying mount) if the
--   activation root on a <a>Volume</a> is set.
--   
--   <i>Since: 2.20</i>
mountIsShadowed :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool

-- | Remounts a mount. This is an asynchronous operation, and is finished
--   by calling <a>mountRemountFinish</a> with the <i><tt>mount</tt></i>
--   and <tt><i>GAsyncResults</i></tt> data returned in the
--   <i><tt>callback</tt></i>.
--   
--   Remounting is useful when some setting affecting the operation of the
--   volume has been changed, as these may need a remount to take affect.
--   While this is semantically equivalent with unmounting and then
--   remounting not all backends might need to actually be unmounted.
mountRemount :: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) => a -> [MountMountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes remounting a mount. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.
mountRemountFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()

-- | Increments the shadow count on <i><tt>mount</tt></i>. Usually used by
--   <a>VolumeMonitor</a> implementations when creating a shadow mount for
--   <i><tt>mount</tt></i>, see <a>mountIsShadowed</a> for more
--   information. The caller will need to emit the <a>Mount::changed</a>
--   signal on <i><tt>mount</tt></i> manually.
--   
--   <i>Since: 2.20</i>
mountShadow :: (HasCallStack, MonadIO m, IsMount a) => a -> m ()

-- | Unmounts a mount. This is an asynchronous operation, and is finished
--   by calling <a>mountUnmountFinish</a> with the <i><tt>mount</tt></i>
--   and <a>AsyncResult</a> data returned in the <i><tt>callback</tt></i>.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>mountUnmountWithOperation</a> instead.</i>
mountUnmount :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes unmounting a mount. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>mountUnmountWithOperationFinish</a> instead.</i>
mountUnmountFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()

-- | Unmounts a mount. This is an asynchronous operation, and is finished
--   by calling <a>mountUnmountWithOperationFinish</a> with the
--   <i><tt>mount</tt></i> and <a>AsyncResult</a> data returned in the
--   <i><tt>callback</tt></i>.
--   
--   <i>Since: 2.22</i>
mountUnmountWithOperation :: (HasCallStack, MonadIO m, IsMount a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes unmounting a mount. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.
--   
--   <i>Since: 2.22</i>
mountUnmountWithOperationFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m ()

-- | Decrements the shadow count on <i><tt>mount</tt></i>. Usually used by
--   <a>VolumeMonitor</a> implementations when destroying a shadow mount
--   for <i><tt>mount</tt></i>, see <a>mountIsShadowed</a> for more
--   information. The caller will need to emit the <a>Mount::changed</a>
--   signal on <i><tt>mount</tt></i> manually.
--   
--   <i>Since: 2.20</i>
mountUnshadow :: (HasCallStack, MonadIO m, IsMount a) => a -> m ()

-- | Emitted when the mount has been changed.
type MountChangedCallback = IO ()

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> mount #changed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> mount #changed callback
--   </pre>
onMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId

-- | This signal may be emitted when the <a>Mount</a> is about to be
--   unmounted.
--   
--   This signal depends on the backend and is only emitted if GIO was used
--   to unmount.
--   
--   <i>Since: 2.22</i>
type MountPreUnmountCallback = IO ()

-- | Connect a signal handler for the <a>preUnmount</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> mount #preUnmount callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>preUnmount</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> mount #preUnmount callback
--   </pre>
onMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId

-- | This signal is emitted when the <a>Mount</a> have been unmounted. If
--   the recipient is holding references to the object they should release
--   them so the object can be finalized.
type MountUnmountedCallback = IO ()

-- | Connect a signal handler for the <a>unmounted</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> mount #unmounted callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterMountUnmounted :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountUnmountedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>unmounted</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> mount #unmounted callback
--   </pre>
onMountUnmounted :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountUnmountedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.Mount.Mount
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Mount.Mount
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Mount.Mount
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Mount.Mount)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Mount.Mount o) => GI.Gio.Interfaces.Mount.IsMount o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Mount.Mount
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Mount.Mount


-- | <tt>GLoadableIcon</tt> extends the <a>Icon</a> interface and adds the
--   ability to load icons from streams.
module GI.Gio.Interfaces.LoadableIcon

-- | Memory-managed wrapper type.
newtype LoadableIcon
LoadableIcon :: ManagedPtr LoadableIcon -> LoadableIcon

-- | Type class for types which can be safely cast to <a>LoadableIcon</a>,
--   for instance with <a>toLoadableIcon</a>.
class (GObject o, IsDescendantOf LoadableIcon o) => IsLoadableIcon o

-- | Cast to <a>LoadableIcon</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toLoadableIcon :: (MonadIO m, IsLoadableIcon o) => o -> m LoadableIcon

-- | Loads a loadable icon. For the asynchronous version of this function,
--   see <a>loadableIconLoadAsync</a>.
loadableIconLoad :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) => a -> Int32 -> Maybe b -> m (InputStream, Text)

-- | Loads an icon asynchronously. To finish this function, see
--   <a>loadableIconLoadFinish</a>. For the synchronous, blocking version
--   of this function, see <a>loadableIconLoad</a>.
loadableIconLoadAsync :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous icon load started in
--   <a>loadableIconLoadAsync</a>.
loadableIconLoadFinish :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsAsyncResult b) => a -> b -> m (InputStream, Text)
instance GHC.Classes.Eq GI.Gio.Interfaces.LoadableIcon.LoadableIcon
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.LoadableIcon.LoadableIcon
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.LoadableIcon.LoadableIcon
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.LoadableIcon.LoadableIcon)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.LoadableIcon.LoadableIcon o) => GI.Gio.Interfaces.LoadableIcon.IsLoadableIcon o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.LoadableIcon.LoadableIcon
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.LoadableIcon.LoadableIcon


-- | <tt>GFile</tt> is a high level abstraction for manipulating files on a
--   virtual file system. <tt>GFile</tt>s are lightweight, immutable
--   objects that do no I/O upon creation. It is necessary to understand
--   that <tt>GFile</tt> objects do not represent files, merely an
--   identifier for a file. All file content I/O is implemented as
--   streaming operations (see <a>InputStream</a> and <a>OutputStream</a>).
--   
--   To construct a <tt>GFile</tt>, you can use:
--   
--   <ul>
--   <li><a>fileNewForPath</a> if you have a path.</li>
--   <li><a>fileNewForUri</a> if you have a URI.</li>
--   <li><a>fileNewForCommandlineArg</a> or
--   <a>fileNewForCommandlineArgAndCwd</a> for a command line
--   argument.</li>
--   <li><a>fileNewTmp</a> to create a temporary file from a template.</li>
--   <li><a>fileNewTmpAsync</a> to asynchronously create a temporary
--   file.</li>
--   <li><a>fileNewTmpDirAsync</a> to asynchronously create a temporary
--   directory.</li>
--   <li><a>fileParseName</a> from a UTF-8 string gotten from
--   <a>fileGetParseName</a>.</li>
--   <li><a>File</a>.<tt><i>new_build_filename</i></tt>() or
--   <a>fileNewBuildFilenamev</a> to create a file from path elements.</li>
--   </ul>
--   
--   One way to think of a <tt>GFile</tt> is as an abstraction of a
--   pathname. For normal files the system pathname is what is stored
--   internally, but as <tt>GFile</tt>s are extensible it could also be
--   something else that corresponds to a pathname in a userspace
--   implementation of a filesystem.
--   
--   <tt>GFile</tt>s make up hierarchies of directories and files that
--   correspond to the files on a filesystem. You can move through the file
--   system with <tt>GFile</tt> using <a>fileGetParent</a> to get an
--   identifier for the parent directory, <a>fileGetChild</a> to get a
--   child within a directory, and <a>fileResolveRelativePath</a> to
--   resolve a relative path between two <tt>GFile</tt>s. There can be
--   multiple hierarchies, so you may not end up at the same root if you
--   repeatedly call <a>fileGetParent</a> on two different files.
--   
--   All <tt>GFile</tt>s have a basename (get with <a>fileGetBasename</a>).
--   These names are byte strings that are used to identify the file on the
--   filesystem (relative to its parent directory) and there is no
--   guarantees that they have any particular charset encoding or even make
--   any sense at all. If you want to use filenames in a user interface you
--   should use the display name that you can get by requesting the
--   <tt>G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</tt> attribute with
--   <a>fileQueryInfo</a>. This is guaranteed to be in UTF-8 and can be
--   used in a user interface. But always store the real basename or the
--   <tt>GFile</tt> to use to actually access the file, because there is no
--   way to go from a display name to the actual name.
--   
--   Using <tt>GFile</tt> as an identifier has the same weaknesses as using
--   a path in that there may be multiple aliases for the same file. For
--   instance, hard or soft links may cause two different <tt>GFile</tt>s
--   to refer to the same file. Other possible causes for aliases are: case
--   insensitive filesystems, short and long names on FAT/NTFS, or bind
--   mounts in Linux. If you want to check if two <tt>GFile</tt>s point to
--   the same file you can query for the <tt>G_FILE_ATTRIBUTE_ID_FILE</tt>
--   attribute. Note that <tt>GFile</tt> does some trivial canonicalization
--   of pathnames passed in, so that trivial differences in the path string
--   used at creation (duplicated slashes, slash at end of path, <tt>.</tt>
--   or <tt>..</tt> path segments, etc) does not create different
--   <tt>GFile</tt>s.
--   
--   Many <tt>GFile</tt> operations have both synchronous and asynchronous
--   versions to suit your application. Asynchronous versions of
--   synchronous functions simply have <tt>_async()</tt> appended to their
--   function names. The asynchronous I/O functions call a
--   [callback<i><tt>gio</tt></i>.AsyncReadyCallback] which is then used to
--   finalize the operation, producing a <a>AsyncResult</a> which is then
--   passed to the function’s matching <tt>_finish()</tt> operation.
--   
--   It is highly recommended to use asynchronous calls when running within
--   a shared main loop, such as in the main thread of an application. This
--   avoids I/O operations blocking other sources on the main loop from
--   being dispatched. Synchronous I/O operations should be performed from
--   worker threads. See the <a>introduction to asynchronous programming
--   section</a> for more.
--   
--   Some <tt>GFile</tt> operations almost always take a noticeable amount
--   of time, and so do not have synchronous analogs. Notable cases
--   include:
--   
--   <ul>
--   <li><a>fileMountMountable</a> to mount a mountable file.</li>
--   <li><a>fileUnmountMountableWithOperation</a> to unmount a mountable
--   file.</li>
--   <li><a>fileEjectMountableWithOperation</a> to eject a mountable
--   file.</li>
--   </ul>
--   
--   <h2>Entity Tags</h2>
--   
--   One notable feature of <tt>GFile</tt>s are entity tags, or ‘etags’ for
--   short. Entity tags are somewhat like a more abstract version of the
--   traditional mtime, and can be used to quickly determine if the file
--   has been modified from the version on the file system. See the
--   description of HTTP ETags in <a>RFC9110</a>. <tt>GFile</tt> Entity
--   Tags are a very similar concept.
module GI.Gio.Interfaces.File

-- | Memory-managed wrapper type.
newtype File
File :: ManagedPtr File -> File

-- | Type class for types which can be safely cast to <a>File</a>, for
--   instance with <a>toFile</a>.
class (GObject o, IsDescendantOf File o) => IsFile o

-- | Cast to <a>File</a>, for types for which this is known to be safe. For
--   general casts, use <a>castTo</a>.
toFile :: (MonadIO m, IsFile o) => o -> m File

-- | Gets an output stream for appending data to the file. If the file
--   doesn't already exist it is created.
--   
--   By default files created are generally readable by everyone, but if
--   you pass <a>FileCreateFlagsPrivate</a> in <i><tt>flags</tt></i> the
--   file will be made readable only to the current user, to the level that
--   is supported on the target filesystem.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   Some file systems don't allow all file names, and may return an
--   <a>IOErrorEnumInvalidFilename</a> error. If the file is a directory
--   the <a>IOErrorEnumIsDirectory</a> error will be returned. Other errors
--   are possible too, and depend on what kind of filesystem the file is
--   on.
fileAppendTo :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Maybe b -> m FileOutputStream

-- | Asynchronously opens <i><tt>file</tt></i> for appending.
--   
--   For more details, see <a>fileAppendTo</a> which is the synchronous
--   version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileAppendToFinish</a> to get the result
--   of the operation.
fileAppendToAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file append operation started with
--   <a>fileAppendToAsync</a>.
fileAppendToFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileOutputStream

-- | Prepares the file attribute query string for copying to
--   <i><tt>file</tt></i>.
--   
--   This function prepares an attribute query string to be passed to
--   <a>fileQueryInfo</a> to get a list of attributes normally copied with
--   the file (see <a>fileCopyAttributes</a> for the detailed description).
--   This function is used by the implementation of
--   <a>fileCopyAttributes</a> and is useful when one needs to query and
--   set the attributes in two stages (e.g., for recursive move of a
--   directory).
--   
--   <i>Since: 2.68</i>
fileBuildAttributeListForCopy :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCopyFlags] -> Maybe b -> m Text

-- | Copies the file <i><tt>source</tt></i> to the location specified by
--   <i><tt>destination</tt></i>. Can not handle recursive copies of
--   directories.
--   
--   If the flag <a>FileCopyFlagsOverwrite</a> is specified an already
--   existing <i><tt>destination</tt></i> file is overwritten.
--   
--   If the flag <a>FileCopyFlagsNofollowSymlinks</a> is specified then
--   symlinks will be copied as symlinks, otherwise the target of the
--   <i><tt>source</tt></i> symlink will be copied.
--   
--   If the flag <a>FileCopyFlagsAllMetadata</a> is specified then all the
--   metadata that is possible to copy is copied, not just the default
--   subset (which, for instance, does not include the owner, see
--   <a>FileInfo</a>).
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If <i><tt>progressCallback</tt></i> is not <a>Nothing</a>, then the
--   operation can be monitored by setting this to a
--   <a>FileProgressCallback</a> function.
--   <i><tt>progressCallbackData</tt></i> will be passed to this function.
--   It is guaranteed that this callback will be called after all data has
--   been transferred with the total number of bytes copied during the
--   operation.
--   
--   If the <i><tt>source</tt></i> file does not exist, then the
--   <a>IOErrorEnumNotFound</a> error is returned, independent on the
--   status of the <i><tt>destination</tt></i>.
--   
--   If <a>FileCopyFlagsOverwrite</a> is not specified and the target
--   exists, then the error <a>IOErrorEnumExists</a> is returned.
--   
--   If trying to overwrite a file over a directory, the
--   <a>IOErrorEnumIsDirectory</a> error is returned. If trying to
--   overwrite a directory with a directory the
--   <a>IOErrorEnumWouldMerge</a> error is returned.
--   
--   If the source is a directory and the target does not exist, or
--   <a>FileCopyFlagsOverwrite</a> is specified and the target is a file,
--   then the <a>IOErrorEnumWouldRecurse</a> error is returned.
--   
--   If you are interested in copying the <a>File</a> object itself (not
--   the on-disk file), see <a>fileDup</a>.
fileCopy :: (HasCallStack, MonadIO m, IsFile a, IsFile b, IsCancellable c) => a -> b -> [FileCopyFlags] -> Maybe c -> Maybe FileProgressCallback -> m ()

-- | Version of <a>fileCopyAsync</a> using closures instead of callbacks
--   for easier binding in other languages.
--   
--   <i>Since: 2.82</i>
fileCopyAsync :: (HasCallStack, MonadIO m, IsFile a, IsFile b, IsCancellable c) => a -> b -> [FileCopyFlags] -> Int32 -> Maybe c -> Maybe (GClosure d) -> GClosure e -> m ()

-- | Copies the file attributes from <i><tt>source</tt></i> to
--   <i><tt>destination</tt></i>.
--   
--   Normally only a subset of the file attributes are copied, those that
--   are copies in a normal file copy operation (which for instance does
--   not include e.g. owner). However if <a>FileCopyFlagsAllMetadata</a> is
--   specified in <i><tt>flags</tt></i>, then all the metadata that is
--   possible to copy is copied. This is useful when implementing move by
--   copy + delete source.
fileCopyAttributes :: (HasCallStack, MonadIO m, IsFile a, IsFile b, IsCancellable c) => a -> b -> [FileCopyFlags] -> Maybe c -> m ()

-- | Finishes copying the file started with
--   <tt><i>g_file_copy_async()</i></tt>.
fileCopyFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Creates a new file and returns an output stream for writing to it. The
--   file must not already exist.
--   
--   By default files created are generally readable by everyone, but if
--   you pass <a>FileCreateFlagsPrivate</a> in <i><tt>flags</tt></i> the
--   file will be made readable only to the current user, to the level that
--   is supported on the target filesystem.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If a file or directory with this name already exists the
--   <a>IOErrorEnumExists</a> error will be returned. Some file systems
--   don't allow all file names, and may return an
--   <a>IOErrorEnumInvalidFilename</a> error, and if the name is to long
--   <a>IOErrorEnumFilenameTooLong</a> will be returned. Other errors are
--   possible too, and depend on what kind of filesystem the file is on.
fileCreate :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Maybe b -> m FileOutputStream

-- | Asynchronously creates a new file and returns an output stream for
--   writing to it. The file must not already exist.
--   
--   For more details, see <a>fileCreate</a> which is the synchronous
--   version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileCreateFinish</a> to get the result of
--   the operation.
fileCreateAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file create operation started with
--   <a>fileCreateAsync</a>.
fileCreateFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileOutputStream

-- | Creates a new file and returns a stream for reading and writing to it.
--   The file must not already exist.
--   
--   By default files created are generally readable by everyone, but if
--   you pass <a>FileCreateFlagsPrivate</a> in <i><tt>flags</tt></i> the
--   file will be made readable only to the current user, to the level that
--   is supported on the target filesystem.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If a file or directory with this name already exists, the
--   <a>IOErrorEnumExists</a> error will be returned. Some file systems
--   don't allow all file names, and may return an
--   <a>IOErrorEnumInvalidFilename</a> error, and if the name is too long,
--   <a>IOErrorEnumFilenameTooLong</a> will be returned. Other errors are
--   possible too, and depend on what kind of filesystem the file is on.
--   
--   Note that in many non-local file cases read and write streams are not
--   supported, so make sure you really need to do read and write
--   streaming, rather than just opening for reading or writing.
--   
--   <i>Since: 2.22</i>
fileCreateReadwrite :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Maybe b -> m FileIOStream

-- | Asynchronously creates a new file and returns a stream for reading and
--   writing to it. The file must not already exist.
--   
--   For more details, see <a>fileCreateReadwrite</a> which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileCreateReadwriteFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
fileCreateReadwriteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileCreateFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file create operation started with
--   <a>fileCreateReadwriteAsync</a>.
--   
--   <i>Since: 2.22</i>
fileCreateReadwriteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileIOStream

-- | Deletes a file. If the <i><tt>file</tt></i> is a directory, it will
--   only be deleted if it is empty. This has the same semantics as
--   <a>unlink</a>.
--   
--   If <i><tt>file</tt></i> doesn’t exist, <a>IOErrorEnumNotFound</a> will
--   be returned. This allows for deletion to be implemented avoiding
--   <a>time-of-check to time-of-use races</a>:
--   
--   <pre>
--   g_autoptr(GError) local_error = NULL;
--   if (!g_file_delete (my_file, my_cancellable, &amp;local_error) &amp;&amp;
--       !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
--     {
--       // deletion failed for some reason other than the file not existing:
--       // so report the error
--       g_warning ("Failed to delete %s: %s",
--                  g_file_peek_path (my_file), local_error-&gt;message);
--     }
--   </pre>
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileDelete :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously delete a file. If the <i><tt>file</tt></i> is a
--   directory, it will only be deleted if it is empty. This has the same
--   semantics as <a>unlink</a>.
--   
--   <i>Since: 2.34</i>
fileDeleteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes deleting a file started with <a>fileDeleteAsync</a>.
--   
--   <i>Since: 2.34</i>
fileDeleteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Duplicates a <a>File</a> handle. This operation does not duplicate the
--   actual file or directory represented by the <a>File</a>; see
--   <a>fileCopy</a> if attempting to copy a file.
--   
--   <a>fileDup</a> is useful when a second handle is needed to the same
--   underlying file, for use in a separate thread (t<a>File</a> is not
--   thread-safe). For use within the same thread, use <a>objectRef</a> to
--   increment the existing object’s reference count.
--   
--   This call does no blocking I/O.
fileDup :: (HasCallStack, MonadIO m, IsFile a) => a -> m File

-- | Starts an asynchronous eject on a mountable. When this operation has
--   completed, <i><tt>callback</tt></i> will be called with
--   <i><tt>userUser</tt></i> data, and the operation can be finalized with
--   <a>fileEjectMountableFinish</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>fileEjectMountableWithOperation</a> instead.</i>
fileEjectMountable :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous eject operation started by
--   <a>fileEjectMountable</a>.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>fileEjectMountableWithOperationFinish</a>instead.</i>
fileEjectMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Starts an asynchronous eject on a mountable. When this operation has
--   completed, <i><tt>callback</tt></i> will be called with
--   <i><tt>userUser</tt></i> data, and the operation can be finalized with
--   <a>fileEjectMountableWithOperationFinish</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   <i>Since: 2.22</i>
fileEjectMountableWithOperation :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous eject operation started by
--   <a>fileEjectMountableWithOperation</a>.
--   
--   <i>Since: 2.22</i>
fileEjectMountableWithOperationFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Gets the requested information about the files in a directory. The
--   result is a <a>FileEnumerator</a> object that will give out
--   <a>FileInfo</a> objects for all the files in the directory.
--   
--   The <i><tt>attributes</tt></i> value is a string that specifies the
--   file attributes that should be gathered. It is not an error if it's
--   not possible to read a particular requested attribute from a file - it
--   just won't be set. <i><tt>attributes</tt></i> should be a
--   comma-separated list of attributes or attribute wildcards. The
--   wildcard "*" means all attributes, and a wildcard like "standard::*"
--   means all attributes in the standard namespace. An example attribute
--   query be "standard::*,owner<a>user</a>". The standard attributes are
--   available as defines, like <a>FILE_ATTRIBUTE_STANDARD_NAME</a>.
--   <a>FILE_ATTRIBUTE_STANDARD_NAME</a> should always be specified if you
--   plan to call <a>fileEnumeratorGetChild</a> or
--   <a>fileEnumeratorIterate</a> on the returned enumerator.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If the file does not exist, the <a>IOErrorEnumNotFound</a> error will
--   be returned. If the file is not a directory, the
--   <a>IOErrorEnumNotDirectory</a> error will be returned. Other errors
--   are possible too.
fileEnumerateChildren :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> [FileQueryInfoFlags] -> Maybe b -> m FileEnumerator

-- | Asynchronously gets the requested information about the files in a
--   directory. The result is a <a>FileEnumerator</a> object that will give
--   out <a>FileInfo</a> objects for all the files in the directory.
--   
--   For more details, see <a>fileEnumerateChildren</a> which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileEnumerateChildrenFinish</a> to get
--   the result of the operation.
fileEnumerateChildrenAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> [FileQueryInfoFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an async enumerate children operation. See
--   <a>fileEnumerateChildrenAsync</a>.
fileEnumerateChildrenFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileEnumerator

-- | Checks if the two given <tt><i>GFiles</i></tt> refer to the same file.
--   
--   This function can be used with <a>fileHash</a> to insert <a>File</a>s
--   efficiently in a hash table.
--   
--   Note that two <tt><i>GFiles</i></tt> that differ can still refer to
--   the same file on the filesystem due to various forms of filename
--   aliasing. For local files, this function essentially compares the file
--   paths, so two <a>File</a>s which point to different hard or soft links
--   will not be considered equal, despite pointing to the same content.
--   
--   For determining whether two files are hardlinked, see
--   [const<i><tt>gio</tt></i>.FILE_ATTRIBUTE_ID_FILE].
--   
--   This call does no blocking I/O.
fileEqual :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> b -> m Bool

-- | Gets a <a>Mount</a> for the <a>File</a>.
--   
--   <a>Mount</a> is returned only for user interesting locations, see
--   <a>VolumeMonitor</a>. If the <a>FileIface</a> for <i><tt>file</tt></i>
--   does not have a <tt><i>mount</i></tt>, <i><tt>error</tt></i> will be
--   set to <a>IOErrorEnumNotFound</a> and <a>Nothing</a>
--   <tt><i>will</i></tt> be returned.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileFindEnclosingMount :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m Mount

-- | Asynchronously gets the mount for the file.
--   
--   For more details, see <a>fileFindEnclosingMount</a> which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileFindEnclosingMountFinish</a> to get
--   the result of the operation.
fileFindEnclosingMountAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous find mount request. See
--   <a>fileFindEnclosingMountAsync</a>.
fileFindEnclosingMountFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m Mount

-- | Gets the base name (the last component of the path) for a given
--   <a>File</a>.
--   
--   If called for the top level of a system (such as the filesystem root
--   or a uri like sftp://host/) it will return a single directory
--   separator (and on Windows, possibly a drive letter).
--   
--   The base name is a byte string (not UTF-8). It has no defined encoding
--   or rules other than it may not contain zero bytes. If you want to use
--   filenames in a user interface you should use the display name that you
--   can get by requesting the <a>FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME</a>
--   attribute with <a>fileQueryInfo</a>.
--   
--   This call does no blocking I/O.
fileGetBasename :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe [Char])

-- | Gets a child of <i><tt>file</tt></i> with basename equal to
--   <i><tt>name</tt></i>.
--   
--   Note that the file with that specific name might not exist, but you
--   can still have a <a>File</a> that points to it. You can use this for
--   instance to create that file.
--   
--   This call does no blocking I/O.
fileGetChild :: (HasCallStack, MonadIO m, IsFile a) => a -> [Char] -> m File

-- | Gets the child of <i><tt>file</tt></i> for a given
--   <i><tt>displayName</tt></i> (i.e. a UTF-8 version of the name). If
--   this function fails, it returns <a>Nothing</a> and
--   <i><tt>error</tt></i> will be set. This is very useful when
--   constructing a <a>File</a> for a new file and the user entered the
--   filename in the user interface, for instance when you select a
--   directory and type a filename in the file selector.
--   
--   This call does no blocking I/O.
fileGetChildForDisplayName :: (HasCallStack, MonadIO m, IsFile a) => a -> Text -> m File

-- | Gets the parent directory for the <i><tt>file</tt></i>. If the
--   <i><tt>file</tt></i> represents the root directory of the file system,
--   then <a>Nothing</a> will be returned.
--   
--   This call does no blocking I/O.
fileGetParent :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe File)

-- | Gets the parse name of the <i><tt>file</tt></i>. A parse name is a
--   UTF-8 string that describes the file such that one can get the
--   <a>File</a> back using <a>fileParseName</a>.
--   
--   This is generally used to show the <a>File</a> as a nice full-pathname
--   kind of string in a user interface, like in a location entry.
--   
--   For local files with names that can safely be converted to UTF-8 the
--   pathname is used, otherwise the IRI is used (a form of URI that allows
--   UTF-8 characters unescaped).
--   
--   This call does no blocking I/O.
fileGetParseName :: (HasCallStack, MonadIO m, IsFile a) => a -> m Text

-- | Gets the local pathname for <a>File</a>, if one exists. If
--   non-<a>Nothing</a>, this is guaranteed to be an absolute, canonical
--   path. It might contain symlinks.
--   
--   This call does no blocking I/O.
fileGetPath :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe [Char])

-- | Gets the path for <i><tt>descendant</tt></i> relative to
--   <i><tt>parent</tt></i>.
--   
--   This call does no blocking I/O.
fileGetRelativePath :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> b -> m (Maybe [Char])

-- | Gets the URI for the <i><tt>file</tt></i>.
--   
--   This call does no blocking I/O.
fileGetUri :: (HasCallStack, MonadIO m, IsFile a) => a -> m Text

-- | Gets the URI scheme for a <a>File</a>. RFC 3986 decodes the scheme as:
--   
--   <pre>
--   URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
--   </pre>
--   
--   Common schemes include "file", "http", "ftp", etc.
--   
--   The scheme can be different from the one used to construct the
--   <a>File</a>, in that it might be replaced with one that is logically
--   equivalent to the <a>File</a>.
--   
--   This call does no blocking I/O.
fileGetUriScheme :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe Text)

-- | Checks if <i><tt>file</tt></i> has a parent, and optionally, if it is
--   <i><tt>parent</tt></i>.
--   
--   If <i><tt>parent</tt></i> is <a>Nothing</a> then this function returns
--   <a>True</a> if <i><tt>file</tt></i> has any parent at all. If
--   <i><tt>parent</tt></i> is non-<a>Nothing</a> then <a>True</a> is only
--   returned if <i><tt>file</tt></i> is an immediate child of
--   <i><tt>parent</tt></i>.
--   
--   <i>Since: 2.24</i>
fileHasParent :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> Maybe b -> m Bool

-- | Checks whether <i><tt>file</tt></i> has the prefix specified by
--   <i><tt>prefix</tt></i>.
--   
--   In other words, if the names of initial elements of
--   <i><tt>file</tt></i>'s pathname match <i><tt>prefix</tt></i>. Only
--   full pathname elements are matched, so a path like /foo is not
--   considered a prefix of /foobar, only of /foo/bar.
--   
--   A <a>File</a> is not a prefix of itself. If you want to check for
--   equality, use <a>fileEqual</a>.
--   
--   This call does no I/O, as it works purely on names. As such it can
--   sometimes return <a>False</a> even if <i><tt>file</tt></i> is inside a
--   <i><tt>prefix</tt></i> (from a filesystem point of view), because the
--   prefix of <i><tt>file</tt></i> is an alias of <i><tt>prefix</tt></i>.
fileHasPrefix :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> b -> m Bool

-- | Checks to see if a <a>File</a> has a given URI scheme.
--   
--   This call does no blocking I/O.
fileHasUriScheme :: (HasCallStack, MonadIO m, IsFile a) => a -> Text -> m Bool

-- | Creates a hash value for a <a>File</a>.
--   
--   This call does no blocking I/O.
fileHash :: (HasCallStack, MonadIO m, IsFile a) => a -> m Word32

-- | Checks to see if a file is native to the platform.
--   
--   A native file is one expressed in the platform-native filename format,
--   e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is
--   local, as it might be on a locally mounted remote filesystem.
--   
--   On some systems non-native files may be available using the native
--   filesystem via a userspace filesystem (FUSE), in these cases this call
--   will return <a>False</a>, but <a>fileGetPath</a> will still return a
--   native path.
--   
--   This call does no blocking I/O.
fileIsNative :: (HasCallStack, MonadIO m, IsFile a) => a -> m Bool

-- | Loads the contents of <i><tt>file</tt></i> and returns it as
--   <a>Bytes</a>.
--   
--   If <i><tt>file</tt></i> is a resource:// based URI, the resulting
--   bytes will reference the embedded resource instead of a copy.
--   Otherwise, this is equivalent to calling <a>fileLoadContents</a> and
--   <a>bytesNewTake</a>.
--   
--   For resources, <i><tt>etagOut</tt></i> will be set to <a>Nothing</a>.
--   
--   The data contained in the resulting <a>Bytes</a> is always
--   zero-terminated, but this is not included in the <a>Bytes</a> length.
--   The resulting <a>Bytes</a> should be freed with <a>bytesUnref</a> when
--   no longer in use.
--   
--   <i>Since: 2.56</i>
fileLoadBytes :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m (Bytes, Maybe Text)

-- | Asynchronously loads the contents of <i><tt>file</tt></i> as
--   <a>Bytes</a>.
--   
--   If <i><tt>file</tt></i> is a resource:// based URI, the resulting
--   bytes will reference the embedded resource instead of a copy.
--   Otherwise, this is equivalent to calling <a>fileLoadContentsAsync</a>
--   and <a>bytesNewTake</a>.
--   
--   <i><tt>callback</tt></i> should call <a>fileLoadBytesFinish</a> to get
--   the result of this asynchronous operation.
--   
--   See <a>fileLoadBytes</a> for more information.
--   
--   <i>Since: 2.56</i>
fileLoadBytesAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Completes an asynchronous request to <a>fileLoadBytesAsync</a>.
--   
--   For resources, <i><tt>etagOut</tt></i> will be set to <a>Nothing</a>.
--   
--   The data contained in the resulting <a>Bytes</a> is always
--   zero-terminated, but this is not included in the <a>Bytes</a> length.
--   The resulting <a>Bytes</a> should be freed with <a>bytesUnref</a> when
--   no longer in use.
--   
--   See <a>fileLoadBytes</a> for more information.
--   
--   <i>Since: 2.56</i>
fileLoadBytesFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m (Bytes, Maybe Text)

-- | Loads the content of the file into memory. The data is always
--   zero-terminated, but this is not included in the resultant
--   <i><tt>length</tt></i>. The returned <i><tt>contents</tt></i> should
--   be freed with <a>free</a> when no longer needed.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileLoadContents :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m (ByteString, Maybe Text)

-- | Starts an asynchronous load of the <i><tt>file</tt></i>'s contents.
--   
--   For more details, see <a>fileLoadContents</a> which is the synchronous
--   version of this call.
--   
--   When the load operation has completed, <i><tt>callback</tt></i> will
--   be called with <i><tt>user</tt></i> data. To finish the operation,
--   call <a>fileLoadContentsFinish</a> with the <a>AsyncResult</a>
--   returned by the <i><tt>callback</tt></i>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileLoadContentsAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous load of the <i><tt>file</tt></i>'s contents.
--   The contents are placed in <i><tt>contents</tt></i>, and
--   <i><tt>length</tt></i> is set to the size of the
--   <i><tt>contents</tt></i> string. The <i><tt>contents</tt></i> should
--   be freed with <a>free</a> when no longer needed. If
--   <i><tt>etagOut</tt></i> is present, it will be set to the new entity
--   tag for the <i><tt>file</tt></i>.
fileLoadContentsFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m (ByteString, Maybe Text)

-- | Finishes an asynchronous partial load operation that was started with
--   <tt><i>g_file_load_partial_contents_async()</i></tt>. The data is
--   always zero-terminated, but this is not included in the resultant
--   <i><tt>length</tt></i>. The returned <i><tt>contents</tt></i> should
--   be freed with <a>free</a> when no longer needed.
fileLoadPartialContentsFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m (ByteString, Maybe Text)

-- | Creates a directory.
--   
--   Note that this will only create a child directory of the immediate
--   parent directory of the path or URI given by the <a>File</a>. To
--   recursively create directories, see
--   <a>fileMakeDirectoryWithParents</a>.
--   
--   This function will fail if the parent directory does not exist,
--   setting <i><tt>error</tt></i> to <a>IOErrorEnumNotFound</a>. If the
--   file system doesn't support creating directories, this function will
--   fail, setting <i><tt>error</tt></i> to <a>IOErrorEnumNotSupported</a>.
--   If the directory already exists,
--   [error<i><tt>gio</tt></i>.IOErrorEnum.EXISTS] will be returned.
--   
--   For a local <a>File</a> the newly created directory will have the
--   default (current) ownership and permissions of the current process.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileMakeDirectory :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously creates a directory.
--   
--   <i>Since: 2.38</i>
fileMakeDirectoryAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous directory creation, started with
--   <a>fileMakeDirectoryAsync</a>.
--   
--   <i>Since: 2.38</i>
fileMakeDirectoryFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Creates a directory and any parent directories that may not exist
--   similar to 'mkdir -p'. If the file system does not support creating
--   directories, this function will fail, setting <i><tt>error</tt></i> to
--   <a>IOErrorEnumNotSupported</a>. If the directory itself already
--   exists, this function will fail setting <i><tt>error</tt></i> to
--   <a>IOErrorEnumExists</a>, unlike the similar <a>mkdirWithParents</a>.
--   
--   For a local <a>File</a> the newly created directories will have the
--   default (current) ownership and permissions of the current process.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   <i>Since: 2.18</i>
fileMakeDirectoryWithParents :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m ()

-- | Creates a symbolic link named <i><tt>file</tt></i> which contains the
--   string <i><tt>symlinkValue</tt></i>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileMakeSymbolicLink :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [Char] -> Maybe b -> m ()

-- | Asynchronously creates a symbolic link named <i><tt>file</tt></i>
--   which contains the string <i><tt>symlinkValue</tt></i>.
--   
--   <i>Since: 2.74</i>
fileMakeSymbolicLinkAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [Char] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous symbolic link creation, started with
--   <a>fileMakeSymbolicLinkAsync</a>.
--   
--   <i>Since: 2.74</i>
fileMakeSymbolicLinkFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Recursively measures the disk usage of <i><tt>file</tt></i>.
--   
--   This is essentially an analog of the 'du' command, but it also reports
--   the number of directories and non-directory files encountered
--   (including things like symbolic links).
--   
--   By default, errors are only reported against the toplevel file itself.
--   Errors found while recursing are silently ignored, unless
--   <a>FileMeasureFlagsReportAnyError</a> is given in
--   <i><tt>flags</tt></i>.
--   
--   The returned size, <i><tt>diskUsage</tt></i>, is in bytes and should
--   be formatted with <a>formatSize</a> in order to get something
--   reasonable for showing in a user interface.
--   
--   <i><tt>progressCallback</tt></i> and <i><tt>progressData</tt></i> can
--   be given to request periodic progress updates while scanning. See the
--   documentation for <a>FileMeasureProgressCallback</a> for information
--   about when and how the callback will be invoked.
--   
--   <i>Since: 2.38</i>
fileMeasureDiskUsage :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileMeasureFlags] -> Maybe b -> Maybe FileMeasureProgressCallback -> m (Word64, Word64, Word64)

-- | Collects the results from an earlier call to
--   <tt><i>g_file_measure_disk_usage_async()</i></tt>. See
--   <a>fileMeasureDiskUsage</a> for more information.
--   
--   <i>Since: 2.38</i>
fileMeasureDiskUsageFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m (Word64, Word64, Word64)

-- | Obtains a file or directory monitor for the given file, depending on
--   the type of the file.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   <i>Since: 2.18</i>
fileMonitor :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileMonitorFlags] -> Maybe b -> m FileMonitor

-- | Obtains a directory monitor for the given file. This may fail if
--   directory monitoring is not supported.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   It does not make sense for <i><tt>flags</tt></i> to contain
--   <a>FileMonitorFlagsWatchHardLinks</a>, since hard links can not be
--   made to directories. It is not possible to monitor all the files in a
--   directory for changes made via hard links; if you want to do this then
--   you must register individual watches with <a>fileMonitor</a>.
fileMonitorDirectory :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileMonitorFlags] -> Maybe b -> m FileMonitor

-- | Obtains a file monitor for the given file. If no file notification
--   mechanism exists, then regular polling of the file is used.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If <i><tt>flags</tt></i> contains
--   <a>FileMonitorFlagsWatchHardLinks</a> then the monitor will also
--   attempt to report changes made to the file via another filename (ie, a
--   hard link). Without this flag, you can only rely on changes made
--   through the filename contained in <i><tt>file</tt></i> to be reported.
--   Using this flag may result in an increase in resource usage, and may
--   not have any effect depending on the <a>FileMonitor</a> backend and/or
--   filesystem type.
fileMonitorFile :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileMonitorFlags] -> Maybe b -> m FileMonitor

-- | Starts a <i><tt>mountOperation</tt></i>, mounting the volume that
--   contains the file <i><tt>location</tt></i>.
--   
--   When this operation has completed, <i><tt>callback</tt></i> will be
--   called with <i><tt>userUser</tt></i> data, and the operation can be
--   finalized with <a>fileMountEnclosingVolumeFinish</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileMountEnclosingVolume :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [MountMountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a mount operation started by <a>fileMountEnclosingVolume</a>.
fileMountEnclosingVolumeFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Mounts a file of type G_FILE_TYPE_MOUNTABLE. Using
--   <i><tt>mountOperation</tt></i>, you can request callbacks when, for
--   instance, passwords are needed during authentication.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileMountMountableFinish</a> to get the
--   result of the operation.
fileMountMountable :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [MountMountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a mount operation. See <a>fileMountMountable</a> for details.
--   
--   Finish an asynchronous mount operation that was started with
--   <a>fileMountMountable</a>.
fileMountMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m File

-- | Tries to move the file or directory <i><tt>source</tt></i> to the
--   location specified by <i><tt>destination</tt></i>. If native move
--   operations are supported then this is used, otherwise a copy + delete
--   fallback is used. The native implementation may support moving
--   directories (for instance on moves inside the same filesystem), but
--   the fallback code does not.
--   
--   If the flag <a>FileCopyFlagsOverwrite</a> is specified an already
--   existing <i><tt>destination</tt></i> file is overwritten.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If <i><tt>progressCallback</tt></i> is not <a>Nothing</a>, then the
--   operation can be monitored by setting this to a
--   <a>FileProgressCallback</a> function.
--   <i><tt>progressCallbackData</tt></i> will be passed to this function.
--   It is guaranteed that this callback will be called after all data has
--   been transferred with the total number of bytes copied during the
--   operation.
--   
--   If the <i><tt>source</tt></i> file does not exist, then the
--   <a>IOErrorEnumNotFound</a> error is returned, independent on the
--   status of the <i><tt>destination</tt></i>.
--   
--   If <a>FileCopyFlagsOverwrite</a> is not specified and the target
--   exists, then the error <a>IOErrorEnumExists</a> is returned.
--   
--   If trying to overwrite a file over a directory, the
--   <a>IOErrorEnumIsDirectory</a> error is returned. If trying to
--   overwrite a directory with a directory the
--   <a>IOErrorEnumWouldMerge</a> error is returned.
--   
--   If the source is a directory and the target does not exist, or
--   <a>FileCopyFlagsOverwrite</a> is specified and the target is a file,
--   then the <a>IOErrorEnumWouldRecurse</a> error may be returned (if the
--   native move operation isn't available).
fileMove :: (HasCallStack, MonadIO m, IsFile a, IsFile b, IsCancellable c) => a -> b -> [FileCopyFlags] -> Maybe c -> Maybe FileProgressCallback -> m ()

-- | Version of <a>fileMoveAsync</a> using closures instead of callbacks
--   for easier binding in other languages.
--   
--   <i>Since: 2.82</i>
fileMoveAsync :: (HasCallStack, MonadIO m, IsFile a, IsFile b, IsCancellable c) => a -> b -> [FileCopyFlags] -> Int32 -> Maybe c -> Maybe (GClosure d) -> GClosure e -> m ()

-- | Finishes an asynchronous file movement, started with
--   <tt><i>g_file_move_async()</i></tt>.
--   
--   <i>Since: 2.72</i>
fileMoveFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Constructs a <a>File</a> from a vector of elements using the correct
--   separator for filenames.
--   
--   Using this function is equivalent to calling <a>buildFilenamev</a>,
--   followed by <a>fileNewForPath</a> on the result.
--   
--   <i>Since: 2.78</i>
fileNewBuildFilenamev :: (HasCallStack, MonadIO m) => [[Char]] -> m File

-- | Creates a <a>File</a> with the given argument from the command line.
--   The value of <i><tt>arg</tt></i> can be either a URI, an absolute path
--   or a relative path resolved relative to the current working directory.
--   This operation never fails, but the returned object might not support
--   any I/O operation if <i><tt>arg</tt></i> points to a malformed path.
--   
--   Note that on Windows, this function expects its argument to be in
--   UTF-8 -- not the system code page. This means that you should not use
--   this function with string from argv as it is passed to
--   <tt><i>main()</i></tt>. <tt><i>g_win32_get_command_line()</i></tt>
--   will return a UTF-8 version of the commandline. <a>Application</a>
--   also uses UTF-8 but <a>applicationCommandLineCreateFileForArg</a> may
--   be more useful for you there. It is also always possible to use this
--   function with <a>OptionContext</a> arguments of type
--   <a>OptionArgFilename</a>.
fileNewForCommandlineArg :: (HasCallStack, MonadIO m) => [Char] -> m File

-- | Creates a <a>File</a> with the given argument from the command line.
--   
--   This function is similar to <a>fileNewForCommandlineArg</a> except
--   that it allows for passing the current working directory as an
--   argument instead of using the current working directory of the
--   process.
--   
--   This is useful if the commandline argument was given in a context
--   other than the invocation of the current process.
--   
--   See also <a>applicationCommandLineCreateFileForArg</a>.
--   
--   <i>Since: 2.36</i>
fileNewForCommandlineArgAndCwd :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> m File

-- | Constructs a <a>File</a> for a given path. This operation never fails,
--   but the returned object might not support any I/O operation if
--   <i><tt>path</tt></i> is malformed.
fileNewForPath :: (HasCallStack, MonadIO m) => [Char] -> m File

-- | Constructs a <a>File</a> for a given URI. This operation never fails,
--   but the returned object might not support any I/O operation if
--   <i><tt>uri</tt></i> is malformed or if the uri type is not supported.
fileNewForUri :: (HasCallStack, MonadIO m) => Text -> m File

-- | Opens a file in the preferred directory for temporary files (as
--   returned by <a>getTmpDir</a>) and returns a <a>File</a> and
--   <a>FileIOStream</a> pointing to it.
--   
--   <i><tt>tmpl</tt></i> should be a string in the GLib file name encoding
--   containing a sequence of six 'X' characters, and containing no
--   directory components. If it is <a>Nothing</a>, a default template is
--   used.
--   
--   Unlike the other <a>File</a> constructors, this will return
--   <a>Nothing</a> if a temporary file could not be created.
--   
--   <i>Since: 2.32</i>
fileNewTmp :: (HasCallStack, MonadIO m) => Maybe [Char] -> m (File, FileIOStream)

-- | Asynchronously opens a file in the preferred directory for temporary
--   files (as returned by <a>getTmpDir</a>) as <a>fileNewTmp</a>.
--   
--   <i><tt>tmpl</tt></i> should be a string in the GLib file name encoding
--   containing a sequence of six 'X' characters, and containing no
--   directory components. If it is <a>Nothing</a>, a default template is
--   used.
--   
--   <i>Since: 2.74</i>
fileNewTmpAsync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe [Char] -> Int32 -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Asynchronously creates a directory in the preferred directory for
--   temporary files (as returned by <a>getTmpDir</a>) as
--   <a>dirMakeTmp</a>.
--   
--   <i><tt>tmpl</tt></i> should be a string in the GLib file name encoding
--   containing a sequence of six 'X' characters, and containing no
--   directory components. If it is <a>Nothing</a>, a default template is
--   used.
--   
--   <i>Since: 2.74</i>
fileNewTmpDirAsync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe [Char] -> Int32 -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a temporary directory creation started by
--   <a>fileNewTmpDirAsync</a>.
--   
--   <i>Since: 2.74</i>
fileNewTmpDirFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m File

-- | Finishes a temporary file creation started by <a>fileNewTmpAsync</a>.
--   
--   <i>Since: 2.74</i>
fileNewTmpFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (File, FileIOStream)

-- | Opens an existing file for reading and writing. The result is a
--   <a>FileIOStream</a> that can be used to read and write the contents of
--   the file.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If the file does not exist, the <a>IOErrorEnumNotFound</a> error will
--   be returned. If the file is a directory, the
--   <a>IOErrorEnumIsDirectory</a> error will be returned. Other errors are
--   possible too, and depend on what kind of filesystem the file is on.
--   Note that in many non-local file cases read and write streams are not
--   supported, so make sure you really need to do read and write
--   streaming, rather than just opening for reading or writing.
--   
--   <i>Since: 2.22</i>
fileOpenReadwrite :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m FileIOStream

-- | Asynchronously opens <i><tt>file</tt></i> for reading and writing.
--   
--   For more details, see <a>fileOpenReadwrite</a> which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileOpenReadwriteFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
fileOpenReadwriteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file read operation started with
--   <a>fileOpenReadwriteAsync</a>.
--   
--   <i>Since: 2.22</i>
fileOpenReadwriteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileIOStream

-- | Constructs a <a>File</a> with the given <i><tt>parseName</tt></i>
--   (i.e. something given by <a>fileGetParseName</a>). This operation
--   never fails, but the returned object might not support any I/O
--   operation if the <i><tt>parseName</tt></i> cannot be parsed.
fileParseName :: (HasCallStack, MonadIO m) => Text -> m File

-- | Exactly like <a>fileGetPath</a>, but caches the result via
--   <tt><i>g_object_set_qdata_full()</i></tt>. This is useful for example
--   in C applications which mix <tt>g_file_*</tt> APIs with native ones.
--   It also avoids an extra duplicated string when possible, so will be
--   generally more efficient.
--   
--   This call does no blocking I/O.
--   
--   <i>Since: 2.56</i>
filePeekPath :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe [Char])

-- | Polls a file of type <a>FileTypeMountable</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileMountMountableFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
filePollMountable :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a poll operation. See <a>filePollMountable</a> for details.
--   
--   Finish an asynchronous poll operation that was polled with
--   <a>filePollMountable</a>.
--   
--   <i>Since: 2.22</i>
filePollMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Returns the <a>AppInfo</a> that is registered as the default
--   application to handle the file specified by <i><tt>file</tt></i>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileQueryDefaultHandler :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m AppInfo

-- | Async version of <a>fileQueryDefaultHandler</a>.
--   
--   <i>Since: 2.60</i>
fileQueryDefaultHandlerAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a <a>fileQueryDefaultHandlerAsync</a> operation.
--   
--   <i>Since: 2.60</i>
fileQueryDefaultHandlerFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m AppInfo

-- | Utility function to check if a particular file exists.
--   
--   The fallback implementation of this API is using <a>fileQueryInfo</a>
--   and therefore may do blocking I/O. To asynchronously query the
--   existence of a file, use <a>fileQueryInfoAsync</a>.
--   
--   Note that in many cases it is <a>racy to first check for file
--   existence</a> and then execute something based on the outcome of that,
--   because the file might have been created or removed in between the
--   operations. The general approach to handling that is to not check, but
--   just do the operation and handle the errors as they come.
--   
--   As an example of race-free checking, take the case of reading a file,
--   and if it doesn't exist, creating it. There are two racy versions:
--   read it, and on error create it; and: check if it exists, if not
--   create it. These can both result in two processes creating the file
--   (with perhaps a partially written file as the result). The correct
--   approach is to always try to create the file with <a>fileCreate</a>
--   which will either atomically create the file or fail with a
--   <a>IOErrorEnumExists</a> error.
--   
--   However, in many cases an existence check is useful in a user
--   interface, for instance to make a menu item sensitive/insensitive, so
--   that you don't have to fool users that something is possible and then
--   just show an error dialog. If you do this, you should make sure to
--   also handle the errors that can happen due to races when you execute
--   the operation.
fileQueryExists :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m Bool

-- | Utility function to inspect the <a>FileType</a> of a file. This is
--   implemented using <a>fileQueryInfo</a> and as such does blocking I/O.
--   
--   The primary use case of this method is to check if a file is a regular
--   file, directory, or symlink.
--   
--   <i>Since: 2.18</i>
fileQueryFileType :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileQueryInfoFlags] -> Maybe b -> m FileType

-- | Similar to <a>fileQueryInfo</a>, but obtains information about the
--   filesystem the <i><tt>file</tt></i> is on, rather than the file
--   itself. For instance the amount of space available and the type of the
--   filesystem.
--   
--   The <i><tt>attributes</tt></i> value is a string that specifies the
--   attributes that should be gathered. It is not an error if it's not
--   possible to read a particular requested attribute from a file - it
--   just won't be set. <i><tt>attributes</tt></i> should be a
--   comma-separated list of attributes or attribute wildcards. The
--   wildcard "*" means all attributes, and a wildcard like "filesystem::*"
--   means all attributes in the filesystem namespace. The standard
--   namespace for filesystem attributes is "filesystem". Common attributes
--   of interest are <a>FILE_ATTRIBUTE_FILESYSTEM_SIZE</a> (the total size
--   of the filesystem in bytes), <a>FILE_ATTRIBUTE_FILESYSTEM_FREE</a>
--   (number of bytes available), and <a>FILE_ATTRIBUTE_FILESYSTEM_TYPE</a>
--   (type of the filesystem).
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If the file does not exist, the <a>IOErrorEnumNotFound</a> error will
--   be returned. Other errors are possible too, and depend on what kind of
--   filesystem the file is on.
fileQueryFilesystemInfo :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo

-- | Asynchronously gets the requested information about the filesystem
--   that the specified <i><tt>file</tt></i> is on. The result is a
--   <a>FileInfo</a> object that contains key-value attributes (such as
--   type or size for the file).
--   
--   For more details, see <a>fileQueryFilesystemInfo</a> which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileQueryInfoFinish</a> to get the result
--   of the operation.
fileQueryFilesystemInfoAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous filesystem info query. See
--   <a>fileQueryFilesystemInfoAsync</a>.
fileQueryFilesystemInfoFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileInfo

-- | Gets the requested information about specified <i><tt>file</tt></i>.
--   
--   The result is a <a>FileInfo</a> object that contains key-value
--   attributes (such as the type or size of the file).
--   
--   The <i><tt>attributes</tt></i> value is a string that specifies the
--   file attributes that should be gathered. It is not an error if it’s
--   not possible to read a particular requested attribute from a file — it
--   just won't be set. In particular this means that if a file is
--   inaccessible (due to being in a folder with restrictive permissions),
--   for example, you can expect the returned <a>FileInfo</a> to have very
--   few attributes set. You should check whether an attribute is set using
--   <a>fileInfoHasAttribute</a> before trying to retrieve its value.
--   
--   It is guaranteed that if any of the following attributes are listed in
--   <i><tt>attributes</tt></i>, they will always be set in the returned
--   <a>FileInfo</a>, even if the user doesn’t have permissions to access
--   the file:
--   
--   <ul>
--   <li>[const<i><tt>gio</tt></i>.FILE_ATTRIBUTE_STANDARD_NAME]</li>
--   
--   <li>[const<i><tt>gio</tt></i>.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME]</li>
--   </ul>
--   
--   <i><tt>attributes</tt></i> should be a comma-separated list of
--   attributes or attribute wildcards. The wildcard <tt>"*"</tt> means all
--   attributes, and a wildcard like <tt>"standard::*"</tt> means all
--   attributes in the standard namespace. An example attribute query might
--   be <tt>"standard::*,owner::user"</tt>. The standard attributes are
--   available as defines, like
--   [const<i><tt>gio</tt></i>.FILE_ATTRIBUTE_STANDARD_NAME].
--   
--   If <i><tt>cancellable</tt></i> is not <tt>NULL</tt>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   [error<i><tt>gio</tt></i>.IOErrorEnum.CANCELLED] will be returned.
--   
--   For symlinks, normally the information about the target of the symlink
--   is returned, rather than information about the symlink itself. However
--   if you pass
--   [flags<i><tt>gio</tt></i>.FileQueryInfoFlags.NOFOLLOW_SYMLINKS] in
--   <i><tt>flags</tt></i> the information about the symlink itself will be
--   returned. Also, for symlinks that point to non-existing files the
--   information about the symlink itself will be returned.
--   
--   If the file does not exist, the
--   [error<i><tt>gio</tt></i>.IOErrorEnum.NOT_FOUND] error will be
--   returned. Other errors are possible too, and depend on what kind of
--   file system the file is on.
fileQueryInfo :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> [FileQueryInfoFlags] -> Maybe b -> m FileInfo

-- | Asynchronously gets the requested information about specified
--   <i><tt>file</tt></i>. The result is a <a>FileInfo</a> object that
--   contains key-value attributes (such as type or size for the file).
--   
--   For more details, see <a>fileQueryInfo</a> which is the synchronous
--   version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileQueryInfoFinish</a> to get the result
--   of the operation.
fileQueryInfoAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> [FileQueryInfoFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file info query. See
--   <a>fileQueryInfoAsync</a>.
fileQueryInfoFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileInfo

-- | Obtain the list of settable attributes for the file.
--   
--   Returns the type and full attribute name of all the attributes that
--   can be set on this file. This doesn't mean setting it will always
--   succeed though, you might get an access failure, or some specific file
--   may not support a specific attribute.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileQuerySettableAttributes :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m FileAttributeInfoList

-- | Obtain the list of attribute namespaces where new attributes can be
--   created by a user. An example of this is extended attributes (in the
--   "xattr" namespace).
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileQueryWritableNamespaces :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m FileAttributeInfoList

-- | Opens a file for reading. The result is a <a>FileInputStream</a> that
--   can be used to read the contents of the file.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If the file does not exist, the <a>IOErrorEnumNotFound</a> error will
--   be returned. If the file is a directory, the
--   <a>IOErrorEnumIsDirectory</a> error will be returned. Other errors are
--   possible too, and depend on what kind of filesystem the file is on.
fileRead :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m FileInputStream

-- | Asynchronously opens <i><tt>file</tt></i> for reading.
--   
--   For more details, see <a>fileRead</a> which is the synchronous version
--   of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileReadFinish</a> to get the result of
--   the operation.
fileReadAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file read operation started with
--   <a>fileReadAsync</a>.
fileReadFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileInputStream

-- | Returns an output stream for overwriting the file, possibly creating a
--   backup copy of the file first. If the file doesn't exist, it will be
--   created.
--   
--   This will try to replace the file in the safest way possible so that
--   any errors during the writing will not affect an already existing copy
--   of the file. For instance, for local files it may write to a temporary
--   file and then atomically rename over the destination when the stream
--   is closed.
--   
--   By default files created are generally readable by everyone, but if
--   you pass <a>FileCreateFlagsPrivate</a> in <i><tt>flags</tt></i> the
--   file will be made readable only to the current user, to the level that
--   is supported on the target filesystem.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If you pass in a non-<a>Nothing</a> <i><tt>etag</tt></i> value and
--   <i><tt>file</tt></i> already exists, then this value is compared to
--   the current entity tag of the file, and if they differ an
--   <a>IOErrorEnumWrongEtag</a> error is returned. This generally means
--   that the file has been changed since you last read it. You can get the
--   new etag from <a>fileOutputStreamGetEtag</a> after you've finished
--   writing and closed the <a>FileOutputStream</a>. When you load a new
--   file you can use <a>fileInputStreamQueryInfo</a> to get the etag of
--   the file.
--   
--   If <i><tt>makeBackup</tt></i> is <a>True</a>, this function will
--   attempt to make a backup of the current file before overwriting it. If
--   this fails a <a>IOErrorEnumCantCreateBackup</a> error will be
--   returned. If you want to replace anyway, try again with
--   <i><tt>makeBackup</tt></i> set to <a>False</a>.
--   
--   If the file is a directory the <a>IOErrorEnumIsDirectory</a> error
--   will be returned, and if the file is some other form of non-regular
--   file then a <a>IOErrorEnumNotRegularFile</a> error will be returned.
--   Some file systems don't allow all file names, and may return an
--   <a>IOErrorEnumInvalidFilename</a> error, and if the name is to long
--   <a>IOErrorEnumFilenameTooLong</a> will be returned. Other errors are
--   possible too, and depend on what kind of filesystem the file is on.
fileReplace :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe Text -> Bool -> [FileCreateFlags] -> Maybe b -> m FileOutputStream

-- | Asynchronously overwrites the file, replacing the contents, possibly
--   creating a backup copy of the file first.
--   
--   For more details, see <a>fileReplace</a> which is the synchronous
--   version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileReplaceFinish</a> to get the result
--   of the operation.
fileReplaceAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe Text -> Bool -> [FileCreateFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Replaces the contents of <i><tt>file</tt></i> with
--   <i><tt>contents</tt></i> of <i><tt>length</tt></i> bytes.
--   
--   If <i><tt>etag</tt></i> is specified (not <a>Nothing</a>), any
--   existing file must have that etag, or the error
--   <a>IOErrorEnumWrongEtag</a> will be returned.
--   
--   If <i><tt>makeBackup</tt></i> is <a>True</a>, this function will
--   attempt to make a backup of <i><tt>file</tt></i>. Internally, it uses
--   <a>fileReplace</a>, so will try to replace the file contents in the
--   safest way possible. For example, atomic renames are used when
--   replacing local files’ contents.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   The returned <i><tt>newEtag</tt></i> can be used to verify that the
--   file hasn't changed the next time it is saved over.
fileReplaceContents :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> ByteString -> Maybe Text -> Bool -> [FileCreateFlags] -> Maybe b -> m (Maybe Text)

-- | Starts an asynchronous replacement of <i><tt>file</tt></i> with the
--   given <i><tt>contents</tt></i> of <i><tt>length</tt></i> bytes.
--   <i><tt>etag</tt></i> will replace the document's current entity tag.
--   
--   When this operation has completed, <i><tt>callback</tt></i> will be
--   called with <i><tt>userUser</tt></i> data, and the operation can be
--   finalized with <a>fileReplaceContentsFinish</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   If <i><tt>makeBackup</tt></i> is <a>True</a>, this function will
--   attempt to make a backup of <i><tt>file</tt></i>.
--   
--   Note that no copy of <i><tt>contents</tt></i> will be made, so it must
--   stay valid until <i><tt>callback</tt></i> is called. See
--   <a>fileReplaceContentsBytesAsync</a> for a <a>Bytes</a> version that
--   will automatically hold a reference to the contents (without copying)
--   for the duration of the call.
fileReplaceContentsAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> ByteString -> Maybe Text -> Bool -> [FileCreateFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Same as <a>fileReplaceContentsAsync</a> but takes a <a>Bytes</a> input
--   instead. This function will keep a ref on <i><tt>contents</tt></i>
--   until the operation is done. Unlike <a>fileReplaceContentsAsync</a>
--   this allows forgetting about the content without waiting for the
--   callback.
--   
--   When this operation has completed, <i><tt>callback</tt></i> will be
--   called with <i><tt>userUser</tt></i> data, and the operation can be
--   finalized with <a>fileReplaceContentsFinish</a>.
--   
--   <i>Since: 2.40</i>
fileReplaceContentsBytesAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Bytes -> Maybe Text -> Bool -> [FileCreateFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous replace of the given <i><tt>file</tt></i>.
--   See <a>fileReplaceContentsAsync</a>. Sets <i><tt>newEtag</tt></i> to
--   the new entity tag for the document, if present.
fileReplaceContentsFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m (Maybe Text)

-- | Finishes an asynchronous file replace operation started with
--   <a>fileReplaceAsync</a>.
fileReplaceFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileOutputStream

-- | Returns an output stream for overwriting the file in readwrite mode,
--   possibly creating a backup copy of the file first. If the file doesn't
--   exist, it will be created.
--   
--   For details about the behaviour, see <a>fileReplace</a> which does the
--   same thing but returns an output stream only.
--   
--   Note that in many non-local file cases read and write streams are not
--   supported, so make sure you really need to do read and write
--   streaming, rather than just opening for reading or writing.
--   
--   <i>Since: 2.22</i>
fileReplaceReadwrite :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe Text -> Bool -> [FileCreateFlags] -> Maybe b -> m FileIOStream

-- | Asynchronously overwrites the file in read-write mode, replacing the
--   contents, possibly creating a backup copy of the file first.
--   
--   For more details, see <a>fileReplaceReadwrite</a> which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileReplaceReadwriteFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
fileReplaceReadwriteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe Text -> Bool -> [FileCreateFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file replace operation started with
--   <a>fileReplaceReadwriteAsync</a>.
--   
--   <i>Since: 2.22</i>
fileReplaceReadwriteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileIOStream

-- | Resolves a relative path for <i><tt>file</tt></i> to an absolute path.
--   
--   This call does no blocking I/O.
--   
--   If the <i><tt>relativePath</tt></i> is an absolute path name, the
--   resolution is done absolutely (without taking <i><tt>file</tt></i>
--   path as base).
fileResolveRelativePath :: (HasCallStack, MonadIO m, IsFile a) => a -> [Char] -> m File

-- | Sets an attribute in the file with attribute name
--   <i><tt>attribute</tt></i> to <i><tt>valueP</tt></i>.
--   
--   Some attributes can be unset by setting <i><tt>type</tt></i> to
--   <a>FileAttributeTypeInvalid</a> and <i><tt>valueP</tt></i> to
--   <a>Nothing</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttribute :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> FileAttributeType -> Ptr () -> [FileQueryInfoFlags] -> Maybe b -> m ()

-- | Sets <i><tt>attribute</tt></i> of type
--   <a>FileAttributeTypeByteString</a> to <i><tt>value</tt></i>. If
--   <i><tt>attribute</tt></i> is of a different type, this operation will
--   fail, returning <a>False</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttributeByteString :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Text -> [FileQueryInfoFlags] -> Maybe b -> m ()

-- | Sets <i><tt>attribute</tt></i> of type <a>FileAttributeTypeInt32</a>
--   to <i><tt>value</tt></i>. If <i><tt>attribute</tt></i> is of a
--   different type, this operation will fail.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttributeInt32 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Int32 -> [FileQueryInfoFlags] -> Maybe b -> m ()

-- | Sets <i><tt>attribute</tt></i> of type <a>FileAttributeTypeInt64</a>
--   to <i><tt>value</tt></i>. If <i><tt>attribute</tt></i> is of a
--   different type, this operation will fail.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttributeInt64 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Int64 -> [FileQueryInfoFlags] -> Maybe b -> m ()

-- | Sets <i><tt>attribute</tt></i> of type <a>FileAttributeTypeString</a>
--   to <i><tt>value</tt></i>. If <i><tt>attribute</tt></i> is of a
--   different type, this operation will fail.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttributeString :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Text -> [FileQueryInfoFlags] -> Maybe b -> m ()

-- | Sets <i><tt>attribute</tt></i> of type <a>FileAttributeTypeUint32</a>
--   to <i><tt>value</tt></i>. If <i><tt>attribute</tt></i> is of a
--   different type, this operation will fail.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttributeUint32 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Word32 -> [FileQueryInfoFlags] -> Maybe b -> m ()

-- | Sets <i><tt>attribute</tt></i> of type <a>FileAttributeTypeUint64</a>
--   to <i><tt>value</tt></i>. If <i><tt>attribute</tt></i> is of a
--   different type, this operation will fail.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttributeUint64 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Word64 -> [FileQueryInfoFlags] -> Maybe b -> m ()

-- | Asynchronously sets the attributes of <i><tt>file</tt></i> with
--   <i><tt>info</tt></i>.
--   
--   For more details, see <a>fileSetAttributesFromInfo</a>, which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileSetAttributesFinish</a> to get the
--   result of the operation.
fileSetAttributesAsync :: (HasCallStack, MonadIO m, IsFile a, IsFileInfo b, IsCancellable c) => a -> b -> [FileQueryInfoFlags] -> Int32 -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes setting an attribute started in
--   <a>fileSetAttributesAsync</a>.
fileSetAttributesFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileInfo

-- | Tries to set all attributes in the <a>FileInfo</a> on the target
--   values, not stopping on the first error.
--   
--   If there is any error during this operation then <i><tt>error</tt></i>
--   will be set to the first error. Error on particular fields are flagged
--   by setting the "status" field in the attribute value to
--   <a>FileAttributeStatusErrorSetting</a>, which means you can also
--   detect further errors.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetAttributesFromInfo :: (HasCallStack, MonadIO m, IsFile a, IsFileInfo b, IsCancellable c) => a -> b -> [FileQueryInfoFlags] -> Maybe c -> m ()

-- | Renames <i><tt>file</tt></i> to the specified display name.
--   
--   The display name is converted from UTF-8 to the correct encoding for
--   the target filesystem if possible and the <i><tt>file</tt></i> is
--   renamed to this.
--   
--   If you want to implement a rename operation in the user interface the
--   edit name (<a>FILE_ATTRIBUTE_STANDARD_EDIT_NAME</a>) should be used as
--   the initial value in the rename widget, and then the result after
--   editing should be passed to <a>fileSetDisplayName</a>.
--   
--   On success the resulting converted filename is returned.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileSetDisplayName :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Maybe b -> m File

-- | Asynchronously sets the display name for a given <a>File</a>.
--   
--   For more details, see <a>fileSetDisplayName</a> which is the
--   synchronous version of this call.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileSetDisplayNameFinish</a> to get the
--   result of the operation.
fileSetDisplayNameAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes setting a display name started with
--   <a>fileSetDisplayNameAsync</a>.
fileSetDisplayNameFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m File

-- | Starts a file of type <a>FileTypeMountable</a>. Using
--   <i><tt>startOperation</tt></i>, you can request callbacks when, for
--   instance, passwords are needed during authentication.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileMountMountableFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
fileStartMountable :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [DriveStartFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a start operation. See <a>fileStartMountable</a> for details.
--   
--   Finish an asynchronous start operation that was started with
--   <a>fileStartMountable</a>.
--   
--   <i>Since: 2.22</i>
fileStartMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Stops a file of type <a>FileTypeMountable</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileStopMountableFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
fileStopMountable :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a stop operation, see <a>fileStopMountable</a> for details.
--   
--   Finish an asynchronous stop operation that was started with
--   <a>fileStopMountable</a>.
--   
--   <i>Since: 2.22</i>
fileStopMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Checks if <i><tt>file</tt></i> supports thread-default main contexts
--   (see <a>mainContextPushThreadDefault</a>) If this returns
--   <a>False</a>, you cannot perform asynchronous operations on
--   <i><tt>file</tt></i> in a thread that has a thread-default context.
--   
--   <i>Since: 2.22</i>
fileSupportsThreadContexts :: (HasCallStack, MonadIO m, IsFile a) => a -> m Bool

-- | Sends <i><tt>file</tt></i> to the "Trashcan", if possible. This is
--   similar to deleting it, but the user can recover it before emptying
--   the trashcan. Trashing is disabled for system mounts by default (see
--   <tt><i>g_unix_mount_entry_is_system_internal()</i></tt>), so this call
--   can return the <a>IOErrorEnumNotSupported</a> error. Since GLib 2.66,
--   the <tt>x-gvfs-notrash</tt> unix mount option can be used to disable
--   <a>fileTrash</a> support for particular mounts, the
--   <a>IOErrorEnumNotSupported</a> error will be returned in that case.
--   Since 2.82, the <tt>x-gvfs-trash</tt> unix mount option can be used to
--   enable <a>fileTrash</a> support for particular system mounts.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
fileTrash :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously sends <i><tt>file</tt></i> to the Trash location, if
--   possible.
--   
--   <i>Since: 2.38</i>
fileTrashAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous file trashing operation, started with
--   <a>fileTrashAsync</a>.
--   
--   <i>Since: 2.38</i>
fileTrashFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Unmounts a file of type G_FILE_TYPE_MOUNTABLE.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileUnmountMountableFinish</a> to get the
--   result of the operation.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>fileUnmountMountableWithOperation</a> instead.</i>
fileUnmountMountable :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an unmount operation, see <a>fileUnmountMountable</a> for
--   details.
--   
--   Finish an asynchronous unmount operation that was started with
--   <a>fileUnmountMountable</a>.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>fileUnmountMountableWithOperationFinish</a>instead.</i>
fileUnmountMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()

-- | Unmounts a file of type <a>FileTypeMountable</a>.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then the
--   operation can be cancelled by triggering the cancellable object from
--   another thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>fileUnmountMountableFinish</a> to get the
--   result of the operation.
--   
--   <i>Since: 2.22</i>
fileUnmountMountableWithOperation :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an unmount operation, see
--   <a>fileUnmountMountableWithOperation</a> for details.
--   
--   Finish an asynchronous unmount operation that was started with
--   <a>fileUnmountMountableWithOperation</a>.
--   
--   <i>Since: 2.22</i>
fileUnmountMountableWithOperationFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.File.File
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.File.File
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.File.File
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.File.File o) => GI.Gio.Interfaces.File.IsFile o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.File.File)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.File.File
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.File.File


-- | <tt>GDtlsServerConnection</tt> is the server-side subclass of
--   <a>DtlsConnection</a>, representing a server-side DTLS connection.
--   
--   <i>Since: 2.48</i>
module GI.Gio.Interfaces.DtlsServerConnection

-- | Memory-managed wrapper type.
newtype DtlsServerConnection
DtlsServerConnection :: ManagedPtr DtlsServerConnection -> DtlsServerConnection

-- | Type class for types which can be safely cast to
--   <a>DtlsServerConnection</a>, for instance with
--   <a>toDtlsServerConnection</a>.
class (GObject o, IsDescendantOf DtlsServerConnection o) => IsDtlsServerConnection o

-- | Cast to <a>DtlsServerConnection</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toDtlsServerConnection :: (MonadIO m, IsDtlsServerConnection o) => o -> m DtlsServerConnection

-- | Creates a new <a>DtlsServerConnection</a> wrapping
--   <i><tt>baseSocket</tt></i>.
--   
--   <i>Since: 2.48</i>
dtlsServerConnectionNew :: (HasCallStack, MonadIO m, IsDatagramBased a, IsTlsCertificate b) => a -> Maybe b -> m DtlsServerConnection

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>authentication-mode</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructDtlsServerConnectionAuthenticationMode :: (IsDtlsServerConnection o, MonadIO m) => TlsAuthenticationMode -> m (GValueConstruct o)

-- | Get the value of the “<tt>authentication-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsServerConnection #authenticationMode
--   </pre>
getDtlsServerConnectionAuthenticationMode :: (MonadIO m, IsDtlsServerConnection o) => o -> m TlsAuthenticationMode

-- | Set the value of the “<tt>authentication-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsServerConnection [ #authenticationMode <a>:=</a> value ]
--   </pre>
setDtlsServerConnectionAuthenticationMode :: (MonadIO m, IsDtlsServerConnection o) => o -> TlsAuthenticationMode -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection o) => GI.Gio.Interfaces.DtlsServerConnection.IsDtlsServerConnection o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection


-- | <tt>GDtlsConnection</tt> is the base DTLS connection class type, which
--   wraps a <a>DatagramBased</a> and provides DTLS encryption on top of
--   it. Its subclasses, <a>DtlsClientConnection</a> and
--   <a>DtlsServerConnection</a>, implement client-side and server-side
--   DTLS, respectively.
--   
--   For TLS support, see <a>TlsConnection</a>.
--   
--   As DTLS is datagram based, <tt>GDtlsConnection</tt> implements
--   <a>DatagramBased</a>, presenting a datagram-socket-like API for the
--   encrypted connection. This operates over a base datagram connection,
--   which is also a <tt>GDatagramBased</tt>
--   (<a>DtlsConnection:baseSocket</a>).
--   
--   To close a DTLS connection, use <a>dtlsConnectionClose</a>.
--   
--   Neither <a>DtlsServerConnection</a> or <a>DtlsClientConnection</a> set
--   the peer address on their base <a>DatagramBased</a> if it is a
--   <a>Socket</a> — it is up to the caller to do that if they wish. If
--   they do not, and <a>socketClose</a> is called on the base socket, the
--   <tt>GDtlsConnection</tt> will not raise a
--   <tt>G_IO_ERROR_NOT_CONNECTED</tt> error on further I/O.
--   
--   <i>Since: 2.48</i>
module GI.Gio.Interfaces.DtlsConnection

-- | Memory-managed wrapper type.
newtype DtlsConnection
DtlsConnection :: ManagedPtr DtlsConnection -> DtlsConnection

-- | Type class for types which can be safely cast to
--   <a>DtlsConnection</a>, for instance with <a>toDtlsConnection</a>.
class (GObject o, IsDescendantOf DtlsConnection o) => IsDtlsConnection o

-- | Cast to <a>DtlsConnection</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDtlsConnection :: (MonadIO m, IsDtlsConnection o) => o -> m DtlsConnection

-- | Close the DTLS connection. This is equivalent to calling
--   <a>dtlsConnectionShutdown</a> to shut down both sides of the
--   connection.
--   
--   Closing a <a>DtlsConnection</a> waits for all buffered but
--   untransmitted data to be sent before it completes. It then sends a
--   <tt>close_notify</tt> DTLS alert to the peer and may wait for a
--   <tt>close_notify</tt> to be received from the peer. It does not close
--   the underlying <a>DtlsConnection:baseSocket</a>; that must be closed
--   separately.
--   
--   Once <i><tt>conn</tt></i> is closed, all other operations will return
--   <a>IOErrorEnumClosed</a>. Closing a <a>DtlsConnection</a> multiple
--   times will not return an error.
--   
--   <tt><i>GDtlsConnections</i></tt> will be automatically closed when the
--   last reference is dropped, but you might want to call this function to
--   make sure resources are released as early as possible.
--   
--   If <i><tt>cancellable</tt></i> is cancelled, the <a>DtlsConnection</a>
--   may be left partially-closed and any pending untransmitted data may be
--   lost. Call <a>dtlsConnectionClose</a> again to complete closing the
--   <a>DtlsConnection</a>.
--   
--   <i>Since: 2.48</i>
dtlsConnectionClose :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously close the DTLS connection. See
--   <a>dtlsConnectionClose</a> for more information.
--   
--   <i>Since: 2.48</i>
dtlsConnectionCloseAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous TLS close operation. See
--   <a>dtlsConnectionClose</a> for more information.
--   
--   <i>Since: 2.48</i>
dtlsConnectionCloseFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Used by <a>DtlsConnection</a> implementations to emit the
--   <a>DtlsConnection::acceptCertificate</a> signal.
--   
--   <i>Since: 2.48</i>
dtlsConnectionEmitAcceptCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsCertificate b) => a -> b -> [TlsCertificateFlags] -> m Bool

-- | Gets <i><tt>conn</tt></i>'s certificate, as set by
--   <a>dtlsConnectionSetCertificate</a>.
--   
--   <i>Since: 2.48</i>
dtlsConnectionGetCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe TlsCertificate)

-- | Returns the name of the current DTLS ciphersuite, or <a>Nothing</a> if
--   the connection has not handshaked or has been closed. Beware that the
--   TLS backend may use any of multiple different naming conventions,
--   because OpenSSL and GnuTLS have their own ciphersuite naming
--   conventions that are different from each other and different from the
--   standard, IANA- registered ciphersuite names. The ciphersuite name is
--   intended to be displayed to the user for informative purposes only,
--   and parsing it is not recommended.
--   
--   <i>Since: 2.70</i>
dtlsConnectionGetCiphersuiteName :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe Text)

-- | Gets the certificate database that <i><tt>conn</tt></i> uses to verify
--   peer certificates. See <a>dtlsConnectionSetDatabase</a>.
--   
--   <i>Since: 2.48</i>
dtlsConnectionGetDatabase :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe TlsDatabase)

-- | Get the object that will be used to interact with the user. It will be
--   used for things like prompting the user for passwords. If
--   <a>Nothing</a> is returned, then no user interaction will occur for
--   this connection.
--   
--   <i>Since: 2.48</i>
dtlsConnectionGetInteraction :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe TlsInteraction)

-- | Gets the name of the application-layer protocol negotiated during the
--   handshake.
--   
--   If the peer did not use the ALPN extension, or did not advertise a
--   protocol that matched one of <i><tt>conn</tt></i>'s protocols, or the
--   TLS backend does not support ALPN, then this will be <a>Nothing</a>.
--   See <a>dtlsConnectionSetAdvertisedProtocols</a>.
--   
--   <i>Since: 2.60</i>
dtlsConnectionGetNegotiatedProtocol :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe Text)

-- | Gets <i><tt>conn</tt></i>'s peer's certificate after the handshake has
--   completed or failed. (It is not set during the emission of
--   <a>DtlsConnection::acceptCertificate</a>.)
--   
--   <i>Since: 2.48</i>
dtlsConnectionGetPeerCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe TlsCertificate)

-- | Gets the errors associated with validating <i><tt>conn</tt></i>'s
--   peer's certificate, after the handshake has completed or failed. (It
--   is not set during the emission of
--   <a>DtlsConnection::acceptCertificate</a>.)
--   
--   <i>Since: 2.48</i>
dtlsConnectionGetPeerCertificateErrors :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m [TlsCertificateFlags]

-- | Returns the current DTLS protocol version, which may be
--   <a>TlsProtocolVersionUnknown</a> if the connection has not handshaked,
--   or has been closed, or if the TLS backend has implemented a protocol
--   version that is not a recognized <a>TlsProtocolVersion</a>.
--   
--   <i>Since: 2.70</i>
dtlsConnectionGetProtocolVersion :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsProtocolVersion

-- | Gets <i><tt>conn</tt></i> rehandshaking mode. See
--   <a>dtlsConnectionSetRehandshakeMode</a> for details.
--   
--   <i>Since: 2.48</i>

-- | <i>Deprecated: (Since version 2.64.)Changing the rehandshake mode is
--   no longerrequired for compatibility. Also, rehandshaking has been
--   removedfrom the TLS protocol in TLS 1.3.</i>
dtlsConnectionGetRehandshakeMode :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsRehandshakeMode

-- | Tests whether or not <i><tt>conn</tt></i> expects a proper TLS close
--   notification when the connection is closed. See
--   <a>dtlsConnectionSetRequireCloseNotify</a> for details.
--   
--   <i>Since: 2.48</i>
dtlsConnectionGetRequireCloseNotify :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m Bool

-- | Attempts a TLS handshake on <i><tt>conn</tt></i>.
--   
--   On the client side, it is never necessary to call this method;
--   although the connection needs to perform a handshake after connecting,
--   <a>DtlsConnection</a> will handle this for you automatically when you
--   try to send or receive data on the connection. You can call
--   <a>dtlsConnectionHandshake</a> manually if you want to know whether
--   the initial handshake succeeded or failed (as opposed to just
--   immediately trying to use <i><tt>conn</tt></i> to read or write, in
--   which case, if it fails, it may not be possible to tell if it failed
--   before or after completing the handshake), but beware that servers may
--   reject client authentication after the handshake has completed, so a
--   successful handshake does not indicate the connection will be usable.
--   
--   Likewise, on the server side, although a handshake is necessary at the
--   beginning of the communication, you do not need to call this function
--   explicitly unless you want clearer error reporting.
--   
--   Previously, calling <a>dtlsConnectionHandshake</a> after the initial
--   handshake would trigger a rehandshake; however, this usage was
--   deprecated in GLib 2.60 because rehandshaking was removed from the TLS
--   protocol in TLS 1.3. Since GLib 2.64, calling this function after the
--   initial handshake will no longer do anything.
--   
--   <a>DtlsConnection</a>::<tt><i>accept_certificate</i></tt> may be
--   emitted during the handshake.
--   
--   <i>Since: 2.48</i>
dtlsConnectionHandshake :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Maybe b -> m ()

-- | Asynchronously performs a TLS handshake on <i><tt>conn</tt></i>. See
--   <a>dtlsConnectionHandshake</a> for more information.
--   
--   <i>Since: 2.48</i>
dtlsConnectionHandshakeAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous TLS handshake operation. See
--   <a>dtlsConnectionHandshake</a> for more information.
--   
--   <i>Since: 2.48</i>
dtlsConnectionHandshakeFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Sets the list of application-layer protocols to advertise that the
--   caller is willing to speak on this connection. The Application-Layer
--   Protocol Negotiation (ALPN) extension will be used to negotiate a
--   compatible protocol with the peer; use
--   <a>dtlsConnectionGetNegotiatedProtocol</a> to find the negotiated
--   protocol after the handshake. Specifying <a>Nothing</a> for the the
--   value of <i><tt>protocols</tt></i> will disable ALPN negotiation.
--   
--   See <a>IANA TLS ALPN Protocol IDs</a> for a list of registered
--   protocol IDs.
--   
--   <i>Since: 2.60</i>
dtlsConnectionSetAdvertisedProtocols :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> Maybe [Text] -> m ()

-- | This sets the certificate that <i><tt>conn</tt></i> will present to
--   its peer during the TLS handshake. For a <a>DtlsServerConnection</a>,
--   it is mandatory to set this, and that will normally be done at
--   construct time.
--   
--   For a <a>DtlsClientConnection</a>, this is optional. If a handshake
--   fails with <a>TlsErrorCertificateRequired</a>, that means that the
--   server requires a certificate, and if you try connecting again, you
--   should call this method first. You can call
--   <a>dtlsClientConnectionGetAcceptedCas</a> on the failed connection to
--   get a list of Certificate Authorities that the server will accept
--   certificates from.
--   
--   (It is also possible that a server will allow the connection with or
--   without a certificate; in that case, if you don't provide a
--   certificate, you can tell that the server requested one by the fact
--   that <a>dtlsClientConnectionGetAcceptedCas</a> will return
--   non-<a>Nothing</a>.)
--   
--   <i>Since: 2.48</i>
dtlsConnectionSetCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsCertificate b) => a -> b -> m ()

-- | Sets the certificate database that is used to verify peer
--   certificates. This is set to the default database by default. See
--   <a>tlsBackendGetDefaultDatabase</a>. If set to <a>Nothing</a>, then
--   peer certificate validation will always set the
--   <a>TlsCertificateFlagsUnknownCa</a> error (meaning
--   <a>DtlsConnection::acceptCertificate</a> will always be emitted on
--   client-side connections, unless that bit is not set in
--   <a>DtlsClientConnection:validationFlags</a>).
--   
--   There are nonintuitive security implications when using a non-default
--   database. See <a>DtlsConnection:database</a> for details.
--   
--   <i>Since: 2.48</i>
dtlsConnectionSetDatabase :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsDatabase b) => a -> Maybe b -> m ()

-- | Set the object that will be used to interact with the user. It will be
--   used for things like prompting the user for passwords.
--   
--   The <i><tt>interaction</tt></i> argument will normally be a derived
--   subclass of <a>TlsInteraction</a>. <a>Nothing</a> can also be provided
--   if no user interaction should occur for this connection.
--   
--   <i>Since: 2.48</i>
dtlsConnectionSetInteraction :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsInteraction b) => a -> Maybe b -> m ()

-- | Since GLib 2.64, changing the rehandshake mode is no longer supported
--   and will have no effect. With TLS 1.3, rehandshaking has been removed
--   from the TLS protocol, replaced by separate post-handshake
--   authentication and rekey operations.
--   
--   <i>Since: 2.48</i>

-- | <i>Deprecated: (Since version 2.60.)Changing the rehandshake mode is
--   no longerrequired for compatibility. Also, rehandshaking has been
--   removedfrom the TLS protocol in TLS 1.3.</i>
dtlsConnectionSetRehandshakeMode :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> TlsRehandshakeMode -> m ()

-- | Sets whether or not <i><tt>conn</tt></i> expects a proper TLS close
--   notification before the connection is closed. If this is <a>True</a>
--   (the default), then <i><tt>conn</tt></i> will expect to receive a TLS
--   close notification from its peer before the connection is closed, and
--   will return a <a>TlsErrorEof</a> error if the connection is closed
--   without proper notification (since this may indicate a network error,
--   or man-in-the-middle attack).
--   
--   In some protocols, the application will know whether or not the
--   connection was closed cleanly based on application-level data (because
--   the application-level data includes a length field, or is somehow
--   self-delimiting); in this case, the close notify is redundant and may
--   be omitted. You can use <a>dtlsConnectionSetRequireCloseNotify</a> to
--   tell <i><tt>conn</tt></i> to allow an "unannounced" connection close,
--   in which case the close will show up as a 0-length read, as in a
--   non-TLS <a>DatagramBased</a>, and it is up to the application to check
--   that the data has been fully received.
--   
--   Note that this only affects the behavior when the peer closes the
--   connection; when the application calls <a>dtlsConnectionCloseAsync</a>
--   on <i><tt>conn</tt></i> itself, this will send a close notification
--   regardless of the setting of this property. If you explicitly want to
--   do an unclean close, you can close <i><tt>conn</tt></i>'s
--   <a>DtlsConnection:baseSocket</a> rather than closing
--   <i><tt>conn</tt></i> itself.
--   
--   <i>Since: 2.48</i>
dtlsConnectionSetRequireCloseNotify :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> Bool -> m ()

-- | Shut down part or all of a DTLS connection.
--   
--   If <i><tt>shutdownRead</tt></i> is <a>True</a> then the receiving side
--   of the connection is shut down, and further reading is disallowed.
--   Subsequent calls to <a>datagramBasedReceiveMessages</a> will return
--   <a>IOErrorEnumClosed</a>.
--   
--   If <i><tt>shutdownWrite</tt></i> is <a>True</a> then the sending side
--   of the connection is shut down, and further writing is disallowed.
--   Subsequent calls to <a>datagramBasedSendMessages</a> will return
--   <a>IOErrorEnumClosed</a>.
--   
--   It is allowed for both <i><tt>shutdownRead</tt></i> and
--   <i><tt>shutdownWrite</tt></i> to be TRUE — this is equivalent to
--   calling <a>dtlsConnectionClose</a>.
--   
--   If <i><tt>cancellable</tt></i> is cancelled, the <a>DtlsConnection</a>
--   may be left partially-closed and any pending untransmitted data may be
--   lost. Call <a>dtlsConnectionShutdown</a> again to complete closing the
--   <a>DtlsConnection</a>.
--   
--   <i>Since: 2.48</i>
dtlsConnectionShutdown :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Bool -> Bool -> Maybe b -> m ()

-- | Asynchronously shut down part or all of the DTLS connection. See
--   <a>dtlsConnectionShutdown</a> for more information.
--   
--   <i>Since: 2.48</i>
dtlsConnectionShutdownAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Bool -> Bool -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finish an asynchronous TLS shutdown operation. See
--   <a>dtlsConnectionShutdown</a> for more information.
--   
--   <i>Since: 2.48</i>
dtlsConnectionShutdownFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m ()

-- | Set the value of the “<tt>advertised-protocols</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #advertisedProtocols
--   </pre>
clearDtlsConnectionAdvertisedProtocols :: (MonadIO m, IsDtlsConnection o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>advertised-protocols</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructDtlsConnectionAdvertisedProtocols :: (IsDtlsConnection o, MonadIO m) => [Text] -> m (GValueConstruct o)

-- | Get the value of the “<tt>advertised-protocols</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #advertisedProtocols
--   </pre>
getDtlsConnectionAdvertisedProtocols :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe [Text])

-- | Set the value of the “<tt>advertised-protocols</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsConnection [ #advertisedProtocols <a>:=</a> value ]
--   </pre>
setDtlsConnectionAdvertisedProtocols :: (MonadIO m, IsDtlsConnection o) => o -> [Text] -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>base-socket</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDtlsConnectionBaseSocket :: (IsDtlsConnection o, MonadIO m, IsDatagramBased a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>base-socket</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #baseSocket
--   </pre>
getDtlsConnectionBaseSocket :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe DatagramBased)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>certificate</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDtlsConnectionCertificate :: (IsDtlsConnection o, MonadIO m, IsTlsCertificate a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>certificate</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #certificate
--   </pre>
getDtlsConnectionCertificate :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsCertificate)

-- | Set the value of the “<tt>certificate</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsConnection [ #certificate <a>:=</a> value ]
--   </pre>
setDtlsConnectionCertificate :: (MonadIO m, IsDtlsConnection o, IsTlsCertificate a) => o -> a -> m ()

-- | Get the value of the “<tt>ciphersuite-name</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #ciphersuiteName
--   </pre>
getDtlsConnectionCiphersuiteName :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe Text)

-- | Set the value of the “<tt>database</tt>” property to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #database
--   </pre>
clearDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>database</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructDtlsConnectionDatabase :: (IsDtlsConnection o, MonadIO m, IsTlsDatabase a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>database</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #database
--   </pre>
getDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsDatabase)

-- | Set the value of the “<tt>database</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsConnection [ #database <a>:=</a> value ]
--   </pre>
setDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o, IsTlsDatabase a) => o -> a -> m ()

-- | Set the value of the “<tt>interaction</tt>” property to
--   <a>Nothing</a>. When <a>overloading</a> is enabled, this is equivalent
--   to
--   
--   <pre>
--   <a>clear</a> #interaction
--   </pre>
clearDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o) => o -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>interaction</tt>” property. This is rarely needed directly, but
--   it is used by <a>new</a>.
constructDtlsConnectionInteraction :: (IsDtlsConnection o, MonadIO m, IsTlsInteraction a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>interaction</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #interaction
--   </pre>
getDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsInteraction)

-- | Set the value of the “<tt>interaction</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsConnection [ #interaction <a>:=</a> value ]
--   </pre>
setDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o, IsTlsInteraction a) => o -> a -> m ()

-- | Get the value of the “<tt>negotiated-protocol</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #negotiatedProtocol
--   </pre>
getDtlsConnectionNegotiatedProtocol :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe Text)

-- | Get the value of the “<tt>peer-certificate</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #peerCertificate
--   </pre>
getDtlsConnectionPeerCertificate :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsCertificate)

-- | Get the value of the “<tt>peer-certificate-errors</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #peerCertificateErrors
--   </pre>
getDtlsConnectionPeerCertificateErrors :: (MonadIO m, IsDtlsConnection o) => o -> m [TlsCertificateFlags]

-- | Get the value of the “<tt>protocol-version</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #protocolVersion
--   </pre>
getDtlsConnectionProtocolVersion :: (MonadIO m, IsDtlsConnection o) => o -> m TlsProtocolVersion

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>rehandshake-mode</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructDtlsConnectionRehandshakeMode :: (IsDtlsConnection o, MonadIO m) => TlsRehandshakeMode -> m (GValueConstruct o)

-- | Get the value of the “<tt>rehandshake-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #rehandshakeMode
--   </pre>
getDtlsConnectionRehandshakeMode :: (MonadIO m, IsDtlsConnection o) => o -> m TlsRehandshakeMode

-- | Set the value of the “<tt>rehandshake-mode</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsConnection [ #rehandshakeMode <a>:=</a> value ]
--   </pre>
setDtlsConnectionRehandshakeMode :: (MonadIO m, IsDtlsConnection o) => o -> TlsRehandshakeMode -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>require-close-notify</tt>” property. This is rarely needed
--   directly, but it is used by <a>new</a>.
constructDtlsConnectionRequireCloseNotify :: (IsDtlsConnection o, MonadIO m) => Bool -> m (GValueConstruct o)

-- | Get the value of the “<tt>require-close-notify</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsConnection #requireCloseNotify
--   </pre>
getDtlsConnectionRequireCloseNotify :: (MonadIO m, IsDtlsConnection o) => o -> m Bool

-- | Set the value of the “<tt>require-close-notify</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsConnection [ #requireCloseNotify <a>:=</a> value ]
--   </pre>
setDtlsConnectionRequireCloseNotify :: (MonadIO m, IsDtlsConnection o) => o -> Bool -> m ()

-- | Emitted during the TLS handshake after the peer certificate has been
--   received. You can examine <i><tt>peerCert</tt></i>'s certification
--   path by calling <a>tlsCertificateGetIssuer</a> on it.
--   
--   For a client-side connection, <i><tt>peerCert</tt></i> is the server's
--   certificate, and the signal will only be emitted if the certificate
--   was not acceptable according to <i><tt>conn</tt></i>'s
--   <a>DtlsClientConnection</a>:<tt><i>validation_flags</i></tt>. If you
--   would like the certificate to be accepted despite
--   <i><tt>errors</tt></i>, return <a>True</a> from the signal handler.
--   Otherwise, if no handler accepts the certificate, the handshake will
--   fail with <a>TlsErrorBadCertificate</a>.
--   
--   GLib guarantees that if certificate verification fails, this signal
--   will be emitted with at least one error will be set in
--   <i><tt>errors</tt></i>, but it does not guarantee that all possible
--   errors will be set. Accordingly, you may not safely decide to ignore
--   any particular type of error. For example, it would be incorrect to
--   ignore <a>TlsCertificateFlagsExpired</a> if you want to allow expired
--   certificates, because this could potentially be the only error flag
--   set even if other problems exist with the certificate.
--   
--   For a server-side connection, <i><tt>peerCert</tt></i> is the
--   certificate presented by the client, if this was requested via the
--   server's
--   <a>DtlsServerConnection</a>:<tt><i>authentication_mode</i></tt>. On
--   the server side, the signal is always emitted when the client presents
--   a certificate, and the certificate will only be accepted if a handler
--   returns <a>True</a>.
--   
--   Note that if this signal is emitted as part of asynchronous I/O in the
--   main thread, then you should not attempt to interact with the user
--   before returning from the signal handler. If you want to let the user
--   decide whether or not to accept the certificate, you would have to
--   return <a>False</a> from the signal handler on the first attempt, and
--   then after the connection attempt returns a
--   <a>TlsErrorBadCertificate</a>, you can interact with the user, and if
--   the user decides to accept the certificate, remember that fact, create
--   a new connection, and return <a>True</a> from the signal handler the
--   next time.
--   
--   If you are doing I/O in another thread, you do not need to worry about
--   this, and can simply block in the signal handler until the UI thread
--   returns an answer.
--   
--   <i>Since: 2.48</i>
type DtlsConnectionAcceptCertificateCallback = TlsCertificate -> [TlsCertificateFlags] -> IO Bool

-- | Connect a signal handler for the <a>acceptCertificate</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> dtlsConnection #acceptCertificate callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDtlsConnectionAcceptCertificate :: (IsDtlsConnection a, MonadIO m) => a -> ((?self :: a) => DtlsConnectionAcceptCertificateCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>acceptCertificate</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> dtlsConnection #acceptCertificate callback
--   </pre>
onDtlsConnectionAcceptCertificate :: (IsDtlsConnection a, MonadIO m) => a -> ((?self :: a) => DtlsConnectionAcceptCertificateCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DtlsConnection.DtlsConnection o) => GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DtlsConnection.DtlsConnection)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DtlsConnection.DtlsConnection


-- | <tt>GDtlsClientConnection</tt> is the client-side subclass of
--   <a>DtlsConnection</a>, representing a client-side DTLS connection.
--   
--   <i>Since: 2.48</i>
module GI.Gio.Interfaces.DtlsClientConnection

-- | Memory-managed wrapper type.
newtype DtlsClientConnection
DtlsClientConnection :: ManagedPtr DtlsClientConnection -> DtlsClientConnection

-- | Type class for types which can be safely cast to
--   <a>DtlsClientConnection</a>, for instance with
--   <a>toDtlsClientConnection</a>.
class (GObject o, IsDescendantOf DtlsClientConnection o) => IsDtlsClientConnection o

-- | Cast to <a>DtlsClientConnection</a>, for types for which this is known
--   to be safe. For general casts, use <a>castTo</a>.
toDtlsClientConnection :: (MonadIO m, IsDtlsClientConnection o) => o -> m DtlsClientConnection

-- | Gets the list of distinguished names of the Certificate Authorities
--   that the server will accept certificates from. This will be set during
--   the TLS handshake if the server requests a certificate. Otherwise, it
--   will be <a>Nothing</a>.
--   
--   Each item in the list is a <a>ByteArray</a> which contains the
--   complete subject DN of the certificate authority.
--   
--   <i>Since: 2.48</i>
dtlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m [ByteString]

-- | Gets <i><tt>conn</tt></i>'s expected server identity
--   
--   <i>Since: 2.48</i>
dtlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m SocketConnectable

-- | Gets <i><tt>conn</tt></i>'s validation flags
--   
--   This function does not work as originally designed and is impossible
--   to use correctly. See <a>DtlsClientConnection:validationFlags</a> for
--   more information.
--   
--   <i>Since: 2.48</i>

-- | <i>Deprecated: (Since version 2.74)Do not attempt to ignore validation
--   errors.</i>
dtlsClientConnectionGetValidationFlags :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m [TlsCertificateFlags]

-- | Creates a new <a>DtlsClientConnection</a> wrapping
--   <i><tt>baseSocket</tt></i> which is assumed to communicate with the
--   server identified by <i><tt>serverIdentity</tt></i>.
--   
--   <i>Since: 2.48</i>
dtlsClientConnectionNew :: (HasCallStack, MonadIO m, IsDatagramBased a, IsSocketConnectable b) => a -> Maybe b -> m DtlsClientConnection

-- | Sets <i><tt>conn</tt></i>'s expected server identity, which is used
--   both to tell servers on virtual hosts which certificate to present,
--   and also to let <i><tt>conn</tt></i> know what name to look for in the
--   certificate when performing <a>TlsCertificateFlagsBadIdentity</a>
--   validation, if enabled.
--   
--   <i>Since: 2.48</i>
dtlsClientConnectionSetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a, IsSocketConnectable b) => a -> b -> m ()

-- | Sets <i><tt>conn</tt></i>'s validation flags, to override the default
--   set of checks performed when validating a server certificate. By
--   default, <a>TlsCertificateFlagsValidateAll</a> is used.
--   
--   This function does not work as originally designed and is impossible
--   to use correctly. See <a>DtlsClientConnection:validationFlags</a> for
--   more information.
--   
--   <i>Since: 2.48</i>

-- | <i>Deprecated: (Since version 2.74)Do not attempt to ignore validation
--   errors.</i>
dtlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> [TlsCertificateFlags] -> m ()

-- | Get the value of the “<tt>accepted-cas</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsClientConnection #acceptedCas
--   </pre>
getDtlsClientConnectionAcceptedCas :: (MonadIO m, IsDtlsClientConnection o) => o -> m [Ptr ()]

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>server-identity</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructDtlsClientConnectionServerIdentity :: (IsDtlsClientConnection o, MonadIO m, IsSocketConnectable a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>server-identity</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsClientConnection #serverIdentity
--   </pre>
getDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o) => o -> m SocketConnectable

-- | Set the value of the “<tt>server-identity</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsClientConnection [ #serverIdentity <a>:=</a> value ]
--   </pre>
setDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o, IsSocketConnectable a) => o -> a -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>validation-flags</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructDtlsClientConnectionValidationFlags :: (IsDtlsClientConnection o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o)

-- | Get the value of the “<tt>validation-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> dtlsClientConnection #validationFlags
--   </pre>
getDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> m [TlsCertificateFlags]

-- | Set the value of the “<tt>validation-flags</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> dtlsClientConnection [ #validationFlags <a>:=</a> value ]
--   </pre>
setDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> [TlsCertificateFlags] -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection o) => GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection


-- | <tt>GDrive</tt> represents a piece of hardware connected to the
--   machine. It’s generally only created for removable hardware or
--   hardware with removable media. For example, an optical disc drive, or
--   a USB flash drive.
--   
--   <tt>GDrive</tt> is a container class for <a>Volume</a> objects that
--   stem from the same piece of media. As such, <tt>GDrive</tt> abstracts
--   a drive with (or without) removable media and provides operations for
--   querying whether media is available, determining whether media change
--   is automatically detected and ejecting the media.
--   
--   If the <tt>GDrive</tt> reports that media isn’t automatically
--   detected, one can poll for media; typically one should not do this
--   periodically as a poll for media operation is potentially expensive
--   and may spin up the drive creating noise.
--   
--   <tt>GDrive</tt> supports starting and stopping drives with
--   authentication support for the former. This can be used to support a
--   diverse set of use cases including connecting/disconnecting iSCSI
--   devices, powering down external disk enclosures and starting/stopping
--   multi-disk devices such as RAID devices. Note that the actual
--   semantics and side-effects of starting/stopping a <tt>GDrive</tt> may
--   vary according to implementation. To choose the correct verbs in e.g.
--   a file manager, use <a>driveGetStartStopType</a>.
--   
--   For <a>porting from GnomeVFS</a> note that there is no equivalent of
--   <tt>GDrive</tt> in that API.
module GI.Gio.Interfaces.Drive

-- | Memory-managed wrapper type.
newtype Drive
Drive :: ManagedPtr Drive -> Drive

-- | Type class for types which can be safely cast to <a>Drive</a>, for
--   instance with <a>toDrive</a>.
class (GObject o, IsDescendantOf Drive o) => IsDrive o

-- | Cast to <a>Drive</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toDrive :: (MonadIO m, IsDrive o) => o -> m Drive

-- | Checks if a drive can be ejected.
driveCanEject :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Checks if a drive can be polled for media changes.
driveCanPollForMedia :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Checks if a drive can be started.
--   
--   <i>Since: 2.22</i>
driveCanStart :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Checks if a drive can be started degraded.
--   
--   <i>Since: 2.22</i>
driveCanStartDegraded :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Checks if a drive can be stopped.
--   
--   <i>Since: 2.22</i>
driveCanStop :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Asynchronously ejects a drive.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>driveEjectFinish</a> to obtain the result
--   of the operation.

-- | <i>Deprecated: (Since version 2.22)Use <a>driveEjectWithOperation</a>
--   instead.</i>
driveEject :: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes ejecting a drive.

-- | <i>Deprecated: (Since version 2.22)Use
--   <a>driveEjectWithOperationFinish</a> instead.</i>
driveEjectFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()

-- | Ejects a drive. This is an asynchronous operation, and is finished by
--   calling <a>driveEjectWithOperationFinish</a> with the
--   <i><tt>drive</tt></i> and <a>AsyncResult</a> data returned in the
--   <i><tt>callback</tt></i>.
--   
--   <i>Since: 2.22</i>
driveEjectWithOperation :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes ejecting a drive. If any errors occurred during the
--   operation, <i><tt>error</tt></i> will be set to contain the errors and
--   <a>False</a> will be returned.
--   
--   <i>Since: 2.22</i>
driveEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()

-- | Gets the kinds of identifiers that <i><tt>drive</tt></i> has. Use
--   <a>driveGetIdentifier</a> to obtain the identifiers themselves.
driveEnumerateIdentifiers :: (HasCallStack, MonadIO m, IsDrive a) => a -> m [Text]

-- | Gets the icon for <i><tt>drive</tt></i>.
driveGetIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon

-- | Gets the identifier of the given kind for <i><tt>drive</tt></i>. The
--   only identifier currently available is
--   <a>DRIVE_IDENTIFIER_KIND_UNIX_DEVICE</a>.
driveGetIdentifier :: (HasCallStack, MonadIO m, IsDrive a) => a -> Text -> m (Maybe Text)

-- | Gets the name of <i><tt>drive</tt></i>.
driveGetName :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Text

-- | Gets the sort key for <i><tt>drive</tt></i>, if any.
--   
--   <i>Since: 2.32</i>
driveGetSortKey :: (HasCallStack, MonadIO m, IsDrive a) => a -> m (Maybe Text)

-- | Gets a hint about how a drive can be started/stopped.
--   
--   <i>Since: 2.22</i>
driveGetStartStopType :: (HasCallStack, MonadIO m, IsDrive a) => a -> m DriveStartStopType

-- | Gets the icon for <i><tt>drive</tt></i>.
--   
--   <i>Since: 2.34</i>
driveGetSymbolicIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon

-- | Get a list of mountable volumes for <i><tt>drive</tt></i>.
--   
--   The returned list should be freed with <tt><i>g_list_free()</i></tt>,
--   after its elements have been unreffed with <a>objectUnref</a>.
driveGetVolumes :: (HasCallStack, MonadIO m, IsDrive a) => a -> m [Volume]

-- | Checks if the <i><tt>drive</tt></i> has media. Note that the OS may
--   not be polling the drive for media changes; see
--   <a>driveIsMediaCheckAutomatic</a> for more details.
driveHasMedia :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Check if <i><tt>drive</tt></i> has any mountable volumes.
driveHasVolumes :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Checks if <i><tt>drive</tt></i> is capable of automatically detecting
--   media changes.
driveIsMediaCheckAutomatic :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Checks if the <i><tt>drive</tt></i> supports removable media.
driveIsMediaRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Checks if the <a>Drive</a> and/or its media is considered removable by
--   the user. See <a>driveIsMediaRemovable</a>.
--   
--   <i>Since: 2.50</i>
driveIsRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool

-- | Asynchronously polls <i><tt>drive</tt></i> to see if media has been
--   inserted or removed.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>drivePollForMediaFinish</a> to obtain the
--   result of the operation.
drivePollForMedia :: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>drivePollForMedia</a> on a
--   drive.
drivePollForMediaFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()

-- | Asynchronously starts a drive.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>driveStartFinish</a> to obtain the result
--   of the operation.
--   
--   <i>Since: 2.22</i>
driveStart :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [DriveStartFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes starting a drive.
--   
--   <i>Since: 2.22</i>
driveStartFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()

-- | Asynchronously stops a drive.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>driveStopFinish</a> to obtain the result
--   of the operation.
--   
--   <i>Since: 2.22</i>
driveStop :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes stopping a drive.
--   
--   <i>Since: 2.22</i>
driveStopFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()

-- | Emitted when the drive's state has changed.
type DriveChangedCallback = IO ()

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> drive #changed callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> drive #changed callback
--   </pre>
onDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId

-- | This signal is emitted when the <a>Drive</a> have been disconnected.
--   If the recipient is holding references to the object they should
--   release them so the object can be finalized.
type DriveDisconnectedCallback = IO ()

-- | Connect a signal handler for the <a>disconnected</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> drive #disconnected callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDriveDisconnected :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveDisconnectedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>disconnected</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> drive #disconnected callback
--   </pre>
onDriveDisconnected :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveDisconnectedCallback) -> m SignalHandlerId

-- | Emitted when the physical eject button (if any) of a drive has been
--   pressed.
type DriveEjectButtonCallback = IO ()

-- | Connect a signal handler for the <a>ejectButton</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> drive #ejectButton callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDriveEjectButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveEjectButtonCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>ejectButton</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> drive #ejectButton callback
--   </pre>
onDriveEjectButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveEjectButtonCallback) -> m SignalHandlerId

-- | Emitted when the physical stop button (if any) of a drive has been
--   pressed.
--   
--   <i>Since: 2.22</i>
type DriveStopButtonCallback = IO ()

-- | Connect a signal handler for the <a>stopButton</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> drive #stopButton callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterDriveStopButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveStopButtonCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>stopButton</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> drive #stopButton callback
--   </pre>
onDriveStopButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveStopButtonCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Interfaces.Drive.Drive
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Drive.Drive
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Drive.Drive
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Drive.Drive o) => GI.Gio.Interfaces.Drive.IsDrive o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.Drive.Drive)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.Drive.Drive
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.Drive.Drive


-- | Interface for socket-like objects with datagram semantics.
--   
--   A <tt>GDatagramBased</tt> is a networking interface for representing
--   datagram-based communications. It is a more or less direct mapping of
--   the core parts of the BSD socket API in a portable GObject interface.
--   It is implemented by <a>Socket</a>, which wraps the UNIX socket API on
--   UNIX and winsock2 on Windows.
--   
--   <tt>GDatagramBased</tt> is entirely platform independent, and is
--   intended to be used alongside higher-level networking APIs such as
--   <a>IOStream</a>.
--   
--   It uses vectored scatter/gather I/O by default, allowing for many
--   messages to be sent or received in a single call. Where possible,
--   implementations of the interface should take advantage of vectored I/O
--   to minimise processing or system calls. For example, <tt>GSocket</tt>
--   uses <tt>recvmmsg()</tt> and <tt>sendmmsg()</tt> where possible.
--   Callers should take advantage of scatter/gather I/O (the use of
--   multiple buffers per message) to avoid unnecessary copying of data to
--   assemble or disassemble a message.
--   
--   Each <tt>GDatagramBased</tt> operation has a timeout parameter which
--   may be negative for blocking behaviour, zero for non-blocking
--   behaviour, or positive for timeout behaviour. A blocking operation
--   blocks until finished or there is an error. A non-blocking operation
--   will return immediately with a <tt>G_IO_ERROR_WOULD_BLOCK</tt> error
--   if it cannot make progress. A timeout operation will block until the
--   operation is complete or the timeout expires; if the timeout expires
--   it will return what progress it made, or <tt>G_IO_ERROR_TIMED_OUT</tt>
--   if no progress was made. To know when a call would successfully run
--   you can call <a>datagramBasedConditionCheck</a> or
--   <a>datagramBasedConditionWait</a>. You can also use
--   <a>datagramBasedCreateSource</a> and attach it to a <a>MainContext</a>
--   to get callbacks when I/O is possible.
--   
--   When running a non-blocking operation applications should always be
--   able to handle getting a <tt>G_IO_ERROR_WOULD_BLOCK</tt> error even
--   when some other function said that I/O was possible. This can easily
--   happen in case of a race condition in the application, but it can also
--   happen for other reasons. For instance, on Windows a socket is always
--   seen as writable until a write returns
--   <tt>G_IO_ERROR_WOULD_BLOCK</tt>.
--   
--   As with <tt>GSocket</tt>, <tt>GDatagramBased</tt>s can be either
--   connection oriented (for example, SCTP) or connectionless (for
--   example, UDP). <tt>GDatagramBased</tt>s must be datagram-based, not
--   stream-based. The interface does not cover connection establishment —
--   use methods on the underlying type to establish a connection before
--   sending and receiving data through the <tt>GDatagramBased</tt> API.
--   For connectionless socket types the target/source address is specified
--   or received in each I/O operation.
--   
--   Like most other APIs in GLib, <tt>GDatagramBased</tt> is not
--   inherently thread safe. To use a <tt>GDatagramBased</tt> concurrently
--   from multiple threads, you must implement your own locking.
--   
--   <i>Since: 2.48</i>
module GI.Gio.Interfaces.DatagramBased

-- | Memory-managed wrapper type.
newtype DatagramBased
DatagramBased :: ManagedPtr DatagramBased -> DatagramBased

-- | Type class for types which can be safely cast to <a>DatagramBased</a>,
--   for instance with <a>toDatagramBased</a>.
class (GObject o, IsDescendantOf DatagramBased o) => IsDatagramBased o

-- | Cast to <a>DatagramBased</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toDatagramBased :: (MonadIO m, IsDatagramBased o) => o -> m DatagramBased

-- | Checks on the readiness of <i><tt>datagramBased</tt></i> to perform
--   operations. The operations specified in <i><tt>condition</tt></i> are
--   checked for and masked against the currently-satisfied conditions on
--   <i><tt>datagramBased</tt></i>. The result is returned.
--   
--   <a>IOConditionIn</a> will be set in the return value if data is
--   available to read with <a>datagramBasedReceiveMessages</a>, or if the
--   connection is closed remotely (EOS); and if the datagram_based has not
--   been closed locally using some implementation-specific method (such as
--   <a>socketClose</a> or <a>socketShutdown</a> with
--   <i><tt>shutdownRead</tt></i> set, if it’s a <a>Socket</a>).
--   
--   If the connection is shut down or closed (by calling
--   <a>socketClose</a> or <a>socketShutdown</a> with
--   <i><tt>shutdownRead</tt></i> set, if it’s a <a>Socket</a>, for
--   example), all calls to this function will return
--   <a>IOErrorEnumClosed</a>.
--   
--   <a>IOConditionOut</a> will be set if it is expected that at least one
--   byte can be sent using <a>datagramBasedSendMessages</a> without
--   blocking. It will not be set if the datagram_based has been closed
--   locally.
--   
--   <a>IOConditionHup</a> will be set if the connection has been closed
--   locally.
--   
--   <a>IOConditionErr</a> will be set if there was an asynchronous error
--   in transmitting data previously enqueued using
--   <a>datagramBasedSendMessages</a>.
--   
--   Note that on Windows, it is possible for an operation to return
--   <a>IOErrorEnumWouldBlock</a> even immediately after
--   <a>datagramBasedConditionCheck</a> has claimed that the
--   <a>DatagramBased</a> is ready for writing. Rather than calling
--   <a>datagramBasedConditionCheck</a> and then writing to the
--   <a>DatagramBased</a> if it succeeds, it is generally better to simply
--   try writing right away, and try again later if the initial attempt
--   returns <a>IOErrorEnumWouldBlock</a>.
--   
--   It is meaningless to specify <a>IOConditionErr</a> or
--   <a>IOConditionHup</a> in <i><tt>condition</tt></i>; these conditions
--   will always be set in the output if they are true. Apart from these
--   flags, the output is guaranteed to be masked by
--   <i><tt>condition</tt></i>.
--   
--   This call never blocks.
--   
--   <i>Since: 2.48</i>
datagramBasedConditionCheck :: (HasCallStack, MonadIO m, IsDatagramBased a) => a -> [IOCondition] -> m [IOCondition]

-- | Waits for up to <i><tt>timeout</tt></i> microseconds for condition to
--   become true on <i><tt>datagramBased</tt></i>. If the condition is met,
--   <a>True</a> is returned.
--   
--   If <i><tt>cancellable</tt></i> is cancelled before the condition is
--   met, or if <i><tt>timeout</tt></i> is reached before the condition is
--   met, then <a>False</a> is returned and <i><tt>error</tt></i> is set
--   appropriately (<a>IOErrorEnumCancelled</a> or
--   <a>IOErrorEnumTimedOut</a>).
--   
--   <i>Since: 2.48</i>
datagramBasedConditionWait :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [IOCondition] -> Int64 -> Maybe b -> m ()

-- | Creates a <a>Source</a> that can be attached to a <a>MainContext</a>
--   to monitor for the availability of the specified
--   <i><tt>condition</tt></i> on the <a>DatagramBased</a>. The
--   <a>Source</a> keeps a reference to the <i><tt>datagramBased</tt></i>.
--   
--   The callback on the source is of the <a>DatagramBasedSourceFunc</a>
--   type.
--   
--   It is meaningless to specify <a>IOConditionErr</a> or
--   <a>IOConditionHup</a> in <i><tt>condition</tt></i>; these conditions
--   will always be reported in the callback if they are true.
--   
--   If non-<a>Nothing</a>, <i><tt>cancellable</tt></i> can be used to
--   cancel the source, which will cause the source to trigger, reporting
--   the current condition (which is likely 0 unless cancellation happened
--   at the same time as a condition change). You can check for this in the
--   callback using <a>cancellableIsCancelled</a>.
--   
--   <i>Since: 2.48</i>
datagramBasedCreateSource :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [IOCondition] -> Maybe b -> m Source

-- | Receive one or more data messages from <i><tt>datagramBased</tt></i>
--   in one go.
--   
--   <i><tt>messages</tt></i> must point to an array of <a>InputMessage</a>
--   structs and <i><tt>numMessages</tt></i> must be the length of this
--   array. Each <a>InputMessage</a> contains a pointer to an array of
--   <a>InputVector</a> structs describing the buffers that the data
--   received in each message will be written to.
--   
--   <i><tt>flags</tt></i> modify how all messages are received. The
--   commonly available arguments for this are available in the
--   <a>SocketMsgFlags</a> enum, but the values there are the same as the
--   system values, and the flags are passed in as-is, so you can pass in
--   system-specific flags too. These flags affect the overall receive
--   operation. Flags affecting individual messages are returned in
--   <a>InputMessage</a>.<tt><i>flags</i></tt>.
--   
--   The other members of <a>InputMessage</a> are treated as described in
--   its documentation.
--   
--   If <i><tt>timeout</tt></i> is negative the call will block until
--   <i><tt>numMessages</tt></i> have been received, the connection is
--   closed remotely (EOS), <i><tt>cancellable</tt></i> is cancelled, or an
--   error occurs.
--   
--   If <i><tt>timeout</tt></i> is 0 the call will return up to
--   <i><tt>numMessages</tt></i> without blocking, or
--   <a>IOErrorEnumWouldBlock</a> if no messages are queued in the
--   operating system to be received.
--   
--   If <i><tt>timeout</tt></i> is positive the call will block on the same
--   conditions as if <i><tt>timeout</tt></i> were negative. If the timeout
--   is reached before any messages are received,
--   <a>IOErrorEnumTimedOut</a> is returned, otherwise it will return the
--   number of messages received before timing out. (Note: This is
--   effectively the behaviour of <tt>MSG_WAITFORONE</tt> with
--   <tt><i>recvmmsg()</i></tt>.)
--   
--   To be notified when messages are available, wait for the
--   <a>IOConditionIn</a> condition. Note though that you may still receive
--   <a>IOErrorEnumWouldBlock</a> from <a>datagramBasedReceiveMessages</a>
--   even if you were previously notified of a <a>IOConditionIn</a>
--   condition.
--   
--   If the remote peer closes the connection, any messages queued in the
--   underlying receive buffer will be returned, and subsequent calls to
--   <a>datagramBasedReceiveMessages</a> will return 0 (with no error set).
--   
--   If the connection is shut down or closed (by calling
--   <a>socketClose</a> or <a>socketShutdown</a> with
--   <i><tt>shutdownRead</tt></i> set, if it’s a <a>Socket</a>, for
--   example), all calls to this function will return
--   <a>IOErrorEnumClosed</a>.
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   An error will only be returned if zero messages could be received;
--   otherwise the number of messages successfully received before the
--   error will be returned. If <i><tt>cancellable</tt></i> is cancelled,
--   <a>IOErrorEnumCancelled</a> is returned as with any other error.
--   
--   <i>Since: 2.48</i>
datagramBasedReceiveMessages :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [InputMessage] -> Int32 -> Int64 -> Maybe b -> m Int32

-- | Send one or more data messages from <i><tt>datagramBased</tt></i> in
--   one go.
--   
--   <i><tt>messages</tt></i> must point to an array of
--   <a>OutputMessage</a> structs and <i><tt>numMessages</tt></i> must be
--   the length of this array. Each <a>OutputMessage</a> contains an
--   address to send the data to, and a pointer to an array of
--   <a>OutputVector</a> structs to describe the buffers that the data to
--   be sent for each message will be gathered from.
--   
--   <i><tt>flags</tt></i> modify how the message is sent. The commonly
--   available arguments for this are available in the
--   <a>SocketMsgFlags</a> enum, but the values there are the same as the
--   system values, and the flags are passed in as-is, so you can pass in
--   system-specific flags too.
--   
--   The other members of <a>OutputMessage</a> are treated as described in
--   its documentation.
--   
--   If <i><tt>timeout</tt></i> is negative the call will block until
--   <i><tt>numMessages</tt></i> have been sent,
--   <i><tt>cancellable</tt></i> is cancelled, or an error occurs.
--   
--   If <i><tt>timeout</tt></i> is 0 the call will send up to
--   <i><tt>numMessages</tt></i> without blocking, or will return
--   <a>IOErrorEnumWouldBlock</a> if there is no space to send messages.
--   
--   If <i><tt>timeout</tt></i> is positive the call will block on the same
--   conditions as if <i><tt>timeout</tt></i> were negative. If the timeout
--   is reached before any messages are sent, <a>IOErrorEnumTimedOut</a> is
--   returned, otherwise it will return the number of messages sent before
--   timing out.
--   
--   To be notified when messages can be sent, wait for the
--   <a>IOConditionOut</a> condition. Note though that you may still
--   receive <a>IOErrorEnumWouldBlock</a> from
--   <a>datagramBasedSendMessages</a> even if you were previously notified
--   of a <a>IOConditionOut</a> condition. (On Windows in particular, this
--   is very common due to the way the underlying APIs work.)
--   
--   If the connection is shut down or closed (by calling
--   <a>socketClose</a> or <a>socketShutdown</a> with
--   <i><tt>shutdownWrite</tt></i> set, if it’s a <a>Socket</a>, for
--   example), all calls to this function will return
--   <a>IOErrorEnumClosed</a>.
--   
--   On error -1 is returned and <i><tt>error</tt></i> is set accordingly.
--   An error will only be returned if zero messages could be sent;
--   otherwise the number of messages successfully sent before the error
--   will be returned. If <i><tt>cancellable</tt></i> is cancelled,
--   <a>IOErrorEnumCancelled</a> is returned as with any other error.
--   
--   <i>Since: 2.48</i>
datagramBasedSendMessages :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [OutputMessage] -> Int32 -> Int64 -> Maybe b -> m Int32
instance GHC.Classes.Eq GI.Gio.Interfaces.DatagramBased.DatagramBased
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DatagramBased.DatagramBased
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DatagramBased.DatagramBased
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DatagramBased.DatagramBased o) => GI.Gio.Interfaces.DatagramBased.IsDatagramBased o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.DatagramBased.DatagramBased)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DatagramBased.DatagramBased
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DatagramBased.DatagramBased


-- | <tt>GAsyncInitable</tt> is an interface for asynchronously
--   initializable objects.
--   
--   This is the asynchronous version of <a>Initable</a>; it behaves the
--   same in all ways except that initialization is asynchronous. For more
--   details see the descriptions on <tt>GInitable</tt>.
--   
--   A class may implement both the <tt>GInitable</tt> and
--   <tt>GAsyncInitable</tt> interfaces.
--   
--   Users of objects implementing this are not intended to use the
--   interface method directly; instead it will be used automatically in
--   various ways. For C applications you generally just call
--   <a>AsyncInitable</a>.<tt><i>new_async</i></tt>() directly, or
--   indirectly via a <tt><i>foo_thing_new_async()</i></tt> wrapper. This
--   will call <a>asyncInitableInitAsync</a> under the covers, calling back
--   with <tt>NULL</tt> and a set <tt>GError</tt> on failure.
--   
--   A typical implementation might look something like this:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   enum {
--      NOT_INITIALIZED,
--      INITIALIZING,
--      INITIALIZED
--   };
--   
--   static void
--   _foo_ready_cb (Foo *self)
--   {
--     GList *l;
--   
--     self-&gt;priv-&gt;state = INITIALIZED;
--   
--     for (l = self-&gt;priv-&gt;init_results; l != NULL; l = l-&gt;next)
--       {
--         GTask *task = l-&gt;data;
--   
--         if (self-&gt;priv-&gt;success)
--           g_task_return_boolean (task, TRUE);
--         else
--           g_task_return_new_error (task, ...);
--         g_object_unref (task);
--       }
--   
--     g_list_free (self-&gt;priv-&gt;init_results);
--     self-&gt;priv-&gt;init_results = NULL;
--   }
--   
--   static void
--   foo_init_async (GAsyncInitable       *initable,
--                   int                   io_priority,
--                   GCancellable         *cancellable,
--                   GAsyncReadyCallback   callback,
--                   gpointer              user_data)
--   {
--     Foo *self = FOO (initable);
--     GTask *task;
--   
--     task = g_task_new (initable, cancellable, callback, user_data);
--     g_task_set_name (task, G_STRFUNC);
--   
--     switch (self-&gt;priv-&gt;state)
--       {
--         case NOT_INITIALIZED:
--           _foo_get_ready (self);
--           self-&gt;priv-&gt;init_results = g_list_append (self-&gt;priv-&gt;init_results,
--                                                     task);
--           self-&gt;priv-&gt;state = INITIALIZING;
--           break;
--         case INITIALIZING:
--           self-&gt;priv-&gt;init_results = g_list_append (self-&gt;priv-&gt;init_results,
--                                                     task);
--           break;
--         case INITIALIZED:
--           if (!self-&gt;priv-&gt;success)
--             g_task_return_new_error (task, ...);
--           else
--             g_task_return_boolean (task, TRUE);
--           g_object_unref (task);
--           break;
--       }
--   }
--   
--   static gboolean
--   foo_init_finish (GAsyncInitable       *initable,
--                    GAsyncResult         *result,
--                    GError              **error)
--   {
--     g_return_val_if_fail (g_task_is_valid (result, initable), FALSE);
--   
--     return g_task_propagate_boolean (G_TASK (result), error);
--   }
--   
--   static void
--   foo_async_initable_iface_init (gpointer g_iface,
--                                  gpointer data)
--   {
--     GAsyncInitableIface *iface = g_iface;
--   
--     iface-&gt;init_async = foo_init_async;
--     iface-&gt;init_finish = foo_init_finish;
--   }
--   </pre>
--   
--   <i>Since: 2.22</i>
module GI.Gio.Interfaces.AsyncInitable

-- | Memory-managed wrapper type.
newtype AsyncInitable
AsyncInitable :: ManagedPtr AsyncInitable -> AsyncInitable

-- | Type class for types which can be safely cast to <a>AsyncInitable</a>,
--   for instance with <a>toAsyncInitable</a>.
class (GObject o, IsDescendantOf AsyncInitable o) => IsAsyncInitable o

-- | Cast to <a>AsyncInitable</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toAsyncInitable :: (MonadIO m, IsAsyncInitable o) => o -> m AsyncInitable

-- | Starts asynchronous initialization of the object implementing the
--   interface. This must be done before any real use of the object after
--   initial construction. If the object also implements <a>Initable</a>
--   you can optionally call <a>initableInit</a> instead.
--   
--   This method is intended for language bindings. If writing in C,
--   <tt><i>g_async_initable_new_async()</i></tt> should typically be used
--   instead.
--   
--   When the initialization is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>asyncInitableInitFinish</a> to get the
--   result of the initialization.
--   
--   Implementations may also support cancellation. If
--   <i><tt>cancellable</tt></i> is not <a>Nothing</a>, then initialization
--   can be cancelled by triggering the cancellable object from another
--   thread. If the operation was cancelled, the error
--   <a>IOErrorEnumCancelled</a> will be returned. If
--   <i><tt>cancellable</tt></i> is not <a>Nothing</a>, and the object
--   doesn't support cancellable initialization, the error
--   <a>IOErrorEnumNotSupported</a> will be returned.
--   
--   As with <a>Initable</a>, if the object is not initialized, or
--   initialization returns with an error, then all operations on the
--   object except <a>objectRef</a> and <a>objectUnref</a> are considered
--   to be invalid, and have undefined behaviour. They will often fail with
--   <tt><i>g_critical()</i></tt> or <tt><i>g_warning()</i></tt>, but this
--   must not be relied on.
--   
--   Callers should not assume that a class which implements
--   <a>AsyncInitable</a> can be initialized multiple times; for more
--   information, see <a>initableInit</a>. If a class explicitly supports
--   being initialized multiple times, implementation requires yielding all
--   subsequent calls to <tt><i>init_async()</i></tt> on the results of the
--   first call.
--   
--   For classes that also support the <a>Initable</a> interface, the
--   default implementation of this method will run the <a>initableInit</a>
--   function in a thread, so if you want to support asynchronous
--   initialization via threads, just implement the <a>AsyncInitable</a>
--   interface without overriding any interface methods.
--   
--   <i>Since: 2.22</i>
asyncInitableInitAsync :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes asynchronous initialization and returns the result. See
--   <a>asyncInitableInitAsync</a>.
--   
--   <i>Since: 2.22</i>
asyncInitableInitFinish :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsAsyncResult b) => a -> b -> m ()

-- | Finishes the async construction for the various g_async_initable_new
--   calls, returning the created object or <a>Nothing</a> on error.
--   
--   <i>Since: 2.22</i>
asyncInitableNewFinish :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsAsyncResult b) => a -> b -> m Object

-- | Helper function for constructing <a>AsyncInitable</a> object. This is
--   similar to <a>objectNewv</a> but also initializes the object
--   asynchronously.
--   
--   When the initialization is finished, <i><tt>callback</tt></i> will be
--   called. You can then call <a>asyncInitableNewFinish</a> to get the new
--   object and check for any errors.
--   
--   <i>Since: 2.22</i>

-- | <i>Deprecated: (Since version 2.54)Use
--   <tt><i>g_object_new_with_properties()</i></tt>
--   and<a>asyncInitableInitAsync</a> instead. See <a>Parameter</a> for
--   more information.</i>
asyncInitableNewvAsync :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Word32 -> Parameter -> Int32 -> Maybe a -> Maybe AsyncReadyCallback -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.AsyncInitable.AsyncInitable o) => GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.AsyncInitable.AsyncInitable)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.AsyncInitable.AsyncInitable


-- | Information about an installed application and methods to launch it
--   (with file arguments).
--   
--   <tt>GAppInfo</tt> and <tt>GAppLaunchContext</tt> are used for
--   describing and launching applications installed on the system.
--   
--   As of GLib 2.20, URIs will always be converted to POSIX paths (using
--   <a>fileGetPath</a>) when using <a>appInfoLaunch</a> even if the
--   application requested an URI and not a POSIX path. For example for a
--   desktop-file based application with the following Exec key:
--   
--   <pre>
--   Exec=totem %U
--   </pre>
--   
--   and a single URI, <tt>sftp://foo/file.avi</tt>, then
--   <tt>/home/user/.gvfs/sftp on foo/file.avi</tt> will be passed. This
--   will only work if a set of suitable GIO extensions (such as GVfs 2.26
--   compiled with FUSE support), is available and operational; if this is
--   not the case, the URI will be passed unmodified to the application.
--   Some URIs, such as <tt>mailto:</tt>, of course cannot be mapped to a
--   POSIX path (in GVfs there’s no FUSE mount for it); such URIs will be
--   passed unmodified to the application.
--   
--   Specifically for GVfs 2.26 and later, the POSIX URI will be mapped
--   back to the GIO URI in the <a>File</a> constructors (since GVfs
--   implements the GVfs extension point). As such, if the application
--   needs to examine the URI, it needs to use <a>fileGetUri</a> or similar
--   on <a>File</a>. In other words, an application cannot assume that the
--   URI passed to e.g. <a>fileNewForCommandlineArg</a> is equal to the
--   result of <a>fileGetUri</a>. The following snippet illustrates this:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   GFile *f;
--   char *uri;
--   
--   file = g_file_new_for_commandline_arg (uri_from_commandline);
--   
--   uri = g_file_get_uri (file);
--   strcmp (uri, uri_from_commandline) == 0;
--   g_free (uri);
--   
--   if (g_file_has_uri_scheme (file, "cdda"))
--     {
--       // do something special with uri
--     }
--   g_object_unref (file);
--   </pre>
--   
--   This code will work when both <tt>cdda://sr0/Track 1.wav</tt> and
--   <tt>/home/user/.gvfs/cdda on sr0/Track 1.wav</tt> is passed to the
--   application. It should be noted that it’s generally not safe for
--   applications to rely on the format of a particular URIs. Different
--   launcher applications (e.g. file managers) may have different ideas of
--   what a given URI means.
module GI.Gio.Interfaces.AppInfo

-- | Memory-managed wrapper type.
newtype AppInfo
AppInfo :: ManagedPtr AppInfo -> AppInfo

-- | Type class for types which can be safely cast to <a>AppInfo</a>, for
--   instance with <a>toAppInfo</a>.
class (GObject o, IsDescendantOf AppInfo o) => IsAppInfo o

-- | Cast to <a>AppInfo</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toAppInfo :: (MonadIO m, IsAppInfo o) => o -> m AppInfo

-- | Adds a content type to the application information to indicate the
--   application is capable of opening files with the given content type.
appInfoAddSupportsType :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> Text -> m ()

-- | Obtains the information whether the <a>AppInfo</a> can be deleted. See
--   <a>appInfoDelete</a>.
--   
--   <i>Since: 2.20</i>
appInfoCanDelete :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool

-- | Checks if a supported content type can be removed from an application.
appInfoCanRemoveSupportsType :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool

-- | Creates a new <a>AppInfo</a> from the given information.
--   
--   Note that for <i><tt>commandline</tt></i>, the quoting rules of the
--   <tt>Exec</tt> key of the <a>freedesktop.org Desktop Entry
--   Specification</a> are applied. For example, if the
--   <i><tt>commandline</tt></i> contains percent-encoded URIs, the
--   percent-character must be doubled in order to prevent it from being
--   swallowed by <tt>Exec</tt> key unquoting. See <a>the specification</a>
--   for exact quoting rules.
appInfoCreateFromCommandline :: (HasCallStack, MonadIO m) => [Char] -> Maybe Text -> [AppInfoCreateFlags] -> m AppInfo

-- | Tries to delete a <a>AppInfo</a>.
--   
--   On some platforms, there may be a difference between user-defined
--   <a>AppInfo</a>s which can be deleted, and system-wide ones which
--   cannot. See <a>appInfoCanDelete</a>.
--   
--   <i>Since: 2.20</i>
appInfoDelete :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool

-- | Creates a duplicate of a <a>AppInfo</a>.
appInfoDup :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m AppInfo

-- | Checks if two <a>AppInfo</a>s are equal.
--   
--   Note that the check *may not* compare each individual field, and only
--   does an identity check. In case detecting changes in the contents is
--   needed, program code must additionally compare relevant fields.
appInfoEqual :: (HasCallStack, MonadIO m, IsAppInfo a, IsAppInfo b) => a -> b -> m Bool

-- | Gets a list of all of the applications currently registered on this
--   system.
--   
--   For desktop files, this includes applications that have
--   <a>`NoDisplay=true`</a> set or are excluded from display by means of
--   <a>`OnlyShowIn`</a> or <a>`NotShowIn`</a>. See
--   <a>appInfoShouldShow</a>.
--   
--   The returned list does not include applications which have the
--   <a>`Hidden` key</a> set.
appInfoGetAll :: (HasCallStack, MonadIO m) => m [AppInfo]

-- | Gets a list of all <a>AppInfo</a>s for a given content type, including
--   the recommended and fallback <a>AppInfo</a>s. See
--   <a>appInfoGetRecommendedForType</a> and
--   <a>appInfoGetFallbackForType</a>.
appInfoGetAllForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]

-- | Gets the commandline with which the application will be started.
--   
--   <i>Since: 2.20</i>
appInfoGetCommandline :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m (Maybe [Char])

-- | Gets the default <a>AppInfo</a> for a given content type.
appInfoGetDefaultForType :: (HasCallStack, MonadIO m) => Text -> Bool -> m (Maybe AppInfo)

-- | Asynchronously gets the default <a>AppInfo</a> for a given content
--   type.
--   
--   <i>Since: 2.74</i>
appInfoGetDefaultForTypeAsync :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Bool -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a default <a>AppInfo</a> lookup started by
--   <a>appInfoGetDefaultForTypeAsync</a>.
--   
--   If no #<a>AppInfo</a> is found, then <i><tt>error</tt></i> will be set
--   to [error<i><tt>gio</tt></i>.IOErrorEnum.NOT_FOUND].
--   
--   <i>Since: 2.74</i>
appInfoGetDefaultForTypeFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m AppInfo

-- | Gets the default application for handling URIs with the given URI
--   scheme.
--   
--   A URI scheme is the initial part of the URI, up to but not including
--   the <tt>:</tt>. For example, <tt>http</tt>, <tt>ftp</tt> or
--   <tt>sip</tt>.
appInfoGetDefaultForUriScheme :: (HasCallStack, MonadIO m) => Text -> m (Maybe AppInfo)

-- | Asynchronously gets the default application for handling URIs with the
--   given URI scheme. A URI scheme is the initial part of the URI, up to
--   but not including the <tt>:</tt>, e.g. <tt>http</tt>, <tt>ftp</tt> or
--   <tt>sip</tt>.
--   
--   <i>Since: 2.74</i>
appInfoGetDefaultForUriSchemeAsync :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a default <a>AppInfo</a> lookup started by
--   <a>appInfoGetDefaultForUriSchemeAsync</a>.
--   
--   If no <a>AppInfo</a> is found, then <i><tt>error</tt></i> will be set
--   to [error<i><tt>gio</tt></i>.IOErrorEnum.NOT_FOUND].
--   
--   <i>Since: 2.74</i>
appInfoGetDefaultForUriSchemeFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m AppInfo

-- | Gets a human-readable description of an installed application.
appInfoGetDescription :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m (Maybe Text)

-- | Gets the display name of the application. The display name is often
--   more descriptive to the user than the name itself.
--   
--   <i>Since: 2.24</i>
appInfoGetDisplayName :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Text

-- | Gets the executable’s name for the installed application.
--   
--   This is intended to be used for debugging or labelling what program is
--   going to be run. To launch the executable, use <a>appInfoLaunch</a>
--   and related functions, rather than spawning the return value from this
--   function.
appInfoGetExecutable :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m [Char]

-- | Gets a list of fallback <a>AppInfo</a>s for a given content type, i.e.
--   those applications which claim to support the given content type by
--   MIME type subclassing and not directly.
--   
--   <i>Since: 2.28</i>
appInfoGetFallbackForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]

-- | Gets the icon for the application.
appInfoGetIcon :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m (Maybe Icon)

-- | Gets the ID of an application. An id is a string that identifies the
--   application. The exact format of the id is platform dependent. For
--   instance, on Unix this is the desktop file id from the xdg menu
--   specification.
--   
--   Note that the returned ID may be <tt>NULL</tt>, depending on how the
--   <i><tt>appinfo</tt></i> has been constructed.
appInfoGetId :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m (Maybe Text)

-- | Gets the installed name of the application.
appInfoGetName :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Text

-- | Gets a list of recommended <a>AppInfo</a>s for a given content type,
--   i.e. those applications which claim to support the given content type
--   exactly, and not by MIME type subclassing.
--   
--   Note that the first application of the list is the last used one, i.e.
--   the last one for which <a>appInfoSetAsLastUsedForType</a> has been
--   called.
--   
--   <i>Since: 2.28</i>
appInfoGetRecommendedForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]

-- | Retrieves the list of content types that <i><tt>appInfo</tt></i>
--   claims to support. If this information is not provided by the
--   environment, this function will return <tt>NULL</tt>.
--   
--   This function does not take in consideration associations added with
--   <a>appInfoAddSupportsType</a>, but only those exported directly by the
--   application.
--   
--   <i>Since: 2.34</i>
appInfoGetSupportedTypes :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m (Maybe [Text])

-- | Launches the application. Passes <i><tt>files</tt></i> to the launched
--   application as arguments, using the optional <i><tt>context</tt></i>
--   to get information about the details of the launcher (like what screen
--   it is on). On error, <i><tt>error</tt></i> will be set accordingly.
--   
--   To launch the application without arguments pass a <tt>NULL</tt>
--   <i><tt>files</tt></i> list.
--   
--   Note that even if the launch is successful the application launched
--   can fail to start if it runs into problems during startup. There is no
--   way to detect this.
--   
--   Some URIs can be changed when passed through a GFile (for instance
--   unsupported URIs with strange formats like mailto:), so if you have a
--   textual URI you want to pass in as argument, consider using
--   <a>appInfoLaunchUris</a> instead.
--   
--   The launched application inherits the environment of the launching
--   process, but it can be modified with <a>appLaunchContextSetenv</a> and
--   <a>appLaunchContextUnsetenv</a>.
--   
--   On UNIX, this function sets the <tt>GIO_LAUNCHED_DESKTOP_FILE</tt>
--   environment variable with the path of the launched desktop file and
--   <tt>GIO_LAUNCHED_DESKTOP_FILE_PID</tt> to the process id of the
--   launched process. This can be used to ignore
--   <tt>GIO_LAUNCHED_DESKTOP_FILE</tt>, should it be inherited by further
--   processes. The <tt>DISPLAY</tt>, <tt>XDG_ACTIVATION_TOKEN</tt> and
--   <tt>DESKTOP_STARTUP_ID</tt> environment variables are also set, based
--   on information provided in <i><tt>context</tt></i>.
appInfoLaunch :: (HasCallStack, MonadIO m, IsAppInfo a, IsFile b, IsAppLaunchContext c) => a -> [b] -> Maybe c -> m ()

-- | Utility function that launches the default application registered to
--   handle the specified uri. Synchronous I/O is done on the uri to detect
--   the type of the file if required.
--   
--   The D-Bus–activated applications don’t have to be started if your
--   application terminates too soon after this function. To prevent this,
--   use <a>appInfoLaunchDefaultForUriAsync</a> instead.
appInfoLaunchDefaultForUri :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => Text -> Maybe a -> m ()

-- | Async version of <a>appInfoLaunchDefaultForUri</a>.
--   
--   This version is useful if you are interested in receiving error
--   information in the case where the application is sandboxed and the
--   portal may present an application chooser dialog to the user.
--   
--   This is also useful if you want to be sure that the D-Bus–activated
--   applications are really started before termination and if you are
--   interested in receiving error information from their activation.
--   
--   <i>Since: 2.50</i>
appInfoLaunchDefaultForUriAsync :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsCancellable b) => Text -> Maybe a -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an asynchronous launch-default-for-uri operation.
--   
--   <i>Since: 2.50</i>
appInfoLaunchDefaultForUriFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()

-- | Launches the application. This passes the <i><tt>uris</tt></i> to the
--   launched application as arguments, using the optional
--   <i><tt>context</tt></i> to get information about the details of the
--   launcher (like what screen it is on). On error, <i><tt>error</tt></i>
--   will be set accordingly. If the application only supports one URI per
--   invocation as part of their command-line, multiple instances of the
--   application will be spawned.
--   
--   To launch the application without arguments pass a <tt>NULL</tt>
--   <i><tt>uris</tt></i> list.
--   
--   Note that even if the launch is successful the application launched
--   can fail to start if it runs into problems during startup. There is no
--   way to detect this.
appInfoLaunchUris :: (HasCallStack, MonadIO m, IsAppInfo a, IsAppLaunchContext b) => a -> [Text] -> Maybe b -> m ()

-- | Async version of <a>appInfoLaunchUris</a>.
--   
--   The <i><tt>callback</tt></i> is invoked immediately after the
--   application launch, but it waits for activation in case of
--   D-Bus–activated applications and also provides extended error
--   information for sandboxed applications, see notes for
--   <a>appInfoLaunchDefaultForUriAsync</a>.
--   
--   <i>Since: 2.60</i>
appInfoLaunchUrisAsync :: (HasCallStack, MonadIO m, IsAppInfo a, IsAppLaunchContext b, IsCancellable c) => a -> [Text] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Finishes a <a>appInfoLaunchUrisAsync</a> operation.
--   
--   <i>Since: 2.60</i>
appInfoLaunchUrisFinish :: (HasCallStack, MonadIO m, IsAppInfo a, IsAsyncResult b) => a -> b -> m ()

-- | Removes a supported type from an application, if possible.
appInfoRemoveSupportsType :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> Text -> m ()

-- | Removes all changes to the type associations done by
--   <a>appInfoSetAsDefaultForType</a>,
--   <a>appInfoSetAsDefaultForExtension</a>, <a>appInfoAddSupportsType</a>
--   or <a>appInfoRemoveSupportsType</a>.
--   
--   <i>Since: 2.20</i>
appInfoResetTypeAssociations :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Sets the application as the default handler for the given file
--   extension.
appInfoSetAsDefaultForExtension :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> [Char] -> m ()

-- | Sets the application as the default handler for a given type.
appInfoSetAsDefaultForType :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> Text -> m ()

-- | Sets the application as the last used application for a given type.
--   This will make the application appear as first in the list returned by
--   <a>appInfoGetRecommendedForType</a>, regardless of the default
--   application for that content type.
appInfoSetAsLastUsedForType :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> Text -> m ()

-- | Checks if the application info should be shown in menus that list
--   available applications.
appInfoShouldShow :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool

-- | Checks if the application accepts files as arguments.
appInfoSupportsFiles :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool

-- | Checks if the application supports reading files and directories from
--   URIs.
appInfoSupportsUris :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool
instance GHC.Classes.Eq GI.Gio.Interfaces.AppInfo.AppInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.AppInfo.AppInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.AppInfo.AppInfo
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.AppInfo.AppInfo o) => GI.Gio.Interfaces.AppInfo.IsAppInfo o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.AppInfo.AppInfo)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.AppInfo.AppInfo
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.AppInfo.AppInfo


-- | <tt>GActionMap</tt> is an interface for action containers.
--   
--   The <tt>GActionMap</tt> interface is implemented by <a>ActionGroup</a>
--   implementations that operate by containing a number of named
--   <a>Action</a> instances, such as <a>SimpleActionGroup</a>.
--   
--   One useful application of this interface is to map the names of
--   actions from various action groups to unique, prefixed names (e.g. by
--   prepending "app." or "win."). This is the motivation for the ‘Map’
--   part of the interface name.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Interfaces.ActionMap

-- | Memory-managed wrapper type.
newtype ActionMap
ActionMap :: ManagedPtr ActionMap -> ActionMap

-- | Type class for types which can be safely cast to <a>ActionMap</a>, for
--   instance with <a>toActionMap</a>.
class (GObject o, IsDescendantOf ActionMap o) => IsActionMap o

-- | Cast to <a>ActionMap</a>, for types for which this is known to be
--   safe. For general casts, use <a>castTo</a>.
toActionMap :: (MonadIO m, IsActionMap o) => o -> m ActionMap

-- | Adds an action to the <i><tt>actionMap</tt></i>.
--   
--   If the action map already contains an action with the same name as
--   <i><tt>action</tt></i> then the old action is dropped from the action
--   map.
--   
--   The action map takes its own reference on <i><tt>action</tt></i>.
--   
--   <i>Since: 2.32</i>
actionMapAddAction :: (HasCallStack, MonadIO m, IsActionMap a, IsAction b) => a -> b -> m ()

-- | A convenience function for creating multiple <a>SimpleAction</a>
--   instances and adding them to a <a>ActionMap</a>.
--   
--   Each action is constructed as per one <a>ActionEntry</a>.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static void
--   activate_quit (GSimpleAction *simple,
--                  GVariant      *parameter,
--                  gpointer       user_data)
--   {
--     exit (0);
--   }
--   
--   static void
--   activate_print_string (GSimpleAction *simple,
--                          GVariant      *parameter,
--                          gpointer       user_data)
--   {
--     g_print ("%s\n", g_variant_get_string (parameter, NULL));
--   }
--   
--   static GActionGroup *
--   create_action_group (void)
--   {
--     const GActionEntry entries[] = {
--       { "quit",         activate_quit              },
--       { "print-string", activate_print_string, "s" }
--     };
--     GSimpleActionGroup *group;
--   
--     group = g_simple_action_group_new ();
--     g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL);
--   
--     return G_ACTION_GROUP (group);
--   }
--   </pre>
--   
--   <i>Since: 2.32</i>
actionMapAddActionEntries :: (HasCallStack, MonadIO m, IsActionMap a) => a -> [ActionEntry] -> Ptr () -> m ()

-- | Looks up the action with the name <i><tt>actionName</tt></i> in
--   <i><tt>actionMap</tt></i>.
--   
--   If no such action exists, returns <tt>NULL</tt>.
--   
--   <i>Since: 2.32</i>
actionMapLookupAction :: (HasCallStack, MonadIO m, IsActionMap a) => a -> Text -> m (Maybe Action)

-- | Removes the named action from the action map.
--   
--   If no action of this name is in the map then nothing happens.
--   
--   <i>Since: 2.32</i>
actionMapRemoveAction :: (HasCallStack, MonadIO m, IsActionMap a) => a -> Text -> m ()

-- | Remove actions from a <a>ActionMap</a>. This is meant as the reverse
--   of <a>actionMapAddActionEntries</a>.
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   static const GActionEntry entries[] = {
--       { "quit",         activate_quit              },
--       { "print-string", activate_print_string, "s" }
--   };
--   
--   void
--   add_actions (GActionMap *map)
--   {
--     g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
--   }
--   
--   void
--   remove_actions (GActionMap *map)
--   {
--     g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
--   }
--   </pre>
--   
--   <i>Since: 2.78</i>
actionMapRemoveActionEntries :: (HasCallStack, MonadIO m, IsActionMap a) => a -> [ActionEntry] -> m ()
instance GHC.Classes.Eq GI.Gio.Interfaces.ActionMap.ActionMap
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.ActionMap.ActionMap
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.ActionMap.ActionMap
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.ActionMap.ActionMap o) => GI.Gio.Interfaces.ActionMap.IsActionMap o
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Interfaces.ActionMap.ActionMap)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.ActionMap.ActionMap
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.ActionMap.ActionMap


module GI.Gio.Interfaces


-- | Applications and libraries often contain binary or textual data that
--   is really part of the application, rather than user data. For instance
--   <a>`GtkBuilder`</a> <tt>.ui</tt> files, splashscreen images,
--   <a>Menu</a> markup XML, CSS files, icons, etc. These are often shipped
--   as files in <tt>$datadir/appname</tt>, or manually included as literal
--   strings in the code.
--   
--   The <tt>GResource</tt> API and the <a>`glib-compile-resources`</a>
--   program provide a convenient and efficient alternative to this which
--   has some nice properties. You maintain the files as normal files, so
--   it’s easy to edit them, but during the build the files are combined
--   into a binary bundle that is linked into the executable. This means
--   that loading the resource files are efficient (as they are already in
--   memory, shared with other instances) and simple (no need to check for
--   things like I/O errors or locate the files in the filesystem). It also
--   makes it easier to create relocatable applications.
--   
--   Resource files can also be marked as compressed. Such files will be
--   included in the resource bundle in a compressed form, but will be
--   automatically uncompressed when the resource is used. This is very
--   useful e.g. for larger text files that are parsed once (or rarely) and
--   then thrown away.
--   
--   Resource files can also be marked to be preprocessed, by setting the
--   value of the <tt>preprocess</tt> attribute to a comma-separated list
--   of preprocessing options. The only options currently supported are:
--   
--   <ul>
--   <li><tt>xml-stripblanks</tt> which will use the <a>`xmllint`</a>)
--   command to strip ignorable whitespace from the XML file. For this to
--   work, the <tt>XMLLINT</tt> environment variable must be set to the
--   full path to the xmllint executable, or xmllint must be in the
--   <tt>PATH</tt>; otherwise the preprocessing step is skipped.</li>
--   <li><tt>to-pixdata</tt> (deprecated since gdk-pixbuf 2.32) which will
--   use the <tt>gdk-pixbuf-pixdata</tt> command to convert images to the
--   <a>`GdkPixdata`</a> format, which allows you to create pixbufs
--   directly using the data inside the resource file, rather than an
--   (uncompressed) copy of it. For this, the <tt>gdk-pixbuf-pixdata</tt>
--   program must be in the <tt>PATH</tt>, or the
--   <tt>GDK_PIXBUF_PIXDATA</tt> environment variable must be set to the
--   full path to the <tt>gdk-pixbuf-pixdata</tt> executable; otherwise the
--   resource compiler will abort. <tt>to-pixdata</tt> has been deprecated
--   since gdk-pixbuf 2.32, as <tt>GResource</tt> supports embedding modern
--   image formats just as well. Instead of using it, embed a PNG or SVG
--   file in your <tt>GResource</tt>.</li>
--   <li><tt>json-stripblanks</tt> which will use the
--   <a>`json-glib-format`</a>) command to strip ignorable whitespace from
--   the JSON file. For this to work, the <tt>JSON_GLIB_FORMAT</tt>
--   environment variable must be set to the full path to the
--   <tt>json-glib-format</tt> executable, or it must be in the
--   <tt>PATH</tt>; otherwise the preprocessing step is skipped. In
--   addition, at least version 1.6 of <tt>json-glib-format</tt> is
--   required.</li>
--   </ul>
--   
--   Resource files will be exported in the <tt>GResource</tt> namespace
--   using the combination of the given <tt>prefix</tt> and the filename
--   from the <tt>file</tt> element. The <tt>alias</tt> attribute can be
--   used to alter the filename to expose them at a different location in
--   the resource namespace. Typically, this is used to include files from
--   a different source directory without exposing the source directory in
--   the resource namespace, as in the example below.
--   
--   Resource bundles are created by the <a>`glib-compile-resources`</a>
--   program which takes an XML file that describes the bundle, and a set
--   of files that the XML references. These are combined into a binary
--   resource bundle.
--   
--   An example resource description:
--   
--   <h3><i>xml code</i></h3>
--   
--   <pre>
--   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
--   &lt;gresources&gt;
--     &lt;gresource prefix="/org/gtk/Example"&gt;
--       &lt;file&gt;data/splashscreen.png&lt;/file&gt;
--       &lt;file compressed="true"&gt;dialog.ui&lt;/file&gt;
--       &lt;file preprocess="xml-stripblanks"&gt;menumarkup.xml&lt;/file&gt;
--       &lt;file alias="example.css"&gt;data/example.css&lt;/file&gt;
--     &lt;/gresource&gt;
--   &lt;/gresources&gt;
--   </pre>
--   
--   This will create a resource bundle with the following files:
--   
--   <pre>
--   /org/gtk/Example/data/splashscreen.png
--   /org/gtk/Example/dialog.ui
--   /org/gtk/Example/menumarkup.xml
--   /org/gtk/Example/example.css
--   </pre>
--   
--   Note that all resources in the process share the same namespace, so
--   use Java-style path prefixes (like in the above example) to avoid
--   conflicts.
--   
--   You can then use <a>`glib-compile-resources`</a> to compile the XML to
--   a binary bundle that you can load with <a>resourceLoad</a>. However,
--   it’s more common to use the <tt>--generate-source</tt> and
--   <tt>--generate-header</tt> arguments to create a source file and
--   header to link directly into your application. This will generate
--   <tt>get_resource()</tt>, <tt>register_resource()</tt> and
--   <tt>unregister_resource()</tt> functions, prefixed by the
--   <tt>--c-name</tt> argument passed to <a>`glib-compile-resources`</a>.
--   <tt>get_resource()</tt> returns the generated <tt>GResource</tt>
--   object. The register and unregister functions register the resource so
--   its files can be accessed using <a>resourcesLookupData</a>.
--   
--   Once a <tt>GResource</tt> has been created and registered all the data
--   in it can be accessed globally in the process by using API calls like
--   <a>resourcesOpenStream</a> to stream the data or
--   <a>resourcesLookupData</a> to get a direct pointer to the data. You
--   can also use URIs like
--   <tt>resource:///org/gtk/Example/data/splashscreen.png</tt> with
--   <a>File</a> to access the resource data.
--   
--   Some higher-level APIs, such as <a>`GtkApplication`</a>, will
--   automatically load resources from certain well-known paths in the
--   resource namespace as a convenience. See the documentation for those
--   APIs for details.
--   
--   There are two forms of the generated source, the default version uses
--   the compiler support for constructor and destructor functions (where
--   available) to automatically create and register the <tt>GResource</tt>
--   on startup or library load time. If you pass
--   <tt>--manual-register</tt>, two functions to register/unregister the
--   resource are created instead. This requires an explicit initialization
--   call in your application/library, but it works on all platforms, even
--   on the minor ones where constructors are not supported. (Constructor
--   support is available for at least Win32, Mac OS and Linux.)
--   
--   Note that resource data can point directly into the data segment of
--   e.g. a library, so if you are unloading libraries during runtime you
--   need to be very careful with keeping around pointers to data from a
--   resource, as this goes away when the library is unloaded. However, in
--   practice this is not generally a problem, since most resource accesses
--   are for your own resources, and resource data is often used once,
--   during parsing, and then released.
--   
--   <h1>Overlays</h1>
--   
--   When debugging a program or testing a change to an installed version,
--   it is often useful to be able to replace resources in the program or
--   library, without recompiling, for debugging or quick hacking and
--   testing purposes. Since GLib 2.50, it is possible to use the
--   <tt>G_RESOURCE_OVERLAYS</tt> environment variable to selectively
--   overlay resources with replacements from the filesystem. It is a
--   <tt>G_SEARCHPATH_SEPARATOR</tt>-separated list of substitutions to
--   perform during resource lookups. It is ignored when running in a
--   setuid process.
--   
--   A substitution has the form
--   
--   <pre>
--   /org/gtk/libgtk=/home/desrt/gtk-overlay
--   </pre>
--   
--   The part before the <tt>=</tt> is the resource subpath for which the
--   overlay applies. The part after is a filesystem path which contains
--   files and subdirectories as you would like to be loaded as resources
--   with the equivalent names.
--   
--   In the example above, if an application tried to load a resource with
--   the resource path <tt>/org/gtk/libgtk/ui/gtkdialog.ui</tt> then
--   <tt>GResource</tt> would check the filesystem path
--   <tt>/home/desrt/gtk-overlay/ui/gtkdialog.ui</tt>. If a file was found
--   there, it would be used instead. This is an overlay, not an outright
--   replacement, which means that if a file is not found at that path, the
--   built-in version will be used instead. Whiteouts are not currently
--   supported.
--   
--   Substitutions must start with a slash, and must not contain a trailing
--   slash before the <tt>=</tt>. The filesystem path after the <tt>=</tt>
--   should ideally be absolute, but this is not strictly required. It is
--   possible to overlay the location of a single resource with an
--   individual file.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Structs.Resource

-- | Memory-managed wrapper type.
newtype Resource
Resource :: ManagedPtr Resource -> Resource

-- | Returns all the names of children at the specified
--   <i><tt>path</tt></i> in the resource.
--   
--   The return result is a <tt>NULL</tt> terminated list of strings which
--   should be released with <a>strfreev</a>.
--   
--   If <i><tt>path</tt></i> is invalid or does not exist in the
--   <a>Resource</a>, <a>ResourceErrorNotFound</a> will be returned.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   <i>Since: 2.32</i>
resourceEnumerateChildren :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m [Text]

-- | Looks for a file at the specified <i><tt>path</tt></i> in the resource
--   and if found returns information about it.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   The only error this can return is <a>ResourceErrorNotFound</a>, if
--   <i><tt>path</tt></i> was not found in <i><tt>resource</tt></i>.
--   
--   <i>Since: 2.32</i>
resourceGetInfo :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m (CSize, Word32)

-- | Returns whether the specified <i><tt>path</tt></i> in the resource has
--   children.
--   
--   <i>Since: 2.84</i>
resourceHasChildren :: (HasCallStack, MonadIO m) => Resource -> Text -> m Bool

-- | Loads a binary resource bundle and creates a <a>Resource</a>
--   representation of it, allowing you to query it for data.
--   
--   If you want to use this resource in the global resource namespace you
--   need to register it with <a>resourcesRegister</a>.
--   
--   If <i><tt>filename</tt></i> is empty or the data in it is corrupt,
--   <a>ResourceErrorInternal</a> will be returned. If
--   <i><tt>filename</tt></i> doesn’t exist, or there is an error in
--   reading it, an error from <a>mappedFileNew</a> will be returned.
--   
--   <i>Since: 2.32</i>
resourceLoad :: (HasCallStack, MonadIO m) => [Char] -> m Resource

-- | Looks for a file at the specified <i><tt>path</tt></i> in the resource
--   and returns a <a>Bytes</a> that lets you directly access the data in
--   memory.
--   
--   The data is always followed by a zero byte, so you can safely use the
--   data as a C string. However, that byte is not included in the size of
--   the <a>Bytes</a>.
--   
--   For uncompressed resource files this is a pointer directly into the
--   resource bundle, which is typically in some read-only data section in
--   the program binary. For compressed files, memory is allocated on the
--   heap and the data is automatically uncompressed.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   This can return error <a>ResourceErrorNotFound</a> if
--   <i><tt>path</tt></i> was not found in <i><tt>resource</tt></i>, or
--   <a>ResourceErrorInternal</a> if decompression of a compressed resource
--   failed.
--   
--   <i>Since: 2.32</i>
resourceLookupData :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m Bytes

-- | Creates a <a>Resource</a> from a reference to the binary resource
--   bundle.
--   
--   This will keep a reference to <i><tt>data</tt></i> while the resource
--   lives, so the data should not be modified or freed.
--   
--   If you want to use this resource in the global resource namespace you
--   need to register it with <a>resourcesRegister</a>.
--   
--   Note: <i><tt>data</tt></i> must be backed by memory that is at least
--   pointer aligned. Otherwise this function will internally create a copy
--   of the memory since GLib 2.56, or in older versions fail and exit the
--   process.
--   
--   If <i><tt>data</tt></i> is empty or corrupt,
--   <a>ResourceErrorInternal</a> will be returned.
--   
--   <i>Since: 2.32</i>
resourceNewFromData :: (HasCallStack, MonadIO m) => Bytes -> m Resource

-- | Looks for a file at the specified <i><tt>path</tt></i> in the resource
--   and returns a <a>InputStream</a> that lets you read the data.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   The only error this can return is <a>ResourceErrorNotFound</a>, if
--   <i><tt>path</tt></i> was not found in <i><tt>resource</tt></i>.
--   
--   <i>Since: 2.32</i>
resourceOpenStream :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m InputStream

-- | Atomically increments the reference count of <i><tt>resource</tt></i>
--   by one.
--   
--   This function is threadsafe and may be called from any thread.
--   
--   <i>Since: 2.32</i>
resourceRef :: (HasCallStack, MonadIO m) => Resource -> m Resource

-- | Atomically decrements the reference count of <i><tt>resource</tt></i>
--   by one.
--   
--   If the reference count drops to 0, all memory allocated by the
--   resource is released. This function is threadsafe and may be called
--   from any thread.
--   
--   <i>Since: 2.32</i>
resourceUnref :: (HasCallStack, MonadIO m) => Resource -> m ()
instance GHC.Classes.Eq GI.Gio.Structs.Resource.Resource
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.Resource.Resource
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.Resource.Resource
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.Resource.Resource)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.Resource.Resource
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.Resource.Resource


module GI.Gio.Functions

-- | Asynchronously connects to the message bus specified by
--   <i><tt>busType</tt></i>.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   invoked. You can then call <a>busGetFinish</a> to get the result of
--   the operation.
--   
--   This is an asynchronous failable function. See <a>busGetSync</a> for
--   the synchronous version.
--   
--   <i>Since: 2.26</i>
busGet :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>busGet</a>.
--   
--   The returned object is a singleton, that is, shared with other callers
--   of <a>busGet</a> and <a>busGetSync</a> for <i><tt>busType</tt></i>. In
--   the event that you need a private message bus connection, use
--   <a>dbusAddressGetForBusSync</a> and <a>dBusConnectionNewForAddress</a>
--   with G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
--   G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
--   
--   Note that the returned <a>DBusConnection</a> object will (usually)
--   have the <a>DBusConnection:exitOnClose</a> property set to
--   <a>True</a>.
--   
--   <i>Since: 2.26</i>
busGetFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusConnection

-- | Synchronously connects to the message bus specified by
--   <i><tt>busType</tt></i>. Note that the returned object may shared with
--   other callers, e.g. if two separate parts of a process calls this
--   function with the same <i><tt>busType</tt></i>, they will share the
--   same object.
--   
--   This is a synchronous failable function. See <a>busGet</a> and
--   <a>busGetFinish</a> for the asynchronous version.
--   
--   The returned object is a singleton, that is, shared with other callers
--   of <a>busGet</a> and <a>busGetSync</a> for <i><tt>busType</tt></i>. In
--   the event that you need a private message bus connection, use
--   <a>dbusAddressGetForBusSync</a> and <a>dBusConnectionNewForAddress</a>
--   with G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
--   G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
--   
--   Note that the returned <a>DBusConnection</a> object will (usually)
--   have the <a>DBusConnection:exitOnClose</a> property set to
--   <a>True</a>.
--   
--   <i>Since: 2.26</i>
busGetSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> Maybe a -> m DBusConnection

-- | Version of [func<i><tt>gio</tt></i>.bus_own_name using closures
--   instead of callbacks for easier binding in other languages.
--   
--   <i>Since: 2.26</i>
busOwnName :: (HasCallStack, MonadIO m) => BusType -> Text -> [BusNameOwnerFlags] -> Maybe (GClosure a) -> Maybe (GClosure b) -> Maybe (GClosure c) -> m Word32

-- | Version of <a>busOwnNameOnConnection</a> using closures instead of
--   callbacks for easier binding in other languages.
--   
--   <i>Since: 2.26</i>
busOwnNameOnConnection :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> [BusNameOwnerFlags] -> Maybe (GClosure b) -> Maybe (GClosure c) -> m Word32

-- | Stops owning a name.
--   
--   Note that there may still be D-Bus traffic to process (relating to
--   owning and unowning the name) in the current thread-default
--   <a>MainContext</a> after this function has returned. You should
--   continue to iterate the <a>MainContext</a> until the
--   [callback<i><tt>gLib</tt></i>.DestroyNotify] function passed to
--   <a>busOwnName</a> is called, in order to avoid memory leaks through
--   callbacks queued on the <a>MainContext</a> after it’s stopped being
--   iterated.
--   
--   <i>Since: 2.26</i>
busUnownName :: (HasCallStack, MonadIO m) => Word32 -> m ()

-- | Stops watching a name.
--   
--   Note that there may still be D-Bus traffic to process (relating to
--   watching and unwatching the name) in the current thread-default
--   <a>MainContext</a> after this function has returned. You should
--   continue to iterate the <a>MainContext</a> until the
--   <a>DestroyNotify</a> function passed to
--   <tt><i>g_bus_watch_name()</i></tt> is called, in order to avoid memory
--   leaks through callbacks queued on the <a>MainContext</a> after it’s
--   stopped being iterated.
--   
--   <i>Since: 2.26</i>
busUnwatchName :: (HasCallStack, MonadIO m) => Word32 -> m ()

-- | Version of <tt><i>g_bus_watch_name()</i></tt> using closures instead
--   of callbacks for easier binding in other languages.
--   
--   <i>Since: 2.26</i>
busWatchName :: (HasCallStack, MonadIO m) => BusType -> Text -> [BusNameWatcherFlags] -> Maybe (GClosure a) -> Maybe (GClosure b) -> m Word32

-- | Version of <tt><i>g_bus_watch_name_on_connection()</i></tt> using
--   closures instead of callbacks for easier binding in other languages.
--   
--   <i>Since: 2.26</i>
busWatchNameOnConnection :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> [BusNameWatcherFlags] -> Maybe (GClosure b) -> Maybe (GClosure c) -> m Word32

-- | Checks if a content type can be executable. Note that for instance
--   things like text files can be executables (i.e. scripts and batch
--   files).
contentTypeCanBeExecutable :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Compares two content types for equality.
contentTypeEquals :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Tries to find a content type based on the mime type name.
--   
--   <i>Since: 2.18</i>
contentTypeFromMimeType :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

-- | Gets the human readable description of the content type.
contentTypeGetDescription :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Gets the generic icon name for a content type.
--   
--   See the <a>shared-mime-info</a> specification for more on the generic
--   icon name.
--   
--   <i>Since: 2.34</i>
contentTypeGetGenericIconName :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

-- | Gets the icon for a content type.
contentTypeGetIcon :: (HasCallStack, MonadIO m) => Text -> m Icon

-- | Get the list of directories which MIME data is loaded from. See
--   <a>contentTypeSetMimeDirs</a> for details.
--   
--   <i>Since: 2.60</i>
contentTypeGetMimeDirs :: (HasCallStack, MonadIO m) => m [Text]

-- | Gets the mime type for the content type, if one is registered.
contentTypeGetMimeType :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)

-- | Gets the symbolic icon for a content type.
--   
--   <i>Since: 2.34</i>
contentTypeGetSymbolicIcon :: (HasCallStack, MonadIO m) => Text -> m Icon

-- | Guesses the content type based on example data. If the function is
--   uncertain, <i><tt>resultUncertain</tt></i> will be set to <a>True</a>.
--   Either <i><tt>filename</tt></i> or <i><tt>data</tt></i> may be
--   <a>Nothing</a>, in which case the guess will be based solely on the
--   other argument.
contentTypeGuess :: (HasCallStack, MonadIO m) => Maybe [Char] -> Maybe ByteString -> m (Text, Bool)

-- | Tries to guess the type of the tree with root <i><tt>root</tt></i>, by
--   looking at the files it contains. The result is an array of content
--   types, with the best guess coming first.
--   
--   The types returned all have the form x-content/foo, e.g.
--   x-content/audio-cdda (for audio CDs) or x-content/image-dcf (for a
--   camera memory card). See the <a>shared-mime-info</a> specification for
--   more on x-content types.
--   
--   This function is useful in the implementation of
--   <a>mountGuessContentType</a>.
--   
--   <i>Since: 2.18</i>
contentTypeGuessForTree :: (HasCallStack, MonadIO m, IsFile a) => a -> m [Text]

-- | Determines if <i><tt>type</tt></i> is a subset of
--   <i><tt>supertype</tt></i>.
contentTypeIsA :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Determines if <i><tt>type</tt></i> is a subset of
--   <i><tt>mimeType</tt></i>. Convenience wrapper around
--   <a>contentTypeIsA</a>.
--   
--   <i>Since: 2.52</i>
contentTypeIsMimeType :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool

-- | Checks if the content type is the generic "unknown" type. On UNIX this
--   is the "application/octet-stream" mimetype, while on win32 it is "*"
--   and on OSX it is a dynamic type or octet-stream.
contentTypeIsUnknown :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Set the list of directories used by GIO to load the MIME database. If
--   <i><tt>dirs</tt></i> is <a>Nothing</a>, the directories used are the
--   default:
--   
--   <ul>
--   <li>the <tt>mime</tt> subdirectory of the directory in
--   <tt>$XDG_DATA_HOME</tt></li>
--   <li>the <tt>mime</tt> subdirectory of every directory in
--   <tt>$XDG_DATA_DIRS</tt></li>
--   </ul>
--   
--   This function is intended to be used when writing tests that depend on
--   information stored in the MIME database, in order to control the data.
--   
--   Typically, in case your tests use <a>TEST_OPTION_ISOLATE_DIRS</a>, but
--   they depend on the system’s MIME database, you should call this
--   function with <i><tt>dirs</tt></i> set to <a>Nothing</a> before
--   calling <tt><i>g_test_init()</i></tt>, for instance:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   // Load MIME data from the system
--   g_content_type_set_mime_dirs (NULL);
--   // Isolate the environment
--   g_test_init (&amp;argc, &amp;argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
--   
--   …
--   
--   return g_test_run ();
--   </pre>
--   
--   <i>Since: 2.60</i>
contentTypeSetMimeDirs :: (HasCallStack, MonadIO m) => Maybe [Text] -> m ()

-- | Gets a list of strings containing all the registered content types
--   known to the system. The list and its data should be freed using
--   <tt>g_list_free_full (list, g_free)</tt>.
contentTypesGetRegistered :: (HasCallStack, MonadIO m) => m [Text]

-- | Escape <i><tt>string</tt></i> so it can appear in a D-Bus address as
--   the value part of a key-value pair.
--   
--   For instance, if <i><tt>string</tt></i> is <tt>/run/bus-for-:0</tt>,
--   this function would return <tt>/run/bus-for-%3A0</tt>, which could be
--   used in a D-Bus address like
--   <tt>unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0</tt>.
--   
--   <i>Since: 2.36</i>
dbusAddressEscapeValue :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Synchronously looks up the D-Bus address for the well-known message
--   bus instance specified by <i><tt>busType</tt></i>. This may involve
--   using various platform specific mechanisms.
--   
--   The returned address will be in the <a>D-Bus address format</a>.
--   
--   <i>Since: 2.26</i>
dbusAddressGetForBusSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> Maybe a -> m Text

-- | Asynchronously connects to an endpoint specified by
--   <i><tt>address</tt></i> and sets up the connection so it is in a state
--   to run the client-side of the D-Bus authentication conversation.
--   <i><tt>address</tt></i> must be in the <a>D-Bus address format</a>.
--   
--   When the operation is finished, <i><tt>callback</tt></i> will be
--   invoked. You can then call <a>dbusAddressGetStreamFinish</a> to get
--   the result of the operation.
--   
--   This is an asynchronous failable function. See
--   <a>dbusAddressGetStreamSync</a> for the synchronous version.
--   
--   <i>Since: 2.26</i>
dbusAddressGetStream :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()

-- | Finishes an operation started with <a>dbusAddressGetStream</a>.
--   
--   A server is not required to set a GUID, so <i><tt>outGuid</tt></i> may
--   be set to <a>Nothing</a> even on success.
--   
--   <i>Since: 2.26</i>
dbusAddressGetStreamFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (IOStream, Maybe Text)

-- | Synchronously connects to an endpoint specified by
--   <i><tt>address</tt></i> and sets up the connection so it is in a state
--   to run the client-side of the D-Bus authentication conversation.
--   <i><tt>address</tt></i> must be in the <a>D-Bus address format</a>.
--   
--   A server is not required to set a GUID, so <i><tt>outGuid</tt></i> may
--   be set to <a>Nothing</a> even on success.
--   
--   This is a synchronous failable function. See
--   <a>dbusAddressGetStream</a> for the asynchronous version.
--   
--   <i>Since: 2.26</i>
dbusAddressGetStreamSync :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Maybe a -> m (IOStream, Maybe Text)

-- | This is a language binding friendly version of
--   <a>dbusEscapeObjectPathBytestring</a>.
--   
--   <i>Since: 2.68</i>
dbusEscapeObjectPath :: (HasCallStack, MonadIO m) => Text -> m Text

-- | Escapes <i><tt>bytes</tt></i> for use in a D-Bus object path
--   component. <i><tt>bytes</tt></i> is an array of zero or more nonzero
--   bytes in an unspecified encoding, followed by a single zero byte.
--   
--   The escaping method consists of replacing all non-alphanumeric
--   characters (see <tt><i>g_ascii_isalnum()</i></tt>) with their
--   hexadecimal value preceded by an underscore (<tt>_</tt>). For example:
--   <tt>foo.bar.baz</tt> will become <tt>foo_2ebar_2ebaz</tt>.
--   
--   This method is appropriate to use when the input is nearly a valid
--   object path component but is not when your input is far from being a
--   valid object path component. Other escaping algorithms are also valid
--   to use with D-Bus object paths.
--   
--   This can be reversed with <a>dbusUnescapeObjectPath</a>.
--   
--   <i>Since: 2.68</i>
dbusEscapeObjectPathBytestring :: (HasCallStack, MonadIO m) => ByteString -> m Text

-- | Generate a D-Bus GUID that can be used with e.g.
--   <a>dBusConnectionNew</a>.
--   
--   See the <a>D-Bus specification</a> regarding what strings are valid
--   D-Bus GUIDs. The specification refers to these as ‘UUIDs’ whereas GLib
--   (for historical reasons) refers to them as ‘GUIDs’. The terms are
--   interchangeable.
--   
--   Note that D-Bus GUIDs do not follow <a>RFC 4122</a>.
--   
--   <i>Since: 2.26</i>
dbusGenerateGuid :: (HasCallStack, MonadIO m) => m Text

-- | Converts a <a>Value</a> to a <a>GVariant</a> of the type indicated by
--   the <i><tt>type</tt></i> parameter.
--   
--   The conversion is using the following rules:
--   
--   <ul>
--   <li><tt>G_TYPE_STRING</tt>: 's', 'o', 'g' or 'ay'</li>
--   <li><tt>G_TYPE_STRV</tt>: 'as', 'ao' or 'aay'</li>
--   <li><tt>G_TYPE_BOOLEAN</tt>: 'b'</li>
--   <li><tt>G_TYPE_UCHAR</tt>: 'y'</li>
--   <li><tt>G_TYPE_INT</tt>: 'i', 'n'</li>
--   <li><tt>G_TYPE_UINT</tt>: 'u', 'q'</li>
--   <li><tt>G_TYPE_INT64</tt>: 'x'</li>
--   <li><tt>G_TYPE_UINT64</tt>: 't'</li>
--   <li><tt>G_TYPE_DOUBLE</tt>: 'd'</li>
--   <li><tt>G_TYPE_VARIANT</tt>: Any <a>VariantType</a></li>
--   </ul>
--   
--   This can fail if e.g. <i><tt>gvalue</tt></i> is of type
--   <tt><i>G_TYPE_STRING</i></tt> and <i><tt>type</tt></i> is 'i', i.e.
--   <tt><i>G_VARIANT_TYPE_INT32</i></tt>. It will also fail for any
--   <a>GType</a> (including e.g. <tt><i>G_TYPE_OBJECT</i></tt> and
--   <tt><i>G_TYPE_BOXED</i></tt> derived-types) not in the table above.
--   
--   Note that if <i><tt>gvalue</tt></i> is of type
--   <tt><i>G_TYPE_VARIANT</i></tt> and its value is <a>Nothing</a>, the
--   empty <a>GVariant</a> instance (never <a>Nothing</a>) for
--   <i><tt>type</tt></i> is returned (e.g. 0 for scalar types, the empty
--   string for string types, '/' for object path types, the empty array
--   for any array type and so on).
--   
--   See the <a>dbusGvariantToGvalue</a> function for how to convert a
--   <a>GVariant</a> to a <a>Value</a>.
--   
--   <i>Since: 2.30</i>
dbusGvalueToGvariant :: (HasCallStack, MonadIO m) => GValue -> VariantType -> m GVariant

-- | Converts a <a>GVariant</a> to a <a>Value</a>. If <i><tt>value</tt></i>
--   is floating, it is consumed.
--   
--   The rules specified in the <a>dbusGvalueToGvariant</a> function are
--   used - this function is essentially its reverse form. So, a
--   <a>GVariant</a> containing any basic or string array type will be
--   converted to a <a>Value</a> containing a basic value or string array.
--   Any other <a>GVariant</a> (handle, variant, tuple, dict entry) will be
--   converted to a <a>Value</a> containing that <a>GVariant</a>.
--   
--   The conversion never fails - a valid <a>Value</a> is always returned
--   in <i><tt>outGvalue</tt></i>.
--   
--   <i>Since: 2.30</i>
dbusGvariantToGvalue :: (HasCallStack, MonadIO m) => GVariant -> m GValue

-- | Checks if <i><tt>string</tt></i> is a <a>D-Bus address</a>.
--   
--   This doesn't check if <i><tt>string</tt></i> is actually supported by
--   <a>DBusServer</a> or <a>DBusConnection</a> - use
--   <a>dbusIsSupportedAddress</a> to do more checks.
--   
--   <i>Since: 2.26</i>
dbusIsAddress :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Check whether <i><tt>string</tt></i> is a valid D-Bus error name.
--   
--   This function returns the same result as <a>dbusIsInterfaceName</a>,
--   because D-Bus error names are defined to have exactly the same syntax
--   as interface names.
--   
--   <i>Since: 2.70</i>
dbusIsErrorName :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Checks if <i><tt>string</tt></i> is a D-Bus GUID.
--   
--   See the documentation for <a>dbusGenerateGuid</a> for more information
--   about the format of a GUID.
--   
--   <i>Since: 2.26</i>
dbusIsGuid :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Checks if <i><tt>string</tt></i> is a valid D-Bus interface name.
--   
--   <i>Since: 2.26</i>
dbusIsInterfaceName :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Checks if <i><tt>string</tt></i> is a valid D-Bus member (e.g. signal
--   or method) name.
--   
--   <i>Since: 2.26</i>
dbusIsMemberName :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Checks if <i><tt>string</tt></i> is a valid D-Bus bus name (either
--   unique or well-known).
--   
--   <i>Since: 2.26</i>
dbusIsName :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Like <a>dbusIsAddress</a> but also checks if the library supports the
--   transports in <i><tt>string</tt></i> and that key/value pairs for each
--   transport are valid. See the specification of the <a>D-Bus address
--   format</a>.
--   
--   <i>Since: 2.26</i>
dbusIsSupportedAddress :: (HasCallStack, MonadIO m) => Text -> m ()

-- | Checks if <i><tt>string</tt></i> is a valid D-Bus unique bus name.
--   
--   <i>Since: 2.26</i>
dbusIsUniqueName :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Unescapes an string that was previously escaped with
--   <a>dbusEscapeObjectPath</a>. If the string is in a format that could
--   not have been returned by <a>dbusEscapeObjectPath</a>, this function
--   returns <a>Nothing</a>.
--   
--   Encoding alphanumeric characters which do not need to be encoded is
--   not allowed (e.g <tt>_63</tt> is not valid, the string should contain
--   <tt>c</tt> instead).
--   
--   <i>Since: 2.68</i>
dbusUnescapeObjectPath :: (HasCallStack, MonadIO m) => Text -> m (Maybe ByteString)

-- | Converts <tt>errno.h</tt> error codes into GIO error codes.
--   
--   The fallback value <a>IOErrorEnumFailed</a> is returned for error
--   codes not currently handled (but note that future GLib releases may
--   return a more specific value instead).
--   
--   As <tt>errno</tt> is global and may be modified by intermediate
--   function calls, you should save its value immediately after the call
--   returns, and use the saved value instead of <tt>errno</tt>:
--   
--   <h3><i>C code</i></h3>
--   
--   <pre>
--   int saved_errno;
--   
--   ret = read (blah);
--   saved_errno = errno;
--   
--   g_io_error_from_errno (saved_errno);
--   </pre>
ioErrorFromErrno :: (HasCallStack, MonadIO m) => Int32 -> m IOErrorEnum

-- | Converts <a>FileError</a> error codes into GIO error codes.
--   
--   <i>Since: 2.74</i>
ioErrorFromFileError :: (HasCallStack, MonadIO m) => FileError -> m IOErrorEnum

-- | Gets the GIO Error Quark.
ioErrorQuark :: (HasCallStack, MonadIO m) => m Word32

-- | Scans all the modules in the specified directory, ensuring that any
--   extension point implemented by a module is registered.
--   
--   This may not actually load and initialize all the types in each
--   module, some modules may be lazily loaded and initialized when an
--   extension point it implements is used with e.g.
--   <a>iOExtensionPointGetExtensions</a> or
--   <a>iOExtensionPointGetExtensionByName</a>.
--   
--   If you need to guarantee that all types are loaded in all the modules,
--   use <tt><i>g_io_modules_load_all_in_directory()</i></tt>.
--   
--   <i>Since: 2.24</i>
ioModulesScanAllInDirectory :: (HasCallStack, MonadIO m) => [Char] -> m ()

-- | Scans all the modules in the specified directory, ensuring that any
--   extension point implemented by a module is registered.
--   
--   This may not actually load and initialize all the types in each
--   module, some modules may be lazily loaded and initialized when an
--   extension point it implements is used with e.g.
--   <a>iOExtensionPointGetExtensions</a> or
--   <a>iOExtensionPointGetExtensionByName</a>.
--   
--   If you need to guarantee that all types are loaded in all the modules,
--   use <tt><i>g_io_modules_load_all_in_directory()</i></tt>.
--   
--   <i>Since: 2.30</i>
ioModulesScanAllInDirectoryWithScope :: (HasCallStack, MonadIO m) => [Char] -> IOModuleScope -> m ()

-- | Cancels all cancellable I/O jobs.
--   
--   A job is cancellable if a <a>Cancellable</a> was passed into
--   <a>ioSchedulerPushJob</a>.

-- | <i>Deprecated: (Since version 2.36)You should never call this
--   function, since you don'tknow how other libraries in your program
--   might be making use ofgioscheduler.</i>
ioSchedulerCancelAllJobs :: (HasCallStack, MonadIO m) => m ()

-- | Schedules the I/O job to run in another thread.
--   
--   <i><tt>notify</tt></i> will be called on <i><tt>userData</tt></i>
--   after <i><tt>jobFunc</tt></i> has returned, regardless whether the job
--   was cancelled or has run to completion.
--   
--   If <i><tt>cancellable</tt></i> is not <a>Nothing</a>, it can be used
--   to cancel the I/O job by calling <a>cancellableCancel</a> or by
--   calling <a>ioSchedulerCancelAllJobs</a>.

-- | <i>Deprecated: (Since version 2.36)use <a>ThreadPool</a> or
--   <a>taskRunInThread</a></i>
ioSchedulerPushJob :: (HasCallStack, MonadIO m, IsCancellable a) => IOSchedulerJobFunc -> Int32 -> Maybe a -> m ()

-- | Creates a keyfile-backed <a>SettingsBackend</a>.
--   
--   The filename of the keyfile to use is given by
--   <i><tt>filename</tt></i>.
--   
--   All settings read to or written from the backend must fall under the
--   path given in <i><tt>rootPath</tt></i> (which must start and end with
--   a slash and not contain two consecutive slashes).
--   <i><tt>rootPath</tt></i> may be <tt>"/"</tt>.
--   
--   If <i><tt>rootGroup</tt></i> is non-<tt>NULL</tt> then it specifies
--   the name of the keyfile group used for keys that are written directly
--   below <i><tt>rootPath</tt></i>. For example, if
--   <i><tt>rootPath</tt></i> is <tt>"/apps/example/"</tt> and
--   <i><tt>rootGroup</tt></i> is <tt>"toplevel"</tt>, then setting the key
--   <tt>"/apps/example/enabled"</tt> to true will cause the following to
--   appear in the keyfile:
--   
--   <pre>
--   [toplevel]
--   enabled=true
--   </pre>
--   
--   If <i><tt>rootGroup</tt></i> is <tt>NULL</tt> then it is not permitted
--   to store keys directly below the <i><tt>rootPath</tt></i>.
--   
--   For keys not stored directly below <i><tt>rootPath</tt></i> (ie: in a
--   sub-path), the name of the subpath (with the final slash stripped) is
--   used as the name of the keyfile group. To continue the example, if
--   <tt>"/apps/example/profiles/default/font-size"</tt> were set to
--   <tt>12</tt> then the following would appear in the keyfile:
--   
--   <pre>
--   [profiles/default]
--   font-size=12
--   </pre>
--   
--   The backend will refuse writes (and return writability as being false)
--   for keys outside of <i><tt>rootPath</tt></i> and, in the event that
--   <i><tt>rootGroup</tt></i> is <tt>NULL</tt>, also for keys directly
--   under <i><tt>rootPath</tt></i>. Writes will also be refused if the
--   backend detects that it has the inability to rewrite the keyfile (ie:
--   the containing directory is not writable).
--   
--   There is no checking done for your key namespace clashing with the
--   syntax of the key file format. For example, if you have <tt>[</tt> or
--   <tt>]</tt> characters in your path names or <tt>=</tt> in your key
--   names you may be in trouble.
--   
--   The backend reads default values from a keyfile called
--   <tt>defaults</tt> in the directory specified by the
--   <tt>GKeyfileSettingsBackend:defaults-dir</tt> property, and a list of
--   locked keys from a text file with the name <tt>locks</tt> in the same
--   location.
keyfileSettingsBackendNew :: (HasCallStack, MonadIO m) => Text -> Text -> Maybe Text -> m SettingsBackend

-- | Creates a memory-backed <a>SettingsBackend</a>.
--   
--   This backend allows changes to settings, but does not write them to
--   any backing storage, so the next time you run your application, the
--   memory backend will start out with the default values again.
--   
--   <i>Since: 2.28</i>
memorySettingsBackendNew :: (HasCallStack, MonadIO m) => m SettingsBackend

-- | Initializes the platform networking libraries (eg, on Windows, this
--   calls <tt><i>WSAStartup()</i></tt>). GLib will call this itself if it
--   is needed, so you only need to call it if you directly call system
--   networking functions (without calling any GLib networking functions
--   first).
--   
--   <i>Since: 2.36</i>
networkingInit :: (HasCallStack, MonadIO m) => m ()

-- | Creates a readonly <a>SettingsBackend</a>.
--   
--   This backend does not allow changes to settings, so all settings will
--   always have their default values.
--   
--   <i>Since: 2.28</i>
nullSettingsBackendNew :: (HasCallStack, MonadIO m) => m SettingsBackend

-- | Utility method for <a>PollableInputStream</a> and
--   <a>PollableOutputStream</a> implementations. Creates a new
--   <a>Source</a> that expects a callback of type
--   <a>PollableSourceFunc</a>. The new source does not actually do
--   anything on its own; use <a>sourceAddChildSource</a> to add other
--   sources to it to cause it to trigger.
--   
--   <i>Since: 2.28</i>
pollableSourceNew :: (HasCallStack, MonadIO m, IsObject a) => a -> m Source

-- | Utility method for <a>PollableInputStream</a> and
--   <a>PollableOutputStream</a> implementations. Creates a new
--   <a>Source</a>, as with <a>pollableSourceNew</a>, but also attaching
--   <i><tt>childSource</tt></i> (with a dummy callback), and
--   <i><tt>cancellable</tt></i>, if they are non-<a>Nothing</a>.
--   
--   <i>Since: 2.34</i>
pollableSourceNewFull :: (HasCallStack, MonadIO m, IsObject a, IsCancellable b) => a -> Maybe Source -> Maybe b -> m Source

-- | Tries to read from <i><tt>stream</tt></i>, as with
--   <a>inputStreamRead</a> (if <i><tt>blocking</tt></i> is <a>True</a>) or
--   <a>pollableInputStreamReadNonblocking</a> (if <i><tt>blocking</tt></i>
--   is <a>False</a>). This can be used to more easily share code between
--   blocking and non-blocking implementations of a method.
--   
--   If <i><tt>blocking</tt></i> is <a>False</a>, then
--   <i><tt>stream</tt></i> must be a <a>PollableInputStream</a> for which
--   <a>pollableInputStreamCanPoll</a> returns <a>True</a>, or else the
--   behavior is undefined. If <i><tt>blocking</tt></i> is <a>True</a>,
--   then <i><tt>stream</tt></i> does not need to be a
--   <a>PollableInputStream</a>.
--   
--   <i>Since: 2.34</i>
pollableStreamRead :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m Int64

-- | Tries to write to <i><tt>stream</tt></i>, as with
--   <a>outputStreamWrite</a> (if <i><tt>blocking</tt></i> is <a>True</a>)
--   or <a>pollableOutputStreamWriteNonblocking</a> (if
--   <i><tt>blocking</tt></i> is <a>False</a>). This can be used to more
--   easily share code between blocking and non-blocking implementations of
--   a method.
--   
--   If <i><tt>blocking</tt></i> is <a>False</a>, then
--   <i><tt>stream</tt></i> must be a <a>PollableOutputStream</a> for which
--   <a>pollableOutputStreamCanPoll</a> returns <a>True</a> or else the
--   behavior is undefined. If <i><tt>blocking</tt></i> is <a>True</a>,
--   then <i><tt>stream</tt></i> does not need to be a
--   <a>PollableOutputStream</a>.
--   
--   <i>Since: 2.34</i>
pollableStreamWrite :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m Int64

-- | Tries to write <i><tt>count</tt></i> bytes to <i><tt>stream</tt></i>,
--   as with <a>outputStreamWriteAll</a>, but using
--   <a>pollableStreamWrite</a> rather than <a>outputStreamWrite</a>.
--   
--   On a successful write of <i><tt>count</tt></i> bytes, <a>True</a> is
--   returned, and <i><tt>bytesWritten</tt></i> is set to
--   <i><tt>count</tt></i>.
--   
--   If there is an error during the operation (including
--   <a>IOErrorEnumWouldBlock</a> in the non-blocking case), <a>False</a>
--   is returned and <i><tt>error</tt></i> is set to indicate the error
--   status, <i><tt>bytesWritten</tt></i> is updated to contain the number
--   of bytes written into the stream before the error occurred.
--   
--   As with <a>pollableStreamWrite</a>, if <i><tt>blocking</tt></i> is
--   <a>False</a>, then <i><tt>stream</tt></i> must be a
--   <a>PollableOutputStream</a> for which
--   <a>pollableOutputStreamCanPoll</a> returns <a>True</a> or else the
--   behavior is undefined. If <i><tt>blocking</tt></i> is <a>True</a>,
--   then <i><tt>stream</tt></i> does not need to be a
--   <a>PollableOutputStream</a>.
--   
--   <i>Since: 2.34</i>
pollableStreamWriteAll :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m CSize

-- | Returns all the names of children at the specified
--   <i><tt>path</tt></i> in the set of globally registered resources.
--   
--   The return result is a <tt>NULL</tt> terminated list of strings which
--   should be released with <a>strfreev</a>.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   <i>Since: 2.32</i>
resourcesEnumerateChildren :: (HasCallStack, MonadIO m) => Text -> [ResourceLookupFlags] -> m [Text]

-- | Looks for a file at the specified <i><tt>path</tt></i> in the set of
--   globally registered resources and if found returns information about
--   it.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   <i>Since: 2.32</i>
resourcesGetInfo :: (HasCallStack, MonadIO m) => Text -> [ResourceLookupFlags] -> m (CSize, Word32)

-- | Returns whether the specified <i><tt>path</tt></i> in the set of
--   globally registered resources has children.
--   
--   <i>Since: 2.84</i>
resourcesHasChildren :: (HasCallStack, MonadIO m) => Text -> m Bool

-- | Looks for a file at the specified <i><tt>path</tt></i> in the set of
--   globally registered resources and returns a <a>Bytes</a> that lets you
--   directly access the data in memory.
--   
--   The data is always followed by a zero byte, so you can safely use the
--   data as a C string. However, that byte is not included in the size of
--   the <a>Bytes</a>.
--   
--   For uncompressed resource files this is a pointer directly into the
--   resource bundle, which is typically in some read-only data section in
--   the program binary. For compressed files we allocate memory on the
--   heap and automatically uncompress the data.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   <i>Since: 2.32</i>
resourcesLookupData :: (HasCallStack, MonadIO m) => Text -> [ResourceLookupFlags] -> m Bytes

-- | Looks for a file at the specified <i><tt>path</tt></i> in the set of
--   globally registered resources and returns a <a>InputStream</a> that
--   lets you read the data.
--   
--   <i><tt>lookupFlags</tt></i> controls the behaviour of the lookup.
--   
--   <i>Since: 2.32</i>
resourcesOpenStream :: (HasCallStack, MonadIO m) => Text -> [ResourceLookupFlags] -> m InputStream

-- | Registers the resource with the process-global set of resources.
--   
--   Once a resource is registered the files in it can be accessed with the
--   global resource lookup functions like <a>resourcesLookupData</a>.
--   
--   <i>Since: 2.32</i>
resourcesRegister :: (HasCallStack, MonadIO m) => Resource -> m ()

-- | Unregisters the resource from the process-global set of resources.
--   
--   <i>Since: 2.32</i>
resourcesUnregister :: (HasCallStack, MonadIO m) => Resource -> m ()

-- | Reports an error in an idle function. Similar to
--   <tt><i>g_simple_async_report_error_in_idle()</i></tt>, but takes a
--   <a>GError</a> rather than building a new one.

-- | <i>Deprecated: (Since version 2.46)Use <a>taskReportError</a>.</i>
simpleAsyncReportGerrorInIdle :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Maybe AsyncReadyCallback -> GError -> m ()


-- | Provides an interface for implementing seekable functionality on I/O
--   Streams.
module GI.Gio.Structs.SeekableIface

-- | Memory-managed wrapper type.
newtype SeekableIface
SeekableIface :: ManagedPtr SeekableIface -> SeekableIface

-- | Construct a <a>SeekableIface</a> struct initialized to zero.
newZeroSeekableIface :: MonadIO m => m SeekableIface

-- | Set the value of the “<tt>can_seek</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #canSeek
--   </pre>
clearSeekableIfaceCanSeek :: MonadIO m => SeekableIface -> m ()

-- | Get the value of the “<tt>can_seek</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> seekableIface #canSeek
--   </pre>
getSeekableIfaceCanSeek :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceCanSeekFieldCallback)

-- | Set the value of the “<tt>can_seek</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> seekableIface [ #canSeek <a>:=</a> value ]
--   </pre>
setSeekableIfaceCanSeek :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceCanSeekFieldCallback -> m ()

-- | Set the value of the “<tt>can_truncate</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #canTruncate
--   </pre>
clearSeekableIfaceCanTruncate :: MonadIO m => SeekableIface -> m ()

-- | Get the value of the “<tt>can_truncate</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> seekableIface #canTruncate
--   </pre>
getSeekableIfaceCanTruncate :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceCanTruncateFieldCallback)

-- | Set the value of the “<tt>can_truncate</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> seekableIface [ #canTruncate <a>:=</a> value ]
--   </pre>
setSeekableIfaceCanTruncate :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceCanTruncateFieldCallback -> m ()

-- | Get the value of the “<tt>g_iface</tt>” field. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> seekableIface #gIface
--   </pre>
getSeekableIfaceGIface :: MonadIO m => SeekableIface -> m TypeInterface

-- | Set the value of the “<tt>seek</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #seek
--   </pre>
clearSeekableIfaceSeek :: MonadIO m => SeekableIface -> m ()

-- | Get the value of the “<tt>seek</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> seekableIface #seek
--   </pre>
getSeekableIfaceSeek :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceSeekFieldCallback)

-- | Set the value of the “<tt>seek</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> seekableIface [ #seek <a>:=</a> value ]
--   </pre>
setSeekableIfaceSeek :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceSeekFieldCallback -> m ()

-- | Set the value of the “<tt>tell</tt>” field to <a>Nothing</a>. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #tell
--   </pre>
clearSeekableIfaceTell :: MonadIO m => SeekableIface -> m ()

-- | Get the value of the “<tt>tell</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> seekableIface #tell
--   </pre>
getSeekableIfaceTell :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceTellFieldCallback)

-- | Set the value of the “<tt>tell</tt>” field. When <a>overloading</a> is
--   enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> seekableIface [ #tell <a>:=</a> value ]
--   </pre>
setSeekableIfaceTell :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceTellFieldCallback -> m ()

-- | Set the value of the “<tt>truncate_fn</tt>” field to <a>Nothing</a>.
--   When <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>clear</a> #truncateFn
--   </pre>
clearSeekableIfaceTruncateFn :: MonadIO m => SeekableIface -> m ()

-- | Get the value of the “<tt>truncate_fn</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> seekableIface #truncateFn
--   </pre>
getSeekableIfaceTruncateFn :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceTruncateFnFieldCallback)

-- | Set the value of the “<tt>truncate_fn</tt>” field. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> seekableIface [ #truncateFn <a>:=</a> value ]
--   </pre>
setSeekableIfaceTruncateFn :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceTruncateFnFieldCallback -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.SeekableIface.SeekableIface
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.SeekableIface.SeekableIface
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.SeekableIface.SeekableIface tag
instance GHC.Classes.Eq GI.Gio.Structs.SeekableIface.SeekableIface
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.SeekableIface.SeekableIface


-- | <a>SettingsSchemaKey</a> is an opaque data structure and can only be
--   accessed using the following functions.
module GI.Gio.Structs.SettingsSchemaKey

-- | Memory-managed wrapper type.
newtype SettingsSchemaKey
SettingsSchemaKey :: ManagedPtr SettingsSchemaKey -> SettingsSchemaKey

-- | Gets the default value for <i><tt>key</tt></i>.
--   
--   Note that this is the default value according to the schema. System
--   administrator defaults and lockdown are not visible via this API.
--   
--   <i>Since: 2.40</i>
settingsSchemaKeyGetDefaultValue :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m GVariant

-- | Gets the description for <i><tt>key</tt></i>.
--   
--   If no description has been provided in the schema for
--   <i><tt>key</tt></i>, returns <a>Nothing</a>.
--   
--   The description can be one sentence to several paragraphs in length.
--   Paragraphs are delimited with a double newline. Descriptions can be
--   translated and the value returned from this function is is the current
--   locale.
--   
--   This function is slow. The summary and description information for the
--   schemas is not stored in the compiled schema database so this function
--   has to parse all of the source XML files in the schema directory.
--   
--   <i>Since: 2.34</i>
settingsSchemaKeyGetDescription :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m (Maybe Text)

-- | Gets the name of <i><tt>key</tt></i>.
--   
--   <i>Since: 2.44</i>
settingsSchemaKeyGetName :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m Text

-- | Queries the range of a key.
--   
--   This function will return a <a>GVariant</a> that fully describes the
--   range of values that are valid for <i><tt>key</tt></i>.
--   
--   The type of <a>GVariant</a> returned is <tt>(sv)</tt>. The string
--   describes the type of range restriction in effect. The type and
--   meaning of the value contained in the variant depends on the string.
--   
--   If the string is <tt>'type'</tt> then the variant contains an empty
--   array. The element type of that empty array is the expected type of
--   value and all values of that type are valid.
--   
--   If the string is <tt>'enum'</tt> then the variant contains an array
--   enumerating the possible values. Each item in the array is a possible
--   valid value and no other values are valid.
--   
--   If the string is <tt>'flags'</tt> then the variant contains an array.
--   Each item in the array is a value that may appear zero or one times in
--   an array to be used as the value for this key. For example, if the
--   variant contained the array <tt>['x', 'y']</tt> then the valid values
--   for the key would be <tt>[]</tt>, <tt>['x']</tt>, <tt>['y']</tt>,
--   <tt>['x', 'y']</tt> and <tt>['y', 'x']</tt>.
--   
--   Finally, if the string is <tt>'range'</tt> then the variant contains a
--   pair of like-typed values -- the minimum and maximum permissible
--   values for this key.
--   
--   This information should not be used by normal programs. It is
--   considered to be a hint for introspection purposes. Normal programs
--   should already know what is permitted by their own schema. The format
--   may change in any way in the future -- but particularly, new forms may
--   be added to the possibilities described above.
--   
--   You should free the returned value with <a>variantUnref</a> when it is
--   no longer needed.
--   
--   <i>Since: 2.40</i>
settingsSchemaKeyGetRange :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m GVariant

-- | Gets the summary for <i><tt>key</tt></i>.
--   
--   If no summary has been provided in the schema for <i><tt>key</tt></i>,
--   returns <a>Nothing</a>.
--   
--   The summary is a short description of the purpose of the key; usually
--   one short sentence. Summaries can be translated and the value returned
--   from this function is is the current locale.
--   
--   This function is slow. The summary and description information for the
--   schemas is not stored in the compiled schema database so this function
--   has to parse all of the source XML files in the schema directory.
--   
--   <i>Since: 2.34</i>
settingsSchemaKeyGetSummary :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m (Maybe Text)

-- | Gets the <a>VariantType</a> of <i><tt>key</tt></i>.
--   
--   <i>Since: 2.40</i>
settingsSchemaKeyGetValueType :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m VariantType

-- | Checks if the given <i><tt>value</tt></i> is within the permitted
--   range for <i><tt>key</tt></i>.
--   
--   It is a programmer error if <i><tt>value</tt></i> is not of the
--   correct type — you must check for this first.
--   
--   <i>Since: 2.40</i>
settingsSchemaKeyRangeCheck :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> GVariant -> m Bool

-- | Increase the reference count of <i><tt>key</tt></i>, returning a new
--   reference.
--   
--   <i>Since: 2.40</i>
settingsSchemaKeyRef :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m SettingsSchemaKey

-- | Decrease the reference count of <i><tt>key</tt></i>, possibly freeing
--   it.
--   
--   <i>Since: 2.40</i>
settingsSchemaKeyUnref :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m ()
instance GHC.Classes.Eq GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey


-- | The <a>SettingsSchemaSource</a> and <tt>GSettingsSchema</tt> APIs
--   provide a mechanism for advanced control over the loading of schemas
--   and a mechanism for introspecting their content.
--   
--   Plugin loading systems that wish to provide plugins a way to access
--   settings face the problem of how to make the schemas for these
--   settings visible to GSettings. Typically, a plugin will want to ship
--   the schema along with itself and it won't be installed into the
--   standard system directories for schemas.
--   
--   <a>SettingsSchemaSource</a> provides a mechanism for dealing with this
--   by allowing the creation of a new ‘schema source’ from which schemas
--   can be acquired. This schema source can then become part of the
--   metadata associated with the plugin and queried whenever the plugin
--   requires access to some settings.
--   
--   Consider the following example:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   typedef struct
--   {
--      …
--      GSettingsSchemaSource *schema_source;
--      …
--   } Plugin;
--   
--   Plugin *
--   initialise_plugin (const gchar *dir)
--   {
--     Plugin *plugin;
--   
--     …
--   
--     plugin-&gt;schema_source =
--       g_settings_schema_source_new_from_directory (dir,
--         g_settings_schema_source_get_default (), FALSE, NULL);
--   
--     …
--   
--     return plugin;
--   }
--   
--   …
--   
--   GSettings *
--   plugin_get_settings (Plugin      *plugin,
--                        const gchar *schema_id)
--   {
--     GSettingsSchema *schema;
--   
--     if (schema_id == NULL)
--       schema_id = plugin-&gt;identifier;
--   
--     schema = g_settings_schema_source_lookup (plugin-&gt;schema_source,
--                                               schema_id, FALSE);
--   
--     if (schema == NULL)
--       {
--         … disable the plugin or abort, etc …
--       }
--   
--     return g_settings_new_full (schema, NULL, NULL);
--   }
--   </pre>
--   
--   The code above shows how hooks should be added to the code that
--   initialises (or enables) the plugin to create the schema source and
--   how an API can be added to the plugin system to provide a convenient
--   way for the plugin to access its settings, using the schemas that it
--   ships.
--   
--   From the standpoint of the plugin, it would need to ensure that it
--   ships a gschemas.compiled file as part of itself, and then simply do
--   the following:
--   
--   <h3><i>c code</i></h3>
--   
--   <pre>
--   {
--     GSettings *settings;
--     gint some_value;
--   
--     settings = plugin_get_settings (self, NULL);
--     some_value = g_settings_get_int (settings, "some-value");
--     …
--   }
--   </pre>
--   
--   It's also possible that the plugin system expects the schema source
--   files (ie: <tt>.gschema.xml</tt> files) instead of a
--   <tt>gschemas.compiled</tt> file. In that case, the plugin loading
--   system must compile the schemas for itself before attempting to create
--   the settings source.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Structs.SettingsSchema

-- | Memory-managed wrapper type.
newtype SettingsSchema
SettingsSchema :: ManagedPtr SettingsSchema -> SettingsSchema

-- | Get the ID of <i><tt>schema</tt></i>.
settingsSchemaGetId :: (HasCallStack, MonadIO m) => SettingsSchema -> m Text

-- | Gets the key named <i><tt>name</tt></i> from <i><tt>schema</tt></i>.
--   
--   It is a programmer error to request a key that does not exist. See
--   <a>settingsSchemaListKeys</a>.
--   
--   <i>Since: 2.40</i>
settingsSchemaGetKey :: (HasCallStack, MonadIO m) => SettingsSchema -> Text -> m SettingsSchemaKey

-- | Gets the path associated with <i><tt>schema</tt></i>, or
--   <a>Nothing</a>.
--   
--   Schemas may be single-instance or relocatable. Single-instance schemas
--   correspond to exactly one set of keys in the backend database: those
--   located at the path returned by this function.
--   
--   Relocatable schemas can be referenced by other schemas and can
--   therefore describe multiple sets of keys at different locations. For
--   relocatable schemas, this function will return <a>Nothing</a>.
--   
--   <i>Since: 2.32</i>
settingsSchemaGetPath :: (HasCallStack, MonadIO m) => SettingsSchema -> m (Maybe Text)

-- | Checks if <i><tt>schema</tt></i> has a key named <i><tt>name</tt></i>.
--   
--   <i>Since: 2.40</i>
settingsSchemaHasKey :: (HasCallStack, MonadIO m) => SettingsSchema -> Text -> m Bool

-- | Gets the list of children in <i><tt>schema</tt></i>.
--   
--   You should free the return value with <a>strfreev</a> when you are
--   done with it.
--   
--   <i>Since: 2.44</i>
settingsSchemaListChildren :: (HasCallStack, MonadIO m) => SettingsSchema -> m [Text]

-- | Introspects the list of keys on <i><tt>schema</tt></i>.
--   
--   You should probably not be calling this function from "normal" code
--   (since you should already know what keys are in your schema). This
--   function is intended for introspection reasons.
--   
--   <i>Since: 2.46</i>
settingsSchemaListKeys :: (HasCallStack, MonadIO m) => SettingsSchema -> m [Text]

-- | Increase the reference count of <i><tt>schema</tt></i>, returning a
--   new reference.
--   
--   <i>Since: 2.32</i>
settingsSchemaRef :: (HasCallStack, MonadIO m) => SettingsSchema -> m SettingsSchema

-- | Decrease the reference count of <i><tt>schema</tt></i>, possibly
--   freeing it.
--   
--   <i>Since: 2.32</i>
settingsSchemaUnref :: (HasCallStack, MonadIO m) => SettingsSchema -> m ()
instance GHC.Classes.Eq GI.Gio.Structs.SettingsSchema.SettingsSchema
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.SettingsSchema.SettingsSchema
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.SettingsSchema.SettingsSchema
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.SettingsSchema.SettingsSchema)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.SettingsSchema.SettingsSchema
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.SettingsSchema.SettingsSchema


-- | The <tt>GSettings</tt> class provides a convenient API for storing and
--   retrieving application settings.
--   
--   Reads and writes can be considered to be non-blocking. Reading
--   settings with <tt>GSettings</tt> is typically extremely fast: on
--   approximately the same order of magnitude (but slower than) a
--   <a>GHashTable</a> lookup. Writing settings is also extremely fast in
--   terms of time to return to your application, but can be extremely
--   expensive for other threads and other processes. Many settings
--   backends (including dconf) have lazy initialisation which means in the
--   common case of the user using their computer without modifying any
--   settings a lot of work can be avoided. For dconf, the D-Bus service
--   doesn’t even need to be started in this case. For this reason, you
--   should only ever modify <tt>GSettings</tt> keys in response to
--   explicit user action. Particular care should be paid to ensure that
--   modifications are not made during startup — for example, when setting
--   the initial value of preferences widgets. The built-in
--   <a>settingsBind</a> functionality is careful not to write settings in
--   response to notify signals as a result of modifications that it makes
--   to widgets.
--   
--   When creating a <tt>GSettings</tt> instance, you have to specify a
--   schema that describes the keys in your settings and their types and
--   default values, as well as some other information.
--   
--   Normally, a schema has a fixed path that determines where the settings
--   are stored in the conceptual global tree of settings. However, schemas
--   can also be ‘<a>relocatable</a>’, i.e. not equipped with a fixed path.
--   This is useful e.g. when the schema describes an ‘account’, and you
--   want to be able to store a arbitrary number of accounts.
--   
--   Paths must start with and end with a forward slash character
--   (<tt>/</tt>) and must not contain two sequential slash characters.
--   Paths should be chosen based on a domain name associated with the
--   program or library to which the settings belong. Examples of paths are
--   <tt>/org/gtk/settings/file-chooser/</tt> and
--   <tt>/ca/desrt/dconf-editor/</tt>. Paths should not start with
--   <tt>/apps/</tt>, <tt>/desktop/</tt> or <tt>/system/</tt> as they often
--   did in GConf.
--   
--   Unlike other configuration systems (like GConf), GSettings does not
--   restrict keys to basic types like strings and numbers. GSettings
--   stores values as <a>GVariant</a>, and allows any
--   [type<i><tt>gLib</tt></i>.VariantType] for keys. Key names are
--   restricted to lowercase characters, numbers and <tt>-</tt>.
--   Furthermore, the names must begin with a lowercase character, must not
--   end with a <tt>-</tt>, and must not contain consecutive dashes.
--   
--   Similar to GConf, the default values in GSettings schemas can be
--   localized, but the localized values are stored in gettext catalogs and
--   looked up with the domain that is specified in the
--   <tt>gettext-domain</tt> attribute of the <tt>&lt;schemalist&gt;</tt>
--   or <tt>&lt;schema&gt;</tt> elements and the category that is specified
--   in the <tt>l10n</tt> attribute of the <tt>&lt;default&gt;</tt>
--   element. The string which is translated includes all text in the
--   <tt>&lt;default&gt;</tt> element, including any surrounding quotation
--   marks.
--   
--   The <tt>l10n</tt> attribute must be set to <tt>messages</tt> or
--   <tt>time</tt>, and sets the
--   &lt;<a>https://www.gnu.org/software/gettext/manual/html_node/Aspects.html#index-locale-categories-1</a>
--   locale category for translation&gt;. The <tt>messages</tt> category
--   should be used by default; use <tt>time</tt> for translatable date or
--   time formats. A translation comment can be added as an XML comment
--   immediately above the <tt>&lt;default&gt;</tt> element — it is
--   recommended to add these comments to aid translators understand the
--   meaning and implications of the default value. An optional translation
--   <tt>context</tt> attribute can be set on the <tt>&lt;default&gt;</tt>
--   element to disambiguate multiple defaults which use the same string.
--   
--   For example:
--   
--   <h3><i>xml code</i></h3>
--   
--   <pre>
--   &lt;!-- Translators: A list of words which are not allowed to be typed, in
--        GVariant serialization syntax.
--        See: https://developer.gnome.org/glib/stable/gvariant-text.html --&gt;
--   &lt;default l10n='messages' context='Banned words'&gt;['bad', 'words']&lt;/default&gt;
--   </pre>
--   
--   Translations of default values must remain syntactically valid
--   serialized <a>GVariant</a>s (e.g. retaining any surrounding quotation
--   marks) or runtime errors will occur.
--   
--   GSettings uses schemas in a compact binary form that is created by the
--   <a>`glib-compile-schemas`</a> utility. The input is a schema
--   description in an XML format.
--   
--   A DTD for the gschema XML format can be found here: <a>gschema.dtd</a>
--   
--   The <a>`glib-compile-schemas`</a> tool expects schema files to have
--   the extension <tt>.gschema.xml</tt>.
--   
--   At runtime, schemas are identified by their ID (as specified in the
--   <tt>id</tt> attribute of the <tt>&lt;schema&gt;</tt> element). The
--   convention for schema IDs is to use a dotted name, similar in style to
--   a D-Bus bus name, e.g. <tt>org.gnome.SessionManager</tt>. In
--   particular, if the settings are for a specific service that owns a
--   D-Bus bus name, the D-Bus bus name and schema ID should match. For
--   schemas which deal with settings not associated with one named
--   application, the ID should not use StudlyCaps, e.g.
--   <tt>org.gnome.font-rendering</tt>.
--   
--   In addition to <a>GVariant</a> types, keys can have types that have
--   enumerated types. These can be described by a <tt>&lt;choice&gt;</tt>,
--   <tt>&lt;enum&gt;</tt> or <tt>&lt;flags&gt;</tt> element, as seen in
--   the second example below. The underlying type of such a key is string,
--   but you can use <a>settingsGetEnum</a>, <a>settingsSetEnum</a>,
--   <a>settingsGetFlags</a>, <a>settingsSetFlags</a> access the numeric
--   values corresponding to the string value of enum and flags keys.
--   
--   An example for default value:
--   
--   <h3><i>xml code</i></h3>
--   
--   <pre>
--   &lt;schemalist&gt;
--     &lt;schema id="org.gtk.Test" path="/org/gtk/Test/" gettext-domain="test"&gt;
--   
--       &lt;key name="greeting" type="s"&gt;
--         &lt;default l10n="messages"&gt;"Hello, earthlings"&lt;/default&gt;
--         &lt;summary&gt;A greeting&lt;/summary&gt;
--         &lt;description&gt;
--           Greeting of the invading martians
--         &lt;/description&gt;
--       &lt;/key&gt;
--   
--       &lt;key name="box" type="(ii)"&gt;
--         &lt;default&gt;(20,30)&lt;/default&gt;
--       &lt;/key&gt;
--   
--       &lt;key name="empty-string" type="s"&gt;
--         &lt;default&gt;""&lt;/default&gt;
--         &lt;summary&gt;Empty strings have to be provided in GVariant form&lt;/summary&gt;
--       &lt;/key&gt;
--   
--     &lt;/schema&gt;
--   &lt;/schemalist&gt;
--   </pre>
--   
--   An example for ranges, choices and enumerated types:
--   
--   <h3><i>xml code</i></h3>
--   
--   <pre>
--   &lt;schemalist&gt;
--   
--     &lt;enum id="org.gtk.Test.myenum"&gt;
--       &lt;value nick="first" value="1"/&gt;
--       &lt;value nick="second" value="2"/&gt;
--     &lt;/enum&gt;
--   
--     &lt;flags id="org.gtk.Test.myflags"&gt;
--       &lt;value nick="flag1" value="1"/&gt;
--       &lt;value nick="flag2" value="2"/&gt;
--       &lt;value nick="flag3" value="4"/&gt;
--     &lt;/flags&gt;
--   
--     &lt;schema id="org.gtk.Test"&gt;
--   
--       &lt;key name="key-with-range" type="i"&gt;
--         &lt;range min="1" max="100"/&gt;
--         &lt;default&gt;10&lt;/default&gt;
--       &lt;/key&gt;
--   
--       &lt;key name="key-with-choices" type="s"&gt;
--         &lt;choices&gt;
--           &lt;choice value='Elisabeth'/&gt;
--           &lt;choice value='Annabeth'/&gt;
--           &lt;choice value='Joe'/&gt;
--         &lt;/choices&gt;
--         &lt;aliases&gt;
--           &lt;alias value='Anna' target='Annabeth'/&gt;
--           &lt;alias value='Beth' target='Elisabeth'/&gt;
--         &lt;/aliases&gt;
--         &lt;default&gt;'Joe'&lt;/default&gt;
--       &lt;/key&gt;
--   
--       &lt;key name='enumerated-key' enum='org.gtk.Test.myenum'&gt;
--         &lt;default&gt;'first'&lt;/default&gt;
--       &lt;/key&gt;
--   
--       &lt;key name='flags-key' flags='org.gtk.Test.myflags'&gt;
--         &lt;default&gt;["flag1","flag2"]&lt;/default&gt;
--       &lt;/key&gt;
--     &lt;/schema&gt;
--   &lt;/schemalist&gt;
--   </pre>
--   
--   <h2>Vendor overrides</h2>
--   
--   Default values are defined in the schemas that get installed by an
--   application. Sometimes, it is necessary for a vendor or distributor to
--   adjust these defaults. Since patching the XML source for the schema is
--   inconvenient and error-prone, <a>`glib-compile-schemas`</a> reads
--   so-called ‘vendor override’ files. These are keyfiles in the same
--   directory as the XML schema sources which can override default values.
--   The schema ID serves as the group name in the key file, and the values
--   are expected in serialized <a>GVariant</a> form, as in the following
--   example:
--   
--   <pre>
--   [org.gtk.Example]
--   key1='string'
--   key2=1.5
--   </pre>
--   
--   <tt>glib-compile-schemas</tt> expects schema files to have the
--   extension <tt>.gschema.override</tt>.
--   
--   <h2>Delay-apply mode</h2>
--   
--   By default, values set on a <a>Settings</a> instance immediately start
--   to be written to the backend (although these writes may not complete
--   by the time that <a>Settings</a>.<tt><i>set</i></tt>()) returns; see
--   <a>settingsSync</a>).
--   
--   In order to allow groups of settings to be changed simultaneously and
--   atomically, GSettings also supports a ‘delay-apply’ mode. In this
--   mode, updated values are kept locally in the <a>Settings</a> instance
--   until they are explicitly applied by calling <a>settingsApply</a>.
--   
--   For example, this could be useful for a preferences dialog where the
--   preferences all need to be applied simultaneously when the user clicks
--   ‘Save’.
--   
--   Switching a <a>Settings</a> instance to ‘delay-apply’ mode is a
--   one-time irreversible operation: from that point onwards, *all*
--   changes made to that <a>Settings</a> have to be explicitly applied by
--   calling <a>settingsApply</a>. The ‘delay-apply’ mode is also
--   propagated to any child settings objects subsequently created using
--   <a>settingsGetChild</a>.
--   
--   At any point, the set of unapplied changes can be queried using
--   <a>Settings:hasUnapplied</a>, and discarded by calling
--   <a>settingsRevert</a>.
--   
--   <h2>Binding</h2>
--   
--   A very convenient feature of GSettings lets you bind <a>Object</a>
--   properties directly to settings, using <a>settingsBind</a>. Once a
--   <a>Object</a> property has been bound to a setting, changes on either
--   side are automatically propagated to the other side. GSettings handles
--   details like mapping between <a>Object</a> and <a>GVariant</a> types,
--   and preventing infinite cycles.
--   
--   This makes it very easy to hook up a preferences dialog to the
--   underlying settings. To make this even more convenient, GSettings
--   looks for a boolean property with the name <tt>sensitivity</tt> and
--   automatically binds it to the writability of the bound setting. If
--   this ‘magic’ gets in the way, it can be suppressed with the
--   <tt>G_SETTINGS_BIND_NO_SENSITIVITY</tt> flag.
--   
--   <h2>Relocatable schemas</h2>
--   
--   A relocatable schema is one with no <tt>path</tt> attribute specified
--   on its <tt>&lt;schema&gt;</tt> element. By using
--   <a>settingsNewWithPath</a>, a <tt>GSettings</tt> object can be
--   instantiated for a relocatable schema, assigning a path to the
--   instance. Paths passed to <a>settingsNewWithPath</a> will typically be
--   constructed dynamically from a constant prefix plus some form of
--   instance identifier; but they must still be valid GSettings paths.
--   Paths could also be constant and used with a globally installed schema
--   originating from a dependency library.
--   
--   For example, a relocatable schema could be used to store geometry
--   information for different windows in an application. If the schema ID
--   was <tt>org.foo.MyApp.Window</tt>, it could be instantiated for paths
--   <tt>/org/foo/MyApp/main/</tt>, <tt>/org/foo/MyApp/document-1/</tt>,
--   <tt>/org/foo/MyApp/document-2/</tt>, etc. If any of the paths are
--   well-known they can be specified as <tt>&lt;child&gt;</tt> elements in
--   the parent schema, e.g.:
--   
--   <h3><i>xml code</i></h3>
--   
--   <pre>
--   &lt;schema id="org.foo.MyApp" path="/org/foo/MyApp/"&gt;
--     &lt;child name="main" schema="org.foo.MyApp.Window"/&gt;
--   &lt;/schema&gt;
--   </pre>
--   
--   <h2>Build system integration</h2>
--   
--   <h3>Meson</h3>
--   
--   GSettings is natively supported by Meson’s <a>GNOME module</a>.
--   
--   You can install the schemas as any other data file:
--   
--   <pre>
--   install_data(
--     'org.foo.MyApp.gschema.xml',
--     install_dir: get_option('datadir') / 'glib-2.0/schemas',
--   )
--   </pre>
--   
--   You can use <tt>gnome.post_install()</tt> function to compile the
--   schemas on installation:
--   
--   <pre>
--   gnome = import('gnome')
--   gnome.post_install(
--     glib_compile_schemas: true,
--   )
--   </pre>
--   
--   If an enumerated type defined in a C header file is to be used in a
--   GSettings schema, it can either be defined manually using an
--   <tt>&lt;enum&gt;</tt> element in the schema XML, or it can be
--   extracted automatically from the C header. This approach is preferred,
--   as it ensures the two representations are always synchronised. To do
--   so, you will need to use the <tt>gnome.mkenums()</tt> function with
--   the following templates:
--   
--   <pre>
--   schemas_enums = gnome.mkenums('org.foo.MyApp.enums.xml',
--     comments: '&lt;!-- @comment@ --&gt;',
--     fhead: '&lt;schemalist&gt;',
--     vhead: '  &lt;@type@ id="org.foo.MyApp.@EnumName@"&gt;',
--     vprod: '    &lt;value nick="@valuenick@" value="@valuenum@"/&gt;',
--     vtail: '  &lt;/@type@&gt;',
--     ftail: '&lt;/schemalist&gt;',
--     sources: enum_sources,
--     install_header: true,
--     install_dir: get_option('datadir') / 'glib-2.0/schemas',
--   )
--   </pre>
--   
--   It is recommended to validate your schemas as part of the test suite
--   for your application:
--   
--   <pre>
--   test('validate-schema',
--     find_program('glib-compile-schemas'),
--     args: ['--strict', '--dry-run', meson.current_source_dir()],
--   )
--   </pre>
--   
--   If your application allows running uninstalled, you should also use
--   the <tt>gnome.compile_schemas()</tt> function to compile the schemas
--   in the current build directory:
--   
--   <pre>
--   gnome.compile_schemas()
--   </pre>
--   
--   <h3>Autotools</h3>
--   
--   GSettings comes with autotools integration to simplify compiling and
--   installing schemas. To add GSettings support to an application, add
--   the following to your <tt>configure.ac</tt>:
--   
--   <pre>
--   GLIB_GSETTINGS
--   </pre>
--   
--   In the appropriate <tt>Makefile.am</tt>, use the following snippet to
--   compile and install the named schema:
--   
--   <pre>
--   gsettings_SCHEMAS = org.foo.MyApp.gschema.xml
--   EXTRA_DIST = $(gsettings_SCHEMAS)
--   
--   @GSETTINGS_RULES@
--   </pre>
--   
--   If an enumerated type defined in a C header file is to be used in a
--   GSettings schema, it can either be defined manually using an
--   <tt>&lt;enum&gt;</tt> element in the schema XML, or it can be
--   extracted automatically from the C header. This approach is preferred,
--   as it ensures the two representations are always synchronised. To do
--   so, add the following to the relevant <tt>Makefile.am</tt>:
--   
--   <pre>
--   gsettings_ENUM_NAMESPACE = org.foo.MyApp
--   gsettings_ENUM_FILES = my-app-enums.h my-app-misc.h
--   </pre>
--   
--   <tt>gsettings_ENUM_NAMESPACE</tt> specifies the schema namespace for
--   the enum files, which are specified in <tt>gsettings_ENUM_FILES</tt>.
--   This will generate a <tt>org.foo.MyApp.enums.xml</tt> file containing
--   the extracted enums, which will be automatically included in the
--   schema compilation, install and uninstall rules. It should not be
--   committed to version control or included in <tt>EXTRA_DIST</tt>.
--   
--   <h2>Localization</h2>
--   
--   No changes are needed to the build system to mark a schema XML file
--   for translation. Assuming it sets the <tt>gettext-domain</tt>
--   attribute, a schema may be marked for translation by adding it to
--   <tt>POTFILES.in</tt>, assuming gettext 0.19 or newer is in use (the
--   preferred method for translation):
--   
--   <pre>
--   data/org.foo.MyApp.gschema.xml
--   </pre>
--   
--   Alternatively, if intltool 0.50.1 is in use:
--   
--   <pre>
--   [type: gettext/gsettings]data/org.foo.MyApp.gschema.xml
--   </pre>
--   
--   GSettings will use gettext to look up translations for the
--   <tt>&lt;summary&gt;</tt> and <tt>&lt;description&gt;</tt> elements,
--   and also any <tt>&lt;default&gt;</tt> elements which have a
--   <tt>l10n</tt> attribute set.
--   
--   Translations <b>must not</b> be included in the <tt>.gschema.xml</tt>
--   file by the build system, for example by using a rule to generate the
--   XML file from a template.
module GI.Gio.Objects.Settings

-- | Memory-managed wrapper type.
newtype Settings
Settings :: ManagedPtr Settings -> Settings

-- | Type class for types which can be safely cast to <a>Settings</a>, for
--   instance with <a>toSettings</a>.
class (GObject o, IsDescendantOf Settings o) => IsSettings o

-- | Cast to <a>Settings</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toSettings :: (MonadIO m, IsSettings o) => o -> m Settings

-- | Applies any changes that have been made to the settings.
--   
--   This function does nothing unless <i><tt>settings</tt></i> is in
--   <a>‘delay-apply’ mode</a>. In the normal case settings are always
--   applied immediately.
settingsApply :: (HasCallStack, MonadIO m, IsSettings a) => a -> m ()

-- | Create a binding between the <i><tt>key</tt></i> in the
--   <i><tt>settings</tt></i> object and the property
--   <i><tt>property</tt></i> of <i><tt>object</tt></i>.
--   
--   The binding uses the default GIO mapping functions to map between the
--   settings and property values. These functions handle booleans, numeric
--   types and string types in a straightforward way. Use
--   <a>settingsBindWithMapping</a> if you need a custom mapping, or map
--   between types that are not supported by the default mapping functions.
--   
--   Unless the <i><tt>flags</tt></i> include
--   [flags<i><tt>gio</tt></i>.SettingsBindFlags.NO_SENSITIVITY], this
--   function also establishes a binding between the writability of
--   <i><tt>key</tt></i> and the <tt>sensitive</tt> property of
--   <i><tt>object</tt></i> (if <i><tt>object</tt></i> has a boolean
--   property by that name). See <a>settingsBindWritable</a> for more
--   details about writable bindings.
--   
--   Note that the lifecycle of the binding is tied to
--   <i><tt>object</tt></i>, and that you can have only one binding per
--   object property. If you bind the same property twice on the same
--   object, the second binding overrides the first one.
--   
--   <i>Since: 2.26</i>
settingsBind :: (HasCallStack, MonadIO m, IsSettings a, IsObject b) => a -> Text -> b -> Text -> [SettingsBindFlags] -> m ()

-- | Version of <a>settingsBindWithMapping</a> using closures instead of
--   callbacks for easier binding in other languages.
--   
--   <i>Since: 2.82</i>
settingsBindWithMapping :: (HasCallStack, MonadIO m, IsSettings a, IsObject b) => a -> Text -> b -> Text -> [SettingsBindFlags] -> Maybe (GClosure c) -> Maybe (GClosure d) -> m ()

-- | Create a binding between the writability of <i><tt>key</tt></i> in the
--   <i><tt>settings</tt></i> object and the property
--   <i><tt>property</tt></i> of <i><tt>object</tt></i>.
--   
--   The property must be boolean; <tt>sensitive</tt> or <tt>visible</tt>
--   properties of widgets are the most likely candidates.
--   
--   Writable bindings are always uni-directional; changes of the
--   writability of the setting will be propagated to the object property,
--   not the other way.
--   
--   When the <i><tt>inverted</tt></i> argument is true, the binding
--   inverts the value as it passes from the setting to the object, i.e.
--   <i><tt>property</tt></i> will be set to true if the key is not
--   writable.
--   
--   Note that the lifecycle of the binding is tied to
--   <i><tt>object</tt></i>, and that you can have only one binding per
--   object property. If you bind the same property twice on the same
--   object, the second binding overrides the first one.
--   
--   <i>Since: 2.26</i>
settingsBindWritable :: (HasCallStack, MonadIO m, IsSettings a, IsObject b) => a -> Text -> b -> Text -> Bool -> m ()

-- | Creates a <a>Action</a> corresponding to a given <a>Settings</a> key.
--   
--   The action has the same name as the key.
--   
--   The value of the key becomes the state of the action and the action is
--   enabled when the key is writable. Changing the state of the action
--   results in the key being written to. Changes to the value or
--   writability of the key cause appropriate change notifications to be
--   emitted for the action.
--   
--   For boolean-valued keys, action activations take no parameter and
--   result in the toggling of the value. For all other types, activations
--   take the new value for the key (which must have the correct type).
--   
--   <i>Since: 2.32</i>
settingsCreateAction :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Action

-- | Changes the <a>Settings</a> object into <a>‘delay-apply’ mode</a>.
--   
--   In this mode, changes to <i><tt>settings</tt></i> are not immediately
--   propagated to the backend, but kept locally until <a>settingsApply</a>
--   is called.
--   
--   <i>Since: 2.26</i>
settingsDelay :: (HasCallStack, MonadIO m, IsSettings a) => a -> m ()

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   booleans.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>b</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsGetBoolean :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Bool

-- | Creates a child settings object which has a base path of
--   <tt>base-path/name</tt>, where <tt>base-path</tt> is the base path of
--   <i><tt>settings</tt></i> and <tt>name</tt> is as specified by the
--   caller.
--   
--   The schema for the child settings object must have been declared in
--   the schema of <i><tt>settings</tt></i> using a <tt>&lt;child&gt;</tt>
--   element.
--   
--   The created child settings object will inherit the
--   <a>Settings:delayApply</a> mode from <i><tt>settings</tt></i>.
--   
--   <i>Since: 2.26</i>
settingsGetChild :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Settings

-- | Gets the ‘default value’ of a key.
--   
--   This is the value that would be read if <a>settingsReset</a> were to
--   be called on the key.
--   
--   Note that this may be a different value than returned by
--   <a>settingsSchemaKeyGetDefaultValue</a> if the system administrator
--   has provided a default value.
--   
--   Comparing the return values of <a>settingsGetDefaultValue</a> and
--   <a>settingsGetValue</a> is not sufficient for determining if a value
--   has been set because the user may have explicitly set the value to
--   something that happens to be equal to the default. The difference here
--   is that if the default changes in the future, the user’s key will
--   still be set.
--   
--   This function may be useful for adding an indication to a UI of what
--   the default value was before the user set it.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i>.
--   
--   <i>Since: 2.40</i>
settingsGetDefaultValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m (Maybe GVariant)

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   doubles.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>d</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsGetDouble :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Double

-- | Gets the value that is stored in <i><tt>settings</tt></i> for
--   <i><tt>key</tt></i> and converts it to the enum value that it
--   represents.
--   
--   In order to use this function the type of the value must be a string
--   and it must be marked in the schema file as an enumerated type.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i> or is not marked
--   as an enumerated type.
--   
--   If the value stored in the configuration database is not a valid value
--   for the enumerated type then this function will return the default
--   value.
--   
--   <i>Since: 2.26</i>
settingsGetEnum :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Int32

-- | Gets the value that is stored in <i><tt>settings</tt></i> for
--   <i><tt>key</tt></i> and converts it to the flags value that it
--   represents.
--   
--   In order to use this function the type of the value must be an array
--   of strings and it must be marked in the schema file as a flags type.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i> or is not marked
--   as a flags type.
--   
--   If the value stored in the configuration database is not a valid value
--   for the flags type then this function will return the default value.
--   
--   <i>Since: 2.26</i>
settingsGetFlags :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Word32

-- | Returns whether the <a>Settings</a> object has any unapplied changes.
--   
--   This can only be the case if it is in <a>‘delay-apply’ mode</a>.
--   
--   <i>Since: 2.26</i>
settingsGetHasUnapplied :: (HasCallStack, MonadIO m, IsSettings a) => a -> m Bool

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   32-bit integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>i</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsGetInt :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Int32

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   64-bit integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>x</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.50</i>
settingsGetInt64 :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Int64

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>, subject to application-level
--   validation/mapping.
--   
--   You should use this function when the application needs to perform
--   some processing on the value of the key (for example, parsing). The
--   <i><tt>mapping</tt></i> function performs that processing. If the
--   function indicates that the processing was unsuccessful (due to a
--   parse error, for example) then the mapping is tried again with another
--   value.
--   
--   This allows a robust ‘fall back to defaults’ behaviour to be
--   implemented somewhat automatically.
--   
--   The first value that is tried is the user’s setting for the key. If
--   the mapping function fails to map this value, other values may be
--   tried in an unspecified order (system or site defaults, translated
--   schema default values, untranslated schema default values, etc).
--   
--   If the mapping function fails for all possible values, one additional
--   attempt is made: the mapping function is called with a <tt>NULL</tt>
--   value. If the mapping function still indicates failure at this point
--   then the application will be aborted.
--   
--   The result parameter for the <i><tt>mapping</tt></i> function is
--   pointed to a <tt>gpointer</tt> which is initially set to
--   <tt>NULL</tt>. The same pointer is given to each invocation of
--   <i><tt>mapping</tt></i>. The final value of that <tt>gpointer</tt> is
--   what is returned by this function. <tt>NULL</tt> is valid; it is
--   returned just as any other value would be.
settingsGetMapped :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> SettingsGetMapping -> m (Ptr ())

-- | Queries the range of a key.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.40)Use
--   <a>settingsSchemaKeyGetRange</a> instead.</i>
settingsGetRange :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m GVariant

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   strings.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>s</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsGetString :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Text

-- | A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   string arrays.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>as</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsGetStrv :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m [Text]

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   32-bit unsigned integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>u</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.30</i>
settingsGetUint :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Word32

-- | Gets the value that is stored at <i><tt>key</tt></i> in
--   <i><tt>settings</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>get</i></tt>() for
--   64-bit unsigned integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>t</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.50</i>
settingsGetUint64 :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Word64

-- | Checks the ‘user value’ of a key, if there is one.
--   
--   The user value of a key is the last value that was set by the user.
--   
--   After calling <a>settingsReset</a> this function should always return
--   <tt>NULL</tt> (assuming something is not wrong with the system
--   configuration).
--   
--   It is possible that <a>settingsGetValue</a> will return a different
--   value than this function. This can happen in the case that the user
--   set a value for a key that was subsequently locked down by the system
--   administrator — this function will return the user’s old value.
--   
--   This function may be useful for adding a ‘reset’ option to a UI or for
--   providing indication that a particular value has been changed.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i>.
--   
--   <i>Since: 2.40</i>
settingsGetUserValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m (Maybe GVariant)

-- | Gets the value that is stored in <i><tt>settings</tt></i> for
--   <i><tt>key</tt></i>.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i>.
--   
--   <i>Since: 2.26</i>
settingsGetValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m GVariant

-- | Finds out if a key can be written.
--   
--   <i>Since: 2.26</i>
settingsIsWritable :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Bool

-- | Gets the list of children on <i><tt>settings</tt></i>.
--   
--   The list is exactly the list of strings for which it is not an error
--   to call <a>settingsGetChild</a>.
--   
--   There is little reason to call this function from ‘normal’ code, since
--   you should already know what children are in your schema. This
--   function may still be useful there for introspection reasons, however.
--   
--   You should free the return value with <a>strfreev</a> when you are
--   done with it.
settingsListChildren :: (HasCallStack, MonadIO m, IsSettings a) => a -> m [Text]

-- | Introspects the list of keys on <i><tt>settings</tt></i>.
--   
--   You should probably not be calling this function from ‘normal’ code
--   (since you should already know what keys are in your schema). This
--   function is intended for introspection reasons.
--   
--   You should free the return value with <a>strfreev</a> when you are
--   done with it.

-- | <i>Deprecated: (Since version 2.46)Use <a>settingsSchemaListKeys</a>
--   instead.</i>
settingsListKeys :: (HasCallStack, MonadIO m, IsSettings a) => a -> m [Text]

-- | Deprecated.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.40)Use
--   <a>settingsSchemaSourceListSchemas</a> instead</i>
settingsListRelocatableSchemas :: (HasCallStack, MonadIO m) => m [Text]

-- | Deprecated.
--   
--   <i>Since: 2.26</i>

-- | <i>Deprecated: (Since version 2.40)Use
--   <a>settingsSchemaSourceListSchemas</a> instead.If you used
--   <a>settingsListSchemas</a> to check for the presence ofa particular
--   schema, use <a>settingsSchemaSourceLookup</a> insteadof your whole
--   loop.</i>
settingsListSchemas :: (HasCallStack, MonadIO m) => m [Text]

-- | Creates a new <a>Settings</a> object with the schema specified by
--   <i><tt>schemaId</tt></i>.
--   
--   It is an error for the schema to not exist: schemas are an essential
--   part of a program, as they provide type information. If schemas need
--   to be dynamically loaded (for example, from an optional runtime
--   dependency), <a>settingsSchemaSourceLookup</a> can be used to test for
--   their existence before loading them.
--   
--   Signals on the newly created <a>Settings</a> object will be dispatched
--   via the thread-default <a>MainContext</a> in effect at the time of the
--   call to <a>settingsNew</a>. The new <a>Settings</a> will hold a
--   reference on the context. See <a>mainContextPushThreadDefault</a>.
--   
--   <i>Since: 2.26</i>
settingsNew :: (HasCallStack, MonadIO m) => Text -> m Settings

-- | Creates a new <a>Settings</a> object with a given schema, backend and
--   path.
--   
--   It should be extremely rare that you ever want to use this function.
--   It is made available for advanced use-cases (such as plugin systems
--   that want to provide access to schemas loaded from custom locations,
--   etc).
--   
--   At the most basic level, a <a>Settings</a> object is a pure
--   composition of four things: a <a>SettingsSchema</a>, a
--   <a>SettingsBackend</a>, a path within that backend, and a
--   <a>MainContext</a> to which signals are dispatched.
--   
--   This constructor therefore gives you full control over constructing
--   <a>Settings</a> instances. The first 3 parameters are given directly
--   as <i><tt>schema</tt></i>, <i><tt>backend</tt></i> and
--   <i><tt>path</tt></i>, and the main context is taken from the
--   thread-default (as per <a>settingsNew</a>).
--   
--   If <i><tt>backend</tt></i> is <tt>NULL</tt> then the default backend
--   is used.
--   
--   If <i><tt>path</tt></i> is <tt>NULL</tt> then the path from the schema
--   is used. It is an error if <i><tt>path</tt></i> is <tt>NULL</tt> and
--   the schema has no path of its own or if <i><tt>path</tt></i> is
--   non-<tt>NULL</tt> and not equal to the path that the schema does have.
--   
--   <i>Since: 2.32</i>
settingsNewFull :: (HasCallStack, MonadIO m, IsSettingsBackend a) => SettingsSchema -> Maybe a -> Maybe Text -> m Settings

-- | Creates a new <a>Settings</a> object with the schema specified by
--   <i><tt>schemaId</tt></i> and a given <a>SettingsBackend</a>.
--   
--   Creating a <a>Settings</a> object with a different backend allows
--   accessing settings from a database other than the usual one. For
--   example, it may make sense to pass a backend corresponding to the
--   ‘defaults’ settings database on the system to get a settings object
--   that modifies the system default settings instead of the settings for
--   this user.
--   
--   <i>Since: 2.26</i>
settingsNewWithBackend :: (HasCallStack, MonadIO m, IsSettingsBackend a) => Text -> a -> m Settings

-- | Creates a new <a>Settings</a> object with the schema specified by
--   <i><tt>schemaId</tt></i> and a given <a>SettingsBackend</a> and path.
--   
--   This is a mix of <a>settingsNewWithBackend</a> and
--   <a>settingsNewWithPath</a>.
--   
--   <i>Since: 2.26</i>
settingsNewWithBackendAndPath :: (HasCallStack, MonadIO m, IsSettingsBackend a) => Text -> a -> Text -> m Settings

-- | Creates a new <a>Settings</a> object with the relocatable schema
--   specified by <i><tt>schemaId</tt></i> and a given path.
--   
--   You only need to do this if you want to directly create a settings
--   object with a schema that doesn’t have a specified path of its own.
--   That’s quite rare.
--   
--   It is a programmer error to call this function for a schema that has
--   an explicitly specified path.
--   
--   It is a programmer error if <i><tt>path</tt></i> is not a valid path.
--   A valid path begins and ends with <tt>/</tt> and does not contain two
--   consecutive <tt>/</tt> characters.
--   
--   <i>Since: 2.26</i>
settingsNewWithPath :: (HasCallStack, MonadIO m) => Text -> Text -> m Settings

-- | Checks if the given <i><tt>value</tt></i> is of the correct type and
--   within the permitted range for <i><tt>key</tt></i>.
--   
--   <i>Since: 2.28</i>

-- | <i>Deprecated: (Since version 2.40)Use
--   <a>settingsSchemaKeyRangeCheck</a> instead.</i>
settingsRangeCheck :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> GVariant -> m Bool

-- | Resets <i><tt>key</tt></i> to its default value.
--   
--   This call resets the key, as much as possible, to its default value.
--   That might be the value specified in the schema or the one set by the
--   administrator.
settingsReset :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m ()

-- | Reverts all unapplied changes to the settings.
--   
--   This function does nothing unless <i><tt>settings</tt></i> is in
--   <a>‘delay-apply’ mode</a>. In the normal case settings are always
--   applied immediately.
--   
--   Change notifications will be emitted for affected keys.
settingsRevert :: (HasCallStack, MonadIO m, IsSettings a) => a -> m ()

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   booleans.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>b</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsSetBoolean :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Bool -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   doubles.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>d</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsSetDouble :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Double -> m Bool

-- | Looks up the enumerated type nick for <i><tt>value</tt></i> and writes
--   it to <i><tt>key</tt></i>, within <i><tt>settings</tt></i>.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i> or is not marked
--   as an enumerated type, or for <i><tt>value</tt></i> not to be a valid
--   value for the named type.
--   
--   After performing the write, accessing <i><tt>key</tt></i> directly
--   with <a>settingsGetString</a> will return the ‘nick’ associated with
--   <i><tt>value</tt></i>.
settingsSetEnum :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Int32 -> m Bool

-- | Looks up the flags type nicks for the bits specified by
--   <i><tt>value</tt></i>, puts them in an array of strings and writes the
--   array to <i><tt>key</tt></i>, within <i><tt>settings</tt></i>.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i> or is not marked
--   as a flags type, or for <i><tt>value</tt></i> to contain any bits that
--   are not value for the named type.
--   
--   After performing the write, accessing <i><tt>key</tt></i> directly
--   with <a>settingsGetStrv</a> will return an array of ‘nicks’; one for
--   each bit in <i><tt>value</tt></i>.
settingsSetFlags :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Word32 -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   32-bit integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>i</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsSetInt :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Int32 -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   64-bit integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>x</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.50</i>
settingsSetInt64 :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Int64 -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   strings.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>s</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsSetString :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Text -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   string arrays. If <i><tt>value</tt></i> is <tt>NULL</tt>, then
--   <i><tt>key</tt></i> is set to be the empty array.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having an <tt>as</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.26</i>
settingsSetStrv :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Maybe [Text] -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   32-bit unsigned integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>u</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.30</i>
settingsSetUint :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Word32 -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   A convenience variant of <a>Settings</a>.<tt><i>set</i></tt>() for
--   64-bit unsigned integers.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   specified as having a <tt>t</tt> type in the schema for
--   <i><tt>settings</tt></i> (see <a>VariantType</a>).
--   
--   <i>Since: 2.50</i>
settingsSetUint64 :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Word64 -> m Bool

-- | Sets <i><tt>key</tt></i> in <i><tt>settings</tt></i> to
--   <i><tt>value</tt></i>.
--   
--   It is a programmer error to give a <i><tt>key</tt></i> that isn’t
--   contained in the schema for <i><tt>settings</tt></i> or for
--   <i><tt>value</tt></i> to have the incorrect type, per the schema.
--   
--   If <i><tt>value</tt></i> is floating then this function consumes the
--   reference.
--   
--   <i>Since: 2.26</i>
settingsSetValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> GVariant -> m Bool

-- | Ensures that all pending operations are complete for the default
--   backend.
--   
--   Writes made to a <a>Settings</a> are handled asynchronously. For this
--   reason, it is very unlikely that the changes have it to disk by the
--   time <a>Settings</a>.<tt><i>set</i></tt>() returns.
--   
--   This call will block until all of the writes have made it to the
--   backend. Since the main loop is not running, no change notifications
--   will be dispatched during this call (but some may be queued by the
--   time the call is done).
settingsSync :: (HasCallStack, MonadIO m) => m ()

-- | Removes an existing binding for <i><tt>property</tt></i> on
--   <i><tt>object</tt></i>.
--   
--   Note that bindings are automatically removed when the object is
--   finalized, so it is rarely necessary to call this function.
--   
--   <i>Since: 2.26</i>
settingsUnbind :: (HasCallStack, MonadIO m, IsObject a) => a -> Text -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>backend</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSettingsBackend :: (IsSettings o, MonadIO m, IsSettingsBackend a) => a -> m (GValueConstruct o)

-- | Get the value of the “<tt>backend</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> settings #backend
--   </pre>
getSettingsBackend :: (MonadIO m, IsSettings o) => o -> m (Maybe SettingsBackend)

-- | Get the value of the “<tt>delay-apply</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> settings #delayApply
--   </pre>
getSettingsDelayApply :: (MonadIO m, IsSettings o) => o -> m Bool

-- | Get the value of the “<tt>has-unapplied</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> settings #hasUnapplied
--   </pre>
getSettingsHasUnapplied :: (MonadIO m, IsSettings o) => o -> m Bool

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>path</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSettingsPath :: (IsSettings o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>path</tt>” property. When <a>overloading</a>
--   is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> settings #path
--   </pre>
getSettingsPath :: (MonadIO m, IsSettings o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>schema</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructSettingsSchema :: (IsSettings o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>schema</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> settings #schema
--   </pre>
getSettingsSchema :: (MonadIO m, IsSettings o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>schema-id</tt>” property. This is rarely needed directly, but it
--   is used by <a>new</a>.
constructSettingsSchemaId :: (IsSettings o, MonadIO m) => Text -> m (GValueConstruct o)

-- | Get the value of the “<tt>schema-id</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> settings #schemaId
--   </pre>
getSettingsSchemaId :: (MonadIO m, IsSettings o) => o -> m (Maybe Text)

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>settings-schema</tt>” property. This is rarely needed directly,
--   but it is used by <a>new</a>.
constructSettingsSettingsSchema :: (IsSettings o, MonadIO m) => SettingsSchema -> m (GValueConstruct o)

-- | Get the value of the “<tt>settings-schema</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> settings #settingsSchema
--   </pre>
getSettingsSettingsSchema :: (MonadIO m, IsSettings o) => o -> m (Maybe SettingsSchema)

-- | Emitted once per change event that affects this settings object.
--   
--   You should connect to this signal only if you are interested in
--   viewing groups of changes before they are split out into multiple
--   emissions of the <a>Settings::changed</a> signal. For most use cases
--   it is more appropriate to use the <a>Settings::changed</a> signal.
--   
--   In the event that the change event applies to one or more specified
--   keys, <i><tt>keys</tt></i> will be an array of
--   [alias<i><tt>gLib</tt></i>.Quark]s of length <i><tt>nKeys</tt></i>. In
--   the event that the change event applies to the <a>Settings</a> object
--   as a whole (ie: potentially every key has been changed) then
--   <i><tt>keys</tt></i> will be <tt>NULL</tt> and <i><tt>nKeys</tt></i>
--   will be <tt>0</tt>.
--   
--   The default handler for this signal invokes the
--   <a>Settings::changed</a> signal for each affected key. If any other
--   connected handler returns true then this default functionality will be
--   suppressed.
type SettingsChangeEventCallback = Maybe [Word32] -> IO Bool

-- | Connect a signal handler for the <a>changeEvent</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> settings #changeEvent callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSettingsChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsChangeEventCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changeEvent</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> settings #changeEvent callback
--   </pre>
onSettingsChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsChangeEventCallback) -> m SignalHandlerId

-- | Emitted when a key has potentially changed.
--   
--   You should call one of the <a>Settings</a>.<tt><i>get</i></tt>() calls
--   to check the new value.
--   
--   This signal supports detailed connections. You can connect to the
--   detailed signal <tt>changed::x</tt> in order to only receive callbacks
--   when key <tt>x</tt> changes.
--   
--   Note that <i><tt>settings</tt></i> only emits this signal if you have
--   read <i><tt>key</tt></i> at least once while a signal handler was
--   already connected for <i><tt>key</tt></i>.
type SettingsChangedCallback = Text -> IO ()

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   after the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> settings #changed callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>changed::detail</tt>”
--   instead.
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSettingsChanged :: (IsSettings a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => SettingsChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>changed</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> settings #changed callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to “<tt>changed::detail</tt>”
--   instead.
onSettingsChanged :: (IsSettings a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => SettingsChangedCallback) -> m SignalHandlerId

-- | Emitted once per writability change event that affects this settings
--   object.
--   
--   You should connect to this signal if you are interested in viewing
--   groups of changes before they are split out into multiple emissions of
--   the <a>Settings::writableChanged</a> signal. For most use cases it is
--   more appropriate to use the <a>Settings::writableChanged</a> signal.
--   
--   In the event that the writability change applies only to a single key,
--   <i><tt>key</tt></i> will be set to the
--   [alias<i><tt>gLib</tt></i>.Quark] for that key. In the event that the
--   writability change affects the entire settings object,
--   <i><tt>key</tt></i> will be <tt>0</tt>.
--   
--   The default handler for this signal invokes the
--   <a>Settings::writableChanged</a> and <a>Settings::changed</a> signals
--   for each affected key. This is done because changes in writability
--   might also imply changes in value (if for example, a new mandatory
--   setting is introduced). If any other connected handler returns true
--   then this default functionality will be suppressed.
type SettingsWritableChangeEventCallback = Word32 -> IO Bool

-- | Connect a signal handler for the <a>writableChangeEvent</a> signal, to
--   be run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> settings #writableChangeEvent callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSettingsWritableChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsWritableChangeEventCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>writableChangeEvent</a> signal, to
--   be run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> settings #writableChangeEvent callback
--   </pre>
onSettingsWritableChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsWritableChangeEventCallback) -> m SignalHandlerId

-- | Emitted when the writability of a key has potentially changed.
--   
--   You should call <a>settingsIsWritable</a> in order to determine the
--   new status.
--   
--   This signal supports detailed connections. You can connect to the
--   detailed signal <tt>writable-changed::x</tt> in order to only receive
--   callbacks when the writability of <tt>x</tt> changes.
type SettingsWritableChangedCallback = Text -> IO ()

-- | Connect a signal handler for the <a>writableChanged</a> signal, to be
--   run after the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>after</a> settings #writableChanged callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to
--   “<tt>writable-changed::detail</tt>” instead.
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterSettingsWritableChanged :: (IsSettings a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => SettingsWritableChangedCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>writableChanged</a> signal, to be
--   run before the default handler. When <a>overloading</a> is enabled,
--   this is equivalent to
--   
--   <pre>
--   <a>on</a> settings #writableChanged callback
--   </pre>
--   
--   This signal admits a optional parameter <tt>detail</tt>. If it's not
--   <tt>Nothing</tt>, we will connect to
--   “<tt>writable-changed::detail</tt>” instead.
onSettingsWritableChanged :: (IsSettings a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => SettingsWritableChangedCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.Settings.Settings
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Settings.Settings
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Settings.Settings
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Settings.Settings)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Settings.Settings o) => GI.Gio.Objects.Settings.IsSettings o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Settings.Settings
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Settings.Settings


-- | This is an opaque structure type. You may not access it directly.
--   
--   <i>Since: 2.32</i>
module GI.Gio.Structs.SettingsSchemaSource

-- | Memory-managed wrapper type.
newtype SettingsSchemaSource
SettingsSchemaSource :: ManagedPtr SettingsSchemaSource -> SettingsSchemaSource

-- | Gets the default system schema source.
--   
--   This function is not required for normal uses of <a>Settings</a> but
--   it may be useful to authors of plugin management systems or to those
--   who want to introspect the content of schemas.
--   
--   If no schemas are installed, <a>Nothing</a> will be returned.
--   
--   The returned source may actually consist of multiple schema sources
--   from different directories, depending on which directories were given
--   in <tt>XDG_DATA_DIRS</tt> and <tt>GSETTINGS_SCHEMA_DIR</tt>. For this
--   reason, all lookups performed against the default source should
--   probably be done recursively.
--   
--   <i>Since: 2.32</i>
settingsSchemaSourceGetDefault :: (HasCallStack, MonadIO m) => m (Maybe SettingsSchemaSource)

-- | Lists the schemas in a given source.
--   
--   If <i><tt>recursive</tt></i> is <a>True</a> then include parent
--   sources. If <a>False</a> then only include the schemas from one source
--   (ie: one directory). You probably want <a>True</a>.
--   
--   Non-relocatable schemas are those for which you can call
--   <a>settingsNew</a>. Relocatable schemas are those for which you must
--   use <a>settingsNewWithPath</a>.
--   
--   Do not call this function from normal programs. This is designed for
--   use by database editors, commandline tools, etc.
--   
--   <i>Since: 2.40</i>
settingsSchemaSourceListSchemas :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> Bool -> m ([Text], [Text])

-- | Looks up a schema with the identifier <i><tt>schemaId</tt></i> in
--   <i><tt>source</tt></i>.
--   
--   This function is not required for normal uses of <a>Settings</a> but
--   it may be useful to authors of plugin management systems or to those
--   who want to introspect the content of schemas.
--   
--   If the schema isn't found directly in <i><tt>source</tt></i> and
--   <i><tt>recursive</tt></i> is <a>True</a> then the parent sources will
--   also be checked.
--   
--   If the schema isn't found, <a>Nothing</a> is returned.
--   
--   <i>Since: 2.32</i>
settingsSchemaSourceLookup :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> Text -> Bool -> m (Maybe SettingsSchema)

-- | Attempts to create a new schema source corresponding to the contents
--   of the given directory.
--   
--   This function is not required for normal uses of <a>Settings</a> but
--   it may be useful to authors of plugin management systems.
--   
--   The directory should contain a file called <tt>gschemas.compiled</tt>
--   as produced by the [glib-compile-schemas][glib-compile-schemas] tool.
--   
--   If <i><tt>trusted</tt></i> is <a>True</a> then
--   <tt>gschemas.compiled</tt> is trusted not to be corrupted. This
--   assumption has a performance advantage, but can result in crashes or
--   inconsistent behaviour in the case of a corrupted file. Generally, you
--   should set <i><tt>trusted</tt></i> to <a>True</a> for files installed
--   by the system and to <a>False</a> for files in the home directory.
--   
--   In either case, an empty file or some types of corruption in the file
--   will result in <a>FileErrorInval</a> being returned.
--   
--   If <i><tt>parent</tt></i> is non-<a>Nothing</a> then there are two
--   effects.
--   
--   First, if <a>settingsSchemaSourceLookup</a> is called with the
--   <i><tt>recursive</tt></i> flag set to <a>True</a> and the schema can
--   not be found in the source, the lookup will recurse to the parent.
--   
--   Second, any references to other schemas specified within this source
--   (ie: <tt>child</tt> or <tt>extends</tt>) references may be resolved
--   from the <i><tt>parent</tt></i>.
--   
--   For this second reason, except in very unusual situations, the
--   <i><tt>parent</tt></i> should probably be given as the default schema
--   source, as returned by <a>settingsSchemaSourceGetDefault</a>.
--   
--   <i>Since: 2.32</i>
settingsSchemaSourceNewFromDirectory :: (HasCallStack, MonadIO m) => [Char] -> Maybe SettingsSchemaSource -> Bool -> m SettingsSchemaSource

-- | Increase the reference count of <i><tt>source</tt></i>, returning a
--   new reference.
--   
--   <i>Since: 2.32</i>
settingsSchemaSourceRef :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> m SettingsSchemaSource

-- | Decrease the reference count of <i><tt>source</tt></i>, possibly
--   freeing it.
--   
--   <i>Since: 2.32</i>
settingsSchemaSourceUnref :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> m ()
instance GHC.Classes.Eq GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource


-- | A single target host/port that a network service is running on.
--   
--   SRV (service) records are used by some network protocols to provide
--   service-specific aliasing and load-balancing. For example, XMPP
--   (Jabber) uses SRV records to locate the XMPP server for a domain;
--   rather than connecting directly to ‘example.com’ or assuming a
--   specific server hostname like ‘xmpp.example.com’, an XMPP client would
--   look up the <tt>xmpp-client</tt> SRV record for ‘example.com’, and
--   then connect to whatever host was pointed to by that record.
--   
--   You can use <a>resolverLookupService</a> or
--   <a>resolverLookupServiceAsync</a> to find the <tt>GSrvTarget</tt>s for
--   a given service. However, if you are simply planning to connect to the
--   remote service, you can use <a>NetworkService</a>’s
--   <a>SocketConnectable</a> interface and not need to worry about
--   <tt>GSrvTarget</tt> at all.
module GI.Gio.Structs.SrvTarget

-- | Memory-managed wrapper type.
newtype SrvTarget
SrvTarget :: ManagedPtr SrvTarget -> SrvTarget

-- | Copies <i><tt>target</tt></i>
--   
--   <i>Since: 2.22</i>
srvTargetCopy :: (HasCallStack, MonadIO m) => SrvTarget -> m SrvTarget

-- | Frees <i><tt>target</tt></i>
--   
--   <i>Since: 2.22</i>
srvTargetFree :: (HasCallStack, MonadIO m) => SrvTarget -> m ()

-- | Gets <i><tt>target</tt></i>'s hostname (in ASCII form; if you are
--   going to present this to the user, you should use
--   <a>hostnameIsAsciiEncoded</a> to check if it contains encoded Unicode
--   segments, and use <a>hostnameToUnicode</a> to convert it if it does.)
--   
--   <i>Since: 2.22</i>
srvTargetGetHostname :: (HasCallStack, MonadIO m) => SrvTarget -> m Text

-- | Gets <i><tt>target</tt></i>'s port
--   
--   <i>Since: 2.22</i>
srvTargetGetPort :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16

-- | Gets <i><tt>target</tt></i>'s priority. You should not need to look at
--   this; <a>Resolver</a> already sorts the targets according to the
--   algorithm in RFC 2782.
--   
--   <i>Since: 2.22</i>
srvTargetGetPriority :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16

-- | Gets <i><tt>target</tt></i>'s weight. You should not need to look at
--   this; <a>Resolver</a> already sorts the targets according to the
--   algorithm in RFC 2782.
--   
--   <i>Since: 2.22</i>
srvTargetGetWeight :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16

-- | Creates a new <a>SrvTarget</a> with the given parameters.
--   
--   You should not need to use this; normally <tt><i>GSrvTargets</i></tt>
--   are created by <a>Resolver</a>.
--   
--   <i>Since: 2.22</i>
srvTargetNew :: (HasCallStack, MonadIO m) => Text -> Word16 -> Word16 -> Word16 -> m SrvTarget
instance GHC.Classes.Eq GI.Gio.Structs.SrvTarget.SrvTarget
instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.SrvTarget.SrvTarget
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.SrvTarget.SrvTarget
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Structs.SrvTarget.SrvTarget)
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.SrvTarget.SrvTarget
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.SrvTarget.SrvTarget


-- | <a>ThreadedResolver</a> is an implementation of <a>Resolver</a> which
--   calls the libc lookup functions in threads to allow them to run
--   asynchronously.
--   
--   <i>Since: 2.20</i>
module GI.Gio.Objects.ThreadedResolver

-- | Memory-managed wrapper type.
newtype ThreadedResolver
ThreadedResolver :: ManagedPtr ThreadedResolver -> ThreadedResolver

-- | Type class for types which can be safely cast to
--   <a>ThreadedResolver</a>, for instance with <a>toThreadedResolver</a>.
class (GObject o, IsDescendantOf ThreadedResolver o) => IsThreadedResolver o

-- | Cast to <a>ThreadedResolver</a>, for types for which this is known to
--   be safe. For general casts, use <a>castTo</a>.
toThreadedResolver :: (MonadIO m, IsThreadedResolver o) => o -> m ThreadedResolver
instance GHC.Classes.Eq GI.Gio.Objects.ThreadedResolver.ThreadedResolver
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ThreadedResolver.ThreadedResolver
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ThreadedResolver.ThreadedResolver
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.ThreadedResolver.ThreadedResolver)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.ThreadedResolver.ThreadedResolver o) => GI.Gio.Objects.ThreadedResolver.IsThreadedResolver o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.ThreadedResolver.ThreadedResolver
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.ThreadedResolver.ThreadedResolver


-- | The object that handles DNS resolution. Use <a>resolverGetDefault</a>
--   to get the default resolver.
--   
--   <tt>GResolver</tt> provides cancellable synchronous and asynchronous
--   DNS resolution, for hostnames (<a>resolverLookupByAddress</a>,
--   <a>resolverLookupByName</a> and their async variants) and SRV
--   (service) records (<a>resolverLookupService</a>).
--   
--   <a>NetworkAddress</a> and <a>NetworkService</a> provide wrappers
--   around <tt>GResolver</tt> functionality that also implement
--   <a>SocketConnectable</a>, making it easy to connect to a remote
--   host/service.
--   
--   The default resolver (see <a>resolverGetDefault</a>) has a timeout of
--   30s set on it since GLib 2.78. Earlier versions of GLib did not
--   support resolver timeouts.
--   
--   This is an abstract type; subclasses of it implement different
--   resolvers for different platforms and situations.
module GI.Gio.Objects.Resolver

-- | Memory-managed wrapper type.
newtype Resolver
Resolver :: ManagedPtr Resolver -> Resolver

-- | Type class for types which can be safely cast to <a>Resolver</a>, for
--   instance with <a>toResolver</a>.
class (GObject o, IsDescendantOf Resolver o) => IsResolver o

-- | Cast to <a>Resolver</a>, for types for which this is known to be safe.
--   For general casts, use <a>castTo</a>.
toResolver :: (MonadIO m, IsResolver o) => o -> m Resolver

-- | Gets the default <a>Resolver</a>. You should unref it when you are
--   done with it. <a>Resolver</a> may use its reference count as a hint
--   about how many threads it should allocate for concurrent DNS
--   resolutions.
--   
--   <i>Since: 2.22</i>
resolverGetDefault :: (HasCallStack, MonadIO m) => m Resolver

-- | Get the timeout applied to all resolver lookups. See
--   <a>Resolver:timeout</a>.
--   
--   <i>Since: 2.78</i>
resolverGetTimeout :: (HasCallStack, MonadIO m, IsResolver a) => a -> m Word32

-- | Synchronously reverse-resolves <i><tt>address</tt></i> to determine
--   its associated hostname.
--   
--   If the DNS resolution fails, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>.
--   
--   If <i><tt>cancellable</tt></i> is non-<a>Nothing</a>, it can be used
--   to cancel the operation, in which case <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to <a>IOErrorEnumCancelled</a>.
--   
--   <i>Since: 2.22</i>
resolverLookupByAddress :: (HasCallStack, MonadIO m, IsResolver a, IsInetAddress b, IsCancellable c) => a -> b -> Maybe c -> m Text

-- | Begins asynchronously reverse-resolving <i><tt>address</tt></i> to
--   determine its associated hostname, and eventually calls
--   <i><tt>callback</tt></i>, which must call
--   <a>resolverLookupByAddressFinish</a> to get the final result.
--   
--   <i>Since: 2.22</i>
resolverLookupByAddressAsync :: (HasCallStack, MonadIO m, IsResolver a, IsInetAddress b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()

-- | Retrieves the result of a previous call to
--   <a>resolverLookupByAddressAsync</a>.
--   
--   If the DNS resolution failed, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>.
--   If the operation was cancelled, <i><tt>error</tt></i> will be set to
--   <a>IOErrorEnumCancelled</a>.
--   
--   <i>Since: 2.22</i>
resolverLookupByAddressFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m Text

-- | Synchronously resolves <i><tt>hostname</tt></i> to determine its
--   associated IP address(es). <i><tt>hostname</tt></i> may be an
--   ASCII-only or UTF-8 hostname, or the textual form of an IP address (in
--   which case this just becomes a wrapper around
--   <a>inetAddressNewFromString</a>).
--   
--   On success, <a>resolverLookupByName</a> will return a non-empty
--   <a>List</a> of <a>InetAddress</a>, sorted in order of preference and
--   guaranteed to not contain duplicates. That is, if using the result to
--   connect to <i><tt>hostname</tt></i>, you should attempt to connect to
--   the first address first, then the second if the first fails, etc. If
--   you are using the result to listen on a socket, it is appropriate to
--   add each result using e.g. <a>socketListenerAddAddress</a>.
--   
--   If the DNS resolution fails, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>
--   and <a>Nothing</a> will be returned.
--   
--   If <i><tt>cancellable</tt></i> is non-<a>Nothing</a>, it can be used
--   to cancel the operation, in which case <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to <a>IOErrorEnumCancelled</a>.
--   
--   If you are planning to connect to a socket on the resolved IP address,
--   it may be easier to create a <a>NetworkAddress</a> and use its
--   <a>SocketConnectable</a> interface.
--   
--   <i>Since: 2.22</i>
resolverLookupByName :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Maybe b -> m [InetAddress]

-- | Begins asynchronously resolving <i><tt>hostname</tt></i> to determine
--   its associated IP address(es), and eventually calls
--   <i><tt>callback</tt></i>, which must call
--   <a>resolverLookupByNameFinish</a> to get the result. See
--   <a>resolverLookupByName</a> for more details.
--   
--   <i>Since: 2.22</i>
resolverLookupByNameAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Retrieves the result of a call to <a>resolverLookupByNameAsync</a>.
--   
--   If the DNS resolution failed, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>.
--   If the operation was cancelled, <i><tt>error</tt></i> will be set to
--   <a>IOErrorEnumCancelled</a>.
--   
--   <i>Since: 2.22</i>
resolverLookupByNameFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [InetAddress]

-- | This differs from <a>resolverLookupByName</a> in that you can modify
--   the lookup behavior with <i><tt>flags</tt></i>. For example this can
--   be used to limit results with <a>ResolverNameLookupFlagsIpv4Only</a>.
--   
--   <i>Since: 2.60</i>
resolverLookupByNameWithFlags :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> [ResolverNameLookupFlags] -> Maybe b -> m [InetAddress]

-- | Begins asynchronously resolving <i><tt>hostname</tt></i> to determine
--   its associated IP address(es), and eventually calls
--   <i><tt>callback</tt></i>, which must call
--   <a>resolverLookupByNameWithFlagsFinish</a> to get the result. See
--   <a>resolverLookupByName</a> for more details.
--   
--   <i>Since: 2.60</i>
resolverLookupByNameWithFlagsAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> [ResolverNameLookupFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Retrieves the result of a call to
--   <a>resolverLookupByNameWithFlagsAsync</a>.
--   
--   If the DNS resolution failed, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>.
--   If the operation was cancelled, <i><tt>error</tt></i> will be set to
--   <a>IOErrorEnumCancelled</a>.
--   
--   <i>Since: 2.60</i>
resolverLookupByNameWithFlagsFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [InetAddress]

-- | Synchronously performs a DNS record lookup for the given
--   <i><tt>rrname</tt></i> and returns a list of records as
--   <a>GVariant</a> tuples. See <a>ResolverRecordType</a> for information
--   on what the records contain for each <i><tt>recordType</tt></i>.
--   
--   If the DNS resolution fails, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>
--   and <a>Nothing</a> will be returned.
--   
--   If <i><tt>cancellable</tt></i> is non-<a>Nothing</a>, it can be used
--   to cancel the operation, in which case <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to <a>IOErrorEnumCancelled</a>.
--   
--   <i>Since: 2.34</i>
resolverLookupRecords :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> ResolverRecordType -> Maybe b -> m [GVariant]

-- | Begins asynchronously performing a DNS lookup for the given
--   <i><tt>rrname</tt></i>, and eventually calls <i><tt>callback</tt></i>,
--   which must call <a>resolverLookupRecordsFinish</a> to get the final
--   result. See <a>resolverLookupRecords</a> for more details.
--   
--   <i>Since: 2.34</i>
resolverLookupRecordsAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> ResolverRecordType -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Retrieves the result of a previous call to
--   <a>resolverLookupRecordsAsync</a>. Returns a non-empty list of records
--   as <a>GVariant</a> tuples. See <a>ResolverRecordType</a> for
--   information on what the records contain.
--   
--   If the DNS resolution failed, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>.
--   If the operation was cancelled, <i><tt>error</tt></i> will be set to
--   <a>IOErrorEnumCancelled</a>.
--   
--   <i>Since: 2.34</i>
resolverLookupRecordsFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [GVariant]

-- | Synchronously performs a DNS SRV lookup for the given
--   <i><tt>service</tt></i> and <i><tt>protocol</tt></i> in the given
--   <i><tt>domain</tt></i> and returns an array of <a>SrvTarget</a>.
--   <i><tt>domain</tt></i> may be an ASCII-only or UTF-8 hostname. Note
--   also that the <i><tt>service</tt></i> and <i><tt>protocol</tt></i>
--   arguments do not include the leading underscore that appears in the
--   actual DNS entry.
--   
--   On success, <a>resolverLookupService</a> will return a non-empty
--   <a>List</a> of <a>SrvTarget</a>, sorted in order of preference. (That
--   is, you should attempt to connect to the first target first, then the
--   second if the first fails, etc.)
--   
--   If the DNS resolution fails, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>
--   and <a>Nothing</a> will be returned.
--   
--   If <i><tt>cancellable</tt></i> is non-<a>Nothing</a>, it can be used
--   to cancel the operation, in which case <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to <a>IOErrorEnumCancelled</a>.
--   
--   If you are planning to connect to the service, it is usually easier to
--   create a <a>NetworkService</a> and use its <a>SocketConnectable</a>
--   interface.
--   
--   <i>Since: 2.22</i>
resolverLookupService :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Text -> Text -> Maybe b -> m [SrvTarget]

-- | Begins asynchronously performing a DNS SRV lookup for the given
--   <i><tt>service</tt></i> and <i><tt>protocol</tt></i> in the given
--   <i><tt>domain</tt></i>, and eventually calls <i><tt>callback</tt></i>,
--   which must call <a>resolverLookupServiceFinish</a> to get the final
--   result. See <a>resolverLookupService</a> for more details.
--   
--   <i>Since: 2.22</i>
resolverLookupServiceAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()

-- | Retrieves the result of a previous call to
--   <a>resolverLookupServiceAsync</a>.
--   
--   If the DNS resolution failed, <i><tt>error</tt></i> (if
--   non-<a>Nothing</a>) will be set to a value from <a>ResolverError</a>.
--   If the operation was cancelled, <i><tt>error</tt></i> will be set to
--   <a>IOErrorEnumCancelled</a>.
--   
--   <i>Since: 2.22</i>
resolverLookupServiceFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [SrvTarget]

-- | Sets <i><tt>resolver</tt></i> to be the application's default resolver
--   (reffing <i><tt>resolver</tt></i>, and unreffing the previous default
--   resolver, if any). Future calls to <a>resolverGetDefault</a> will
--   return this resolver.
--   
--   This can be used if an application wants to perform any sort of DNS
--   caching or "pinning"; it can implement its own <a>Resolver</a> that
--   calls the original default resolver for DNS operations, and implements
--   its own cache policies on top of that, and then set itself as the
--   default resolver for all later code to use.
--   
--   <i>Since: 2.22</i>
resolverSetDefault :: (HasCallStack, MonadIO m, IsResolver a) => a -> m ()

-- | Set the timeout applied to all resolver lookups. See
--   <a>Resolver:timeout</a>.
--   
--   <i>Since: 2.78</i>
resolverSetTimeout :: (HasCallStack, MonadIO m, IsResolver a) => a -> Word32 -> m ()

-- | Construct a <a>GValueConstruct</a> with valid value for the
--   “<tt>timeout</tt>” property. This is rarely needed directly, but it is
--   used by <a>new</a>.
constructResolverTimeout :: (IsResolver o, MonadIO m) => Word32 -> m (GValueConstruct o)

-- | Get the value of the “<tt>timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>get</a> resolver #timeout
--   </pre>
getResolverTimeout :: (MonadIO m, IsResolver o) => o -> m Word32

-- | Set the value of the “<tt>timeout</tt>” property. When
--   <a>overloading</a> is enabled, this is equivalent to
--   
--   <pre>
--   <a>set</a> resolver [ #timeout <a>:=</a> value ]
--   </pre>
setResolverTimeout :: (MonadIO m, IsResolver o) => o -> Word32 -> m ()

-- | Emitted when the resolver notices that the system resolver
--   configuration has changed.
type ResolverReloadCallback = IO ()

-- | Connect a signal handler for the <a>reload</a> signal, to be run after
--   the default handler. When <a>overloading</a> is enabled, this is
--   equivalent to
--   
--   <pre>
--   <a>after</a> resolver #reload callback
--   </pre>
--   
--   By default the object invoking the signal is not passed to the
--   callback. If you need to access it, you can use the implit
--   <tt>?self</tt> parameter. Note that this requires activating the
--   <tt>ImplicitParams</tt> GHC extension.
afterResolverReload :: (IsResolver a, MonadIO m) => a -> ((?self :: a) => ResolverReloadCallback) -> m SignalHandlerId

-- | Connect a signal handler for the <a>reload</a> signal, to be run
--   before the default handler. When <a>overloading</a> is enabled, this
--   is equivalent to
--   
--   <pre>
--   <a>on</a> resolver #reload callback
--   </pre>
onResolverReload :: (IsResolver a, MonadIO m) => a -> ((?self :: a) => ResolverReloadCallback) -> m SignalHandlerId
instance GHC.Classes.Eq GI.Gio.Objects.Resolver.Resolver
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Resolver.Resolver
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Resolver.Resolver
instance Data.GI.Base.GValue.IsGValue (GHC.Internal.Maybe.Maybe GI.Gio.Objects.Resolver.Resolver)
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.Resolver.Resolver o) => GI.Gio.Objects.Resolver.IsResolver o
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.Resolver.Resolver
instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.Resolver.Resolver


module GI.Gio.Objects


-- | <tt>GStaticResource</tt> is an opaque data structure and can only be
--   accessed using the following functions.
module GI.Gio.Structs.StaticResource

-- | Memory-managed wrapper type.
newtype StaticResource
StaticResource :: ManagedPtr StaticResource -> StaticResource

-- | Construct a <a>StaticResource</a> struct initialized to zero.
newZeroStaticResource :: MonadIO m => m StaticResource

-- | Finalizes a <a>Resource</a> initialized by <a>staticResourceInit</a>.
--   
--   This is normally used by code generated by
--   <a>`glib-compile-resources`</a> and is not typically used by other
--   code.
--   
--   <i>Since: 2.32</i>
staticResourceFini :: (HasCallStack, MonadIO m) => StaticResource -> m ()

-- | Gets the <a>Resource</a> that was registered by a call to
--   <a>staticResourceInit</a>.
--   
--   This is normally used by code generated by
--   <a>`glib-compile-resources`</a> and is not typically used by other
--   code.
--   
--   <i>Since: 2.32</i>
staticResourceGetResource :: (HasCallStack, MonadIO m) => StaticResource -> m Resource

-- | Initializes a <a>Resource</a> from static data using a
--   <a>StaticResource</a>.
--   
--   This is normally used by code generated by
--   <a>`glib-compile-resources`</a> and is not typically used by other
--   code.
--   
--   <i>Since: 2.32</i>
staticResourceInit :: (HasCallStack, MonadIO m) => StaticResource -> m ()
instance Data.GI.Base.BasicTypes.BoxedPtr GI.Gio.Structs.StaticResource.StaticResource
instance Data.GI.Base.BasicTypes.CallocPtr GI.Gio.Structs.StaticResource.StaticResource
instance (tag GHC.Types.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.StaticResource.StaticResource tag
instance GHC.Classes.Eq GI.Gio.Structs.StaticResource.StaticResource
instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.StaticResource.StaticResource


module GI.Gio.Structs


module GI.Gio
