-- 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.35 -- | Build time configuration used during code generation. module GI.Gio.Config -- | Overrides used when generating these bindings. overrides :: Text module GI.Gio.Constants -- | Extension point for volume monitor functionality. See [Extending -- GIO][extending-gio]. pattern VOLUME_MONITOR_EXTENSION_POINT_NAME :: Text -- | The string used to obtain a UUID with volumeGetIdentifier. pattern VOLUME_IDENTIFIER_KIND_UUID :: Text -- | The string used to obtain a Unix device path with -- volumeGetIdentifier. pattern VOLUME_IDENTIFIER_KIND_UNIX_DEVICE :: Text -- | The string used to obtain a NFS mount with volumeGetIdentifier. pattern VOLUME_IDENTIFIER_KIND_NFS_MOUNT :: Text -- | The string used to obtain a filesystem label with -- volumeGetIdentifier. pattern VOLUME_IDENTIFIER_KIND_LABEL :: Text -- | The string used to obtain a Hal UDI with volumeGetIdentifier. -- | Deprecated: (Since version 2.58)Do not use, HAL is deprecated. pattern VOLUME_IDENTIFIER_KIND_HAL_UDI :: Text -- | The string used to obtain the volume class with -- volumeGetIdentifier. -- -- Known volume classes include device, network, and -- loop. Other classes may be added in the future. -- -- This is intended to be used by applications to classify Volume -- instances into different sections - for example a file manager or file -- chooser can use this information to show network volumes -- under a "Network" heading and device volumes under a -- "Devices" heading. pattern VOLUME_IDENTIFIER_KIND_CLASS :: Text -- | Extension point for Vfs functionality. See [Extending -- GIO][extending-gio]. 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 TlsBackend. See -- [Extending GIO][extending-gio]. pattern TLS_BACKEND_EXTENSION_POINT_NAME :: Text -- | Extension point for SettingsBackend functionality. pattern SETTINGS_BACKEND_EXTENSION_POINT_NAME :: Text -- | Extension point for proxy resolving functionality. See [Extending -- GIO][extending-gio]. pattern PROXY_RESOLVER_EXTENSION_POINT_NAME :: Text -- | Extension point for proxy functionality. See [Extending -- GIO][extending-gio]. -- -- Since: 2.26 pattern PROXY_EXTENSION_POINT_NAME :: Text -- | Extension point for power profile usage monitoring functionality. See -- [Extending GIO][extending-gio]. -- -- Since: 2.70 pattern POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME :: Text -- | Extension point for network status monitoring functionality. See -- [Extending GIO][extending-gio]. -- -- Since: 2.30 pattern NETWORK_MONITOR_EXTENSION_POINT_NAME :: Text -- | No description available in the introspection data. pattern NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME :: Text -- | The name of the link that associates a menu item with a submenu. -- -- See also menuItemSetLink. -- -- Since: 2.32 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 menuItemSetLink. -- -- Since: 2.32 pattern MENU_LINK_SECTION :: Text -- | The maximum number of entries in a menu section supported by -- dBusConnectionExportMenuModel. -- -- The exact value of the limit may change in future GLib versions. -- -- Since: 2.76 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 g_menu_item_set_action_and_target() -- -- Since: 2.32 pattern MENU_ATTRIBUTE_TARGET :: Text -- | The menu item attribute which holds the label of the item. -- -- Since: 2.32 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 iconSerialize. -- -- 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). -- -- Since: 2.38 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. -- -- Since: 2.36 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 g_menu_model_get_item_attribute() and -- g_menu_item_set_attribute(). -- -- Since: 2.32 pattern MENU_ATTRIBUTE_ACTION :: Text -- | Extension point for memory usage monitoring functionality. See -- [Extending GIO][extending-gio]. -- -- Since: 2.64 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 FileAttributeType is -- FileAttributeTypeUint32. 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 lstat(). -- -- This attribute is only available for UNIX file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 lstat(). -- -- This attribute is only available for UNIX file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 lstat(): this attribute is -- equivalent to the st_mode member of struct stat, and -- includes both the file type and permissions. -- -- This attribute is only available for UNIX file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 True if the file is a UNIX mount point. -- -- Since 2.58, / is considered to be a mount point. -- -- This attribute is only available for UNIX file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. 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 FileAttributeType is -- FileAttributeTypeUint64. 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 FileAttributeType is -- FileAttributeTypeUint32. 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 stat() documentation). -- -- This attribute is only available for UNIX file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 FileAttributeType is -- FileAttributeTypeUint32. 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 FileAttributeType is -- FileAttributeTypeUint64. pattern FILE_ATTRIBUTE_UNIX_BLOCKS :: Text -- | A key in the "trash" namespace for getting the original path of a file -- inside the trash:/// folder before it was trashed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- -- Since: 2.24 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 trash:/// folder. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 trash:/// folder. -- -- The format of the returned string is YYYY-MM-DDThh:mm:ss. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- -- Since: 2.24 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 -- FILE_ATTRIBUTE_TIME_MODIFIED. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 -- FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding -- FileAttributeType is FileAttributeTypeUint32. -- -- Since: 2.74 pattern FILE_ATTRIBUTE_TIME_MODIFIED_NSEC :: Text -- | A key in the "time" namespace for getting the time the file was last -- modified. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint64, 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 -- FILE_ATTRIBUTE_TIME_CREATED. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 -- FILE_ATTRIBUTE_TIME_CREATED. Corresponding -- FileAttributeType is FileAttributeTypeUint32. -- -- Since: 2.74 pattern FILE_ATTRIBUTE_TIME_CREATED_NSEC :: Text -- | A key in the "time" namespace for getting the time the file was -- created. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint64, and contains the time since the file -- was created, in seconds since the UNIX epoch. -- -- This may correspond to Linux stx_btime, FreeBSD -- st_birthtim, NetBSD st_birthtime or NTFS -- ctime. 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 -- FILE_ATTRIBUTE_TIME_CHANGED. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 -- FILE_ATTRIBUTE_TIME_CHANGED. Corresponding -- FileAttributeType is FileAttributeTypeUint32. -- -- Since: 2.74 pattern FILE_ATTRIBUTE_TIME_CHANGED_NSEC :: Text -- | A key in the "time" namespace for getting the time the file was last -- changed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint64, 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 -- FILE_ATTRIBUTE_TIME_ACCESS. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. 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 -- FILE_ATTRIBUTE_TIME_ACCESS. Corresponding -- FileAttributeType is FileAttributeTypeUint32. -- -- Since: 2.74 pattern FILE_ATTRIBUTE_TIME_ACCESS_NSEC :: Text -- | A key in the "time" namespace for getting the time the file was last -- accessed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint64, 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 FileAttributeType is -- FileAttributeTypeByteString. -- -- Since: 2.76 pattern FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE :: Text -- | A key in the "thumbnail" namespace for getting the path to the x-large -- thumbnail image. -- -- Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- -- Since: 2.76 pattern FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE :: Text -- | A key in the "thumbnail" namespace for getting the path to the normal -- thumbnail image. -- -- Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- -- Since: 2.76 pattern FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL :: Text -- | A key in the "thumbnail" namespace for getting the path to the large -- thumbnail image. -- -- Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- -- Since: 2.76 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 FileAttributeType is -- FileAttributeTypeByteString. pattern FILE_ATTRIBUTE_THUMBNAIL_PATH :: Text -- | A key in the "thumbnail" namespace for checking whether the xx-large -- thumbnail is outdated. -- -- This attribute is True if the x-large thumbnail is up-to-date -- with the file it represents, and False if the file has been -- modified since the thumbnail was generated. -- -- If FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE is True -- and this attribute is False, it indicates that thumbnailing may -- be attempted again and may succeed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 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 True if the x-large thumbnail is up-to-date -- with the file it represents, and False if the file has been -- modified since the thumbnail was generated. -- -- If FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE is True and -- this attribute is False, it indicates that thumbnailing may be -- attempted again and may succeed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 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 True if the normal thumbnail is up-to-date -- with the file it represents, and False if the file has been -- modified since the thumbnail was generated. -- -- If FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL is True and -- this attribute is False, it indicates that thumbnailing may be -- attempted again and may succeed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 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 True if the large thumbnail is up-to-date -- with the file it represents, and False if the file has been -- modified since the thumbnail was generated. -- -- If FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE is True and -- this attribute is False, it indicates that thumbnailing may be -- attempted again and may succeed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 pattern FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE :: Text -- | A key in the "thumbnail" namespace for checking whether the thumbnail -- is outdated. -- -- This attribute is True if the thumbnail is up-to-date with the -- file it represents, and False if the file has been modified -- since the thumbnail was generated. -- -- If FILE_ATTRIBUTE_THUMBNAILING_FAILED is True and this -- attribute is False, it indicates that thumbnailing may be -- attempted again and may succeed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.40 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 True if thumbnailing failed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 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 True if thumbnailing failed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 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 True if thumbnailing failed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 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 True if thumbnailing failed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.76 pattern FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE :: Text -- | A key in the "thumbnail" namespace for checking if thumbnailing -- failed. -- -- This attribute is True if thumbnailing failed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. pattern FILE_ATTRIBUTE_THUMBNAILING_FAILED :: Text -- | A key in the "standard" namespace for storing file types. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. -- -- The value for this key should contain a FileType. pattern FILE_ATTRIBUTE_STANDARD_TYPE :: Text -- | A key in the "standard" namespace for getting the target URI for the -- file, in the case of FileTypeShortcut or -- FileTypeMountable files. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. 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 FileAttributeType is -- FileAttributeTypeByteString. pattern FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET :: Text -- | A key in the "standard" namespace for getting the symbolic icon for -- the file. -- -- Corresponding FileAttributeType is -- FileAttributeTypeObject. -- -- The value for this key should contain a Icon. -- -- Since: 2.34 pattern FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON :: Text -- | A key in the "standard" namespace for setting the sort order of a -- file. -- -- Corresponding FileAttributeType is -- FileAttributeTypeInt32. -- -- 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 FileAttributeType is -- FileAttributeTypeUint64. 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 FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display -- the name in a user interface. -- -- Corresponding FileAttributeType is -- FileAttributeTypeByteString. 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 -- FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.46 pattern FILE_ATTRIBUTE_STANDARD_IS_VOLATILE :: Text -- | A key in the "standard" namespace for checking if a file is virtual. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. 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 FileAttributeType is -- FileAttributeTypeBoolean. pattern FILE_ATTRIBUTE_STANDARD_IS_SYMLINK :: Text -- | A key in the "standard" namespace for checking if a file is hidden. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. pattern FILE_ATTRIBUTE_STANDARD_IS_HIDDEN :: Text -- | A key in the "standard" namespace for checking if a file is a backup -- file. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. pattern FILE_ATTRIBUTE_STANDARD_IS_BACKUP :: Text -- | A key in the "standard" namespace for getting the icon for the file. -- -- Corresponding FileAttributeType is -- FileAttributeTypeObject. -- -- The value for this key should contain a Icon. 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 FileAttributeType is -- FileAttributeTypeString. 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 FileAttributeType is -- FileAttributeTypeString. 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 FileAttributeType is -- FileAttributeTypeString. 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 FileAttributeType is -- FileAttributeTypeString. 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 FileAttributeType is -- FileAttributeTypeString. pattern FILE_ATTRIBUTE_STANDARD_COPY_NAME :: Text -- | A key in the "standard" namespace for getting the content type of the -- file. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- -- 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 FileAttributeType is -- FileAttributeTypeUint64. -- -- Since: 2.20 pattern FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE :: Text -- | A key in the "selinux" namespace for getting the file's SELinux -- context. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- -- 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 recent:/// was last changed. -- -- Corresponding FileAttributeType is -- FileAttributeTypeInt64. -- -- Since: 2.52 pattern FILE_ATTRIBUTE_RECENT_MODIFIED :: Text -- | A key in the "preview" namespace for getting a Icon that can be -- used to get preview of the file. -- -- For example, it may be a low resolution thumbnail without metadata. -- -- Corresponding FileAttributeType is -- FileAttributeTypeObject. -- -- The value for this key should contain a Icon. -- -- Since: 2.20 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 FileAttributeType is -- FileAttributeTypeString. pattern FILE_ATTRIBUTE_OWNER_USER_REAL :: Text -- | A key in the "owner" namespace for getting the user name of the file's -- owner. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. pattern FILE_ATTRIBUTE_OWNER_USER :: Text -- | A key in the "owner" namespace for getting the file owner's group. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. pattern FILE_ATTRIBUTE_OWNER_GROUP :: Text -- | A key in the "mountable" namespace for getting the unix device file. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- -- Since: 2.22 pattern FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE :: Text -- | A key in the "mountable" namespace for getting the unix device. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. pattern FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE :: Text -- | A key in the "mountable" namespace for getting the -- DriveStartStopType. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. -- -- Since: 2.22 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.22 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 FileAttributeType is -- FileAttributeTypeString. 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 FileAttributeType is -- FileAttributeTypeBoolean. 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.22 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.22 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.22 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.22 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 FileAttributeType is -- FileAttributeTypeBoolean. 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 FileAttributeType is -- FileAttributeTypeBoolean. pattern FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT :: Text -- | A key in the "id" namespace for getting the file system identifier. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- -- 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 FileAttributeType is -- FileAttributeTypeString. -- -- An example use would be during listing files, to avoid recursive -- directory scanning. pattern FILE_ATTRIBUTE_ID_FILE :: Text -- | A key in the "gvfs" namespace that gets the name of the current GVFS -- backend in use. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. 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 FilesystemPreviewType. 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 FileAttributeType is -- FileAttributeTypeUint64. -- -- Since: 2.32 pattern FILE_ATTRIBUTE_FILESYSTEM_USED :: Text -- | A key in the "filesystem" namespace for getting the file system's -- type. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. 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 fileQueryFilesystemInfo. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint64. pattern FILE_ATTRIBUTE_FILESYSTEM_SIZE :: Text -- | A key in the "filesystem" namespace for checking if the file system is -- remote. -- -- Is set to True if the file system is remote. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. pattern FILE_ATTRIBUTE_FILESYSTEM_REMOTE :: Text -- | A key in the "filesystem" namespace for checking if the file system is -- read only. -- -- Is set to True if the file system is read only. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. 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 FileAttributeType is -- FileAttributeTypeUint64. pattern FILE_ATTRIBUTE_FILESYSTEM_FREE :: Text -- | A key in the "etag" namespace for getting the value of the file's -- entity tag. -- -- Corresponding FileAttributeType is -- FileAttributeTypeString. 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 Reparse Tags page for possible reparse tag values. -- -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. -- -- Since: 2.60 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 True if the backup flag is set. -- -- This attribute is only available for DOS file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. 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 True if file is a reparse point of type -- IO_REPARSE_TAG_MOUNT_POINT. -- -- This attribute is only available for DOS file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- Since: 2.60 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 True if the archive flag is set. -- -- This attribute is only available for DOS file systems. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. pattern FILE_ATTRIBUTE_DOS_IS_ARCHIVE :: Text -- | A key in the "access" namespace for getting write privileges. -- -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- -- This attribute will be True 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- This attribute will be True 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- This attribute will be True 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- This attribute will be True 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- This attribute will be True 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 FileAttributeType is -- FileAttributeTypeBoolean. -- -- This attribute will be True 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 -- driveGetIdentifier. -- -- Since: 2.58 pattern DRIVE_IDENTIFIER_KIND_UNIX_DEVICE :: Text -- | Extension point for default handler to URI association. See [Extending -- GIO][extending-gio]. -- | Deprecated: (Since version 2.28)The DesktopAppInfoLookup -- interface is deprecated andunused by GIO. pattern DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME :: Text -- | Extension point for debug control functionality. See [Extending -- GIO][extending-gio]. -- -- Since: 2.72 pattern DEBUG_CONTROLLER_EXTENSION_POINT_NAME :: Text -- | The value returned by handlers of the signals generated by the -- gdbus-codegen tool to indicate that a method call has not -- been handled by an implementation. It is equal to False, but -- using this macro is sometimes more readable. -- -- In code that needs to be backwards-compatible with older GLib, use -- False instead. -- -- Since: 2.68 pattern DBUS_METHOD_INVOCATION_UNHANDLED :: Bool -- | The value returned by handlers of the signals generated by the -- gdbus-codegen tool to indicate that a method call has been -- handled by an implementation. It is equal to True, but using -- this macro is sometimes more readable. -- -- In code that needs to be backwards-compatible with older GLib, use -- True instead, often written like this: -- --
-- g_dbus_method_invocation_return_error (invocation, ...); -- return TRUE; // handled ---- -- Since: 2.68 pattern DBUS_METHOD_INVOCATION_HANDLED :: Bool module GI.Gio.Enums -- | An enumeration for well-known message buses. -- -- Since: 2.26 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 converterConvert. -- -- Since: 2.24 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. -- -- Since: 2.26 data CredentialsType -- | Indicates an invalid native credential type. CredentialsTypeInvalid :: CredentialsType -- | The native credentials type is a struct ucred. CredentialsTypeLinuxUcred :: CredentialsType -- | The native credentials type is a struct cmsgcred. CredentialsTypeFreebsdCmsgcred :: CredentialsType -- | The native credentials type is a struct sockpeercred. Added -- in 2.30. CredentialsTypeOpenbsdSockpeercred :: CredentialsType -- | The native credentials type is a ucred_t. Added in 2.40. CredentialsTypeSolarisUcred :: CredentialsType -- | The native credentials type is a struct unpcbid. Added in -- 2.42. CredentialsTypeNetbsdUnpcbid :: CredentialsType -- | The native credentials type is a struct xucred. Added in -- 2.66. CredentialsTypeAppleXucred :: CredentialsType -- | The native credentials type is a PID DWORD. Added in 2.72. CredentialsTypeWin32Pid :: CredentialsType -- | Catch-all for unknown values AnotherCredentialsType :: Int -> CredentialsType -- | Error codes for the G_DBUS_ERROR error domain. -- -- Since: 2.26 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 -- DBusErrorNoReply is used for message reply timeouts. Warning: -- this is confusingly-named given that DBusErrorTimedOut 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 DBusErrorTimeout 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 exec() call failed. DBusErrorSpawnExecFailed :: DBusError -- | While starting a new process, the fork() 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 DBusError. This is a specialized -- version of catchGErrorJustDomain. catchDBusError :: IO a -> (DBusError -> GErrorMessage -> IO a) -> IO a -- | Handle exceptions of type DBusError. This is a specialized -- version of handleGErrorJustDomain. handleDBusError :: (DBusError -> GErrorMessage -> IO a) -> IO a -> IO a -- | Enumeration used to describe the byte order of a D-Bus message. -- -- Since: 2.26 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 DBusMessage. -- -- Since: 2.26 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 DBusMessage. -- -- Since: 2.26 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 -- | DataStreamByteOrder 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 -- | DataStreamNewlineType 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. -- -- Since: 2.22 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 SECURITY UNLOCK DEVICE command) DriveStartStopTypePassword :: DriveStartStopType -- | Catch-all for unknown values AnotherDriveStartStopType :: Int -> DriveStartStopType -- | GEmblemOrigin is used to add information about the origin of the -- emblem to Emblem. -- -- Since: 2.18 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 fileSetAttributesFromInfo 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 Object. FileAttributeTypeObject :: FileAttributeType -- | a Nothing 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) -- FileMonitorFlagsSendMoved flag is set FileMonitorEventMoved :: FileMonitorEvent -- | the file was renamed within the current directory -- only sent if the -- FileMonitorFlagsWatchMoves flag is set. Since: 2.46. FileMonitorEventRenamed :: FileMonitorEvent -- | the file was moved into the monitored directory from another location -- -- only sent if the FileMonitorFlagsWatchMoves flag is set. -- Since: 2.46. FileMonitorEventMovedIn :: FileMonitorEvent -- | the file was moved out of the monitored directory to another location -- -- only sent if the FileMonitorFlagsWatchMoves 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 FileTypeSymbolicLink -- type; use FileInfo and -- FILE_ATTRIBUTE_STANDARD_IS_SYMLINK 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. -- FileType enumeration cannot precisely represent this important -- distinction, which is why all Windows symlinks will continue to be -- reported as FileTypeRegular or FileTypeDirectory. 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 -- FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. 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 IOErrorEnumFailed in cases that were not explicitly -- distinguished before. You should therefore avoid writing code like -- --
-- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED))
-- {
-- // Assume that this is EPRINTERONFIRE
-- ...
-- }
--
--
-- but should instead treat all unrecognized error codes the same as
-- IOErrorEnumFailed.
--
-- See also PollableReturn for a cheaper way of returning
-- IOErrorEnumWouldBlock to callers without allocating a
-- GError.
data IOErrorEnum
-- | Generic error condition for when an operation fails and no more
-- specific IOErrorEnum 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 Cancellable.
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 GError error domain. Use
-- dbusErrorGetRemoteError to extract the D-Bus error name and
-- dbusErrorStripRemoteError 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
-- IOErrorEnumBrokenPipe; before 2.44 some "connection closed"
-- errors returned IOErrorEnumBrokenPipe, but others returned
-- IOErrorEnumFailed. 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 IOErrorEnum. This is a specialized
-- version of catchGErrorJustDomain.
catchIOErrorEnum :: IO a -> (IOErrorEnum -> GErrorMessage -> IO a) -> IO a
-- | Handle exceptions of type IOErrorEnum. This is a specialized
-- version of handleGErrorJustDomain.
handleIOErrorEnum :: (IOErrorEnum -> GErrorMessage -> IO a) -> IO a -> IO a
-- | Flags for use with g_io_module_scope_new().
--
-- Since: 2.30
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
-- | Memory availability warning levels.
--
-- Note that because new values might be added, it is recommended that
-- applications check MemoryMonitorWarningLevel as ranges, for
-- example:
--
-- -- if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW) -- drop_caches (); ---- -- Since: 2.64 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 gMEMORYMONITORWARNINGLEVELLOW 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 -- | MountOperationResult 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 -- NetworkMonitor. -- -- Since: 2.44 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 GNotifications. -- -- Since: 2.42 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 -- | PasswordSave is used to indicate the lifespan of a saved -- password. -- -- Gvfs 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 GError. -- -- This enum exists to be able to return errors to callers without having -- to allocate a GError. Allocating GErrors can be -- quite expensive for regularly happening errors like -- IOErrorEnumWouldBlock. -- -- In case of PollableReturnFailed a GError should be set -- for the operation to give details about the error that happened. -- -- Since: 2.60 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 G_RESOLVER_ERROR in a -- GError returned from a Resolver routine. -- -- Since: 2.22 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 ResolverError. This is a specialized -- version of catchGErrorJustDomain. catchResolverError :: IO a -> (ResolverError -> GErrorMessage -> IO a) -> IO a -- | Handle exceptions of type ResolverError. This is a specialized -- version of handleGErrorJustDomain. handleResolverError :: (ResolverError -> GErrorMessage -> IO a) -> IO a -> IO a -- | The type of record that resolverLookupRecords or -- resolverLookupRecordsAsync should retrieve. The records are -- returned as lists of GVariant tuples. Each record type has -- different values in the variant tuples returned. -- -- ResolverRecordTypeSrv records are returned as variants with the -- signature (qqqs), containing a guint16 with the -- priority, a guint16 with the weight, a guint16 with -- the port, and a string of the hostname. -- -- ResolverRecordTypeMx records are returned as variants with the -- signature (qs), representing a guint16 with the -- preference, and a string containing the mail exchanger hostname. -- -- ResolverRecordTypeTxt records are returned as variants with the -- signature (as), representing an array of the strings in the -- text record. Note: Most TXT records only contain a single string, but -- RFC 1035 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 RFC 7208. -- -- ResolverRecordTypeSoa records are returned as variants with the -- signature (ssuuuuu), representing a string containing the -- primary name server, a string containing the administrator, the serial -- as a guint32, the refresh interval as a guint32, the -- retry interval as a guint32, the expire timeout as a -- guint32, and the TTL as a guint32. -- -- ResolverRecordTypeNs records are returned as variants with the -- signature (s), representing a string of the hostname of the -- name server. -- -- Since: 2.34 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 G_RESOURCE_ERROR in a -- GError returned from a Resource routine. -- -- Since: 2.32 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 ResourceError. This is a specialized -- version of catchGErrorJustDomain. catchResourceError :: IO a -> (ResourceError -> GErrorMessage -> IO a) -> IO a -- | Handle exceptions of type ResourceError. This is a specialized -- version of handleGErrorJustDomain. handleResourceError :: (ResourceError -> GErrorMessage -> IO a) -> IO a -> IO a -- | Describes an event occurring on a SocketClient. See the -- SocketClient::event signal for more details. -- -- Additional values may be added to this type in the future. -- -- Since: 2.32 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 SocketConnectable. SocketClientEventComplete :: SocketClientEvent -- | Catch-all for unknown values AnotherSocketClientEvent :: Int -> SocketClientEvent -- | The protocol family of a SocketAddress. (These values are -- identical to the system defines AF_INET, -- AF_INET6 and AF_UNIX, if available.) -- -- Since: 2.22 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 SocketListener. See the -- SocketListener::event signal for more details. -- -- Additional values may be added to this type in the future. -- -- Since: 2.46 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 Socket, -- 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. -- -- Since: 2.22 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 Socket. Some protocols may not -- implement all the socket types. -- -- Since: 2.22 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 TlsServerConnection. -- -- Since: 2.28 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 -- | Flags for tlsInteractionRequestCertificate, -- tlsInteractionRequestCertificateAsync, and -- tlsInteractionInvokeRequestCertificate. -- -- Since: 2.40 data TlsCertificateRequestFlags -- | No flags TlsCertificateRequestFlagsNone :: TlsCertificateRequestFlags -- | Catch-all for unknown values AnotherTlsCertificateRequestFlags :: Int -> TlsCertificateRequestFlags -- | An error code used with G_TLS_CHANNEL_BINDING_ERROR in -- a GError to indicate a TLS channel binding retrieval error. -- -- Since: 2.66 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 tls-server-end-point -- 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 TlsChannelBindingError. This is a -- specialized version of catchGErrorJustDomain. catchTlsChannelBindingError :: IO a -> (TlsChannelBindingError -> GErrorMessage -> IO a) -> IO a -- | Handle exceptions of type TlsChannelBindingError. This is a -- specialized version of handleGErrorJustDomain. handleTlsChannelBindingError :: (TlsChannelBindingError -> GErrorMessage -> IO a) -> IO a -> IO a -- | The type of TLS channel binding data to retrieve from -- TlsConnection or DtlsConnection, as documented by RFC -- 5929 or RFC 9266. The `tls-unique-for-telnet` binding type is -- not currently implemented. -- -- Since: 2.66 data TlsChannelBindingType -- | `tls-unique` binding type TlsChannelBindingTypeUnique :: TlsChannelBindingType -- | `tls-server-end-point` binding type TlsChannelBindingTypeServerEndPoint :: TlsChannelBindingType -- | `tls-exporter` binding type. Since: 2.74 TlsChannelBindingTypeExporter :: TlsChannelBindingType -- | Catch-all for unknown values AnotherTlsChannelBindingType :: Int -> TlsChannelBindingType -- | Flags for tlsDatabaseLookupCertificateForHandle, -- tlsDatabaseLookupCertificateIssuer, and -- tlsDatabaseLookupCertificatesIssuedBy. -- -- Since: 2.30 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 -- | An error code used with G_TLS_ERROR in a GError -- returned from a TLS-related routine. -- -- Since: 2.28 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 -- tlsConnectionSetCertificate. TlsErrorCertificateRequired :: TlsError -- | The TLS connection was closed without proper notice, which may -- indicate an attack. See tlsConnectionSetRequireCloseNotify. 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 TlsError. This is a specialized -- version of catchGErrorJustDomain. catchTlsError :: IO a -> (TlsError -> GErrorMessage -> IO a) -> IO a -- | Handle exceptions of type TlsError. This is a specialized -- version of handleGErrorJustDomain. handleTlsError :: (TlsError -> GErrorMessage -> IO a) -> IO a -> IO a -- | TlsInteractionResult is returned by various functions in -- TlsInteraction when finishing an interaction request. -- -- Since: 2.30 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 TlsConnection or -- DtlsConnection. 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 TlsProtocolVersionUnknown 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. -- -- Since: 2.70 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 RFC 5246 TlsProtocolVersionTls12 :: TlsProtocolVersion -- | TLS 1.3, defined by RFC 8446 TlsProtocolVersionTls13 :: TlsProtocolVersion -- | DTLS 1.0, which is insecure and should not be used TlsProtocolVersionDtls10 :: TlsProtocolVersion -- | DTLS 1.2, defined by RFC 6347 TlsProtocolVersionDtls12 :: TlsProtocolVersion -- | Catch-all for unknown values AnotherTlsProtocolVersion :: Int -> TlsProtocolVersion -- | When to allow rehandshaking. See -- tlsConnectionSetRehandshakeMode. -- -- Since: 2.28 -- | 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. 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 UnixSocketAddress. -- UnixSocketAddressTypePath indicates a traditional unix domain -- socket bound to a filesystem path. -- UnixSocketAddressTypeAnonymous indicates a socket not bound to -- any name (eg, a client-side socket, or a socket created with -- socketpair()). -- -- For abstract sockets, there are two incompatible ways of naming them; -- the man pages suggest using the entire struct sockaddr_un as -- the name, padding the unused parts of the sun_path -- field with zeroes; this corresponds to -- UnixSocketAddressTypeAbstractPadded. However, many programs -- instead just use a portion of sun_path, and pass an -- appropriate smaller length to bind() or -- connect(). This is -- UnixSocketAddressTypeAbstract. -- -- Since: 2.26 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 -- ZlibDecompressor and ZlibCompressor. -- -- Since: 2.24 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.IOModuleScopeFlags 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.TlsCertificateRequestFlags 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.TlsDatabaseLookupFlags 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.Enum.Enum GI.Gio.Enums.BusType instance GHC.Enum.Enum GI.Gio.Enums.ConverterResult instance GHC.Enum.Enum GI.Gio.Enums.CredentialsType instance GHC.Enum.Enum GI.Gio.Enums.DBusError instance GHC.Enum.Enum GI.Gio.Enums.DBusMessageByteOrder instance GHC.Enum.Enum GI.Gio.Enums.DBusMessageHeaderField instance GHC.Enum.Enum GI.Gio.Enums.DBusMessageType instance GHC.Enum.Enum GI.Gio.Enums.DataStreamByteOrder instance GHC.Enum.Enum GI.Gio.Enums.DataStreamNewlineType instance GHC.Enum.Enum GI.Gio.Enums.DriveStartStopType instance GHC.Enum.Enum GI.Gio.Enums.EmblemOrigin instance GHC.Enum.Enum GI.Gio.Enums.FileAttributeStatus instance GHC.Enum.Enum GI.Gio.Enums.FileAttributeType instance GHC.Enum.Enum GI.Gio.Enums.FileMonitorEvent instance GHC.Enum.Enum GI.Gio.Enums.FileType instance GHC.Enum.Enum GI.Gio.Enums.FilesystemPreviewType instance GHC.Enum.Enum GI.Gio.Enums.IOErrorEnum instance GHC.Enum.Enum GI.Gio.Enums.IOModuleScopeFlags instance GHC.Enum.Enum GI.Gio.Enums.MemoryMonitorWarningLevel instance GHC.Enum.Enum GI.Gio.Enums.MountOperationResult instance GHC.Enum.Enum GI.Gio.Enums.NetworkConnectivity instance GHC.Enum.Enum GI.Gio.Enums.NotificationPriority instance GHC.Enum.Enum GI.Gio.Enums.PasswordSave instance GHC.Enum.Enum GI.Gio.Enums.PollableReturn instance GHC.Enum.Enum GI.Gio.Enums.ResolverError instance GHC.Enum.Enum GI.Gio.Enums.ResolverRecordType instance GHC.Enum.Enum GI.Gio.Enums.ResourceError instance GHC.Enum.Enum GI.Gio.Enums.SocketClientEvent instance GHC.Enum.Enum GI.Gio.Enums.SocketFamily instance GHC.Enum.Enum GI.Gio.Enums.SocketListenerEvent instance GHC.Enum.Enum GI.Gio.Enums.SocketProtocol instance GHC.Enum.Enum GI.Gio.Enums.SocketType instance GHC.Enum.Enum GI.Gio.Enums.TlsAuthenticationMode instance GHC.Enum.Enum GI.Gio.Enums.TlsCertificateRequestFlags instance GHC.Enum.Enum GI.Gio.Enums.TlsChannelBindingError instance GHC.Enum.Enum GI.Gio.Enums.TlsChannelBindingType instance GHC.Enum.Enum GI.Gio.Enums.TlsDatabaseLookupFlags instance GHC.Enum.Enum GI.Gio.Enums.TlsError instance GHC.Enum.Enum GI.Gio.Enums.TlsInteractionResult instance GHC.Enum.Enum GI.Gio.Enums.TlsProtocolVersion instance GHC.Enum.Enum GI.Gio.Enums.TlsRehandshakeMode instance GHC.Enum.Enum GI.Gio.Enums.UnixSocketAddressType instance GHC.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.IOModuleScopeFlags 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.TlsCertificateRequestFlags instance GHC.Classes.Eq GI.Gio.Enums.TlsChannelBindingError instance GHC.Classes.Eq GI.Gio.Enums.TlsChannelBindingType instance GHC.Classes.Eq GI.Gio.Enums.TlsDatabaseLookupFlags 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.IOModuleScopeFlags 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.TlsCertificateRequestFlags 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.TlsDatabaseLookupFlags 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.IOModuleScopeFlags 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.TlsCertificateRequestFlags instance GHC.Classes.Ord GI.Gio.Enums.TlsChannelBindingError instance GHC.Classes.Ord GI.Gio.Enums.TlsChannelBindingType instance GHC.Classes.Ord GI.Gio.Enums.TlsDatabaseLookupFlags 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.Show.Show GI.Gio.Enums.BusType instance GHC.Show.Show GI.Gio.Enums.ConverterResult instance GHC.Show.Show GI.Gio.Enums.CredentialsType instance GHC.Show.Show GI.Gio.Enums.DBusError instance GHC.Show.Show GI.Gio.Enums.DBusMessageByteOrder instance GHC.Show.Show GI.Gio.Enums.DBusMessageHeaderField instance GHC.Show.Show GI.Gio.Enums.DBusMessageType instance GHC.Show.Show GI.Gio.Enums.DataStreamByteOrder instance GHC.Show.Show GI.Gio.Enums.DataStreamNewlineType instance GHC.Show.Show GI.Gio.Enums.DriveStartStopType instance GHC.Show.Show GI.Gio.Enums.EmblemOrigin instance GHC.Show.Show GI.Gio.Enums.FileAttributeStatus instance GHC.Show.Show GI.Gio.Enums.FileAttributeType instance GHC.Show.Show GI.Gio.Enums.FileMonitorEvent instance GHC.Show.Show GI.Gio.Enums.FileType instance GHC.Show.Show GI.Gio.Enums.FilesystemPreviewType instance GHC.Show.Show GI.Gio.Enums.IOErrorEnum instance GHC.Show.Show GI.Gio.Enums.IOModuleScopeFlags instance GHC.Show.Show GI.Gio.Enums.MemoryMonitorWarningLevel instance GHC.Show.Show GI.Gio.Enums.MountOperationResult instance GHC.Show.Show GI.Gio.Enums.NetworkConnectivity instance GHC.Show.Show GI.Gio.Enums.NotificationPriority instance GHC.Show.Show GI.Gio.Enums.PasswordSave instance GHC.Show.Show GI.Gio.Enums.PollableReturn instance GHC.Show.Show GI.Gio.Enums.ResolverError instance GHC.Show.Show GI.Gio.Enums.ResolverRecordType instance GHC.Show.Show GI.Gio.Enums.ResourceError instance GHC.Show.Show GI.Gio.Enums.SocketClientEvent instance GHC.Show.Show GI.Gio.Enums.SocketFamily instance GHC.Show.Show GI.Gio.Enums.SocketListenerEvent instance GHC.Show.Show GI.Gio.Enums.SocketProtocol instance GHC.Show.Show GI.Gio.Enums.SocketType instance GHC.Show.Show GI.Gio.Enums.TlsAuthenticationMode instance GHC.Show.Show GI.Gio.Enums.TlsCertificateRequestFlags instance GHC.Show.Show GI.Gio.Enums.TlsChannelBindingError instance GHC.Show.Show GI.Gio.Enums.TlsChannelBindingType instance GHC.Show.Show GI.Gio.Enums.TlsDatabaseLookupFlags instance GHC.Show.Show GI.Gio.Enums.TlsError instance GHC.Show.Show GI.Gio.Enums.TlsInteractionResult instance GHC.Show.Show GI.Gio.Enums.TlsProtocolVersion instance GHC.Show.Show GI.Gio.Enums.TlsRehandshakeMode instance GHC.Show.Show GI.Gio.Enums.UnixSocketAddressType instance GHC.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.IOModuleScopeFlags 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.TlsCertificateRequestFlags 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.TlsDatabaseLookupFlags 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 AppInfo. 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 Application. -- -- Since: 2.28 data ApplicationFlags -- | Default. Deprecated in 2.74, use ApplicationFlagsDefaultFlags -- instead ApplicationFlagsFlagsNone :: ApplicationFlags -- | Default flags. Since: 2.74 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 -- local_command_line(), and has no effect if -- ApplicationFlagsHandlesCommandLine is given. See -- applicationRun for details. ApplicationFlagsHandlesOpen :: ApplicationFlags -- | This application handles command line arguments (in the primary -- instance). Note that this flag only affect the default implementation -- of local_command_line(). See applicationRun 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 GIT_COMMITTER_NAME environment -- variable when editing a git commit message. The environment is -- available to the Application::commandLine signal handler, via -- applicationCommandLineGetenv. 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 -- --gapplication-app-id. 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 -- --gapplication-replace on the commandline. Since: 2.60 ApplicationFlagsReplace :: ApplicationFlags -- | Catch-all for unknown values AnotherApplicationFlags :: Int -> ApplicationFlags -- | AskPasswordFlags 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 g_bus_own_name(). -- -- Since: 2.26 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 -- BusNameOwnerFlagsAllowReplacement, then take the name from the -- other connection. BusNameOwnerFlagsReplace :: BusNameOwnerFlags -- | If another message bus connection owns the name, immediately return an -- error from g_bus_own_name() rather than entering the -- waiting queue for that name. (Since 2.54) BusNameOwnerFlagsDoNotQueue :: BusNameOwnerFlags -- | Catch-all for unknown values AnotherBusNameOwnerFlags :: Int -> BusNameOwnerFlags -- | Flags used in g_bus_watch_name(). -- -- Since: 2.26 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 converterConvert. -- -- Since: 2.24 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 dBusConnectionCall and similar APIs. -- -- Since: 2.26 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. -- -- Since: 2.26 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 DBusConnection. -- -- Since: 2.26 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 Hello() method will be invoked as part -- of the connection setup. DBusConnectionFlagsMessageBusConnection :: DBusConnectionFlags -- | If set, processing of D-Bus messages is delayed until -- dBusConnectionStartMessageProcessing 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 -- EXTERNAL 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 DBusInterfaceSkeleton -- instance. -- -- Since: 2.30 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 DBusMessage. -- -- Since: 2.26 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 DBusObjectManagerClient. -- -- Since: 2.30 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. -- -- Since: 2.26 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 DBusProxy derived -- class. -- -- Since: 2.26 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 invalidated property will be -- (asynchronously) retrieved upon receiving the -- `PropertiesChanged` D-Bus signal and the property will not -- cause emission of the DBusProxy::gPropertiesChanged signal. -- When the value is received the DBusProxy::gPropertiesChanged -- 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 DBusProxyFlagsDoNotAutoStart 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 GDBusMessages on a -- DBusConnection. -- -- Since: 2.26 data DBusSendMessageFlags -- | No flags set. DBusSendMessageFlagsNone :: DBusSendMessageFlags -- | Do not automatically assign a serial number from the -- DBusConnection object when sending a message. DBusSendMessageFlagsPreserveSerial :: DBusSendMessageFlags -- | Catch-all for unknown values AnotherDBusSendMessageFlags :: Int -> DBusSendMessageFlags -- | Flags used when creating a DBusServer. -- -- Since: 2.26 data DBusServerFlags -- | No flags set. DBusServerFlagsNone :: DBusServerFlags -- | All DBusServer::newConnection 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 -- dBusConnectionSignalSubscribe. -- -- Since: 2.26 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 dBusConnectionRegisterSubtree. -- -- Since: 2.26 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. -- -- Since: 2.22 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 -- FileInfo). 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 -- fileReplace and its variants, including -- fileReplaceContents. Since 2.20 FileCreateFlagsReplaceDestination :: FileCreateFlags -- | Catch-all for unknown values AnotherFileCreateFlags :: Int -> FileCreateFlags -- | Flags that can be used with fileMeasureDiskUsage. -- -- Since: 2.38 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 du --apparent-size. Since GLib 2.78. -- and similarly to du 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 du -x. FileMeasureFlagsNoXdev :: FileMeasureFlags -- | Catch-all for unknown values AnotherFileMeasureFlags :: Int -> FileMeasureFlags -- | Flags used to set what a FileMonitor 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 FileMonitorFlagsWatchMoves 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 -- FileMonitorEventRenamed, FileMonitorEventMovedIn and -- FileMonitorEventMovedOut events to be emitted when possible. -- Since: 2.46. FileMonitorFlagsWatchMoves :: FileMonitorFlags -- | Catch-all for unknown values AnotherFileMonitorFlags :: Int -> FileMonitorFlags -- | Flags used when querying a FileInfo. data FileQueryInfoFlags -- | No flags set. FileQueryInfoFlagsNone :: FileQueryInfoFlags -- | Don't follow symlinks. FileQueryInfoFlagsNofollowSymlinks :: FileQueryInfoFlags -- | Catch-all for unknown values AnotherFileQueryInfoFlags :: Int -> FileQueryInfoFlags -- | GIOStreamSpliceFlags determine how streams should be spliced. -- -- Since: 2.28 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. -- -- Since: 2.60 data ResolverNameLookupFlags -- | default behavior (same as resolverLookupByName) 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. -- -- Since: 2.32 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. -- -- Since: 2.32 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 G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET SettingsBindFlagsDefault :: SettingsBindFlags -- | Update the Object 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 Object 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 SettingsBindFlagsGet, set the -- Object property value initially from the setting, but do not -- listen for changes of the setting SettingsBindFlagsGetNoChanges :: SettingsBindFlags -- | When passed to settingsBind, 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 g_settings_bind_with_mapping(). SettingsBindFlagsInvertBoolean :: SettingsBindFlags -- | Catch-all for unknown values AnotherSettingsBindFlags :: Int -> SettingsBindFlags -- | Flags used in socketReceiveMessage and -- socketSendMessage. 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. -- -- Since: 2.22 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 Subprocess. -- -- Note that the default for stdin is to redirect from -- /dev/null. 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 SubprocessFlagsStdoutPipe and -- SubprocessFlagsStdoutSilence. -- -- Since: 2.40 data SubprocessFlags -- | No flags. SubprocessFlagsNone :: SubprocessFlags -- | create a pipe for the stdin of the spawned process that can be -- accessed with subprocessGetStdinPipe. 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 subprocessGetStdoutPipe. SubprocessFlagsStdoutPipe :: SubprocessFlags -- | silence the stdout of the spawned process (ie: redirect to -- /dev/null). SubprocessFlagsStdoutSilence :: SubprocessFlags -- | create a pipe for the stderr of the spawned process that can be -- accessed with subprocessGetStderrPipe. SubprocessFlagsStderrPipe :: SubprocessFlags -- | silence the stderr of the spawned process (ie: redirect to -- /dev/null). 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 -- PATH in the launcher environment. (Since: 2.72) SubprocessFlagsSearchPathFromEnvp :: SubprocessFlags -- | Catch-all for unknown values AnotherSubprocessFlags :: Int -> SubprocessFlags -- | Flags to define future TestDBus behaviour. -- -- Since: 2.34 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 TlsConnection::acceptCertificate). -- -- 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 -- TlsCertificateFlagsExpired 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. -- -- Since: 2.28 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 -- TlsConnection'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 tlsDatabaseVerifyChain. -- -- Since: 2.30 data TlsDatabaseVerifyFlags -- | No verification flags TlsDatabaseVerifyFlagsNone :: TlsDatabaseVerifyFlags -- | Catch-all for unknown values AnotherTlsDatabaseVerifyFlags :: Int -> TlsDatabaseVerifyFlags -- | Various flags for the password. -- -- Since: 2.30 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 11, the user PIN is required. Since: 2.70. TlsPasswordFlagsPkcs11User :: TlsPasswordFlags -- | For PKCS 11, the security officer PIN is required. -- Since: 2.70. TlsPasswordFlagsPkcs11SecurityOfficer :: TlsPasswordFlags -- | For PKCS 11, 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.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.TlsDatabaseVerifyFlags instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsPasswordFlags instance GHC.Enum.Enum GI.Gio.Flags.AppInfoCreateFlags instance GHC.Enum.Enum GI.Gio.Flags.ApplicationFlags instance GHC.Enum.Enum GI.Gio.Flags.AskPasswordFlags instance GHC.Enum.Enum GI.Gio.Flags.BusNameOwnerFlags instance GHC.Enum.Enum GI.Gio.Flags.BusNameWatcherFlags instance GHC.Enum.Enum GI.Gio.Flags.ConverterFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusCallFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusCapabilityFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusConnectionFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusInterfaceSkeletonFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusMessageFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusObjectManagerClientFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusPropertyInfoFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusProxyFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusSendMessageFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusServerFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusSignalFlags instance GHC.Enum.Enum GI.Gio.Flags.DBusSubtreeFlags instance GHC.Enum.Enum GI.Gio.Flags.DriveStartFlags instance GHC.Enum.Enum GI.Gio.Flags.FileAttributeInfoFlags instance GHC.Enum.Enum GI.Gio.Flags.FileCopyFlags instance GHC.Enum.Enum GI.Gio.Flags.FileCreateFlags instance GHC.Enum.Enum GI.Gio.Flags.FileMeasureFlags instance GHC.Enum.Enum GI.Gio.Flags.FileMonitorFlags instance GHC.Enum.Enum GI.Gio.Flags.FileQueryInfoFlags instance GHC.Enum.Enum GI.Gio.Flags.IOStreamSpliceFlags instance GHC.Enum.Enum GI.Gio.Flags.MountMountFlags instance GHC.Enum.Enum GI.Gio.Flags.MountUnmountFlags instance GHC.Enum.Enum GI.Gio.Flags.OutputStreamSpliceFlags instance GHC.Enum.Enum GI.Gio.Flags.ResolverNameLookupFlags instance GHC.Enum.Enum GI.Gio.Flags.ResourceFlags instance GHC.Enum.Enum GI.Gio.Flags.ResourceLookupFlags instance GHC.Enum.Enum GI.Gio.Flags.SettingsBindFlags instance GHC.Enum.Enum GI.Gio.Flags.SocketMsgFlags instance GHC.Enum.Enum GI.Gio.Flags.SubprocessFlags instance GHC.Enum.Enum GI.Gio.Flags.TestDBusFlags instance GHC.Enum.Enum GI.Gio.Flags.TlsCertificateFlags instance GHC.Enum.Enum GI.Gio.Flags.TlsDatabaseVerifyFlags instance GHC.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.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.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.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.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.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.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.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.TlsDatabaseVerifyFlags instance GHC.Classes.Ord GI.Gio.Flags.TlsPasswordFlags instance GHC.Show.Show GI.Gio.Flags.AppInfoCreateFlags instance GHC.Show.Show GI.Gio.Flags.ApplicationFlags instance GHC.Show.Show GI.Gio.Flags.AskPasswordFlags instance GHC.Show.Show GI.Gio.Flags.BusNameOwnerFlags instance GHC.Show.Show GI.Gio.Flags.BusNameWatcherFlags instance GHC.Show.Show GI.Gio.Flags.ConverterFlags instance GHC.Show.Show GI.Gio.Flags.DBusCallFlags instance GHC.Show.Show GI.Gio.Flags.DBusCapabilityFlags instance GHC.Show.Show GI.Gio.Flags.DBusConnectionFlags instance GHC.Show.Show GI.Gio.Flags.DBusInterfaceSkeletonFlags instance GHC.Show.Show GI.Gio.Flags.DBusMessageFlags instance GHC.Show.Show GI.Gio.Flags.DBusObjectManagerClientFlags instance GHC.Show.Show GI.Gio.Flags.DBusPropertyInfoFlags instance GHC.Show.Show GI.Gio.Flags.DBusProxyFlags instance GHC.Show.Show GI.Gio.Flags.DBusSendMessageFlags instance GHC.Show.Show GI.Gio.Flags.DBusServerFlags instance GHC.Show.Show GI.Gio.Flags.DBusSignalFlags instance GHC.Show.Show GI.Gio.Flags.DBusSubtreeFlags instance GHC.Show.Show GI.Gio.Flags.DriveStartFlags instance GHC.Show.Show GI.Gio.Flags.FileAttributeInfoFlags instance GHC.Show.Show GI.Gio.Flags.FileCopyFlags instance GHC.Show.Show GI.Gio.Flags.FileCreateFlags instance GHC.Show.Show GI.Gio.Flags.FileMeasureFlags instance GHC.Show.Show GI.Gio.Flags.FileMonitorFlags instance GHC.Show.Show GI.Gio.Flags.FileQueryInfoFlags instance GHC.Show.Show GI.Gio.Flags.IOStreamSpliceFlags instance GHC.Show.Show GI.Gio.Flags.MountMountFlags instance GHC.Show.Show GI.Gio.Flags.MountUnmountFlags instance GHC.Show.Show GI.Gio.Flags.OutputStreamSpliceFlags instance GHC.Show.Show GI.Gio.Flags.ResolverNameLookupFlags instance GHC.Show.Show GI.Gio.Flags.ResourceFlags instance GHC.Show.Show GI.Gio.Flags.ResourceLookupFlags instance GHC.Show.Show GI.Gio.Flags.SettingsBindFlags instance GHC.Show.Show GI.Gio.Flags.SocketMsgFlags instance GHC.Show.Show GI.Gio.Flags.SubprocessFlags instance GHC.Show.Show GI.Gio.Flags.TestDBusFlags instance GHC.Show.Show GI.Gio.Flags.TlsCertificateFlags instance GHC.Show.Show GI.Gio.Flags.TlsDatabaseVerifyFlags instance GHC.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.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.TlsDatabaseVerifyFlags instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Flags.TlsPasswordFlags -- | GAction represents a single named action. -- -- The main interface to an action is that it can be activated with -- actionActivate. This results in the 'activate' signal being -- emitted. An activation has a GVariant parameter (which may be -- NULL). 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 actionChangeState. This call takes a -- [typegLib.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. -- -- GAction is merely the interface to the concept of an action, -- as described above. Various implementations of actions exist, -- including SimpleAction. -- -- 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 actionActivate and actionChangeState for type safety -- and for the state being enabled. -- -- Probably the only useful thing to do with a GAction is to put -- it inside of a SimpleActionGroup. 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 Action, for -- instance with toAction. class (GObject o, IsDescendantOf Action o) => IsAction o -- | Cast to Action, for types for which this is known to be safe. -- For general casts, use castTo. toAction :: (MonadIO m, IsAction o) => o -> m Action -- | Activates the action. -- -- parameter must be the correct type of parameter for -- the action (ie: the parameter type given at construction time). If the -- parameter type was NULL then parameter must -- also be NULL. -- -- If the parameter [typegLib.Variant] is -- floating, it is consumed. -- -- Since: 2.28 actionActivate :: (HasCallStack, MonadIO m, IsAction a) => a -> Maybe GVariant -> m () -- | Request for the state of action to be changed to -- value. -- -- The action must be stateful and value must be of the -- correct type. See actionGetStateType. -- -- This call merely requests a change. The action may refuse to change -- its state or may change its state to something other than -- value. See actionGetStateHint. -- -- If the value [typegLib.Variant] is -- floating, it is consumed. -- -- Since: 2.30 actionChangeState :: (HasCallStack, MonadIO m, IsAction a) => a -> GVariant -> m () -- | Checks if action is currently enabled. -- -- An action must be enabled in order to be activated or in order to have -- its state changed from outside callers. -- -- Since: 2.28 actionGetEnabled :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool -- | Queries the name of action. -- -- Since: 2.28 actionGetName :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text -- | Queries the type of the parameter that must be given when activating -- action. -- -- When activating the action using actionActivate, the -- [typegLib.Variant] given to that function must be of -- the type returned by this function. -- -- In the case that this function returns NULL, you must not -- give any [typegLib.Variant], but NULL -- instead. -- -- Since: 2.28 actionGetParameterType :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe VariantType) -- | Queries the current state of action. -- -- If the action is not stateful then NULL will be returned. If -- the action is stateful then the type of the return value is the type -- given by actionGetStateType. -- -- The return value (if non-NULL) should be freed with -- variantUnref when it is no longer required. -- -- Since: 2.28 actionGetState :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe GVariant) -- | Requests a hint about the valid range of values for the state of -- action. -- -- If NULL is returned it either means that the action is not -- stateful or that there is no hint about the valid range of values for -- the state of the action. -- -- If a [typegLib.Variant] array is returned then each -- item in the array is a possible value for the state. If a -- [typegLib.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-NULL) should be freed with -- variantUnref when it is no longer required. -- -- Since: 2.28 actionGetStateHint :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe GVariant) -- | Queries the type of the state of action. -- -- If the action is stateful (e.g. created with -- simpleActionNewStateful) then this function returns the -- [typegLib.VariantType] of the state. This is the type -- of the initial value given as the state. All calls to -- actionChangeState must give a -- [typegLib.Variant] of this type and -- actionGetState will return a [typegLib.Variant] -- of the same type. -- -- If the action is not stateful (e.g. created with -- simpleActionNew) then this function will return NULL. -- In that case, actionGetState will return NULL and you -- must not call actionChangeState. -- -- Since: 2.28 actionGetStateType :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe VariantType) -- | Checks if actionName is valid. -- -- actionName is valid if it consists only of -- alphanumeric characters, plus - and .. The empty -- string is not a valid action name. -- -- It is an error to call this function with a non-UTF-8 -- actionName. actionName must not be -- NULL. -- -- Since: 2.38 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 :, ( or ). For example: -- app.action. -- -- The second format is used to represent an action with a target value -- that is a non-empty string consisting only of alphanumerics, plus -- - and .. In that case, the action name and target -- value are separated by a double colon (::). For example: -- app.action::target. -- -- The third format is used to represent an action with any type of -- target value, including strings. The target value follows the action -- name, surrounded in parens. For example: app.action(42). The -- target value is parsed using variantParse. If a tuple-typed -- value is desired, it must be specified in the same way, resulting in -- two sets of parens, for example: app.action((1,2,3)). A -- string target can be specified this way as well: -- app.action('target'). For strings, this third format must be -- used if target value is empty or contains characters other than -- alphanumerics, - and .. -- -- If this function returns TRUE, a non-NULL value is -- guaranteed to be returned in actionName (if a pointer -- is passed in). A NULL value may still be returned in -- targetValue, as the detailedName may -- not contain a target. -- -- If returned, the [typegLib.Variant] in -- targetValue is guaranteed to not be floating. -- -- Since: 2.38 actionParseDetailedName :: (HasCallStack, MonadIO m) => Text -> m (Text, Maybe GVariant) -- | Formats a detailed action name from actionName and -- targetValue. -- -- It is an error to call this function with an invalid action name. -- -- This function is the opposite of actionParseDetailedName. It -- will produce a string that can be parsed back to the -- actionName and targetValue by that -- function. -- -- See that function for the types of strings that will be printed by -- this function. -- -- Since: 2.38 actionPrintDetailedName :: (HasCallStack, MonadIO m) => Text -> Maybe GVariant -> m Text -- | Get the value of the “enabled” property. When -- overloading is enabled, this is equivalent to -- --
-- get action #enabled --getActionEnabled :: (MonadIO m, IsAction o) => o -> m Bool -- | Get the value of the “name” property. When overloading -- is enabled, this is equivalent to -- --
-- get action #name --getActionName :: (MonadIO m, IsAction o) => o -> m Text -- | Get the value of the “parameter-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get action #parameterType --getActionParameterType :: (MonadIO m, IsAction o) => o -> m (Maybe VariantType) -- | Get the value of the “state” property. When -- overloading is enabled, this is equivalent to -- --
-- get action #state --getActionState :: (MonadIO m, IsAction o) => o -> m (Maybe GVariant) -- | Get the value of the “state-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get action #stateType --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.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 -- | GActionGroup 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 -- [typegio.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 GActionGroup -- is to activate them with actionGroupActivateAction. Activating -- an action may require a [typegLib.Variant] parameter. -- The required type of the parameter can be inquired with -- actionGroupGetActionParameterType. Actions may be disabled, see -- actionGroupGetActionEnabled. Activating a disabled action has -- no effect. -- -- Actions may optionally have a state in the form of a -- [typegLib.Variant]. The current state of an action can -- be inquired with actionGroupGetActionState. Activating a -- stateful action may change its state, but it is also possible to set -- the state by calling actionGroupChangeActionState. -- -- 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 actionGroupListActions take the name of an -- action as an argument. -- -- The GActionGroup 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 – -- actionGroupGetActionEnabled but not an equivalent -- set_action_enabled() method. -- -- Signals are emitted on the action group in response to state changes -- on individual actions. -- -- Implementations of GActionGroup should provide -- implementations for the virtual functions -- actionGroupListActions and actionGroupQueryAction. The -- other virtual functions should not be implemented — their ‘wrappers’ -- are actually implemented with calls to actionGroupQueryAction. 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 ActionGroup, -- for instance with toActionGroup. class (GObject o, IsDescendantOf ActionGroup o) => IsActionGroup o -- | Cast to ActionGroup, for types for which this is known to be -- safe. For general casts, use castTo. toActionGroup :: (MonadIO m, IsActionGroup o) => o -> m ActionGroup -- | Emits the ActionGroup::actionAdded signal on -- actionGroup. -- -- This function should only be called by -- [typegio.ActionGroup] implementations. -- -- Since: 2.28 actionGroupActionAdded :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m () -- | Emits the ActionGroup::actionEnabledChanged signal on -- actionGroup. -- -- This function should only be called by -- [typegio.ActionGroup] implementations. -- -- Since: 2.28 actionGroupActionEnabledChanged :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> Bool -> m () -- | Emits the ActionGroup::actionRemoved signal on -- actionGroup. -- -- This function should only be called by -- [typegio.ActionGroup] implementations. -- -- Since: 2.28 actionGroupActionRemoved :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m () -- | Emits the ActionGroup::actionStateChanged signal on -- actionGroup. -- -- This function should only be called by -- [typegio.ActionGroup] implementations. -- -- Since: 2.28 actionGroupActionStateChanged :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> GVariant -> m () -- | Activate the named action within actionGroup. -- -- If the action is expecting a parameter, then the correct type of -- parameter must be given as parameter. If the action is -- expecting no parameters then parameter must be -- NULL. See actionGroupGetActionParameterType. -- -- If the [typegio.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, -- dBusConnectionFlush 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 dBusConnectionFlush is called before -- exit(). Without g_dbus_connection_flush(), the -- ‘quit’ action may fail to be activated on the primary instance. -- --
-- // 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);
--
--
-- Since: 2.28
actionGroupActivateAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> Maybe GVariant -> m ()
-- | Request for the state of the named action within
-- actionGroup to be changed to value.
--
-- The action must be stateful and value must be of the
-- correct type. See actionGroupGetActionStateType.
--
-- This call merely requests a change. The action may refuse to change
-- its state or may change its state to something other than
-- value. See actionGroupGetActionStateHint.
--
-- If the value GVariant is floating, it is consumed.
--
-- Since: 2.28
actionGroupChangeActionState :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> GVariant -> m ()
-- | Checks if the named action within actionGroup is
-- currently enabled.
--
-- An action must be enabled in order to be activated or in order to have
-- its state changed from outside callers.
--
-- Since: 2.28
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 actionGroup.
--
-- When activating the action using actionGroupActivateAction, the
-- [typegLib.Variant] given to that function must be of
-- the type returned by this function.
--
-- In the case that this function returns NULL, you must not
-- give any [typegLib.Variant], but NULL
-- 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.
--
-- Since: 2.28
actionGroupGetActionParameterType :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe VariantType)
-- | Queries the current state of the named action within
-- actionGroup.
--
-- If the action is not stateful then NULL will be returned. If
-- the action is stateful then the type of the return value is the type
-- given by actionGroupGetActionStateType.
--
-- The return value (if non-NULL) should be freed with
-- variantUnref when it is no longer required.
--
-- Since: 2.28
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 actionGroup.
--
-- If NULL is returned it either means that the action is not
-- stateful or that there is no hint about the valid range of values for
-- the state of the action.
--
-- If a [typegLib.Variant] array is returned then each
-- item in the array is a possible value for the state. If a
-- [typegLib.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-NULL) should be freed with
-- variantUnref when it is no longer required.
--
-- Since: 2.28
actionGroupGetActionStateHint :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe GVariant)
-- | Queries the type of the state of the named action within
-- actionGroup.
--
-- If the action is stateful then this function returns the
-- [typegLib.VariantType] of the state. All calls to
-- actionGroupChangeActionState must give a
-- [typegLib.Variant] of this type and
-- actionGroupGetActionState will return a
-- [typegLib.Variant] of the same type.
--
-- If the action is not stateful then this function will return
-- NULL. In that case, actionGroupGetActionState will
-- return NULL and you must not call
-- actionGroupChangeActionState.
--
-- 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.
--
-- Since: 2.28
actionGroupGetActionStateType :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe VariantType)
-- | Checks if the named action exists within actionGroup.
--
-- Since: 2.28
actionGroupHasAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m Bool
-- | Lists the actions contained within actionGroup.
--
-- The caller is responsible for freeing the list with strfreev
-- when it is no longer required.
--
-- Since: 2.28
actionGroupListActions :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> m [Text]
-- | Queries all aspects of the named action within an
-- actionGroup.
--
-- This function acquires the information available from
-- actionGroupHasAction, actionGroupGetActionEnabled,
-- actionGroupGetActionParameterType,
-- actionGroupGetActionStateType,
-- actionGroupGetActionStateHint and
-- actionGroupGetActionState 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
-- [typegio.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, TRUE is returned and any of the
-- requested fields (as indicated by having a non-NULL reference
-- passed in) are filled. If the action doesn’t exist, FALSE is
-- returned and the fields may or may not have been modified.
--
-- Since: 2.32
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.
--
-- Since: 2.28
type ActionGroupActionAddedCallback = Text -> IO ()
-- | Connect a signal handler for the actionAdded signal, to be run
-- after the default handler. When overloading is enabled, this is
-- equivalent to
--
-- -- after actionGroup #actionAdded callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “action-added::detail” -- 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 -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionAddedCallback) -> m SignalHandlerId -- | Connect a signal handler for the actionAdded signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on actionGroup #actionAdded callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “action-added::detail” -- 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. -- -- Since: 2.28 type ActionGroupActionEnabledChangedCallback = Text -> Bool -> IO () -- | Connect a signal handler for the actionEnabledChanged signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after actionGroup #actionEnabledChanged callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to -- “action-enabled-changed::detail” 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 -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionEnabledChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the actionEnabledChanged signal, -- to be run before the default handler. When overloading is -- enabled, this is equivalent to -- --
-- on actionGroup #actionEnabledChanged callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to -- “action-enabled-changed::detail” 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. -- -- Since: 2.28 type ActionGroupActionRemovedCallback = Text -> IO () -- | Connect a signal handler for the actionRemoved signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after actionGroup #actionRemoved callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “action-removed::detail” -- 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 -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionRemovedCallback) -> m SignalHandlerId -- | Connect a signal handler for the actionRemoved signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on actionGroup #actionRemoved callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “action-removed::detail” -- instead. onActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionRemovedCallback) -> m SignalHandlerId -- | Signals that the state of the named action has changed. -- -- Since: 2.28 type ActionGroupActionStateChangedCallback = Text -> GVariant -> IO () -- | Connect a signal handler for the actionStateChanged signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after actionGroup #actionStateChanged callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to -- “action-state-changed::detail” 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 -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => ActionGroupActionStateChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the actionStateChanged signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on actionGroup #actionStateChanged callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to -- “action-state-changed::detail” 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.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 -- | GAsyncResult provides a base class for implementing -- asynchronous function results. -- -- Asynchronous operations are broken up into two separate operations -- which are chained together by a GAsyncReadyCallback. To begin -- an asynchronous operation, provide a GAsyncReadyCallback 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 mainContextPushThreadDefault) -- from where the operation was initiated. It will be passed a -- GAsyncResult 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 -- _finish() function, passing the object the function was -- called for, the GAsyncResult instance, and (optionally) an -- error to grab any error conditions that may have -- occurred. -- -- The _finish() function for an operation takes the generic -- result (of type GAsyncResult) and returns the specific result -- that the operation in question yields (e.g. a FileEnumerator -- for a "enumerate children" operation). If the result or error status -- of the operation is not needed, there is no need to call the -- _finish() function; GIO will take care of cleaning up the -- result and error information after the GAsyncReadyCallback -- returns. You can pass NULL for the -- GAsyncReadyCallback if you don't need to take any action at -- all after the operation completes. Applications may also take a -- reference to the GAsyncResult and call _finish() -- later; however, the _finish() function may be called at most -- once. -- -- Example of a typical asynchronous operation flow: -- --
-- 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);
--
-- ...
-- }
--
--
-- 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 G_IO_ERROR_CANCELLED error.
--
--
-- 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);
--
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 ListModel, for
-- instance with toListModel.
class (GObject o, IsDescendantOf ListModel o) => IsListModel o
-- | Cast to ListModel, for types for which this is known to be
-- safe. For general casts, use castTo.
toListModel :: (MonadIO m, IsListModel o) => o -> m ListModel
-- | Get the item at position.
--
-- If position is greater than the number of items in
-- list, Nothing is returned.
--
-- Nothing 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
-- g_list_model_get_item().
--
-- See also: listModelGetNItems
--
-- Since: 2.44
listModelGetItem :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> m (Maybe Object)
-- | Gets the type of the items in list.
--
-- All items returned from g_list_model_get_item() 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 ListModel can not change during the life of
-- the model.
--
-- Since: 2.44
listModelGetItemType :: (HasCallStack, MonadIO m, IsListModel a) => a -> m GType
-- | Gets the number of items in list.
--
-- Depending on the model implementation, calling this function may be
-- less efficient than iterating the list with increasing values for
-- position until g_list_model_get_item()
-- returns Nothing.
--
-- Since: 2.44
listModelGetNItems :: (HasCallStack, MonadIO m, IsListModel a) => a -> m Word32
-- | Emits the ListModel::itemsChanged signal on
-- list.
--
-- This function should only be called by classes implementing
-- ListModel. It has to be called after the internal
-- representation of list has been updated, because
-- handlers connected to this signal might query the new state of the
-- list.
--
-- 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
-- ListStore), 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 ListModel 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.
--
-- Since: 2.44
listModelItemsChanged :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> Word32 -> Word32 -> m ()
-- | This signal is emitted whenever items were added to or removed from
-- list. At position,
-- removed items were removed and added
-- items were added in their place.
--
-- Note: If removed != added, the positions of all later items
-- in the model change.
--
-- Since: 2.44
type ListModelItemsChangedCallback = Word32 -> Word32 -> Word32 -> IO ()
-- | Connect a signal handler for the itemsChanged signal, to be run
-- after the default handler. When overloading is enabled, this is
-- equivalent to
--
-- -- after listModel #itemsChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ((?self :: a) => ListModelItemsChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the itemsChanged signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on listModel #itemsChanged callback --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.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 GRemoteActionGroup interface is implemented by -- ActionGroup instances that either transmit action invocations -- to other processes or receive action invocations in the local process -- from other processes. -- -- The interface has _full variants of the two methods on -- ActionGroup used to activate actions: -- actionGroupActivateAction and -- actionGroupChangeActionState. These variants allow a ‘platform -- data’ GVariant to be specified: a dictionary providing context -- for the action invocation (for example: timestamps, startup -- notification IDs, etc). -- -- DBusActionGroup implements GRemoteActionGroup. This -- provides a mechanism to send platform data for action invocations over -- D-Bus. -- -- Additionally, dBusConnectionExportActionGroup will check if the -- exported ActionGroup implements GRemoteActionGroup and -- use the _full 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. -- -- Since: 2.32 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 -- RemoteActionGroup, for instance with -- toRemoteActionGroup. class (GObject o, IsDescendantOf RemoteActionGroup o) => IsRemoteActionGroup o -- | Cast to RemoteActionGroup, for types for which this is known to -- be safe. For general casts, use castTo. toRemoteActionGroup :: (MonadIO m, IsRemoteActionGroup o) => o -> m RemoteActionGroup -- | Activates the remote action. -- -- This is the same as actionGroupActivateAction 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. -- -- platformData must be non-Nothing and must have -- the type G_VARIANT_TYPE_VARDICT. If it is floating, it -- will be consumed. -- -- Since: 2.32 remoteActionGroupActivateActionFull :: (HasCallStack, MonadIO m, IsRemoteActionGroup a) => a -> Text -> Maybe GVariant -> GVariant -> m () -- | Changes the state of a remote action. -- -- This is the same as actionGroupChangeActionState 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. -- -- platformData must be non-Nothing and must have -- the type G_VARIANT_TYPE_VARDICT. If it is floating, it -- will be consumed. -- -- Since: 2.32 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.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 -- | GAppInfoMonitor monitors application information for changes. -- -- GAppInfoMonitor is a very simple object used for monitoring -- the app info database for changes (newly installed or removed -- applications). -- -- Call appInfoMonitorGet to get a GAppInfoMonitor and -- connect to the AppInfoMonitor::changed 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 appInfoGetAll or -- another g_app_info_*() function. This is because monitoring -- the app info database for changes is expensive. -- -- The following functions will re-arm the AppInfoMonitor::changed -- signal so it can be emitted again: -- --
-- after appInfoMonitor #changed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> ((?self :: a) => AppInfoMonitorChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the changed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on appInfoMonitor #changed callback --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.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 -- | GCancellable allows operations to be cancelled. -- -- GCancellable 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 Cancellable, -- for instance with toCancellable. class (GObject o, IsDescendantOf Cancellable o) => IsCancellable o -- | Cast to Cancellable, for types for which this is known to be -- safe. For general casts, use castTo. toCancellable :: (MonadIO m, IsCancellable o) => o -> m Cancellable -- | Will set cancellable to cancelled, and will emit the -- Cancellable::cancelled 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 cancellable. -- -- If cancellable is Nothing, 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 AsyncReadyCallback will not be invoked until the -- application returns to the main loop. cancellableCancel :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m () -- | Convenience function to connect to the Cancellable::cancelled -- signal. Also handles the race condition that may happen if the -- cancellable is cancelled right before connecting. -- -- callback is called at most once, either directly at -- the time of the connect if cancellable is already -- cancelled, or when cancellable is cancelled in some -- thread. -- -- dataDestroyFunc will be called when the handler is -- disconnected, or immediately if the cancellable is already cancelled. -- -- See Cancellable::cancelled for details on how to use this. -- -- Since GLib 2.40, the lock protecting cancellable is -- not held when callback is invoked. This lifts a -- restriction in place for earlier GLib versions which now makes it -- easier to write cleanup code that unconditionally invokes e.g. -- cancellableCancel. -- -- Since: 2.22 cancellableConnect :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> Callback -> m CULong -- | Disconnects a handler from a cancellable instance similar to -- signalHandlerDisconnect. 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 -- Cancellable::cancelled 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 Cancellable::cancelled for details on how to use -- this. -- -- If cancellable is Nothing or -- handlerId is 0 this function does nothing. -- -- Since: 2.22 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 cancellable is cancelled. -- -- You are not supposed to read from the fd yourself, just check for -- readable status. Reading to unset the readable status is done with -- cancellableReset. -- -- After a successful return from this function, you should use -- cancellableReleaseFd to free up resources allocated for the -- returned file descriptor. -- -- See also cancellableMakePollfd. 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 PollFD corresponding to cancellable; -- this can be passed to poll and used to poll for cancellation. -- This is useful both for unix systems without a native poll and for -- portability to windows. -- -- When this function returns True, you should use -- cancellableReleaseFd to free up resources allocated for the -- pollfd. After a False return, do not call -- cancellableReleaseFd. -- -- If this function returns False, either no -- cancellable was given or resource limits prevent this -- function from allocating the necessary structures for polling. (On -- Linux, you will likely have reached the maximum number of file -- descriptors.) The suggested way to handle these cases is to ignore the -- cancellable. -- -- You are not supposed to read from the fd yourself, just check for -- readable status. Reading to unset the readable status is done with -- cancellableReset. -- -- Since: 2.22 cancellableMakePollfd :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> PollFD -> m Bool -- | Creates a new Cancellable object. -- -- Applications that want to start one or more operations that should be -- cancellable should create a Cancellable and pass it to the -- operations. -- -- One Cancellable can be used in multiple consecutive operations -- or in multiple concurrent operations. cancellableNew :: (HasCallStack, MonadIO m) => m Cancellable -- | Pops cancellable off the cancellable stack (verifying -- that cancellable is on the top of the stack). cancellablePopCurrent :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m () -- | Pushes cancellable onto the cancellable stack. The -- current cancellable can then be received using -- cancellableGetCurrent. -- -- 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. File operations, -- so you rarely have to call this yourself. cancellablePushCurrent :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m () -- | Releases a resources previously allocated by cancellableGetFd -- or cancellableMakePollfd. -- -- For compatibility reasons with older releases, calling this function -- is not strictly required, the resources will be automatically freed -- when the cancellable is finalized. However, the -- cancellable will block scarce file descriptors until -- it is finalized if this function is not called. This can cause the -- application to run out of file descriptors when many -- GCancellables are used at the same time. -- -- Since: 2.22 cancellableReleaseFd :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m () -- | Resets cancellable 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. cancellableReset :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe a -> m () -- | If the cancellable 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 cancellable is -- cancelled and calls its callback of type CancellableSourceFunc. -- This is primarily useful for attaching to another (non-cancellable) -- source with sourceAddChildSource to add cancellability to it. -- -- For convenience, you can call this with a Nothing -- Cancellable, in which case the source will never trigger. -- -- The new Source will hold a reference to the Cancellable. -- -- Since: 2.28 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 -- signalHandlerDisconnect 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: cancellableConnect and -- cancellableDisconnect which protect against problems like this. -- -- An example of how to us this: -- --
-- // 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); ---- -- 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 cancelled signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after cancellable #cancelled callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterCancellableCancelled :: (IsCancellable a, MonadIO m) => a -> ((?self :: a) => CancellableCancelledCallback) -> m SignalHandlerId -- | Connect a signal handler for the cancelled signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on cancellable #cancelled callback --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.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 -- | GSeekable is implemented by streams (implementations of -- InputStream or OutputStream) that support seeking. -- -- Seekable streams largely fall into two categories: resizable and -- fixed-size. -- -- GSeekable on fixed-sized streams is approximately the same as -- POSIX `lseek()`) on a block device (for example: attempting to -- seek past the end of the device is an error). Fixed streams typically -- cannot be truncated. -- -- GSeekable on resizable streams is approximately the same as -- POSIX `lseek()`) 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 Seekable, for -- instance with toSeekable. class (GObject o, IsDescendantOf Seekable o) => IsSeekable o -- | Cast to Seekable, for types for which this is known to be safe. -- For general casts, use castTo. toSeekable :: (MonadIO m, IsSeekable o) => o -> m Seekable -- | Tests if the stream supports the SeekableIface. seekableCanSeek :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Bool -- | Tests if the length of the stream can be adjusted with -- seekableTruncate. seekableCanTruncate :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Bool -- | Seeks in the stream by the given offset, modified by -- type. -- -- 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 offset. If the stream -- was previously larger than offset, the extra data is -- discarded. If the stream was previously shorter than -- offset, it is extended with NUL ('\0') bytes. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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.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 -- | GPowerProfileMonitor 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: -- --
-- get powerProfileMonitor #powerSaverEnabled --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.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 -- | GMemoryMonitor will monitor system memory and suggest to the -- application when to free memory so as to leave more room for other -- applications. It is implemented on Linux using the Low Memory -- Monitor (API documentation). -- -- There is also an implementation for use inside Flatpak sandboxes. -- -- Possible actions to take when the signal is received are: -- --
-- static void
-- warning_cb (GMemoryMonitor *m, GMemoryMonitorWarningLevel level)
-- {
-- g_debug ("Warning level: %d", level);
-- if (warning_level > G_MEMORY_MONITOR_WARNING_LEVEL_LOW)
-- drop_caches ();
-- }
--
-- static GMemoryMonitor *
-- monitor_low_memory (void)
-- {
-- GMemoryMonitor *m;
-- m = g_memory_monitor_dup_default ();
-- g_signal_connect (G_OBJECT (m), "low-memory-warning",
-- G_CALLBACK (warning_cb), NULL);
-- return m;
-- }
--
--
-- Don’t forget to disconnect the MemoryMonitor::lowMemoryWarning
-- signal, and unref the GMemoryMonitor itself when exiting.
--
-- Since: 2.64
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 MemoryMonitor,
-- for instance with toMemoryMonitor.
class (GObject o, IsDescendantOf MemoryMonitor o) => IsMemoryMonitor o
-- | Cast to MemoryMonitor, for types for which this is known to be
-- safe. For general casts, use castTo.
toMemoryMonitor :: (MonadIO m, IsMemoryMonitor o) => o -> m MemoryMonitor
-- | Gets a reference to the default MemoryMonitor for the system.
--
-- Since: 2.64
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 MemoryMonitorWarningLevel documentation
-- for details.
--
-- Since: 2.64
type MemoryMonitorLowMemoryWarningCallback = MemoryMonitorWarningLevel -> IO ()
-- | Connect a signal handler for the lowMemoryWarning signal, to be
-- run after the default handler. When overloading is enabled,
-- this is equivalent to
--
-- -- after memoryMonitor #lowMemoryWarning callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMemoryMonitorLowMemoryWarning :: (IsMemoryMonitor a, MonadIO m) => a -> ((?self :: a) => MemoryMonitorLowMemoryWarningCallback) -> m SignalHandlerId -- | Connect a signal handler for the lowMemoryWarning signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on memoryMonitor #lowMemoryWarning callback --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.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 -- | GInitable 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 -- initableInit or asyncInitableInitAsync (the latter is -- only available if it also implements AsyncInitable). -- -- If the object is not initialized, or initialization returns with an -- error, then all operations on the object except -- g_object_ref() and g_object_unref() are considered -- to be invalid, and have undefined behaviour. They will often fail with -- GLib.critical or GLib.warning, 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 -- Initable.new() directly, or indirectly via a -- foo_thing_new() wrapper. This will call initableInit -- under the cover, returning NULL and setting a GError -- 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 -- GInitable during normal construction and automatically -- initialize them, throwing an exception on failure. -- -- Since: 2.22 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 Initable, for -- instance with toInitable. class (GObject o, IsDescendantOf Initable o) => IsInitable o -- | Cast to Initable, for types for which this is known to be safe. -- For general casts, use castTo. 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, -- g_initable_new() should typically be used instead. -- -- The object must be initialized before any real use after initial -- construction, either with this function or -- asyncInitableInitAsync. -- -- Implementations may also support cancellation. If -- cancellable is not Nothing, then initialization -- can be cancelled by triggering the cancellable object from another -- thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. If -- cancellable is not Nothing and the object -- doesn't support cancellable initialization the error -- IOErrorEnumNotSupported will be returned. -- -- If the object is not initialized, or initialization returns with an -- error, then all operations on the object except objectRef and -- objectUnref are considered to be invalid, and have undefined -- behaviour. See the [introduction][ginitable] for more details. -- -- Callers should not assume that a class which implements -- Initable can be initialized multiple times, unless the class -- explicitly documents itself as supporting this. Generally, a class’ -- implementation of init() can assume (and assert) that -- it will only be called once. Previously, this documentation -- recommended all Initable 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 -- ObjectClass.constructor that sometimes returns -- an existing instance. In this pattern, a caller would expect to be -- able to call initableInit on the result of -- g_object_new(), regardless of whether it is in fact a -- new instance. -- -- Since: 2.22 initableInit :: (HasCallStack, MonadIO m, IsInitable a, IsCancellable b) => a -> Maybe b -> m () -- | Helper function for constructing Initable object. This is -- similar to objectNewv but also initializes the object and -- returns Nothing, setting an error on failure. -- -- Since: 2.22 -- | Deprecated: (Since version 2.54)Use -- g_object_new_with_properties() andinitableInit -- instead. See Parameter for more information. 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.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 -- | GDebugController is an interface to expose control of -- debugging features and debug output. -- -- It is implemented on Linux using DebugControllerDBus, 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 -- DebugController:debugEnabled. This controls -- logSetDebugEnabled by default. Application code may connect to -- the Object::notify 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 -- GDebugController should be all that’s needed to dynamically -- enable or disable debug output. -- -- Since: 2.72 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 -- DebugController, for instance with toDebugController. class (GObject o, IsDescendantOf DebugController o) => IsDebugController o -- | Cast to DebugController, for types for which this is known to -- be safe. For general casts, use castTo. toDebugController :: (MonadIO m, IsDebugController o) => o -> m DebugController -- | Get the value of DebugController:debugEnabled. -- -- Since: 2.72 debugControllerGetDebugEnabled :: (HasCallStack, MonadIO m, IsDebugController a) => a -> m Bool -- | Set the value of DebugController:debugEnabled. -- -- Since: 2.72 debugControllerSetDebugEnabled :: (HasCallStack, MonadIO m, IsDebugController a) => a -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “debug-enabled” property. This is rarely needed directly, but -- it is used by new. constructDebugControllerDebugEnabled :: (IsDebugController o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “debug-enabled” property. When -- overloading is enabled, this is equivalent to -- --
-- get debugController #debugEnabled --getDebugControllerDebugEnabled :: (MonadIO m, IsDebugController o) => o -> m Bool -- | Set the value of the “debug-enabled” property. When -- overloading is enabled, this is equivalent to -- --
-- set debugController [ #debugEnabled := value ] --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.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 -- | GCharsetConverter is an implementation of Converter -- based on GLib.IConv. 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 -- CharsetConverter, for instance with toCharsetConverter. class (GObject o, IsDescendantOf CharsetConverter o) => IsCharsetConverter o -- | Cast to CharsetConverter, for types for which this is known to -- be safe. For general casts, use castTo. toCharsetConverter :: (MonadIO m, IsCharsetConverter o) => o -> m CharsetConverter -- | Gets the number of fallbacks that converter has -- applied so far. -- -- Since: 2.24 charsetConverterGetNumFallbacks :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Word32 -- | Gets the CharsetConverter:useFallback property. -- -- Since: 2.24 charsetConverterGetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Bool -- | Creates a new CharsetConverter. -- -- Since: 2.24 charsetConverterNew :: (HasCallStack, MonadIO m) => Text -> Text -> m CharsetConverter -- | Sets the CharsetConverter:useFallback property. -- -- Since: 2.24 charsetConverterSetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “from-charset” property. This is rarely needed directly, but -- it is used by new. constructCharsetConverterFromCharset :: (IsCharsetConverter o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “from-charset” property. When -- overloading is enabled, this is equivalent to -- --
-- get charsetConverter #fromCharset --getCharsetConverterFromCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “to-charset” property. This is rarely needed directly, but it -- is used by new. constructCharsetConverterToCharset :: (IsCharsetConverter o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “to-charset” property. When -- overloading is enabled, this is equivalent to -- --
-- get charsetConverter #toCharset --getCharsetConverterToCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “use-fallback” property. This is rarely needed directly, but -- it is used by new. constructCharsetConverterUseFallback :: (IsCharsetConverter o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “use-fallback” property. When -- overloading is enabled, this is equivalent to -- --
-- get charsetConverter #useFallback --getCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> m Bool -- | Set the value of the “use-fallback” property. When -- overloading is enabled, this is equivalent to -- --
-- set charsetConverter [ #useFallback := value ] --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.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 GCredentials type is a reference-counted wrapper for -- native credentials. -- -- The information in GCredentials 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. -- socketGetCredentials. -- -- Some operating systems supports securely sending and receiving -- credentials over a Unix Domain Socket, see -- UnixCredentialsMessage, unixConnectionSendCredentials -- and unixConnectionReceiveCredentials for details. -- -- On Linux, the native credential type is a struct ucred - see -- the `unix(7)` man page) for details. This corresponds to -- G_CREDENTIALS_TYPE_LINUX_UCRED. -- -- On Apple operating systems (including iOS, tvOS, and macOS), the -- native credential type is a struct xucred. This corresponds -- to G_CREDENTIALS_TYPE_APPLE_XUCRED. -- -- On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential -- type is a struct cmsgcred. This corresponds to -- G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED. -- -- On NetBSD, the native credential type is a struct unpcbid. -- This corresponds to G_CREDENTIALS_TYPE_NETBSD_UNPCBID. -- -- On OpenBSD, the native credential type is a struct -- sockpeercred. This corresponds to -- G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED. -- -- On Solaris (including OpenSolaris and its derivatives), the native -- credential type is a ucred_t. This corresponds to -- G_CREDENTIALS_TYPE_SOLARIS_UCRED. -- -- Since GLib 2.72, on Windows, the native credentials may contain the -- PID of a process. This corresponds to -- G_CREDENTIALS_TYPE_WIN32_PID. -- -- Since: 2.26 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 Credentials, -- for instance with toCredentials. class (GObject o, IsDescendantOf Credentials o) => IsCredentials o -- | Cast to Credentials, for types for which this is known to be -- safe. For general casts, use castTo. toCredentials :: (MonadIO m, IsCredentials o) => o -> m Credentials -- | Tries to get the UNIX process identifier from -- credentials. This method is only available on UNIX -- platforms. -- -- This operation can fail if Credentials is not supported on the -- OS or if the native credentials type does not contain information -- about the UNIX process ID. -- -- Since: 2.36 credentialsGetUnixPid :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Int32 -- | Tries to get the UNIX user identifier from -- credentials. This method is only available on UNIX -- platforms. -- -- This operation can fail if Credentials is not supported on the -- OS or if the native credentials type does not contain information -- about the UNIX user. -- -- Since: 2.26 credentialsGetUnixUser :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Word32 -- | Checks if credentials and -- otherCredentials is the same user. -- -- This operation can fail if Credentials is not supported on the -- the OS. -- -- Since: 2.26 credentialsIsSameUser :: (HasCallStack, MonadIO m, IsCredentials a, IsCredentials b) => a -> b -> m () -- | Creates a new Credentials object with credentials matching the -- the current process. -- -- Since: 2.26 credentialsNew :: (HasCallStack, MonadIO m) => m Credentials -- | Copies the native credentials of type nativeType from -- native into credentials. -- -- It is a programming error (which will cause a warning to be logged) to -- use this method if there is no Credentials support for the OS -- or if nativeType isn't supported by the OS. -- -- Since: 2.26 credentialsSetNative :: (HasCallStack, MonadIO m, IsCredentials a) => a -> CredentialsType -> Ptr () -> m () -- | Tries to set the UNIX user identifier on credentials. -- This method is only available on UNIX platforms. -- -- This operation can fail if Credentials 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. -- -- Since: 2.26 credentialsSetUnixUser :: (HasCallStack, MonadIO m, IsCredentials a) => a -> Word32 -> m () -- | Creates a human-readable textual representation of -- credentials that can be used in logging and debug -- messages. The format of the returned string may change in future GLib -- release. -- -- Since: 2.26 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.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 -- | GEmblem is an implementation of Icon that supports -- having an emblem, which is an icon with additional properties. It can -- than be added to a EmblemedIcon. -- -- 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 Emblem, for -- instance with toEmblem. class (GObject o, IsDescendantOf Emblem o) => IsEmblem o -- | Cast to Emblem, for types for which this is known to be safe. -- For general casts, use castTo. toEmblem :: (MonadIO m, IsEmblem o) => o -> m Emblem -- | Gives back the icon from emblem. -- -- Since: 2.18 emblemGetIcon :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m Icon -- | Gets the origin of the emblem. -- -- Since: 2.18 emblemGetOrigin :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m EmblemOrigin -- | Creates a new emblem for icon. -- -- Since: 2.18 emblemNew :: (HasCallStack, MonadIO m, IsIcon a) => a -> m Emblem -- | Creates a new emblem for icon. -- -- Since: 2.18 emblemNewWithOrigin :: (HasCallStack, MonadIO m, IsIcon a) => a -> EmblemOrigin -> m Emblem -- | Construct a GValueConstruct with valid value for the -- “icon” property. This is rarely needed directly, but it is -- used by new. constructEmblemIcon :: (IsEmblem o, MonadIO m, IsObject a) => a -> m (GValueConstruct o) -- | Get the value of the “icon” property. When overloading -- is enabled, this is equivalent to -- --
-- get emblem #icon --getEmblemIcon :: (MonadIO m, IsEmblem o) => o -> m (Maybe Object) -- | Construct a GValueConstruct with valid value for the -- “origin” property. This is rarely needed directly, but it is -- used by new. constructEmblemOrigin :: (IsEmblem o, MonadIO m) => EmblemOrigin -> m (GValueConstruct o) -- | Get the value of the “origin” property. When -- overloading is enabled, this is equivalent to -- --
-- get emblem #origin --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.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 -- | GEmblemedIcon is an implementation of Icon that -- supports adding an emblem to an icon. Adding multiple emblems to an -- icon is ensured via emblemedIconAddEmblem. -- -- Note that GEmblemedIcon allows no control over the position -- of the emblems. See also Emblem 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 EmblemedIcon, -- for instance with toEmblemedIcon. class (GObject o, IsDescendantOf EmblemedIcon o) => IsEmblemedIcon o -- | Cast to EmblemedIcon, for types for which this is known to be -- safe. For general casts, use castTo. toEmblemedIcon :: (MonadIO m, IsEmblemedIcon o) => o -> m EmblemedIcon -- | Adds emblem to the List of -- GEmblems. -- -- Since: 2.18 emblemedIconAddEmblem :: (HasCallStack, MonadIO m, IsEmblemedIcon a, IsEmblem b) => a -> b -> m () -- | Removes all the emblems from icon. -- -- Since: 2.28 emblemedIconClearEmblems :: (HasCallStack, MonadIO m, IsEmblemedIcon a) => a -> m () -- | Gets the list of emblems for the icon. -- -- Since: 2.18 emblemedIconGetEmblems :: (HasCallStack, MonadIO m, IsEmblemedIcon a) => a -> m [Emblem] -- | Gets the main icon for emblemed. -- -- Since: 2.18 emblemedIconGetIcon :: (HasCallStack, MonadIO m, IsEmblemedIcon a) => a -> m Icon -- | Creates a new emblemed icon for icon with the emblem -- emblem. -- -- Since: 2.18 emblemedIconNew :: (HasCallStack, MonadIO m, IsIcon a, IsEmblem b) => a -> Maybe b -> m EmblemedIcon -- | Construct a GValueConstruct with valid value for the -- “gicon” property. This is rarely needed directly, but it is -- used by new. constructEmblemedIconGicon :: (IsEmblemedIcon o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o) -- | Get the value of the “gicon” property. When -- overloading is enabled, this is equivalent to -- --
-- get emblemedIcon #gicon --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.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 -- FilenameCompleter, for instance with -- toFilenameCompleter. class (GObject o, IsDescendantOf FilenameCompleter o) => IsFilenameCompleter o -- | Cast to FilenameCompleter, for types for which this is known to -- be safe. For general casts, use castTo. toFilenameCompleter :: (MonadIO m, IsFilenameCompleter o) => o -> m FilenameCompleter -- | Obtains a completion for initialText from -- completer. 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 dirsOnly is True, completer -- will only complete directory names, and not file names. 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 gotCompletionData signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after filenameCompleter #gotCompletionData callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> ((?self :: a) => FilenameCompleterGotCompletionDataCallback) -> m SignalHandlerId -- | Connect a signal handler for the gotCompletionData signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on filenameCompleter #gotCompletionData callback --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.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 -- | GInetAddress represents an IPv4 or IPv6 internet address. Use -- resolverLookupByName or resolverLookupByNameAsync to -- look up the GInetAddress for a hostname. Use -- resolverLookupByAddress or resolverLookupByAddressAsync -- to look up the hostname for a GInetAddress. -- -- To actually connect to a remote host, you will need a -- InetSocketAddress (which includes a GInetAddress 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 InetAddress, -- for instance with toInetAddress. class (GObject o, IsDescendantOf InetAddress o) => IsInetAddress o -- | Cast to InetAddress, for types for which this is known to be -- safe. For general casts, use castTo. toInetAddress :: (MonadIO m, IsInetAddress o) => o -> m InetAddress -- | Checks if two InetAddress instances are equal, e.g. the same -- address. -- -- Since: 2.30 inetAddressEqual :: (HasCallStack, MonadIO m, IsInetAddress a, IsInetAddress b) => a -> b -> m Bool -- | Gets address's family -- -- Since: 2.22 inetAddressGetFamily :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m SocketFamily -- | Tests whether address is the "any" address for its -- family. -- -- Since: 2.22 inetAddressGetIsAny :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is a link-local address (that -- is, if it identifies a host on a local network that is not connected -- to the Internet). -- -- Since: 2.22 inetAddressGetIsLinkLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is the loopback address for its -- family. -- -- Since: 2.22 inetAddressGetIsLoopback :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is a global multicast address. -- -- Since: 2.22 inetAddressGetIsMcGlobal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is a link-local multicast -- address. -- -- Since: 2.22 inetAddressGetIsMcLinkLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is a node-local multicast -- address. -- -- Since: 2.22 inetAddressGetIsMcNodeLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is an organization-local -- multicast address. -- -- Since: 2.22 inetAddressGetIsMcOrgLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is a site-local multicast -- address. -- -- Since: 2.22 inetAddressGetIsMcSiteLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is a multicast address. -- -- Since: 2.22 inetAddressGetIsMulticast :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Tests whether address is a site-local address such as -- 10.0.0.1 (that is, the address identifies a host on a local network -- that can not be reached directly from the Internet, but which may have -- outgoing Internet connectivity via a NAT or firewall). -- -- Since: 2.22 inetAddressGetIsSiteLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool -- | Gets the size of the native raw binary address for -- address. This is the size of the data that you get -- from g_inet_address_to_bytes(). -- -- Since: 2.22 inetAddressGetNativeSize :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m CSize -- | Creates a InetAddress for the "any" address (unassigned/"don't -- care") for family. -- -- Since: 2.22 inetAddressNewAny :: (HasCallStack, MonadIO m) => SocketFamily -> m InetAddress -- | Creates a new InetAddress from the given family -- and bytes. bytes should be 4 bytes for -- SocketFamilyIpv4 and 16 bytes for SocketFamilyIpv6. -- -- Since: 2.22 inetAddressNewFromBytes :: (HasCallStack, MonadIO m) => Ptr Word8 -> SocketFamily -> m InetAddress -- | Parses string as an IP address and creates a new -- InetAddress. -- -- Since: 2.22 inetAddressNewFromString :: (HasCallStack, MonadIO m) => Text -> m (Maybe InetAddress) -- | Creates a InetAddress for the loopback address for -- family. -- -- Since: 2.22 inetAddressNewLoopback :: (HasCallStack, MonadIO m) => SocketFamily -> m InetAddress -- | Converts address to string form. -- -- Since: 2.22 inetAddressToString :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Text -- | Construct a GValueConstruct with valid value for the -- “bytes” property. This is rarely needed directly, but it is -- used by new. constructInetAddressBytes :: (IsInetAddress o, MonadIO m) => Ptr () -> m (GValueConstruct o) -- | Get the value of the “bytes” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #bytes --getInetAddressBytes :: (MonadIO m, IsInetAddress o) => o -> m (Ptr ()) -- | Construct a GValueConstruct with valid value for the -- “family” property. This is rarely needed directly, but it is -- used by new. constructInetAddressFamily :: (IsInetAddress o, MonadIO m) => SocketFamily -> m (GValueConstruct o) -- | Get the value of the “family” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #family --getInetAddressFamily :: (MonadIO m, IsInetAddress o) => o -> m SocketFamily -- | Get the value of the “is-any” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isAny --getInetAddressIsAny :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-link-local” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isLinkLocal --getInetAddressIsLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-loopback” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isLoopback --getInetAddressIsLoopback :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-mc-global” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isMcGlobal --getInetAddressIsMcGlobal :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-mc-link-local” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isMcLinkLocal --getInetAddressIsMcLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-mc-node-local” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isMcNodeLocal --getInetAddressIsMcNodeLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-mc-org-local” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isMcOrgLocal --getInetAddressIsMcOrgLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-mc-site-local” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isMcSiteLocal --getInetAddressIsMcSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-multicast” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isMulticast --getInetAddressIsMulticast :: (MonadIO m, IsInetAddress o) => o -> m Bool -- | Get the value of the “is-site-local” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddress #isSiteLocal --getInetAddressIsSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool 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.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 -- | GInetAddressMask 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, 10.0.0.0/8, or -- fe80::/10. -- -- Since: 2.32 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 -- InetAddressMask, for instance with toInetAddressMask. class (GObject o, IsDescendantOf InetAddressMask o) => IsInetAddressMask o -- | Cast to InetAddressMask, for types for which this is known to -- be safe. For general casts, use castTo. toInetAddressMask :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddressMask -- | Tests if mask and mask2 are the same -- mask. -- -- Since: 2.32 inetAddressMaskEqual :: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddressMask b) => a -> b -> m Bool -- | Gets mask's base address -- -- Since: 2.32 inetAddressMaskGetAddress :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m InetAddress -- | Gets the SocketFamily of mask's address -- -- Since: 2.32 inetAddressMaskGetFamily :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m SocketFamily -- | Gets mask's length -- -- Since: 2.32 inetAddressMaskGetLength :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Word32 -- | Tests if address falls within the range described by -- mask. -- -- Since: 2.32 inetAddressMaskMatches :: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddress b) => a -> b -> m Bool -- | Creates a new InetAddressMask representing all addresses whose -- first length bits match addr. -- -- Since: 2.32 inetAddressMaskNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word32 -> m InetAddressMask -- | Parses maskString as an IP address and (optional) -- length, and creates a new InetAddressMask. 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. -- -- Since: 2.32 inetAddressMaskNewFromString :: (HasCallStack, MonadIO m) => Text -> m InetAddressMask -- | Converts mask back to its corresponding string form. -- -- Since: 2.32 inetAddressMaskToString :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Text -- | Set the value of the “address” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #address --clearInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “address” property. This is rarely needed directly, but it is -- used by new. constructInetAddressMaskAddress :: (IsInetAddressMask o, MonadIO m, IsInetAddress a) => a -> m (GValueConstruct o) -- | Get the value of the “address” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddressMask #address --getInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddress -- | Set the value of the “address” property. When -- overloading is enabled, this is equivalent to -- --
-- set inetAddressMask [ #address := value ] --setInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o, IsInetAddress a) => o -> a -> m () -- | Get the value of the “family” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddressMask #family --getInetAddressMaskFamily :: (MonadIO m, IsInetAddressMask o) => o -> m SocketFamily -- | Construct a GValueConstruct with valid value for the -- “length” property. This is rarely needed directly, but it is -- used by new. constructInetAddressMaskLength :: (IsInetAddressMask o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “length” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetAddressMask #length --getInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> m Word32 -- | Set the value of the “length” property. When -- overloading is enabled, this is equivalent to -- --
-- set inetAddressMask [ #length := value ] --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.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 -- | GListStore is a simple implementation of ListModel -- 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 ListStore, for -- instance with toListStore. class (GObject o, IsDescendantOf ListStore o) => IsListStore o -- | Cast to ListStore, for types for which this is known to be -- safe. For general casts, use castTo. toListStore :: (MonadIO m, IsListStore o) => o -> m ListStore -- | Appends item to store. -- item must be of type ListStore:itemType. -- -- This function takes a ref on item. -- -- Use listStoreSplice to append multiple items at the same time -- efficiently. -- -- Since: 2.44 listStoreAppend :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> m () -- | Looks up the given item in the list store by looping -- over the items until the first occurrence of item. If -- item was not found, then position will -- not be set, and this method will return False. -- -- If you need to compare the two items with a custom comparison -- function, use listStoreFindWithEqualFunc with a custom -- EqualFunc instead. -- -- Since: 2.64 listStoreFind :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> m (Bool, Word32) -- | Looks up the given item in the list store by looping -- over the items and comparing them with equalFunc until -- the first occurrence of item which matches. If -- item was not found, then position will -- not be set, and this method will return False. -- -- item is always passed as second parameter to -- equalFunc. -- -- Since GLib 2.76 it is possible to pass NULL for -- item. -- -- Since: 2.64 listStoreFindWithEqualFunc :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Maybe b -> EqualFunc -> m (Bool, Word32) -- | Like listStoreFindWithEqualFunc but with an additional -- userData that is passed to equalFunc. -- -- item is always passed as second parameter to -- equalFunc. -- -- Since GLib 2.76 it is possible to pass NULL for -- item. -- -- Since: 2.74 listStoreFindWithEqualFuncFull :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Maybe b -> EqualFuncFull -> m (Bool, Word32) -- | Inserts item into store at -- position. item must be of type -- ListStore:itemType or derived from it. position -- must be smaller than the length of the list, or equal to it to append. -- -- This function takes a ref on item. -- -- Use listStoreSplice to insert multiple items at the same time -- efficiently. -- -- Since: 2.44 listStoreInsert :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Word32 -> b -> m () -- | Inserts item into store at a position -- to be determined by the compareFunc. -- -- The list must already be sorted before calling this function or the -- result is undefined. Usually you would approach this by only ever -- inserting items by way of this function. -- -- This function takes a ref on item. -- -- Since: 2.44 listStoreInsertSorted :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> CompareDataFunc -> m Word32 -- | Creates a new ListStore with items of type -- itemType. itemType must be a subclass -- of Object. -- -- Since: 2.44 listStoreNew :: (HasCallStack, MonadIO m) => GType -> m ListStore -- | Removes the item from store that is at -- position. position must be smaller -- than the current length of the list. -- -- Use listStoreSplice to remove multiple items at the same time -- efficiently. -- -- Since: 2.44 listStoreRemove :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> m () -- | Removes all items from store. -- -- Since: 2.44 listStoreRemoveAll :: (HasCallStack, MonadIO m, IsListStore a) => a -> m () -- | Sort the items in store according to -- compareFunc. -- -- Since: 2.46 listStoreSort :: (HasCallStack, MonadIO m, IsListStore a) => a -> CompareDataFunc -> m () -- | Changes store by removing nRemovals -- items and adding nAdditions items to it. -- additions must contain nAdditions -- items of type ListStore:itemType. Nothing is not -- permitted. -- -- This function is more efficient than listStoreInsert and -- listStoreRemove, because it only emits -- ListModel::itemsChanged once for the change. -- -- This function takes a ref on each item in additions. -- -- The parameters position and nRemovals -- must be correct (ie: position + -- nRemovals must be less than or equal to the length of -- the list at the time this function is called). -- -- Since: 2.44 listStoreSplice :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> Word32 -> [Object] -> m () -- | Construct a GValueConstruct with valid value for the -- “item-type” property. This is rarely needed directly, but it -- is used by new. constructListStoreItemType :: (IsListStore o, MonadIO m) => GType -> m (GValueConstruct o) -- | Get the value of the “item-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get listStore #itemType --getListStoreItemType :: (MonadIO m, IsListStore o) => o -> m GType -- | Get the value of the “n-items” property. When -- overloading is enabled, this is equivalent to -- --
-- get listStore #nItems --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.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 -- | MenuAttributeIter is an opaque structure type. You must access -- it using the functions below. -- -- Since: 2.32 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 -- MenuAttributeIter, for instance with -- toMenuAttributeIter. class (GObject o, IsDescendantOf MenuAttributeIter o) => IsMenuAttributeIter o -- | Cast to MenuAttributeIter, for types for which this is known to -- be safe. For general casts, use castTo. 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. -- -- Since: 2.32 menuAttributeIterGetName :: (HasCallStack, MonadIO m, IsMenuAttributeIter a) => a -> m Text -- | This function combines menuAttributeIterNext with -- menuAttributeIterGetName and menuAttributeIterGetValue. -- -- First the iterator is advanced to the next (possibly first) attribute. -- If that fails, then False is returned and there are no other -- effects. -- -- If successful, name and value are set -- to the name and value of the attribute that has just been advanced to. -- At this point, menuAttributeIterGetName and -- menuAttributeIterGetValue will return the same values again. -- -- The value returned in name remains valid for as long -- as the iterator remains at the current position. The value returned in -- value must be unreffed using variantUnref when -- it is no longer in use. -- -- Since: 2.32 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. -- -- Since: 2.32 menuAttributeIterGetValue :: (HasCallStack, MonadIO m, IsMenuAttributeIter a) => a -> m GVariant -- | Attempts to advance the iterator to the next (possibly first) -- attribute. -- -- True is returned on success, or False 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). -- -- Since: 2.32 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.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 -- | GMenuModel 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 GMenuModel is hierarchical: -- sections and submenus are again represented by GMenuModels. -- Menus themselves do not define their own roles. Rather, the role of a -- particular GMenuModel 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: -- --
-- after menuModel #itemsChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMenuModelItemsChanged :: (IsMenuModel a, MonadIO m) => a -> ((?self :: a) => MenuModelItemsChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the itemsChanged signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on menuModel #itemsChanged callback --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.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 -- | MenuLinkIter is an opaque structure type. You must access it -- using the functions below. -- -- Since: 2.32 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 MenuLinkIter, -- for instance with toMenuLinkIter. class (GObject o, IsDescendantOf MenuLinkIter o) => IsMenuLinkIter o -- | Cast to MenuLinkIter, for types for which this is known to be -- safe. For general casts, use castTo. toMenuLinkIter :: (MonadIO m, IsMenuLinkIter o) => o -> m MenuLinkIter -- | Gets the name of the link at the current iterator position. -- -- The iterator is not advanced. -- -- Since: 2.32 menuLinkIterGetName :: (HasCallStack, MonadIO m, IsMenuLinkIter a) => a -> m Text -- | This function combines menuLinkIterNext with -- menuLinkIterGetName and menuLinkIterGetValue. -- -- First the iterator is advanced to the next (possibly first) link. If -- that fails, then False is returned and there are no other -- effects. -- -- If successful, outLink and value are -- set to the name and MenuModel of the link that has just been -- advanced to. At this point, menuLinkIterGetName and -- menuLinkIterGetValue will return the same values again. -- -- The value returned in outLink remains valid for as -- long as the iterator remains at the current position. The value -- returned in value must be unreffed using -- objectUnref when it is no longer in use. -- -- Since: 2.32 menuLinkIterGetNext :: (HasCallStack, MonadIO m, IsMenuLinkIter a) => a -> m (Bool, Text, MenuModel) -- | Gets the linked MenuModel at the current iterator position. -- -- The iterator is not advanced. -- -- Since: 2.32 menuLinkIterGetValue :: (HasCallStack, MonadIO m, IsMenuLinkIter a) => a -> m MenuModel -- | Attempts to advance the iterator to the next (possibly first) link. -- -- True is returned on success, or False if there are no -- more links. -- -- You must call this function when you first acquire the iterator to -- advance it to the first link (and determine if the first link exists -- at all). -- -- Since: 2.32 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.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 -- | MenuItem is an opaque structure type. You must access it using -- the functions below. -- -- Since: 2.32 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 MenuItem, for -- instance with toMenuItem. class (GObject o, IsDescendantOf MenuItem o) => IsMenuItem o -- | Cast to MenuItem, for types for which this is known to be safe. -- For general casts, use castTo. toMenuItem :: (MonadIO m, IsMenuItem o) => o -> m MenuItem -- | Queries the named attribute on -- menuItem. -- -- If expectedType is specified and the attribute does -- not have this type, Nothing is returned. Nothing is also -- returned if the attribute simply does not exist. -- -- Since: 2.34 menuItemGetAttributeValue :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> Maybe VariantType -> m (Maybe GVariant) -- | Queries the named link on menuItem. -- -- Since: 2.34 menuItemGetLink :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> m (Maybe MenuModel) -- | Creates a new MenuItem. -- -- If label is non-Nothing it is used to set the -- "label" attribute of the new item. -- -- If detailedAction is non-Nothing it is used to -- set the "action" and possibly the "target" attribute of the new item. -- See menuItemSetDetailedAction for more information. -- -- Since: 2.32 menuItemNew :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe Text -> m MenuItem -- | Creates a MenuItem as an exact copy of an existing menu item in -- a MenuModel. -- -- itemIndex must be valid (ie: be sure to call -- menuModelGetNItems first). -- -- Since: 2.34 menuItemNewFromModel :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> Int32 -> m MenuItem -- | Creates a new MenuItem representing a section. -- -- This is a convenience API around menuItemNew and -- menuItemSetSection. -- -- The effect of having one menu appear as a section of another is -- exactly as it sounds: the items from section become a -- direct part of the menu that menuItem is added to. -- -- Visual separation is typically displayed between two non-empty -- sections. If label is non-Nothing 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 Menu 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: -- --
-- <menu id='edit-menu'> -- <section> -- <item label='Undo'/> -- <item label='Redo'/> -- </section> -- <section> -- <item label='Cut'/> -- <item label='Copy'/> -- <item label='Paste'/> -- </section> -- </menu> ---- -- 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). -- --
-- <menu id='edit-menu'> -- <item> -- <link name='section'> -- <item label='Undo'/> -- <item label='Redo'/> -- </link> -- </item> -- <item> -- <link name='section'> -- <item label='Cut'/> -- <item label='Copy'/> -- <item label='Paste'/> -- </link> -- </item> -- </menu> ---- -- Since: 2.32 menuItemNewSection :: (HasCallStack, MonadIO m, IsMenuModel a) => Maybe Text -> a -> m MenuItem -- | Creates a new MenuItem representing a submenu. -- -- This is a convenience API around menuItemNew and -- menuItemSetSubmenu. -- -- Since: 2.32 menuItemNewSubmenu :: (HasCallStack, MonadIO m, IsMenuModel a) => Maybe Text -> a -> m MenuItem -- | Sets or unsets the "action" and "target" attributes of -- menuItem. -- -- If action is Nothing then both the "action" and -- "target" attributes are unset (and targetValue is -- ignored). -- -- If action is non-Nothing then the "action" -- attribute is set. The "target" attribute is then set to the value of -- targetValue if it is non-Nothing 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 Action -- and ActionGroup for an overview of actions. -- -- In general, clicking on the menu item will result in activation of the -- named action with the "target" attribute given as the parameter to the -- action invocation. If the "target" attribute is not set then the -- action is invoked with no parameter. -- -- If the action has no state then the menu item is usually drawn as a -- plain menu item (ie: with no additional decoration). -- -- If the action has a boolean state then the menu item is usually drawn -- as a toggle menu item (ie: with a checkmark or equivalent indication). -- The item should be marked as 'toggled' or 'checked' when the boolean -- state is True. -- -- If the action has a string state then the menu item is usually drawn -- as a radio menu item (ie: with a radio bullet or equivalent -- indication). The item should be marked as 'selected' when the string -- state is equal to the value of the target property. -- -- See g_menu_item_set_action_and_target() or -- menuItemSetDetailedAction for two equivalent calls that are -- probably more convenient for most uses. -- -- Since: 2.32 menuItemSetActionAndTargetValue :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Maybe Text -> Maybe GVariant -> m () -- | Sets or unsets an attribute on menuItem. -- -- The attribute to set or unset is specified by -- attribute. This can be one of the standard attribute -- names MENU_ATTRIBUTE_LABEL, MENU_ATTRIBUTE_ACTION, -- MENU_ATTRIBUTE_TARGET, or a custom attribute name. Attribute -- names are restricted to lowercase characters, numbers and '-'. -- Furthermore, the names must begin with a lowercase character, must not -- end with a '-', and must not contain consecutive dashes. -- -- must consist only of lowercase ASCII characters, digits and '-'. -- -- If value is non-Nothing then it is used as the -- new value for the attribute. If value is -- Nothing then the attribute is unset. If the -- value GVariant is floating, it is consumed. -- -- See also g_menu_item_set_attribute() for a more -- convenient way to do the same. -- -- Since: 2.32 menuItemSetAttributeValue :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> Maybe GVariant -> m () -- | Sets the "action" and possibly the "target" attribute of -- menuItem. -- -- The format of detailedAction is the same format parsed -- by actionParseDetailedName. -- -- See g_menu_item_set_action_and_target() or -- menuItemSetActionAndTargetValue for more flexible (but slightly -- less convenient) alternatives. -- -- See also menuItemSetActionAndTargetValue for a description of -- the semantics of the action and target attributes. -- -- Since: 2.32 menuItemSetDetailedAction :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> m () -- | Sets (or unsets) the icon on menuItem. -- -- This call is the same as calling iconSerialize and using the -- result as the value to menuItemSetAttributeValue for -- MENU_ATTRIBUTE_ICON. -- -- 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 icon is Nothing then the icon is unset. -- -- Since: 2.38 menuItemSetIcon :: (HasCallStack, MonadIO m, IsMenuItem a, IsIcon b) => a -> b -> m () -- | Sets or unsets the "label" attribute of menuItem. -- -- If label is non-Nothing it is used as the label -- for the menu item. If it is Nothing then the label attribute is -- unset. -- -- Since: 2.32 menuItemSetLabel :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Maybe Text -> m () -- | Creates a link from menuItem to model -- if non-Nothing, or unsets it. -- -- Links are used to establish a relationship between a particular menu -- item and another menu. For example, MENU_LINK_SUBMENU is used -- to associate a submenu with a particular menu item, and -- MENU_LINK_SECTION is used to create a section. Other types of -- link can be used, but there is no guarantee that clients will be able -- to make sense of them. Link types are restricted to lowercase -- characters, numbers and '-'. Furthermore, the names must begin with a -- lowercase character, must not end with a '-', and must not contain -- consecutive dashes. -- -- Since: 2.32 menuItemSetLink :: (HasCallStack, MonadIO m, IsMenuItem a, IsMenuModel b) => a -> Text -> Maybe b -> m () -- | Sets or unsets the "section" link of menuItem to -- section. -- -- The effect of having one menu appear as a section of another is -- exactly as it sounds: the items from section become a -- direct part of the menu that menuItem is added to. See -- menuItemNewSection for more information about what it means for -- a menu item to be a section. -- -- Since: 2.32 menuItemSetSection :: (HasCallStack, MonadIO m, IsMenuItem a, IsMenuModel b) => a -> Maybe b -> m () -- | Sets or unsets the "submenu" link of menuItem to -- submenu. -- -- If submenu is non-Nothing, it is linked to. If -- it is Nothing then the link is unset. -- -- The effect of having one menu appear as a submenu of another is -- exactly as it sounds. -- -- Since: 2.32 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.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 -- | GMenu is a simple implementation of MenuModel. You -- populate a GMenu by adding MenuItem instances to it. -- -- There are some convenience functions to allow you to directly add -- items (avoiding MenuItem) for the common cases. To add a -- regular item, use menuInsert. To add a section, use -- menuInsertSection. To add a submenu, use -- menuInsertSubmenu. -- -- Since: 2.32 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 Menu, for -- instance with toMenu. class (GObject o, IsDescendantOf Menu o) => IsMenu o -- | Cast to Menu, for types for which this is known to be safe. For -- general casts, use castTo. toMenu :: (MonadIO m, IsMenu o) => o -> m Menu -- | Convenience function for appending a normal menu item to the end of -- menu. Combine menuItemNew and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 menuAppend :: (HasCallStack, MonadIO m, IsMenu a) => a -> Maybe Text -> Maybe Text -> m () -- | Appends item to the end of menu. -- -- See menuInsertItem for more information. -- -- Since: 2.32 menuAppendItem :: (HasCallStack, MonadIO m, IsMenu a, IsMenuItem b) => a -> b -> m () -- | Convenience function for appending a section menu item to the end of -- menu. Combine menuItemNewSection and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 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 -- menu. Combine menuItemNewSubmenu and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 menuAppendSubmenu :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Maybe Text -> b -> m () -- | Marks menu 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 Menu API must no -- longer be used. -- -- This function causes menuModelIsMutable to begin returning -- False, which has some positive performance implications. -- -- Since: 2.32 menuFreeze :: (HasCallStack, MonadIO m, IsMenu a) => a -> m () -- | Convenience function for inserting a normal menu item into -- menu. Combine menuItemNew and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 menuInsert :: (HasCallStack, MonadIO m, IsMenu a) => a -> Int32 -> Maybe Text -> Maybe Text -> m () -- | Inserts item into menu. -- -- The "insertion" is actually done by copying all of the attribute and -- link values of item and using them to form a new item -- within menu. As such, item itself is -- not really inserted, but rather, a menu item that is exactly the same -- as the one presently described by item. -- -- This means that item is essentially useless after the -- insertion occurs. Any changes you make to it are ignored unless it is -- inserted again (at which point its updated values will be copied). -- -- You should probably just free item once you're done. -- -- There are many convenience functions to take care of common cases. See -- menuInsert, menuInsertSection and -- menuInsertSubmenu as well as "prepend" and "append" variants of -- each of these functions. -- -- Since: 2.32 menuInsertItem :: (HasCallStack, MonadIO m, IsMenu a, IsMenuItem b) => a -> Int32 -> b -> m () -- | Convenience function for inserting a section menu item into -- menu. Combine menuItemNewSection and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 menuInsertSection :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Int32 -> Maybe Text -> b -> m () -- | Convenience function for inserting a submenu menu item into -- menu. Combine menuItemNewSubmenu and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 menuInsertSubmenu :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Int32 -> Maybe Text -> b -> m () -- | Creates a new Menu. -- -- The new menu has no items. -- -- Since: 2.32 menuNew :: (HasCallStack, MonadIO m) => m Menu -- | Convenience function for prepending a normal menu item to the start of -- menu. Combine menuItemNew and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 menuPrepend :: (HasCallStack, MonadIO m, IsMenu a) => a -> Maybe Text -> Maybe Text -> m () -- | Prepends item to the start of menu. -- -- See menuInsertItem for more information. -- -- Since: 2.32 menuPrependItem :: (HasCallStack, MonadIO m, IsMenu a, IsMenuItem b) => a -> b -> m () -- | Convenience function for prepending a section menu item to the start -- of menu. Combine menuItemNewSection and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 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 menu. Combine menuItemNewSubmenu and -- menuInsertItem for a more flexible alternative. -- -- Since: 2.32 menuPrependSubmenu :: (HasCallStack, MonadIO m, IsMenu a, IsMenuModel b) => a -> Maybe Text -> b -> m () -- | Removes an item from the menu. -- -- position 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). -- -- Since: 2.32 menuRemove :: (HasCallStack, MonadIO m, IsMenu a) => a -> Int32 -> m () -- | Removes all items in the menu. -- -- Since: 2.38 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.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 -- | GMountOperation 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 GMountOperation is used for more than just -- Mount objects – for example it is also used in -- driveStart and driveStop. -- -- Users should instantiate a subclass of this that implements all the -- various callbacks to show the required dialogs, such as -- `GtkMountOperation`. If no user interaction is desired (for -- example when automounting filesystems at login time), usually -- NULL can be passed, see each method taking a -- GMountOperation for details. -- -- Throughout the API, the term ‘TCRYPT’ is used to mean ‘compatible with -- TrueCrypt and VeraCrypt’. TrueCrypt is a discontinued system -- for encrypting file containers, partitions or whole disks, typically -- used with Windows. VeraCrypt 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 -- MountOperation, for instance with toMountOperation. class (GObject o, IsDescendantOf MountOperation o) => IsMountOperation o -- | Cast to MountOperation, for types for which this is known to be -- safe. For general casts, use castTo. 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. -- -- Since: 2.58 mountOperationGetIsTcryptHiddenVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool -- | Check to see whether the mount operation is being used for a TCRYPT -- system volume. -- -- Since: 2.58 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. -- -- Since: 2.58 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 MountOperation::reply signal. mountOperationReply :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> MountOperationResult -> m () -- | Sets the mount operation to use an anonymous user if -- anonymous is True. 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 -- hiddenVolume is True. -- -- Since: 2.58 mountOperationSetIsTcryptHiddenVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m () -- | Sets the mount operation to use a system volume if -- systemVolume is True. -- -- Since: 2.58 mountOperationSetIsTcryptSystemVolume :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m () -- | Sets the mount operation's password to password. 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 pim. -- -- Since: 2.58 mountOperationSetPim :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Word32 -> m () -- | Sets the user name within op to -- username. mountOperationSetUsername :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Maybe Text -> m () -- | Construct a GValueConstruct with valid value for the -- “anonymous” property. This is rarely needed directly, but it -- is used by new. constructMountOperationAnonymous :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “anonymous” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #anonymous --getMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> m Bool -- | Set the value of the “anonymous” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #anonymous := value ] --setMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “choice” property. This is rarely needed directly, but it is -- used by new. constructMountOperationChoice :: (IsMountOperation o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “choice” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #choice --getMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> m Int32 -- | Set the value of the “choice” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #choice := value ] --setMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> Int32 -> m () -- | Set the value of the “domain” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #domain --clearMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “domain” property. This is rarely needed directly, but it is -- used by new. constructMountOperationDomain :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “domain” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #domain --getMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text) -- | Set the value of the “domain” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #domain := value ] --setMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “is-tcrypt-hidden-volume” property. This is rarely needed -- directly, but it is used by new. constructMountOperationIsTcryptHiddenVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “is-tcrypt-hidden-volume” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #isTcryptHiddenVolume --getMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool -- | Set the value of the “is-tcrypt-hidden-volume” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #isTcryptHiddenVolume := value ] --setMountOperationIsTcryptHiddenVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “is-tcrypt-system-volume” property. This is rarely needed -- directly, but it is used by new. constructMountOperationIsTcryptSystemVolume :: (IsMountOperation o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “is-tcrypt-system-volume” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #isTcryptSystemVolume --getMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> m Bool -- | Set the value of the “is-tcrypt-system-volume” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #isTcryptSystemVolume := value ] --setMountOperationIsTcryptSystemVolume :: (MonadIO m, IsMountOperation o) => o -> Bool -> m () -- | Set the value of the “password” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #password --clearMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “password” property. This is rarely needed directly, but it -- is used by new. constructMountOperationPassword :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “password” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #password --getMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text) -- | Set the value of the “password” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #password := value ] --setMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “password-save” property. This is rarely needed directly, but -- it is used by new. constructMountOperationPasswordSave :: (IsMountOperation o, MonadIO m) => PasswordSave -> m (GValueConstruct o) -- | Get the value of the “password-save” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #passwordSave --getMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> m PasswordSave -- | Set the value of the “password-save” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #passwordSave := value ] --setMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> PasswordSave -> m () -- | Construct a GValueConstruct with valid value for the -- “pim” property. This is rarely needed directly, but it is -- used by new. constructMountOperationPim :: (IsMountOperation o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “pim” property. When overloading -- is enabled, this is equivalent to -- --
-- get mountOperation #pim --getMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> m Word32 -- | Set the value of the “pim” property. When overloading -- is enabled, this is equivalent to -- --
-- set mountOperation [ #pim := value ] --setMountOperationPim :: (MonadIO m, IsMountOperation o) => o -> Word32 -> m () -- | Set the value of the “username” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #username --clearMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “username” property. This is rarely needed directly, but it -- is used by new. constructMountOperationUsername :: (IsMountOperation o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “username” property. When -- overloading is enabled, this is equivalent to -- --
-- get mountOperation #username --getMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m (Maybe Text) -- | Set the value of the “username” property. When -- overloading is enabled, this is equivalent to -- --
-- set mountOperation [ #username := value ] --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. -- -- Since: 2.20 type MountOperationAbortedCallback = IO () -- | Connect a signal handler for the aborted signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after mountOperation #aborted callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAbortedCallback) -> m SignalHandlerId -- | Connect a signal handler for the aborted signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on mountOperation #aborted callback --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 GtkMessageDialog. type MountOperationAskPasswordCallback = Text -> Text -> Text -> [AskPasswordFlags] -> IO () -- | Connect a signal handler for the askPassword signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after mountOperation #askPassword callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskPasswordCallback) -> m SignalHandlerId -- | Connect a signal handler for the askPassword signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on mountOperation #askPassword callback --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 GtkMessageDialog. type MountOperationAskQuestionCallback = Text -> [Text] -> IO () -- | Connect a signal handler for the askQuestion signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after mountOperation #askQuestion callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationAskQuestionCallback) -> m SignalHandlerId -- | Connect a signal handler for the askQuestion signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on mountOperation #askQuestion callback --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 reply signal, to be run after -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after mountOperation #reply callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationReplyCallback) -> m SignalHandlerId -- | Connect a signal handler for the reply signal, to be run before -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- on mountOperation #reply callback --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 Mount or stopping a Drive. -- -- 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 mountOperationReply to the latest signal -- (setting MountOperation:choice 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 GtkMessageDialog. -- -- Since: 2.22 type MountOperationShowProcessesCallback = Text -> [Int32] -> [Text] -> IO () -- | Connect a signal handler for the showProcesses signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after mountOperation #showProcesses callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowProcessesCallback) -> m SignalHandlerId -- | Connect a signal handler for the showProcesses signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on mountOperation #showProcesses callback --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 -- bytesLeft 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 bytesLeft 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 GtkMessageDialog. -- -- Since: 2.34 type MountOperationShowUnmountProgressCallback = Text -> Int64 -> Int64 -> IO () -- | Connect a signal handler for the showUnmountProgress signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after mountOperation #showUnmountProgress callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> ((?self :: a) => MountOperationShowUnmountProgressCallback) -> m SignalHandlerId -- | Connect a signal handler for the showUnmountProgress signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on mountOperation #showUnmountProgress callback --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.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 -- | GNotification 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 GNotification and other similar -- APIs is that, if supported by the desktop environment, notifications -- sent with GNotification 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 GNotification should be able -- to be started as a D-Bus service, using Application. -- -- In order for GNotification to work, the application must have -- installed a .desktop file. For example: -- --
-- [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 ---- -- The X-GNOME-UsesNotifications key indicates to GNOME Control -- Center that this application uses notifications, so it can be listed -- in the Control Center’s ‘Notifications’ panel. -- -- The .desktop file must be named as -- org.gnome.TestApplication.desktop, where -- org.gnome.TestApplication is the ID passed to -- applicationNew. -- -- User interaction with a notification (either the default action, or -- buttons) must be associated with actions on the application (ie: -- app. 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 applicationSendNotification. -- -- Since: 2.40 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 Notification, -- for instance with toNotification. class (GObject o, IsDescendantOf Notification o) => IsNotification o -- | Cast to Notification, for types for which this is known to be -- safe. For general casts, use castTo. toNotification :: (MonadIO m, IsNotification o) => o -> m Notification -- | Adds a button to notification that activates the -- action in detailedAction when clicked. That action -- must be an application-wide action (starting with "app."). If -- detailedAction contains a target, the action will be -- activated with that target as its parameter. -- -- See actionParseDetailedName for a description of the format for -- detailedAction. -- -- Since: 2.40 notificationAddButton :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> m () -- | Adds a button to notification that activates -- action when clicked. action must be an -- application-wide action (it must start with "app."). -- -- If target is non-Nothing, -- action will be activated with target -- as its parameter. -- -- Since: 2.40 notificationAddButtonWithTarget :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> Maybe GVariant -> m () -- | Creates a new Notification with title as its -- title. -- -- After populating notification with more details, it -- can be sent to the desktop shell with -- applicationSendNotification. Changing any properties after this -- call will not have any effect until resending -- notification. -- -- Since: 2.40 notificationNew :: (HasCallStack, MonadIO m) => Text -> m Notification -- | Sets the body of notification to body. -- -- Since: 2.40 notificationSetBody :: (HasCallStack, MonadIO m, IsNotification a) => a -> Maybe Text -> m () -- | Sets the type of notification to -- category. Categories have a main type like -- email, im or device and can have a detail -- separated by a ., e.g. im.received or -- email.arrived. Setting the category helps the notification -- server to select proper feedback to the user. -- -- Standard categories are listed in the specification. -- -- Since: 2.70 notificationSetCategory :: (HasCallStack, MonadIO m, IsNotification a) => a -> Maybe Text -> m () -- | Sets the default action of notification to -- detailedAction. This action is activated when the -- notification is clicked on. -- -- The action in detailedAction must be an -- application-wide action (it must start with "app."). If -- detailedAction contains a target, the given action -- will be activated with that target as its parameter. See -- actionParseDetailedName for a description of the format for -- detailedAction. -- -- When no default action is set, the application that the notification -- was sent on is activated. -- -- Since: 2.40 notificationSetDefaultAction :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m () -- | Sets the default action of notification to -- action. This action is activated when the notification -- is clicked on. It must be an application-wide action (start with -- "app."). -- -- If target is non-Nothing, -- action will be activated with target -- as its parameter. If target is floating, it will be -- consumed. -- -- When no default action is set, the application that the notification -- was sent on is activated. -- -- Since: 2.40 notificationSetDefaultActionAndTarget :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe GVariant -> m () -- | Sets the icon of notification to icon. -- -- Since: 2.40 notificationSetIcon :: (HasCallStack, MonadIO m, IsNotification a, IsIcon b) => a -> b -> m () -- | Sets the priority of notification to -- priority. See NotificationPriority for possible -- values. notificationSetPriority :: (HasCallStack, MonadIO m, IsNotification a) => a -> NotificationPriority -> m () -- | Sets the title of notification to -- title. -- -- Since: 2.40 notificationSetTitle :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m () -- | Deprecated in favor of notificationSetPriority. -- -- Since: 2.40 -- | Deprecated: (Since version 2.42)Since 2.42, this has been -- deprecated in favour ofnotificationSetPriority. 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.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 GPropertyAction is a way to get a Action with a -- state value reflecting and controlling the value of a Object -- 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 -- [typegObject.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 [typegObject.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 [typegLib.Variant] types are not -- currently supported. -- -- If the property is boolean-valued then the action will have a -- NULL 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). GPropertyAction 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 Action -- corresponding to the visible-child-name property of a -- `GtkStack` 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 GtkStack. -- -- An anti-example would be binding the active-id property on a -- `GtkComboBox`. 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 -- visible-child-name property of a `GtkStack` if this -- value is actually stored in Settings. In that case, the real -- source of the value is* Settings. If you want a Action -- to control a setting stored in Settings, see -- settingsCreateAction instead, and possibly combine its use with -- settingsBind. -- -- Since: 2.38 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 -- PropertyAction, for instance with toPropertyAction. class (GObject o, IsDescendantOf PropertyAction o) => IsPropertyAction o -- | Cast to PropertyAction, for types for which this is known to be -- safe. For general casts, use castTo. toPropertyAction :: (MonadIO m, IsPropertyAction o) => o -> m PropertyAction -- | Creates a Action corresponding to the value of property -- propertyName on object. -- -- The property must be existent and readable and writable (and not -- construct-only). -- -- This function takes a reference on object and doesn't -- release it until the action is destroyed. -- -- Since: 2.38 propertyActionNew :: (HasCallStack, MonadIO m, IsObject a) => Text -> a -> Text -> m PropertyAction -- | Get the value of the “enabled” property. When -- overloading is enabled, this is equivalent to -- --
-- get propertyAction #enabled --getPropertyActionEnabled :: (MonadIO m, IsPropertyAction o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “invert-boolean” property. This is rarely needed directly, -- but it is used by new. constructPropertyActionInvertBoolean :: (IsPropertyAction o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “invert-boolean” property. When -- overloading is enabled, this is equivalent to -- --
-- get propertyAction #invertBoolean --getPropertyActionInvertBoolean :: (MonadIO m, IsPropertyAction o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “name” property. This is rarely needed directly, but it is -- used by new. constructPropertyActionName :: (IsPropertyAction o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “name” property. When overloading -- is enabled, this is equivalent to -- --
-- get propertyAction #name --getPropertyActionName :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “object” property. This is rarely needed directly, but it is -- used by new. constructPropertyActionObject :: (IsPropertyAction o, MonadIO m, IsObject a) => a -> m (GValueConstruct o) -- | Get the value of the “parameter-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get propertyAction #parameterType --getPropertyActionParameterType :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe VariantType) -- | Construct a GValueConstruct with valid value for the -- “property-name” property. This is rarely needed directly, but -- it is used by new. constructPropertyActionPropertyName :: (IsPropertyAction o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “state” property. When -- overloading is enabled, this is equivalent to -- --
-- get propertyAction #state --getPropertyActionState :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe GVariant) -- | Get the value of the “state-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get propertyAction #stateType --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.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 GSettingsBackend interface defines a generic interface -- for non-strictly-typed data that is stored in a hierarchy. To -- implement an alternative storage backend for Settings, you need -- to implement the GSettingsBackend interface and then make it -- implement the extension point -- G_SETTINGS_BACKEND_EXTENSION_POINT_NAME. -- -- 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 GSettingsBackend functions accept or return a -- Tree. These trees always have strings as keys and -- GVariant as values. -- -- The GSettingsBackend 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 G_SETTINGS_ENABLE_BACKEND before -- including gio/gsettingsbackend.h. 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 -- SettingsBackend, for instance with toSettingsBackend. class (GObject o, IsDescendantOf SettingsBackend o) => IsSettingsBackend o -- | Cast to SettingsBackend, for types for which this is known to -- be safe. For general casts, use castTo. 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. -- -- key 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 -- g_settings_backend_write(), 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 -- g_settings_backend_write()). -- -- In the case that this call is in response to a call to -- g_settings_backend_write() then -- originTag must be set to the same value that was -- passed to that call. -- -- Since: 2.26 settingsBackendChanged :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Text -> Ptr () -> m () -- | This call is a convenience wrapper. It gets the list of changes from -- tree, computes the longest common prefix and calls -- settingsBackendChanged. -- -- Since: 2.26 settingsBackendChangedTree :: (HasCallStack, MonadIO m, IsSettingsBackend a) => a -> Tree -> Ptr () -> m () -- | Returns the default SettingsBackend. It is possible to override -- the default by setting the GSETTINGS_BACKEND environment -- variable to the name of a settings backend. -- -- The user gets a reference to the backend. -- -- Since: 2.28 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. -- -- path must be a valid path (ie starting and ending with -- a slash and not containing '//'). Each string in items -- must form a valid key name when path 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 contatenation of path with each item in -- items may have changed. -- -- The same rules for when notifications must occur apply as per -- settingsBackendChanged. These two calls can be used -- interchangeably if exactly one item has changed (although in that case -- settingsBackendChanged is definitely preferred). -- -- For efficiency reasons, the implementation should strive for -- path 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. -- -- Since: 2.26 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. -- -- path 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 path may have changed. -- -- The same rules for when notifications must occur apply as per -- settingsBackendChanged. 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 -- path 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. -- -- Since: 2.26 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. -- -- Since: 2.26 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. -- -- Since: 2.26 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.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 GSimpleAction is the obvious simple implementation of the -- Action interface. This is the easiest way to create an action -- for purposes of adding it to a SimpleActionGroup. 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 SimpleAction, -- for instance with toSimpleAction. class (GObject o, IsDescendantOf SimpleAction o) => IsSimpleAction o -- | Cast to SimpleAction, for types for which this is known to be -- safe. For general casts, use castTo. toSimpleAction :: (MonadIO m, IsSimpleAction o) => o -> m SimpleAction -- | Creates a new action. -- -- The created action is stateless. See simpleActionNewStateful to -- create an action that has state. -- -- Since: 2.28 simpleActionNew :: (HasCallStack, MonadIO m) => Text -> Maybe VariantType -> m SimpleAction -- | Creates a new stateful action. -- -- All future state values must have the same VariantType as the -- initial state. -- -- If the state GVariant is floating, it is -- consumed. -- -- Since: 2.28 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. -- -- Since: 2.28 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 actionChangeState to request the -- change. -- -- If the value GVariant is floating, it is consumed. -- -- Since: 2.30 simpleActionSetState :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> GVariant -> m () -- | Sets the state hint for the action. -- -- See actionGetStateHint for more information about action state -- hints. -- -- Since: 2.44 simpleActionSetStateHint :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> Maybe GVariant -> m () -- | Construct a GValueConstruct with valid value for the -- “enabled” property. This is rarely needed directly, but it is -- used by new. constructSimpleActionEnabled :: (IsSimpleAction o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “enabled” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleAction #enabled --getSimpleActionEnabled :: (MonadIO m, IsSimpleAction o) => o -> m Bool -- | Set the value of the “enabled” property. When -- overloading is enabled, this is equivalent to -- --
-- set simpleAction [ #enabled := value ] --setSimpleActionEnabled :: (MonadIO m, IsSimpleAction o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “name” property. This is rarely needed directly, but it is -- used by new. constructSimpleActionName :: (IsSimpleAction o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “name” property. When overloading -- is enabled, this is equivalent to -- --
-- get simpleAction #name --getSimpleActionName :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “parameter-type” property. This is rarely needed directly, -- but it is used by new. constructSimpleActionParameterType :: (IsSimpleAction o, MonadIO m) => VariantType -> m (GValueConstruct o) -- | Get the value of the “parameter-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleAction #parameterType --getSimpleActionParameterType :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe VariantType) -- | Construct a GValueConstruct with valid value for the -- “state” property. This is rarely needed directly, but it is -- used by new. constructSimpleActionState :: (IsSimpleAction o, MonadIO m) => GVariant -> m (GValueConstruct o) -- | Get the value of the “state” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleAction #state --getSimpleActionState :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe GVariant) -- | Set the value of the “state” property. When -- overloading is enabled, this is equivalent to -- --
-- set simpleAction [ #state := value ] --setSimpleActionState :: (MonadIO m, IsSimpleAction o) => o -> GVariant -> m () -- | Get the value of the “state-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleAction #stateType --getSimpleActionStateType :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe VariantType) -- | Indicates that the action was just activated. -- -- parameter will always be of the expected type, i.e. -- the parameter type specified when the action was created. If an -- incorrect type is given when activating the action, this signal is not -- emitted. -- -- Since GLib 2.40, if no handler is connected to this signal then the -- default behaviour for boolean-stated actions with a Nothing -- parameter type is to toggle them via the -- SimpleAction::changeState signal. For stateful actions where -- the state type is equal to the parameter type, the default is to -- forward them directly to SimpleAction::changeState. This should -- allow almost all users of SimpleAction to connect only one -- handler or the other. -- -- Since: 2.28 type SimpleActionActivateCallback = Maybe GVariant -> IO () -- | Connect a signal handler for the activate signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after simpleAction #activate callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSimpleActionActivate :: (IsSimpleAction a, MonadIO m) => a -> ((?self :: a) => SimpleActionActivateCallback) -> m SignalHandlerId -- | Connect a signal handler for the activate signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on simpleAction #activate callback --onSimpleActionActivate :: (IsSimpleAction a, MonadIO m) => a -> ((?self :: a) => SimpleActionActivateCallback) -> m SignalHandlerId -- | Indicates that the action just received a request to change its state. -- -- value will always be of the correct state type, i.e. -- the type of the initial state passed to -- simpleActionNewStateful. 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 simpleActionSetState 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 -- simpleActionSetState from the handler. -- -- An example of a 'change-state' handler: -- --
-- 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 <= requested && requested <= 10)
-- g_simple_action_set_state (action, value);
-- }
--
--
-- 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.
--
-- Since: 2.30
type SimpleActionChangeStateCallback = Maybe GVariant -> IO ()
-- | Connect a signal handler for the changeState signal, to be run
-- after the default handler. When overloading is enabled, this is
-- equivalent to
--
-- -- after simpleAction #changeState callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSimpleActionChangeState :: (IsSimpleAction a, MonadIO m) => a -> ((?self :: a) => SimpleActionChangeStateCallback) -> m SignalHandlerId -- | Connect a signal handler for the changeState signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on simpleAction #changeState callback --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.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 GSocketControlMessage is a special-purpose utility message -- that can be sent to or received from a Socket. 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 socketSendMessage and received -- with socketReceiveMessage. -- -- To extend the set of control message that can be sent, subclass this -- class and override the get_size, get_level, -- get_type and serialize methods. -- -- To extend the set of control messages that can be received, subclass -- this class and implement the deserialize method. Also, make -- sure your class is registered with the -- [typegObject.Type] type system before calling -- socketReceiveMessage to read such a message. -- -- Since: 2.22 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 -- SocketControlMessage, for instance with -- toSocketControlMessage. class (GObject o, IsDescendantOf SocketControlMessage o) => IsSocketControlMessage o -- | Cast to SocketControlMessage, for types for which this is known -- to be safe. For general casts, use castTo. toSocketControlMessage :: (MonadIO m, IsSocketControlMessage o) => o -> m SocketControlMessage -- | Tries to deserialize a socket control message of a given -- level and type. This will ask all -- known (to GType) subclasses of SocketControlMessage if they can -- understand this kind of message and if so deserialize it into a -- SocketControlMessage. -- -- If there is no implementation for this kind of control message, -- Nothing will be returned. -- -- Since: 2.22 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. -- -- Since: 2.22 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. -- -- Since: 2.22 socketControlMessageGetMsgType :: (HasCallStack, MonadIO m, IsSocketControlMessage a) => a -> m Int32 -- | Returns the space required for the control message, not including -- headers or alignment. -- -- Since: 2.22 socketControlMessageGetSize :: (HasCallStack, MonadIO m, IsSocketControlMessage a) => a -> m CSize -- | Converts the data in the message to bytes placed in the message. -- -- data is guaranteed to have enough space to fit the -- size returned by socketControlMessageGetSize on this object. -- -- Since: 2.22 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.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 GTestDBus modifies the user’s environment, calling -- `setenv()`). This is not thread-safe, so all GTestDBus -- calls should be completed before threads are spawned, or should have -- appropriate locking to ensure no access conflicts to environment -- variables shared between GTestDBus and other threads. -- --
-- [D-BUS Service] -- Name=org.gtk.GDBus.Examples.ObjectManager -- Exec=@abs_top_builddir@/gio/tests/gdbus-example-objectmanager-server ---- -- 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: -- --
-- -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\" ---- -- 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 -- GTestDBus scaffolding. -- -- An example of a test fixture for D-Bus services can be found here: -- gdbus-test-fixture.c -- -- 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 Settings 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 GTestDBus 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 GSETTINGS_SCHEMA_DIR to the in tree directory holding -- your schemas in the above fixture_setup() 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: -- --
-- all-am: -- $(GLIB_COMPILE_SCHEMAS) . -- -- CLEANFILES += gschemas.compiled ---- -- Since: 2.34 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 TestDBus, for -- instance with toTestDBus. class (GObject o, IsDescendantOf TestDBus o) => IsTestDBus o -- | Cast to TestDBus, for types for which this is known to be safe. -- For general casts, use castTo. 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 testDBusUp. testDBusAddServiceDir :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> Text -> m () -- | Stop the session bus started by testDBusUp. -- -- This will wait for the singleton returned by busGet or -- busGetSync 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 testDBusUp -- has not been called yet, Nothing is returned. This can be used -- with dBusConnectionNewForAddress. testDBusGetBusAddress :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m (Maybe Text) -- | Get the flags of the TestDBus object. testDBusGetFlags :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m [TestDBusFlags] -- | Create a new TestDBus object. testDBusNew :: (HasCallStack, MonadIO m) => [TestDBusFlags] -> m TestDBus -- | Stop the session bus started by testDBusUp. -- -- Unlike testDBusDown, this won't verify the -- DBusConnection singleton returned by busGet or -- busGetSync is destroyed. Unit tests wanting to verify behaviour -- after the session bus has been stopped can use this function but -- should still call testDBusDown 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 testDBusUp 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 -- g_test_add(), testDBusDown must be called in -- its teardown callback. -- -- If this function is called from unit test's main(), -- then testDBusDown must be called after testRun. testDBusUp :: (HasCallStack, MonadIO m, IsTestDBus a) => a -> m () -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. constructTestDBusFlags :: (IsTestDBus o, MonadIO m) => [TestDBusFlags] -> m (GValueConstruct o) -- | Get the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get testDBus #flags --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.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 -- | GThemedIcon is an implementation of Icon that supports -- icon themes. -- -- GThemedIcon contains a list of all of the icons present in an -- icon theme, so that icons can be looked up quickly. -- GThemedIcon does not provide actual pixmaps for icons, just -- the icon names. Ideally something like -- Gtk.IconTheme.choose_icon() 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 ThemedIcon, -- for instance with toThemedIcon. class (GObject o, IsDescendantOf ThemedIcon o) => IsThemedIcon o -- | Cast to ThemedIcon, for types for which this is known to be -- safe. For general casts, use castTo. toThemedIcon :: (MonadIO m, IsThemedIcon o) => o -> m ThemedIcon -- | Append a name to the list of icons from within icon. -- -- Note that doing so invalidates the hash computed by prior calls to -- iconHash. themedIconAppendName :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> Text -> m () -- | Gets the names of icons from within icon. themedIconGetNames :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> m [Text] -- | Creates a new themed icon for iconname. themedIconNew :: (HasCallStack, MonadIO m) => Text -> m ThemedIcon -- | Creates a new themed icon for iconnames. themedIconNewFromNames :: (HasCallStack, MonadIO m) => [Text] -> m ThemedIcon -- | Creates a new themed icon for iconname, and all the -- names that can be created by shortening iconname at -- '-' characters. -- -- In the following example, icon1 and -- icon2 are equivalent: -- --
-- const char *names[] = {
-- "gnome-dev-cdrom-audio",
-- "gnome-dev-cdrom",
-- "gnome-dev",
-- "gnome"
-- };
--
-- icon1 = g_themed_icon_new_from_names (names, 4);
-- icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
--
themedIconNewWithDefaultFallbacks :: (HasCallStack, MonadIO m) => Text -> m ThemedIcon
-- | Prepend a name to the list of icons from within icon.
--
-- Note that doing so invalidates the hash computed by prior calls to
-- iconHash.
--
-- Since: 2.18
themedIconPrependName :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> Text -> m ()
-- | Construct a GValueConstruct with valid value for the
-- “name” property. This is rarely needed directly, but it is
-- used by new.
constructThemedIconName :: (IsThemedIcon o, MonadIO m) => Text -> m (GValueConstruct o)
-- | Construct a GValueConstruct with valid value for the
-- “names” property. This is rarely needed directly, but it is
-- used by new.
constructThemedIconNames :: (IsThemedIcon o, MonadIO m) => [Text] -> m (GValueConstruct o)
-- | Get the value of the “names” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get themedIcon #names --getThemedIconNames :: (MonadIO m, IsThemedIcon o) => o -> m [Text] -- | Construct a GValueConstruct with valid value for the -- “use-default-fallbacks” property. This is rarely needed -- directly, but it is used by new. constructThemedIconUseDefaultFallbacks :: (IsThemedIcon o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “use-default-fallbacks” property. When -- overloading is enabled, this is equivalent to -- --
-- get themedIcon #useDefaultFallbacks --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.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. -- -- Since: 2.30 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 TlsPassword, -- for instance with toTlsPassword. class (GObject o, IsDescendantOf TlsPassword o) => IsTlsPassword o -- | Cast to TlsPassword, for types for which this is known to be -- safe. For general casts, use castTo. toTlsPassword :: (MonadIO m, IsTlsPassword o) => o -> m TlsPassword -- | Get a description string about what the password will be used for. -- -- Since: 2.30 tlsPasswordGetDescription :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m Text -- | Get flags about the password. -- -- Since: 2.30 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 -- tlsPasswordGetFlags. -- -- Since: 2.30 tlsPasswordGetWarning :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> m Text -- | Create a new TlsPassword object. tlsPasswordNew :: (HasCallStack, MonadIO m) => [TlsPasswordFlags] -> Text -> m TlsPassword -- | Set a description string about what the password will be used for. -- -- Since: 2.30 tlsPasswordSetDescription :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> Text -> m () -- | Set flags about the password. -- -- Since: 2.30 tlsPasswordSetFlags :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> [TlsPasswordFlags] -> m () -- | Set the value for this password. The value will be -- copied by the password object. -- -- Specify the length, for a non-nul-terminated password. -- Pass -1 as length if using a nul-terminated password, -- and length will be calculated automatically. (Note -- that the terminating nul is not considered part of the password in -- this case.) -- -- Since: 2.30 tlsPasswordSetValue :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> ByteString -> m () -- | Provide the value for this password. -- -- The value will be owned by the password object, and -- later freed using the destroy function callback. -- -- Specify the length, for a non-nul-terminated password. -- Pass -1 as length if using a nul-terminated password, -- and length will be calculated automatically. (Note -- that the terminating nul is not considered part of the password in -- this case.) -- -- Since: 2.30 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 -- tlsPasswordGetFlags. -- -- Since: 2.30 tlsPasswordSetWarning :: (HasCallStack, MonadIO m, IsTlsPassword a) => a -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “description” property. This is rarely needed directly, but -- it is used by new. constructTlsPasswordDescription :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “description” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsPassword #description --getTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> m Text -- | Set the value of the “description” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsPassword [ #description := value ] --setTlsPasswordDescription :: (MonadIO m, IsTlsPassword o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. constructTlsPasswordFlags :: (IsTlsPassword o, MonadIO m) => [TlsPasswordFlags] -> m (GValueConstruct o) -- | Get the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsPassword #flags --getTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> m [TlsPasswordFlags] -- | Set the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsPassword [ #flags := value ] --setTlsPasswordFlags :: (MonadIO m, IsTlsPassword o) => o -> [TlsPasswordFlags] -> m () -- | Construct a GValueConstruct with valid value for the -- “warning” property. This is rarely needed directly, but it is -- used by new. constructTlsPasswordWarning :: (IsTlsPassword o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “warning” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsPassword #warning --getTlsPasswordWarning :: (MonadIO m, IsTlsPassword o) => o -> m Text -- | Set the value of the “warning” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsPassword [ #warning := value ] --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.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 SocketControlMessage contains a Credentials -- instance. It may be sent using socketSendMessage and received -- using socketReceiveMessage over UNIX sockets (ie: sockets in -- the G_SOCKET_FAMILY_UNIX family). -- -- For an easier way to send and receive credentials over stream-oriented -- UNIX sockets, see unixConnectionSendCredentials and -- unixConnectionReceiveCredentials. To receive credentials of a -- foreign process connected to a socket, use -- socketGetCredentials. -- -- Since GLib 2.72, GUnixCredentialMessage is available on all -- platforms. It requires underlying system support (such as Windows 10 -- with AF_UNIX) at run time. -- -- Before GLib 2.72, <gio/gunixcredentialsmessage.h> -- belonged to the UNIX-specific GIO interfaces, thus you had to use the -- gio-unix-2.0.pc pkg-config file when using it. This is no -- longer necessary since GLib 2.72. -- -- Since: 2.26 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 -- UnixCredentialsMessage, for instance with -- toUnixCredentialsMessage. class (GObject o, IsDescendantOf UnixCredentialsMessage o) => IsUnixCredentialsMessage o -- | Cast to UnixCredentialsMessage, for types for which this is -- known to be safe. For general casts, use castTo. toUnixCredentialsMessage :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m UnixCredentialsMessage -- | Gets the credentials stored in message. -- -- Since: 2.26 unixCredentialsMessageGetCredentials :: (HasCallStack, MonadIO m, IsUnixCredentialsMessage a) => a -> m Credentials -- | Checks if passing Credentials on a Socket is supported -- on this platform. -- -- Since: 2.26 unixCredentialsMessageIsSupported :: (HasCallStack, MonadIO m) => m Bool -- | Creates a new UnixCredentialsMessage with credentials matching -- the current processes. -- -- Since: 2.26 unixCredentialsMessageNew :: (HasCallStack, MonadIO m) => m UnixCredentialsMessage -- | Creates a new UnixCredentialsMessage holding -- credentials. -- -- Since: 2.26 unixCredentialsMessageNewWithCredentials :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m UnixCredentialsMessage -- | Construct a GValueConstruct with valid value for the -- “credentials” property. This is rarely needed directly, but -- it is used by new. constructUnixCredentialsMessageCredentials :: (IsUnixCredentialsMessage o, MonadIO m, IsCredentials a) => a -> m (GValueConstruct o) -- | Get the value of the “credentials” property. When -- overloading is enabled, this is equivalent to -- --
-- get unixCredentialsMessage #credentials --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.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 GUnixFDList contains a list of file descriptors. It owns -- the file descriptors that it contains, closing them when finalized. -- -- It may be wrapped in a `GUnixFDMessage` and sent over a -- Socket in the G_SOCKET_FAMILY_UNIX family by using -- socketSendMessage and received using -- socketReceiveMessage. -- -- Before 2.74, <gio/gunixfdlist.h> belonged to the -- UNIX-specific GIO interfaces, thus you had to use the -- gio-unix-2.0.pc 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 UnixFDList, -- for instance with toUnixFDList. class (GObject o, IsDescendantOf UnixFDList o) => IsUnixFDList o -- | Cast to UnixFDList, for types for which this is known to be -- safe. For general casts, use castTo. toUnixFDList :: (MonadIO m, IsUnixFDList o) => o -> m UnixFDList -- | Adds a file descriptor to list. -- -- The file descriptor is duplicated using dup(). You -- keep your copy of the descriptor and the copy contained in -- list will be closed when list is -- finalized. -- -- A possible cause of failure is exceeding the per-process or -- system-wide file descriptor limit. -- -- The index of the file descriptor in the list is returned. If you use -- this index with unixFDListGet then you will receive back a -- duplicated copy of the same file descriptor. -- -- Since: 2.24 unixFDListAppend :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> Int32 -> m Int32 -- | Gets a file descriptor out of list. -- -- index_ specifies the index of the file descriptor to -- get. It is a programmer error for index_ to be out of -- range; see unixFDListGetLength. -- -- The file descriptor is duplicated using dup() and set -- as close-on-exec before being returned. You must call -- close() on it when you are done. -- -- A possible cause of failure is exceeding the per-process or -- system-wide file descriptor limit. -- -- Since: 2.24 unixFDListGet :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> Int32 -> m Int32 -- | Gets the length of list (ie: the number of file -- descriptors contained within). -- -- Since: 2.24 unixFDListGetLength :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> m Int32 -- | Creates a new UnixFDList containing no file descriptors. -- -- Since: 2.24 unixFDListNew :: (HasCallStack, MonadIO m) => m UnixFDList -- | Creates a new UnixFDList containing the file descriptors given -- in fds. The file descriptors become the property of -- the new list and may no longer be used by the caller. The array itself -- is owned by the caller. -- -- Each file descriptor in the array should be set to close-on-exec. -- -- If nFds is -1 then fds must be -- terminated with -1. -- -- Since: 2.24 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 -- list. The caller must not close them and must not free -- the array. The array is valid only until list is -- changed in any way. -- -- If length is non-Nothing 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 Nothing. In case there are no file -- descriptors contained in list, an empty array is -- returned. -- -- Since: 2.24 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 -- list. Further calls will return an empty list (unless -- more descriptors have been added). -- -- The return result of this function must be freed with free. The -- caller is also responsible for closing all of the file descriptors. -- The file descriptors in the array are set to close-on-exec. -- -- If length is non-Nothing 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 Nothing. In case there are no file -- descriptors contained in list, an empty array is -- returned. -- -- Since: 2.24 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.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 DBusConnection. -- -- Since: 2.26 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 DBusMessage, -- for instance with toDBusMessage. class (GObject o, IsDescendantOf DBusMessage o) => IsDBusMessage o -- | Cast to DBusMessage, for types for which this is known to be -- safe. For general casts, use castTo. 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 blob. -- -- Since: 2.26 dBusMessageBytesNeeded :: (HasCallStack, MonadIO m) => ByteString -> m Int64 -- | Copies message. The copy is a deep copy and the -- returned DBusMessage is completely identical except that it is -- guaranteed to not be locked. -- -- This operation can fail if e.g. message contains file -- descriptors and the per-process or system-wide open files limit is -- reached. -- -- Since: 2.26 dBusMessageCopy :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessage -- | Convenience to get the first item in the body of -- message. -- -- See dBusMessageGetArg0Path for returning object-path-typed arg0 -- values. -- -- Since: 2.26 dBusMessageGetArg0 :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Convenience to get the first item in the body of -- message. -- -- See dBusMessageGetArg0 for returning string-typed arg0 values. -- -- Since: 2.80 dBusMessageGetArg0Path :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Gets the body of a message. -- -- Since: 2.26 dBusMessageGetBody :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe GVariant) -- | Gets the byte order of message. dBusMessageGetByteOrder :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessageByteOrder -- | Convenience getter for the DBusMessageHeaderFieldDestination -- header field. -- -- Since: 2.26 dBusMessageGetDestination :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Convenience getter for the DBusMessageHeaderFieldErrorName -- header field. -- -- Since: 2.26 dBusMessageGetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Gets the flags for message. -- -- Since: 2.26 dBusMessageGetFlags :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m [DBusMessageFlags] -- | Gets a header field on message. -- -- The caller is responsible for checking the type of the returned -- GVariant matches what is expected. -- -- Since: 2.26 dBusMessageGetHeader :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageHeaderField -> m (Maybe GVariant) -- | Gets an array of all header fields on message that are -- set. -- -- Since: 2.26 dBusMessageGetHeaderFields :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m ByteString -- | Convenience getter for the DBusMessageHeaderFieldInterface -- header field. -- -- Since: 2.26 dBusMessageGetInterface :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Checks whether message is locked. To monitor changes -- to this value, conncet to the Object::notify signal to listen -- for changes on the DBusMessage:locked property. -- -- Since: 2.26 dBusMessageGetLocked :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Bool -- | Convenience getter for the DBusMessageHeaderFieldMember header -- field. -- -- Since: 2.26 dBusMessageGetMember :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Gets the type of message. -- -- Since: 2.26 dBusMessageGetMessageType :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessageType -- | Convenience getter for the DBusMessageHeaderFieldNumUnixFds -- header field. -- -- Since: 2.26 dBusMessageGetNumUnixFds :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32 -- | Convenience getter for the DBusMessageHeaderFieldPath header -- field. -- -- Since: 2.26 dBusMessageGetPath :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Convenience getter for the DBusMessageHeaderFieldReplySerial -- header field. -- -- Since: 2.26 dBusMessageGetReplySerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32 -- | Convenience getter for the DBusMessageHeaderFieldSender header -- field. -- -- Since: 2.26 dBusMessageGetSender :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe Text) -- | Gets the serial for message. -- -- Since: 2.26 dBusMessageGetSerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32 -- | Convenience getter for the DBusMessageHeaderFieldSignature -- header field. -- -- This will always be non-Nothing, but may be an empty string. -- -- Since: 2.26 dBusMessageGetSignature :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text -- | Gets the UNIX file descriptors associated with -- message, if any. -- -- This method is only available on UNIX. -- -- The file descriptors normally correspond to -- G_VARIANT_TYPE_HANDLE values in the body of the -- message. For example, if variantGetHandle returns 5, that is -- intended to be a reference to the file descriptor that can be accessed -- by g_unix_fd_list_get (list, 5, ...). -- -- Since: 2.26 dBusMessageGetUnixFdList :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m (Maybe UnixFDList) -- | If message is locked, does nothing. Otherwise locks -- the message. -- -- Since: 2.26 dBusMessageLock :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m () -- | Creates a new empty DBusMessage. -- -- Since: 2.26 dBusMessageNew :: (HasCallStack, MonadIO m) => m DBusMessage -- | Creates a new DBusMessage from the data stored at -- blob. The byte order that the message was in can be -- retrieved using dBusMessageGetByteOrder. -- -- If the blob cannot be parsed, contains invalid fields, -- or contains invalid headers, IOErrorEnumInvalidArgument will be -- returned. -- -- Since: 2.26 dBusMessageNewFromBlob :: (HasCallStack, MonadIO m) => ByteString -> [DBusCapabilityFlags] -> m DBusMessage -- | Creates a new DBusMessage for a method call. -- -- Since: 2.26 dBusMessageNewMethodCall :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> Maybe Text -> Text -> m DBusMessage -- | Creates a new DBusMessage that is an error reply to -- methodCallMessage. -- -- Since: 2.26 dBusMessageNewMethodErrorLiteral :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> Text -> m DBusMessage -- | Creates a new DBusMessage that is a reply to -- methodCallMessage. -- -- Since: 2.26 dBusMessageNewMethodReply :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessage -- | Creates a new DBusMessage for a signal emission. -- -- Since: 2.26 dBusMessageNewSignal :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> m DBusMessage -- | Produces a human-readable multi-line description of -- message. -- -- The contents of the description has no ABI guarantees, the contents -- and formatting is subject to change at any time. Typical output looks -- something like this: -- --
-- Flags: none -- Version: 0 -- Serial: 4 -- Headers: -- path -> objectpath '/org/gtk/GDBus/TestObject' -- interface -> 'org.gtk.GDBus.TestInterface' -- member -> 'GimmeStdout' -- destination -> ':1.146' -- Body: () -- UNIX File Descriptors: -- (none) ---- -- or -- --
-- Flags: no-reply-expected -- Version: 0 -- Serial: 477 -- Headers: -- reply-serial -> uint32 4 -- destination -> ':1.159' -- sender -> ':1.146' -- num-unix-fds -> uint32 1 -- Body: () -- UNIX File Descriptors: -- fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635 ---- -- Since: 2.26 dBusMessagePrint :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m Text -- | Sets the body message. As a side-effect the -- DBusMessageHeaderFieldSignature header field is set to the type -- string of body (or cleared if body is -- Nothing). -- -- If body is floating, message assumes -- ownership of body. -- -- Since: 2.26 dBusMessageSetBody :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> GVariant -> m () -- | Sets the byte order of message. dBusMessageSetByteOrder :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageByteOrder -> m () -- | Convenience setter for the DBusMessageHeaderFieldDestination -- header field. -- -- Since: 2.26 dBusMessageSetDestination :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m () -- | Convenience setter for the DBusMessageHeaderFieldErrorName -- header field. -- -- Since: 2.26 dBusMessageSetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => Maybe a -> Text -> m () -- | Sets the flags to set on message. -- -- Since: 2.26 dBusMessageSetFlags :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> [DBusMessageFlags] -> m () -- | Sets a header field on message. -- -- If value is floating, message assumes -- ownership of value. -- -- Since: 2.26 dBusMessageSetHeader :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageHeaderField -> Maybe GVariant -> m () -- | Convenience setter for the DBusMessageHeaderFieldInterface -- header field. -- -- Since: 2.26 dBusMessageSetInterface :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m () -- | Convenience setter for the DBusMessageHeaderFieldMember header -- field. -- -- Since: 2.26 dBusMessageSetMember :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m () -- | Sets message to be of type. -- -- Since: 2.26 dBusMessageSetMessageType :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageType -> m () -- | Convenience setter for the DBusMessageHeaderFieldNumUnixFds -- header field. -- -- Since: 2.26 dBusMessageSetNumUnixFds :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m () -- | Convenience setter for the DBusMessageHeaderFieldPath header -- field. -- -- Since: 2.26 dBusMessageSetPath :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m () -- | Convenience setter for the DBusMessageHeaderFieldReplySerial -- header field. -- -- Since: 2.26 dBusMessageSetReplySerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m () -- | Convenience setter for the DBusMessageHeaderFieldSender header -- field. -- -- Since: 2.26 dBusMessageSetSender :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m () -- | Sets the serial for message. -- -- Since: 2.26 dBusMessageSetSerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m () -- | Convenience setter for the DBusMessageHeaderFieldSignature -- header field. -- -- Since: 2.26 dBusMessageSetSignature :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Maybe Text -> m () -- | Sets the UNIX file descriptors associated with -- message. As a side-effect the -- DBusMessageHeaderFieldNumUnixFds header field is set to the -- number of fds in fdList (or cleared if -- fdList is Nothing). -- -- 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 -- G_VARIANT_TYPE_HANDLE in the body of the message. -- -- Since: 2.26 dBusMessageSetUnixFdList :: (HasCallStack, MonadIO m, IsDBusMessage a, IsUnixFDList b) => a -> Maybe b -> m () -- | Serializes message to a blob. The byte order returned -- by dBusMessageGetByteOrder will be used. -- -- Since: 2.26 dBusMessageToBlob :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> [DBusCapabilityFlags] -> m ByteString -- | If message is not of type DBusMessageTypeError -- does nothing and returns False. -- -- Otherwise this method encodes the error in message as -- a GError using g_dbus_error_set_dbus_error() -- using the information in the DBusMessageHeaderFieldErrorName -- header field of message as well as the first string -- item in message's body. -- -- Since: 2.26 dBusMessageToGerror :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m () -- | Get the value of the “locked” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusMessage #locked --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.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 -- | This SocketControlMessage contains a UnixFDList. It may -- be sent using socketSendMessage and received using -- socketReceiveMessage over UNIX sockets (ie: sockets in the -- G_SOCKET_FAMILY_UNIX family). The file descriptors are copied -- between processes by the kernel. -- -- For an easier way to send and receive file descriptors over -- stream-oriented UNIX sockets, see unixConnectionSendFd and -- unixConnectionReceiveFd. -- -- Note that <gio/gunixfdmessage.h> belongs to the -- UNIX-specific GIO interfaces, thus you have to use the -- gio-unix-2.0.pc pkg-config file or the GioUnix-2.0 -- GIR namespace when using it. module GI.Gio.Objects.UnixFDMessage -- | Memory-managed wrapper type. newtype UnixFDMessage UnixFDMessage :: ManagedPtr UnixFDMessage -> UnixFDMessage -- | Type class for types which can be safely cast to UnixFDMessage, -- for instance with toUnixFDMessage. class (GObject o, IsDescendantOf UnixFDMessage o) => IsUnixFDMessage o -- | Cast to UnixFDMessage, for types for which this is known to be -- safe. For general casts, use castTo. toUnixFDMessage :: (MonadIO m, IsUnixFDMessage o) => o -> m UnixFDMessage -- | Adds a file descriptor to message. -- -- The file descriptor is duplicated using dup(). You -- keep your copy of the descriptor and the copy contained in -- message will be closed when message is -- finalized. -- -- A possible cause of failure is exceeding the per-process or -- system-wide file descriptor limit. -- -- Since: 2.22 unixFDMessageAppendFd :: (HasCallStack, MonadIO m, IsUnixFDMessage a) => a -> Int32 -> m () -- | Gets the UnixFDList contained in message. This -- function does not return a reference to the caller, but the returned -- list is valid for the lifetime of message. -- -- Since: 2.24 unixFDMessageGetFdList :: (HasCallStack, MonadIO m, IsUnixFDMessage a) => a -> m UnixFDList -- | Creates a new UnixFDMessage containing an empty file descriptor -- list. -- -- Since: 2.22 unixFDMessageNew :: (HasCallStack, MonadIO m) => m UnixFDMessage -- | Creates a new UnixFDMessage containing list. -- -- Since: 2.24 unixFDMessageNewWithFdList :: (HasCallStack, MonadIO m, IsUnixFDList a) => a -> m UnixFDMessage -- | Returns the array of file descriptors that is contained in this -- object. -- -- After this call, the descriptors are no longer contained in -- message. Further calls will return an empty list -- (unless more descriptors have been added). -- -- The return result of this function must be freed with free. The -- caller is also responsible for closing all of the file descriptors. -- -- If length is non-Nothing 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 Nothing. In case there are no file -- descriptors contained in message, an empty array is -- returned. -- -- Since: 2.22 unixFDMessageStealFds :: (HasCallStack, MonadIO m, IsUnixFDMessage a) => a -> m [Int32] -- | Construct a GValueConstruct with valid value for the -- “fd-list” property. This is rarely needed directly, but it is -- used by new. constructUnixFDMessageFdList :: (IsUnixFDMessage o, MonadIO m, IsUnixFDList a) => a -> m (GValueConstruct o) -- | Get the value of the “fd-list” property. When -- overloading is enabled, this is equivalent to -- --
-- get unixFDMessage #fdList --getUnixFDMessageFdList :: (MonadIO m, IsUnixFDMessage o) => o -> m UnixFDList instance GHC.Classes.Eq GI.Gio.Objects.UnixFDMessage.UnixFDMessage instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixFDMessage.UnixFDMessage instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixFDMessage.UnixFDMessage instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Objects.UnixFDMessage.UnixFDMessage) instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixFDMessage.UnixFDMessage o) => GI.Gio.Objects.UnixFDMessage.IsUnixFDMessage o instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixFDMessage.UnixFDMessage instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixFDMessage.UnixFDMessage -- | Watches GUnixMounts for changes. module GI.Gio.Objects.UnixMountMonitor -- | Memory-managed wrapper type. newtype UnixMountMonitor UnixMountMonitor :: ManagedPtr UnixMountMonitor -> UnixMountMonitor -- | Type class for types which can be safely cast to -- UnixMountMonitor, for instance with toUnixMountMonitor. class (GObject o, IsDescendantOf UnixMountMonitor o) => IsUnixMountMonitor o -- | Cast to UnixMountMonitor, for types for which this is known to -- be safe. For general casts, use castTo. toUnixMountMonitor :: (MonadIO m, IsUnixMountMonitor o) => o -> m UnixMountMonitor -- | Gets the UnixMountMonitor for the current thread-default main -- context. -- -- The mount monitor can be used to monitor for changes to the list of -- mounted filesystems as well as the list of mount points (ie: fstab -- entries). -- -- You must only call objectUnref on the return value from under -- the same main context as you called this function. -- -- Since: 2.44 unixMountMonitorGet :: (HasCallStack, MonadIO m) => m UnixMountMonitor -- | Deprecated alias for unixMountMonitorGet. -- -- This function was never a true constructor, which is why it was -- renamed. -- | Deprecated: (Since version 2.44)Use unixMountMonitorGet -- instead. unixMountMonitorNew :: (HasCallStack, MonadIO m) => m UnixMountMonitor -- | This function does nothing. -- -- Before 2.44, this was a partially-effective way of controlling the -- rate at which events would be reported under some uncommon -- circumstances. Since mountMonitor is a singleton, it -- also meant that calling this function would have side effects for -- other users of the monitor. -- -- Since: 2.18 -- | Deprecated: (Since version 2.44)This function does nothing. Don't -- call it. unixMountMonitorSetRateLimit :: (HasCallStack, MonadIO m, IsUnixMountMonitor a) => a -> Int32 -> m () -- | Emitted when the unix mount points have changed. type UnixMountMonitorMountpointsChangedCallback = IO () -- | Connect a signal handler for the mountpointsChanged signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after unixMountMonitor #mountpointsChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountpointsChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the mountpointsChanged signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on unixMountMonitor #mountpointsChanged callback --onUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountpointsChangedCallback) -> m SignalHandlerId -- | Emitted when the unix mounts have changed. type UnixMountMonitorMountsChangedCallback = IO () -- | Connect a signal handler for the mountsChanged signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after unixMountMonitor #mountsChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountsChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the mountsChanged signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on unixMountMonitor #mountsChanged callback --onUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> ((?self :: a) => UnixMountMonitorMountsChangedCallback) -> m SignalHandlerId instance GHC.Classes.Eq GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor) instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor o) => GI.Gio.Objects.UnixMountMonitor.IsUnixMountMonitor o instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor -- | Information about an annotation. -- -- Since: 2.26 module GI.Gio.Structs.DBusAnnotationInfo -- | Memory-managed wrapper type. newtype DBusAnnotationInfo DBusAnnotationInfo :: ManagedPtr DBusAnnotationInfo -> DBusAnnotationInfo -- | Construct a DBusAnnotationInfo 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. -- -- Since: 2.26 dBusAnnotationInfoLookup :: (HasCallStack, MonadIO m) => Maybe [DBusAnnotationInfo] -> Text -> m (Maybe Text) -- | If info is statically allocated does nothing. -- Otherwise increases the reference count. -- -- Since: 2.26 dBusAnnotationInfoRef :: (HasCallStack, MonadIO m) => DBusAnnotationInfo -> m DBusAnnotationInfo -- | If info is statically allocated, does nothing. -- Otherwise decreases the reference count of info. When -- its reference count drops to 0, the memory used is freed. -- -- Since: 2.26 dBusAnnotationInfoUnref :: (HasCallStack, MonadIO m) => DBusAnnotationInfo -> m () -- | Set the value of the “annotations” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #annotations --clearDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> m () -- | Get the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusAnnotationInfo #annotations --getDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> m (Maybe [DBusAnnotationInfo]) -- | Set the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusAnnotationInfo [ #annotations := value ] --setDBusAnnotationInfoAnnotations :: MonadIO m => DBusAnnotationInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () -- | Set the value of the “key” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #key --clearDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m () -- | Get the value of the “key” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusAnnotationInfo #key --getDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text) -- | Set the value of the “key” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusAnnotationInfo [ #key := value ] --setDBusAnnotationInfoKey :: MonadIO m => DBusAnnotationInfo -> CString -> m () -- | Get the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusAnnotationInfo #refCount --getDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> m Int32 -- | Set the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusAnnotationInfo [ #refCount := value ] --setDBusAnnotationInfoRefCount :: MonadIO m => DBusAnnotationInfo -> Int32 -> m () -- | Set the value of the “value” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #value --clearDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m () -- | Get the value of the “value” field. When overloading -- is enabled, this is equivalent to -- --
-- get dBusAnnotationInfo #value --getDBusAnnotationInfoValue :: MonadIO m => DBusAnnotationInfo -> m (Maybe Text) -- | Set the value of the “value” field. When overloading -- is enabled, this is equivalent to -- --
-- set dBusAnnotationInfo [ #value := value ] --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.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. -- -- Since: 2.26 module GI.Gio.Structs.DBusArgInfo -- | Memory-managed wrapper type. newtype DBusArgInfo DBusArgInfo :: ManagedPtr DBusArgInfo -> DBusArgInfo -- | Construct a DBusArgInfo struct initialized to zero. newZeroDBusArgInfo :: MonadIO m => m DBusArgInfo -- | If info is statically allocated does nothing. -- Otherwise increases the reference count. -- -- Since: 2.26 dBusArgInfoRef :: (HasCallStack, MonadIO m) => DBusArgInfo -> m DBusArgInfo -- | If info is statically allocated, does nothing. -- Otherwise decreases the reference count of info. When -- its reference count drops to 0, the memory used is freed. -- -- Since: 2.26 dBusArgInfoUnref :: (HasCallStack, MonadIO m) => DBusArgInfo -> m () -- | Set the value of the “annotations” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #annotations --clearDBusArgInfoAnnotations :: MonadIO m => DBusArgInfo -> m () -- | Get the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusArgInfo #annotations --getDBusArgInfoAnnotations :: MonadIO m => DBusArgInfo -> m (Maybe [DBusAnnotationInfo]) -- | Set the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusArgInfo [ #annotations := value ] --setDBusArgInfoAnnotations :: MonadIO m => DBusArgInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () -- | Set the value of the “name” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #name --clearDBusArgInfoName :: MonadIO m => DBusArgInfo -> m () -- | Get the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusArgInfo #name --getDBusArgInfoName :: MonadIO m => DBusArgInfo -> m (Maybe Text) -- | Set the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusArgInfo [ #name := value ] --setDBusArgInfoName :: MonadIO m => DBusArgInfo -> CString -> m () -- | Get the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusArgInfo #refCount --getDBusArgInfoRefCount :: MonadIO m => DBusArgInfo -> m Int32 -- | Set the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusArgInfo [ #refCount := value ] --setDBusArgInfoRefCount :: MonadIO m => DBusArgInfo -> Int32 -> m () -- | Set the value of the “signature” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #signature --clearDBusArgInfoSignature :: MonadIO m => DBusArgInfo -> m () -- | Get the value of the “signature” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusArgInfo #signature --getDBusArgInfoSignature :: MonadIO m => DBusArgInfo -> m (Maybe Text) -- | Set the value of the “signature” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusArgInfo [ #signature := value ] --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.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 dbusErrorRegisterErrorDomain. -- -- Since: 2.26 module GI.Gio.Structs.DBusErrorEntry -- | Memory-managed wrapper type. newtype DBusErrorEntry DBusErrorEntry :: ManagedPtr DBusErrorEntry -> DBusErrorEntry -- | Construct a DBusErrorEntry struct initialized to zero. newZeroDBusErrorEntry :: MonadIO m => m DBusErrorEntry -- | Set the value of the “dbus_error_name” field to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #dbusErrorName --clearDBusErrorEntryDbusErrorName :: MonadIO m => DBusErrorEntry -> m () -- | Get the value of the “dbus_error_name” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusErrorEntry #dbusErrorName --getDBusErrorEntryDbusErrorName :: MonadIO m => DBusErrorEntry -> m (Maybe Text) -- | Set the value of the “dbus_error_name” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusErrorEntry [ #dbusErrorName := value ] --setDBusErrorEntryDbusErrorName :: MonadIO m => DBusErrorEntry -> CString -> m () -- | Get the value of the “error_code” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusErrorEntry #errorCode --getDBusErrorEntryErrorCode :: MonadIO m => DBusErrorEntry -> m Int32 -- | Set the value of the “error_code” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusErrorEntry [ #errorCode := value ] --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. -- -- Since: 2.26 module GI.Gio.Structs.DBusMethodInfo -- | Memory-managed wrapper type. newtype DBusMethodInfo DBusMethodInfo :: ManagedPtr DBusMethodInfo -> DBusMethodInfo -- | Construct a DBusMethodInfo struct initialized to zero. newZeroDBusMethodInfo :: MonadIO m => m DBusMethodInfo -- | If info is statically allocated does nothing. -- Otherwise increases the reference count. -- -- Since: 2.26 dBusMethodInfoRef :: (HasCallStack, MonadIO m) => DBusMethodInfo -> m DBusMethodInfo -- | If info is statically allocated, does nothing. -- Otherwise decreases the reference count of info. When -- its reference count drops to 0, the memory used is freed. -- -- Since: 2.26 dBusMethodInfoUnref :: (HasCallStack, MonadIO m) => DBusMethodInfo -> m () -- | Set the value of the “annotations” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #annotations --clearDBusMethodInfoAnnotations :: MonadIO m => DBusMethodInfo -> m () -- | Get the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusMethodInfo #annotations --getDBusMethodInfoAnnotations :: MonadIO m => DBusMethodInfo -> m (Maybe [DBusAnnotationInfo]) -- | Set the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusMethodInfo [ #annotations := value ] --setDBusMethodInfoAnnotations :: MonadIO m => DBusMethodInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () -- | Set the value of the “in_args” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #inArgs --clearDBusMethodInfoInArgs :: MonadIO m => DBusMethodInfo -> m () -- | Get the value of the “in_args” field. When overloading -- is enabled, this is equivalent to -- --
-- get dBusMethodInfo #inArgs --getDBusMethodInfoInArgs :: MonadIO m => DBusMethodInfo -> m (Maybe [DBusArgInfo]) -- | Set the value of the “in_args” field. When overloading -- is enabled, this is equivalent to -- --
-- set dBusMethodInfo [ #inArgs := value ] --setDBusMethodInfoInArgs :: MonadIO m => DBusMethodInfo -> Ptr (Ptr DBusArgInfo) -> m () -- | Set the value of the “name” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #name --clearDBusMethodInfoName :: MonadIO m => DBusMethodInfo -> m () -- | Get the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusMethodInfo #name --getDBusMethodInfoName :: MonadIO m => DBusMethodInfo -> m (Maybe Text) -- | Set the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusMethodInfo [ #name := value ] --setDBusMethodInfoName :: MonadIO m => DBusMethodInfo -> CString -> m () -- | Set the value of the “out_args” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #outArgs --clearDBusMethodInfoOutArgs :: MonadIO m => DBusMethodInfo -> m () -- | Get the value of the “out_args” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusMethodInfo #outArgs --getDBusMethodInfoOutArgs :: MonadIO m => DBusMethodInfo -> m (Maybe [DBusArgInfo]) -- | Set the value of the “out_args” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusMethodInfo [ #outArgs := value ] --setDBusMethodInfoOutArgs :: MonadIO m => DBusMethodInfo -> Ptr (Ptr DBusArgInfo) -> m () -- | Get the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusMethodInfo #refCount --getDBusMethodInfoRefCount :: MonadIO m => DBusMethodInfo -> m Int32 -- | Set the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusMethodInfo [ #refCount := value ] --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.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. -- -- Since: 2.26 module GI.Gio.Structs.DBusPropertyInfo -- | Memory-managed wrapper type. newtype DBusPropertyInfo DBusPropertyInfo :: ManagedPtr DBusPropertyInfo -> DBusPropertyInfo -- | Construct a DBusPropertyInfo struct initialized to zero. newZeroDBusPropertyInfo :: MonadIO m => m DBusPropertyInfo -- | If info is statically allocated does nothing. -- Otherwise increases the reference count. -- -- Since: 2.26 dBusPropertyInfoRef :: (HasCallStack, MonadIO m) => DBusPropertyInfo -> m DBusPropertyInfo -- | If info is statically allocated, does nothing. -- Otherwise decreases the reference count of info. When -- its reference count drops to 0, the memory used is freed. -- -- Since: 2.26 dBusPropertyInfoUnref :: (HasCallStack, MonadIO m) => DBusPropertyInfo -> m () -- | Set the value of the “annotations” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #annotations --clearDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> m () -- | Get the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusPropertyInfo #annotations --getDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> m (Maybe [DBusAnnotationInfo]) -- | Set the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusPropertyInfo [ #annotations := value ] --setDBusPropertyInfoAnnotations :: MonadIO m => DBusPropertyInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () -- | Get the value of the “flags” field. When overloading -- is enabled, this is equivalent to -- --
-- get dBusPropertyInfo #flags --getDBusPropertyInfoFlags :: MonadIO m => DBusPropertyInfo -> m [DBusPropertyInfoFlags] -- | Set the value of the “flags” field. When overloading -- is enabled, this is equivalent to -- --
-- set dBusPropertyInfo [ #flags := value ] --setDBusPropertyInfoFlags :: MonadIO m => DBusPropertyInfo -> [DBusPropertyInfoFlags] -> m () -- | Set the value of the “name” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #name --clearDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> m () -- | Get the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusPropertyInfo #name --getDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> m (Maybe Text) -- | Set the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusPropertyInfo [ #name := value ] --setDBusPropertyInfoName :: MonadIO m => DBusPropertyInfo -> CString -> m () -- | Get the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusPropertyInfo #refCount --getDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> m Int32 -- | Set the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusPropertyInfo [ #refCount := value ] --setDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> Int32 -> m () -- | Set the value of the “signature” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #signature --clearDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> m () -- | Get the value of the “signature” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusPropertyInfo #signature --getDBusPropertyInfoSignature :: MonadIO m => DBusPropertyInfo -> m (Maybe Text) -- | Set the value of the “signature” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusPropertyInfo [ #signature := value ] --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.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. -- -- Since: 2.26 module GI.Gio.Structs.DBusSignalInfo -- | Memory-managed wrapper type. newtype DBusSignalInfo DBusSignalInfo :: ManagedPtr DBusSignalInfo -> DBusSignalInfo -- | Construct a DBusSignalInfo struct initialized to zero. newZeroDBusSignalInfo :: MonadIO m => m DBusSignalInfo -- | If info is statically allocated does nothing. -- Otherwise increases the reference count. -- -- Since: 2.26 dBusSignalInfoRef :: (HasCallStack, MonadIO m) => DBusSignalInfo -> m DBusSignalInfo -- | If info is statically allocated, does nothing. -- Otherwise decreases the reference count of info. When -- its reference count drops to 0, the memory used is freed. -- -- Since: 2.26 dBusSignalInfoUnref :: (HasCallStack, MonadIO m) => DBusSignalInfo -> m () -- | Set the value of the “annotations” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #annotations --clearDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> m () -- | Get the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusSignalInfo #annotations --getDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> m (Maybe [DBusAnnotationInfo]) -- | Set the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusSignalInfo [ #annotations := value ] --setDBusSignalInfoAnnotations :: MonadIO m => DBusSignalInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () -- | Set the value of the “args” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #args --clearDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> m () -- | Get the value of the “args” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusSignalInfo #args --getDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> m (Maybe [DBusArgInfo]) -- | Set the value of the “args” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusSignalInfo [ #args := value ] --setDBusSignalInfoArgs :: MonadIO m => DBusSignalInfo -> Ptr (Ptr DBusArgInfo) -> m () -- | Set the value of the “name” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #name --clearDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> m () -- | Get the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusSignalInfo #name --getDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> m (Maybe Text) -- | Set the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusSignalInfo [ #name := value ] --setDBusSignalInfoName :: MonadIO m => DBusSignalInfo -> CString -> m () -- | Get the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusSignalInfo #refCount --getDBusSignalInfoRefCount :: MonadIO m => DBusSignalInfo -> m Int32 -- | Set the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusSignalInfo [ #refCount := value ] --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.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. -- -- Since: 2.26 module GI.Gio.Structs.DBusNodeInfo -- | Memory-managed wrapper type. newtype DBusNodeInfo DBusNodeInfo :: ManagedPtr DBusNodeInfo -> DBusNodeInfo -- | Construct a DBusNodeInfo struct initialized to zero. newZeroDBusNodeInfo :: MonadIO m => m DBusNodeInfo -- | Appends an XML representation of info (and its -- children) to stringBuilder. -- -- This function is typically used for generating introspection XML -- documents at run-time for handling the -- org.freedesktop.DBus.Introspectable.Introspect method. -- -- Since: 2.26 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. -- -- Since: 2.26 dBusNodeInfoLookupInterface :: (HasCallStack, MonadIO m) => DBusNodeInfo -> Text -> m (Maybe DBusInterfaceInfo) -- | Parses xmlData and returns a DBusNodeInfo -- representing the data. -- -- The introspection XML must contain exactly one top-level -- <node> element. -- -- Note that this routine is using a -- [GMarkup][glib-Simple-XML-Subset-Parser.description]-based parser that -- only accepts a subset of valid XML documents. -- -- Since: 2.26 dBusNodeInfoNewForXml :: (HasCallStack, MonadIO m) => Text -> m DBusNodeInfo -- | If info is statically allocated does nothing. -- Otherwise increases the reference count. -- -- Since: 2.26 dBusNodeInfoRef :: (HasCallStack, MonadIO m) => DBusNodeInfo -> m DBusNodeInfo -- | If info is statically allocated, does nothing. -- Otherwise decreases the reference count of info. When -- its reference count drops to 0, the memory used is freed. -- -- Since: 2.26 dBusNodeInfoUnref :: (HasCallStack, MonadIO m) => DBusNodeInfo -> m () -- | Set the value of the “annotations” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #annotations --clearDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> m () -- | Get the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusNodeInfo #annotations --getDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> m (Maybe [DBusAnnotationInfo]) -- | Set the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusNodeInfo [ #annotations := value ] --setDBusNodeInfoAnnotations :: MonadIO m => DBusNodeInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () -- | Set the value of the “interfaces” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #interfaces --clearDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> m () -- | Get the value of the “interfaces” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusNodeInfo #interfaces --getDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> m (Maybe [DBusInterfaceInfo]) -- | Set the value of the “interfaces” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusNodeInfo [ #interfaces := value ] --setDBusNodeInfoInterfaces :: MonadIO m => DBusNodeInfo -> Ptr (Ptr DBusInterfaceInfo) -> m () -- | Set the value of the “nodes” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #nodes --clearDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> m () -- | Get the value of the “nodes” field. When overloading -- is enabled, this is equivalent to -- --
-- get dBusNodeInfo #nodes --getDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> m (Maybe [DBusNodeInfo]) -- | Set the value of the “nodes” field. When overloading -- is enabled, this is equivalent to -- --
-- set dBusNodeInfo [ #nodes := value ] --setDBusNodeInfoNodes :: MonadIO m => DBusNodeInfo -> Ptr (Ptr DBusNodeInfo) -> m () -- | Set the value of the “path” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #path --clearDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> m () -- | Get the value of the “path” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusNodeInfo #path --getDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> m (Maybe Text) -- | Set the value of the “path” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusNodeInfo [ #path := value ] --setDBusNodeInfoPath :: MonadIO m => DBusNodeInfo -> CString -> m () -- | Get the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusNodeInfo #refCount --getDBusNodeInfoRefCount :: MonadIO m => DBusNodeInfo -> m Int32 -- | Set the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusNodeInfo [ #refCount := value ] --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.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. -- -- Since: 2.26 module GI.Gio.Structs.DBusInterfaceInfo -- | Memory-managed wrapper type. newtype DBusInterfaceInfo DBusInterfaceInfo :: ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo -- | Construct a DBusInterfaceInfo struct initialized to zero. newZeroDBusInterfaceInfo :: MonadIO m => m DBusInterfaceInfo -- | Builds a lookup-cache to speed up -- dBusInterfaceInfoLookupMethod, -- dBusInterfaceInfoLookupSignal and -- dBusInterfaceInfoLookupProperty. -- -- If this has already been called with info, the -- existing cache is used and its use count is increased. -- -- Note that info cannot be modified until -- dBusInterfaceInfoCacheRelease is called. -- -- Since: 2.30 dBusInterfaceInfoCacheBuild :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m () -- | Decrements the usage count for the cache for info -- built by dBusInterfaceInfoCacheBuild (if any) and frees the -- resources used by the cache if the usage count drops to zero. -- -- Since: 2.30 dBusInterfaceInfoCacheRelease :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m () -- | Appends an XML representation of info (and its -- children) to stringBuilder. -- -- This function is typically used for generating introspection XML -- documents at run-time for handling the -- org.freedesktop.DBus.Introspectable.Introspect method. -- -- Since: 2.26 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 -- dBusInterfaceInfoCacheBuild has been used on -- info. -- -- Since: 2.26 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 -- dBusInterfaceInfoCacheBuild has been used on -- info. -- -- Since: 2.26 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 -- dBusInterfaceInfoCacheBuild has been used on -- info. -- -- Since: 2.26 dBusInterfaceInfoLookupSignal :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> Text -> m (Maybe DBusSignalInfo) -- | If info is statically allocated does nothing. -- Otherwise increases the reference count. -- -- Since: 2.26 dBusInterfaceInfoRef :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m DBusInterfaceInfo -- | If info is statically allocated, does nothing. -- Otherwise decreases the reference count of info. When -- its reference count drops to 0, the memory used is freed. -- -- Since: 2.26 dBusInterfaceInfoUnref :: (HasCallStack, MonadIO m) => DBusInterfaceInfo -> m () -- | Set the value of the “annotations” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #annotations --clearDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m () -- | Get the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusInterfaceInfo #annotations --getDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusAnnotationInfo]) -- | Set the value of the “annotations” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusInterfaceInfo [ #annotations := value ] --setDBusInterfaceInfoAnnotations :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusAnnotationInfo) -> m () -- | Set the value of the “methods” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #methods --clearDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m () -- | Get the value of the “methods” field. When overloading -- is enabled, this is equivalent to -- --
-- get dBusInterfaceInfo #methods --getDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusMethodInfo]) -- | Set the value of the “methods” field. When overloading -- is enabled, this is equivalent to -- --
-- set dBusInterfaceInfo [ #methods := value ] --setDBusInterfaceInfoMethods :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusMethodInfo) -> m () -- | Set the value of the “name” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #name --clearDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m () -- | Get the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- get dBusInterfaceInfo #name --getDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> m (Maybe Text) -- | Set the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- set dBusInterfaceInfo [ #name := value ] --setDBusInterfaceInfoName :: MonadIO m => DBusInterfaceInfo -> CString -> m () -- | Set the value of the “properties” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #properties --clearDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m () -- | Get the value of the “properties” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusInterfaceInfo #properties --getDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusPropertyInfo]) -- | Set the value of the “properties” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusInterfaceInfo [ #properties := value ] --setDBusInterfaceInfoProperties :: MonadIO m => DBusInterfaceInfo -> Ptr (Ptr DBusPropertyInfo) -> m () -- | Get the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusInterfaceInfo #refCount --getDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> m Int32 -- | Set the value of the “ref_count” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusInterfaceInfo [ #refCount := value ] --setDBusInterfaceInfoRefCount :: MonadIO m => DBusInterfaceInfo -> Int32 -> m () -- | Set the value of the “signals” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #signals --clearDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m () -- | Get the value of the “signals” field. When overloading -- is enabled, this is equivalent to -- --
-- get dBusInterfaceInfo #signals --getDBusInterfaceInfoSignals :: MonadIO m => DBusInterfaceInfo -> m (Maybe [DBusSignalInfo]) -- | Set the value of the “signals” field. When overloading -- is enabled, this is equivalent to -- --
-- set dBusInterfaceInfo [ #signals := value ] --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.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 GDBusObjectManager type is the base type for service- and -- client-side implementations of the standardized -- `org.freedesktop.DBus.ObjectManager` interface. -- -- See DBusObjectManagerClient for the client-side implementation -- and DBusObjectManagerServer 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 -- DBusObjectManager, for instance with -- toDBusObjectManager. class (GObject o, IsDescendantOf DBusObjectManager o) => IsDBusObjectManager o -- | Cast to DBusObjectManager, for types for which this is known to -- be safe. For general casts, use castTo. toDBusObjectManager :: (MonadIO m, IsDBusObjectManager o) => o -> m DBusObjectManager -- | Gets the interface proxy for interfaceName at -- objectPath, if any. -- -- Since: 2.30 dBusObjectManagerGetInterface :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> Text -> m (Maybe DBusInterface) -- | Gets the DBusObject at objectPath, if any. -- -- Since: 2.30 dBusObjectManagerGetObject :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> m (Maybe DBusObject) -- | Gets the object path that manager is for. -- -- Since: 2.30 dBusObjectManagerGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m Text -- | Gets all DBusObject objects known to manager. -- -- Since: 2.30 dBusObjectManagerGetObjects :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m [DBusObject] -- | Emitted when interface is added to -- object. -- -- This signal exists purely as a convenience to avoid having to connect -- signals to all objects managed by manager. -- -- Since: 2.30 type DBusObjectManagerInterfaceAddedCallback = DBusObject -> DBusInterface -> IO () -- | Connect a signal handler for the interfaceAdded signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObjectManager #interfaceAdded callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId -- | Connect a signal handler for the interfaceAdded signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusObjectManager #interfaceAdded callback --onDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceAddedCallback) -> m SignalHandlerId -- | Emitted when interface has been removed from -- object. -- -- This signal exists purely as a convenience to avoid having to connect -- signals to all objects managed by manager. -- -- Since: 2.30 type DBusObjectManagerInterfaceRemovedCallback = DBusObject -> DBusInterface -> IO () -- | Connect a signal handler for the interfaceRemoved signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObjectManager #interfaceRemoved callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId -- | Connect a signal handler for the interfaceRemoved signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusObjectManager #interfaceRemoved callback --onDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerInterfaceRemovedCallback) -> m SignalHandlerId -- | Emitted when object is added to -- manager. -- -- Since: 2.30 type DBusObjectManagerObjectAddedCallback = DBusObject -> IO () -- | Connect a signal handler for the objectAdded signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after dBusObjectManager #objectAdded callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId -- | Connect a signal handler for the objectAdded signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on dBusObjectManager #objectAdded callback --onDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectAddedCallback) -> m SignalHandlerId -- | Emitted when object is removed from -- manager. -- -- Since: 2.30 type DBusObjectManagerObjectRemovedCallback = DBusObject -> IO () -- | Connect a signal handler for the objectRemoved signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObjectManager #objectRemoved callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerObjectRemovedCallback) -> m SignalHandlerId -- | Connect a signal handler for the objectRemoved signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusObjectManager #objectRemoved callback --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.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 GDBusObject type is the base type for D-Bus objects on -- both the service side (see DBusObjectSkeleton) and the client -- side (see DBusObjectProxy). 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 DBusObject, -- for instance with toDBusObject. class (GObject o, IsDescendantOf DBusObject o) => IsDBusObject o -- | Cast to DBusObject, for types for which this is known to be -- safe. For general casts, use castTo. toDBusObject :: (MonadIO m, IsDBusObject o) => o -> m DBusObject -- | Gets the D-Bus interface with name interfaceName -- associated with object, if any. -- -- Since: 2.30 dBusObjectGetInterface :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> Text -> m (Maybe DBusInterface) -- | Gets the D-Bus interfaces associated with object. -- -- Since: 2.30 dBusObjectGetInterfaces :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m [DBusInterface] -- | Gets the object path for object. -- -- Since: 2.30 dBusObjectGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m Text -- | Emitted when interface is added to -- object. -- -- Since: 2.30 type DBusObjectInterfaceAddedCallback = DBusInterface -> IO () -- | Connect a signal handler for the interfaceAdded signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObject #interfaceAdded callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId -- | Connect a signal handler for the interfaceAdded signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusObject #interfaceAdded callback --onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceAddedCallback) -> m SignalHandlerId -- | Emitted when interface is removed from -- object. -- -- Since: 2.30 type DBusObjectInterfaceRemovedCallback = DBusInterface -> IO () -- | Connect a signal handler for the interfaceRemoved signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObject #interfaceRemoved callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> ((?self :: a) => DBusObjectInterfaceRemovedCallback) -> m SignalHandlerId -- | Connect a signal handler for the interfaceRemoved signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusObject #interfaceRemoved callback --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.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 GDBusInterface type is the base type for D-Bus interfaces -- both on the service side (see DBusInterfaceSkeleton) and client -- side (see DBusProxy). -- -- Since: 2.30 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 DBusInterface, -- for instance with toDBusInterface. class (GObject o, IsDescendantOf DBusInterface o) => IsDBusInterface o -- | Cast to DBusInterface, for types for which this is known to be -- safe. For general casts, use castTo. toDBusInterface :: (MonadIO m, IsDBusInterface o) => o -> m DBusInterface -- | Gets D-Bus introspection information for the D-Bus interface -- implemented by interface_. -- -- Since: 2.30 dBusInterfaceGetInfo :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m DBusInterfaceInfo -- | Gets the DBusObject that interface_ belongs to, -- if any. -- -- Since: 2.32 dBusInterfaceGetObject :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m (Maybe DBusObject) -- | Sets the DBusObject for interface_ to -- object. -- -- Note that interface_ will hold a weak reference to -- object. -- -- Since: 2.30 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.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 FileAttributeInfo struct initialized to zero. newZeroFileAttributeInfo :: MonadIO m => m FileAttributeInfo -- | Get the value of the “flags” field. When overloading -- is enabled, this is equivalent to -- --
-- get fileAttributeInfo #flags --getFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> m [FileAttributeInfoFlags] -- | Set the value of the “flags” field. When overloading -- is enabled, this is equivalent to -- --
-- set fileAttributeInfo [ #flags := value ] --setFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> [FileAttributeInfoFlags] -> m () -- | Set the value of the “name” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #name --clearFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m () -- | Get the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- get fileAttributeInfo #name --getFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m (Maybe Text) -- | Set the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- set fileAttributeInfo [ #name := value ] --setFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> CString -> m () -- | Get the value of the “type” field. When overloading is -- enabled, this is equivalent to -- --
-- get fileAttributeInfo #type --getFileAttributeInfoType :: MonadIO m => FileAttributeInfo -> m FileAttributeType -- | Set the value of the “type” field. When overloading is -- enabled, this is equivalent to -- --
-- set fileAttributeInfo [ #type := value ] --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 -- GFileAttributeInfos. module GI.Gio.Structs.FileAttributeInfoList -- | Memory-managed wrapper type. newtype FileAttributeInfoList FileAttributeInfoList :: ManagedPtr FileAttributeInfoList -> FileAttributeInfoList -- | Construct a FileAttributeInfoList struct initialized to zero. newZeroFileAttributeInfoList :: MonadIO m => m FileAttributeInfoList -- | Adds a new attribute with name to the -- list, setting its type and -- flags. 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 name from -- list. 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 list. If the -- reference count falls to zero, the list is deleted. fileAttributeInfoListUnref :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> m () -- | Set the value of the “infos” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #infos --clearFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m () -- | Get the value of the “infos” field. When overloading -- is enabled, this is equivalent to -- --
-- get fileAttributeInfoList #infos --getFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m (Maybe FileAttributeInfo) -- | Set the value of the “infos” field. When overloading -- is enabled, this is equivalent to -- --
-- set fileAttributeInfoList [ #infos := value ] --setFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> Ptr FileAttributeInfo -> m () -- | Get the value of the “n_infos” field. When overloading -- is enabled, this is equivalent to -- --
-- get fileAttributeInfoList #nInfos --getFileAttributeInfoListNInfos :: MonadIO m => FileAttributeInfoList -> m Int32 -- | Set the value of the “n_infos” field. When overloading -- is enabled, this is equivalent to -- --
-- set fileAttributeInfoList [ #nInfos := value ] --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.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 True if a wildcard character is in use -- (e.g. if matcher was created with "standard::*" and ns -- is "standard", or if matcher was created using "*" and namespace is -- anything.) -- -- TODO: this is awkwardly worded. fileAttributeMatcherEnumerateNamespace :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool -- | Gets the next matched attribute from a FileAttributeMatcher. 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 True. fileAttributeMatcherMatches :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool -- | Checks if an attribute matcher only matches a given attribute. Always -- returns False 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. GFileAttributeMatchers are reference -- counted structures, and are created with a reference count of 1. If -- the number of references falls to 0, the FileAttributeMatcher -- is automatically destroyed. -- -- The attributes string should be formatted with -- specific keys separated from namespaces with a double colon. Several -- "namespacekey" strings may be concatenated with a single comma -- (e.g. "standardtype,standardisHidden"). The wildcard "*" -- may be used to match all keys and namespaces, or "namespace::*" will -- match all keys in a given namespace. -- --
-- get zlibDecompressor #fileInfo --getZlibDecompressorFileInfo :: (MonadIO m, IsZlibDecompressor o) => o -> m (Maybe FileInfo) -- | Construct a GValueConstruct with valid value for the -- “format” property. This is rarely needed directly, but it is -- used by new. constructZlibDecompressorFormat :: (IsZlibDecompressor o, MonadIO m) => ZlibCompressorFormat -> m (GValueConstruct o) -- | Get the value of the “format” property. When -- overloading is enabled, this is equivalent to -- --
-- get zlibDecompressor #format --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.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 -- | GZlibCompressor is an implementation of Converter 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 -- ZlibCompressor, for instance with toZlibCompressor. class (GObject o, IsDescendantOf ZlibCompressor o) => IsZlibCompressor o -- | Cast to ZlibCompressor, for types for which this is known to be -- safe. For general casts, use castTo. toZlibCompressor :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressor -- | Returns the ZlibCompressor:fileInfo property. -- -- Since: 2.26 zlibCompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> m (Maybe FileInfo) -- | Creates a new ZlibCompressor. -- -- Since: 2.24 zlibCompressorNew :: (HasCallStack, MonadIO m) => ZlibCompressorFormat -> Int32 -> m ZlibCompressor -- | Sets fileInfo in compressor. If -- non-Nothing, and compressor's -- ZlibCompressor:format property is -- ZlibCompressorFormatGzip, it will be used to set the file name -- and modification time in the GZIP header of the compressed data. -- -- Note: it is an error to call this function while a compression is in -- progress; it may only be called immediately after creation of -- compressor, or after resetting it with -- converterReset. -- -- Since: 2.26 zlibCompressorSetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a, IsFileInfo b) => a -> Maybe b -> m () -- | Set the value of the “file-info” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #fileInfo --clearZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “file-info” property. This is rarely needed directly, but it -- is used by new. constructZlibCompressorFileInfo :: (IsZlibCompressor o, MonadIO m, IsFileInfo a) => a -> m (GValueConstruct o) -- | Get the value of the “file-info” property. When -- overloading is enabled, this is equivalent to -- --
-- get zlibCompressor #fileInfo --getZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m (Maybe FileInfo) -- | Set the value of the “file-info” property. When -- overloading is enabled, this is equivalent to -- --
-- set zlibCompressor [ #fileInfo := value ] --setZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o, IsFileInfo a) => o -> a -> m () -- | Construct a GValueConstruct with valid value for the -- “format” property. This is rarely needed directly, but it is -- used by new. constructZlibCompressorFormat :: (IsZlibCompressor o, MonadIO m) => ZlibCompressorFormat -> m (GValueConstruct o) -- | Get the value of the “format” property. When -- overloading is enabled, this is equivalent to -- --
-- get zlibCompressor #format --getZlibCompressorFormat :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressorFormat -- | Construct a GValueConstruct with valid value for the -- “level” property. This is rarely needed directly, but it is -- used by new. constructZlibCompressorLevel :: (IsZlibCompressor o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “level” property. When -- overloading is enabled, this is equivalent to -- --
-- get zlibCompressor #level --getZlibCompressorLevel :: (MonadIO m, IsZlibCompressor o) => o -> m Int32 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.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 -- File. -- -- Functionality for manipulating basic metadata for files. -- GFileInfo implements methods for getting information that all -- files should contain, and allows for manipulation of extended -- attributes. -- -- See the file attributes document for more information on how -- GIO handles file attributes. -- -- To obtain a GFileInfo for a File, use -- fileQueryInfo (or its async variant). To obtain a -- GFileInfo for a file input or output stream, use -- fileInputStreamQueryInfo or fileOutputStreamQueryInfo -- (or their async variants). -- -- To change the actual attributes of a file, you should then set the -- attribute in the GFileInfo and call -- fileSetAttributesFromInfo or fileSetAttributesAsync on a -- GFile. -- -- However, not all attributes can be changed in the file. For instance, -- the actual size of a file cannot be changed via -- fileInfoSetSize. You may call -- fileQuerySettableAttributes and -- fileQueryWritableNamespaces to discover the settable attributes -- of a particular file at runtime. -- -- The direct accessors, such as fileInfoGetName, are slightly -- more optimized than the generic attribute accessors, such as -- fileInfoGetAttributeByteString.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 GFileInfo. Use -- fileInfoHasAttribute or fileInfoListAttributes to check -- what attributes are specified for a GFileInfo. -- -- FileAttributeMatcher allows for searching through a -- GFileInfo 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 FileInfo, for -- instance with toFileInfo. class (GObject o, IsDescendantOf FileInfo o) => IsFileInfo o -- | Cast to FileInfo, for types for which this is known to be safe. -- For general casts, use castTo. toFileInfo :: (MonadIO m, IsFileInfo o) => o -> m FileInfo -- | Clears the status information from info. fileInfoClearStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m () -- | First clears all of the [GFileAttribute][gio-GFileAttribute] of -- destInfo, and then copies all of the file attributes -- from srcInfo to destInfo. 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 info and returns -- it as a DateTime. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_TIME_ACCESS. If -- FILE_ATTRIBUTE_TIME_ACCESS_USEC is provided, the resulting -- DateTime will additionally have microsecond precision. -- -- If nanosecond precision is needed, -- FILE_ATTRIBUTE_TIME_ACCESS_NSEC must be queried separately -- using fileInfoGetAttributeUint32. -- -- Since: 2.70 fileInfoGetAccessDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe DateTime) -- | Gets the value of an attribute, formatted as a string. This escapes -- things as needed to make the string valid UTF-8. 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, False 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, Nothing 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, NULL will be -- returned. -- -- This function is meant to be used by language bindings that have -- specific handling for Unix paths. -- -- Since: 2.78 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 Object attribute. If the attribute does not -- contain a Object, Nothing 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, Nothing 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, Nothing will be returned. -- -- Since: 2.22 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 FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. fileInfoGetContentType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe Text) -- | Gets the creation time of the current info and returns -- it as a DateTime. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_TIME_CREATED. If -- FILE_ATTRIBUTE_TIME_CREATED_USEC is provided, the resulting -- DateTime will additionally have microsecond precision. -- -- If nanosecond precision is needed, -- FILE_ATTRIBUTE_TIME_CREATED_NSEC must be queried separately -- using fileInfoGetAttributeUint32. -- -- Since: 2.70 fileInfoGetCreationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe DateTime) -- | Returns the DateTime representing the deletion date of the -- file, as available in FILE_ATTRIBUTE_TRASH_DELETION_DATE. If -- the FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, -- Nothing is returned. -- -- Since: 2.36 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 FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. 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 FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_EDIT_NAME. fileInfoGetEditName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text -- | Gets the entity tag for a given FileInfo. See -- FILE_ATTRIBUTE_ETAG_VALUE. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_ETAG_VALUE. 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 -- fileInfoGetContentType. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_TYPE. fileInfoGetFileType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m FileType -- | Gets the icon for a file. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_ICON. 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 FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_IS_BACKUP. fileInfoGetIsBackup :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool -- | Checks if a file is hidden. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. 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 FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. fileInfoGetIsSymlink :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool -- | Gets the modification time of the current info and -- returns it as a DateTime. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_TIME_MODIFIED. If -- FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided, the resulting -- DateTime will additionally have microsecond precision. -- -- If nanosecond precision is needed, -- FILE_ATTRIBUTE_TIME_MODIFIED_NSEC must be queried separately -- using fileInfoGetAttributeUint32. -- -- Since: 2.62 fileInfoGetModificationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe DateTime) -- | Gets the modification time of the current info and -- sets it in result. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_TIME_MODIFIED. If -- FILE_ATTRIBUTE_TIME_MODIFIED_USEC is provided it will be used -- too. -- | Deprecated: (Since version 2.62)Use -- fileInfoGetModificationDateTime instead, asTimeVal is -- deprecated due to the year 2038 problem. 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 FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_NAME. 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 FILE_ATTRIBUTE_STANDARD_SIZE attribute and is -- converted from guint64 to goffset -- before returning the result. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_SIZE. fileInfoGetSize :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Int64 -- | Gets the value of the sort_order attribute from the FileInfo. -- See FILE_ATTRIBUTE_STANDARD_SORT_ORDER. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_SORT_ORDER. 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 FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON. -- -- Since: 2.34 fileInfoGetSymbolicIcon :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe Icon) -- | Gets the symlink target for a given FileInfo. -- -- It is an error to call this if the FileInfo does not contain -- FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET. fileInfoGetSymlinkTarget :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (Maybe [Char]) -- | Checks if a file info structure has an attribute named -- attribute. fileInfoHasAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Bool -- | Checks if a file info structure has an attribute in the specified -- nameSpace. -- -- Since: 2.22 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 attribute from -- info if it exists. fileInfoRemoveAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m () -- | Sets the FILE_ATTRIBUTE_TIME_ACCESS and -- FILE_ATTRIBUTE_TIME_ACCESS_USEC attributes in the file info to -- the given date/time value. -- -- FILE_ATTRIBUTE_TIME_ACCESS_NSEC will be cleared. -- -- Since: 2.70 fileInfoSetAccessDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> DateTime -> m () -- | Sets the attribute to contain the given value, if -- possible. To unset the attribute, use FileAttributeTypeInvalid -- for type. fileInfoSetAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> FileAttributeType -> Ptr () -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. fileInfoSetAttributeBoolean :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Bool -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. fileInfoSetAttributeByteString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Text -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. -- -- This function is meant to be used by language bindings that have -- specific handling for Unix paths. -- -- Since: 2.78 fileInfoSetAttributeFilePath :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> [Char] -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. fileInfoSetAttributeInt32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Int32 -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. fileInfoSetAttributeInt64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Int64 -> m () -- | Sets mask on info to match specific -- attribute types. fileInfoSetAttributeMask :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> FileAttributeMatcher -> m () -- | Sets the attribute to contain the given -- attrValue, 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 fileSetAttributesFromInfo or -- similar functions. -- -- The attribute must exist in info for this to work. -- Otherwise False is returned and info is -- unchanged. -- -- Since: 2.22 fileInfoSetAttributeStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> FileAttributeStatus -> m Bool -- | Sets the attribute to contain the given -- attrValue, if possible. fileInfoSetAttributeString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Text -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. -- -- Sinze: 2.22 fileInfoSetAttributeStringv :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> [Text] -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. fileInfoSetAttributeUint32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Word32 -> m () -- | Sets the attribute to contain the given -- attrValue, if possible. fileInfoSetAttributeUint64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Word64 -> m () -- | Sets the content type attribute for a given FileInfo. See -- FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. fileInfoSetContentType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m () -- | Sets the FILE_ATTRIBUTE_TIME_CREATED and -- FILE_ATTRIBUTE_TIME_CREATED_USEC attributes in the file info to -- the given date/time value. -- -- FILE_ATTRIBUTE_TIME_CREATED_NSEC will be cleared. -- -- Since: 2.70 fileInfoSetCreationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> DateTime -> m () -- | Sets the display name for the current FileInfo. See -- FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. fileInfoSetDisplayName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m () -- | Sets the edit name for the current file. See -- FILE_ATTRIBUTE_STANDARD_EDIT_NAME. fileInfoSetEditName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m () -- | Sets the file type in a FileInfo to type. See -- FILE_ATTRIBUTE_STANDARD_TYPE. fileInfoSetFileType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> FileType -> m () -- | Sets the icon for a given FileInfo. See -- FILE_ATTRIBUTE_STANDARD_ICON. fileInfoSetIcon :: (HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) => a -> b -> m () -- | Sets the "is_hidden" attribute in a FileInfo according to -- isHidden. See -- FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. fileInfoSetIsHidden :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Bool -> m () -- | Sets the "is_symlink" attribute in a FileInfo according to -- isSymlink. See -- FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. fileInfoSetIsSymlink :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Bool -> m () -- | Sets the FILE_ATTRIBUTE_TIME_MODIFIED and -- FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info -- to the given date/time value. -- -- FILE_ATTRIBUTE_TIME_MODIFIED_NSEC will be cleared. -- -- Since: 2.62 fileInfoSetModificationDateTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> DateTime -> m () -- | Sets the FILE_ATTRIBUTE_TIME_MODIFIED and -- FILE_ATTRIBUTE_TIME_MODIFIED_USEC attributes in the file info -- to the given time value. -- -- FILE_ATTRIBUTE_TIME_MODIFIED_NSEC will be cleared. -- | Deprecated: (Since version 2.62)Use -- fileInfoSetModificationDateTime instead, asTimeVal is -- deprecated due to the year 2038 problem. fileInfoSetModificationTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> TimeVal -> m () -- | Sets the name attribute for the current FileInfo. See -- FILE_ATTRIBUTE_STANDARD_NAME. fileInfoSetName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> [Char] -> m () -- | Sets the FILE_ATTRIBUTE_STANDARD_SIZE 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 -- FILE_ATTRIBUTE_STANDARD_SORT_ORDER. fileInfoSetSortOrder :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Int32 -> m () -- | Sets the symbolic icon for a given FileInfo. See -- FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON. -- -- Since: 2.34 fileInfoSetSymbolicIcon :: (HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) => a -> b -> m () -- | Sets the FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in -- the file info to the given symlink target. fileInfoSetSymlinkTarget :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> [Char] -> m () -- | Unsets a mask set by fileInfoSetAttributeMask, 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.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 -- | IOExtension 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 extension 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 extension was registered. iOExtensionGetPriority :: (HasCallStack, MonadIO m) => IOExtension -> m Int32 -- | Gets the type associated with extension. 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 -- | GIOExtensionPoint 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 iOExtensionPointRegister to register an extension -- point, and iOExtensionPointSetRequiredType to set a required -- type. -- -- A module can implement an extension point by specifying the -- [typegObject.Type] that implements the functionality. -- Additionally, each implementation of an extension point has a name, -- and a priority. Use iOExtensionPointImplement to implement an -- extension point. -- --
-- 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);
--
--
--
-- // 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);
--
--
-- 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
-- gio-querymodules. You are expected to run this command after
-- installing a GIO module.
--
-- The GIO_EXTRA_MODULES environment variable can be used to
-- specify additional directories to automatically load modules from.
-- This environment variable has the same syntax as the PATH. 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 IOExtension 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 extensionPoint.
iOExtensionPointGetRequiredType :: (HasCallStack, MonadIO m) => IOExtensionPoint -> m GType
-- | Registers type as extension for the extension point
-- with name extensionPointName.
--
-- If type has already been registered as an extension
-- for this extension point, the existing IOExtension 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 extensionPoint to
-- type. 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
-- g_io_modules_load_all_in_directory_with_scope() or
-- ioModulesScanAllInDirectoryWithScope.
--
-- Since: 2.30
module GI.Gio.Structs.IOModuleScope
-- | Memory-managed wrapper type.
newtype IOModuleScope
IOModuleScope :: ManagedPtr IOModuleScope -> IOModuleScope
-- | Block modules with the given basename from being
-- loaded when this scope is used with
-- ioModulesScanAllInDirectoryWithScope or
-- g_io_modules_load_all_in_directory_with_scope().
--
-- Since: 2.30
iOModuleScopeBlock :: (HasCallStack, MonadIO m) => IOModuleScope -> Text -> m ()
-- | Free a module scope.
--
-- Since: 2.30
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).
-- | Deprecated: (Since version 2.36)Use
-- g_main_context_invoke().
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 userData from
-- ioSchedulerPushJob on to this function you have to ensure that
-- it is not freed before func is called, either by
-- passing Nothing as notify to
-- ioSchedulerPushJob or by using refcounting for
-- userData.
-- | Deprecated: (Since version 2.36)Use
-- g_main_context_invoke().
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
-- | No description available in the introspection data.
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 GInputVectors and the operation will store
-- the read data starting in the first buffer, switching to the next as
-- needed.
--
-- Since: 2.22
module GI.Gio.Structs.InputVector
-- | Memory-managed wrapper type.
newtype InputVector
InputVector :: ManagedPtr InputVector -> InputVector
-- | Construct a InputVector struct initialized to zero.
newZeroInputVector :: MonadIO m => m InputVector
-- | Set the value of the “buffer” field to Nothing. When
-- overloading is enabled, this is equivalent to
--
-- -- clear #buffer --clearInputVectorBuffer :: MonadIO m => InputVector -> m () -- | Get the value of the “buffer” field. When overloading -- is enabled, this is equivalent to -- --
-- get inputVector #buffer --getInputVectorBuffer :: MonadIO m => InputVector -> m (Ptr ()) -- | Set the value of the “buffer” field. When overloading -- is enabled, this is equivalent to -- --
-- set inputVector [ #buffer := value ] --setInputVectorBuffer :: MonadIO m => InputVector -> Ptr () -> m () -- | Get the value of the “size” field. When overloading is -- enabled, this is equivalent to -- --
-- get inputVector #size --getInputVectorSize :: MonadIO m => InputVector -> m CSize -- | Set the value of the “size” field. When overloading is -- enabled, this is equivalent to -- --
-- set inputVector [ #size := value ] --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 GOutputVectors and the operation will use -- all the buffers as if they were one buffer. -- -- Since: 2.22 module GI.Gio.Structs.OutputVector -- | Memory-managed wrapper type. newtype OutputVector OutputVector :: ManagedPtr OutputVector -> OutputVector -- | Construct a OutputVector struct initialized to zero. newZeroOutputVector :: MonadIO m => m OutputVector -- | Set the value of the “buffer” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #buffer --clearOutputVectorBuffer :: MonadIO m => OutputVector -> m () -- | Get the value of the “buffer” field. When overloading -- is enabled, this is equivalent to -- --
-- get outputVector #buffer --getOutputVectorBuffer :: MonadIO m => OutputVector -> m (Ptr ()) -- | Set the value of the “buffer” field. When overloading -- is enabled, this is equivalent to -- --
-- set outputVector [ #buffer := value ] --setOutputVectorBuffer :: MonadIO m => OutputVector -> Ptr () -> m () -- | Get the value of the “size” field. When overloading is -- enabled, this is equivalent to -- --
-- get outputVector #size --getOutputVectorSize :: MonadIO m => OutputVector -> m CSize -- | Set the value of the “size” field. When overloading is -- enabled, this is equivalent to -- --
-- set outputVector [ #size := value ] --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 -- | No description available in the introspection data. type ActionEntryActivateFieldCallback = SimpleAction -> Maybe GVariant -> IO () -- | No description available in the introspection data. 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 GClosure. genClosure_ActionEntryActivateFieldCallback :: MonadIO m => ActionEntryActivateFieldCallback -> m (GClosure C_ActionEntryActivateFieldCallback) -- | Generate a function pointer callable from C code, from a -- C_ActionEntryActivateFieldCallback. mk_ActionEntryActivateFieldCallback :: C_ActionEntryActivateFieldCallback -> IO (FunPtr C_ActionEntryActivateFieldCallback) -- | A convenience synonym for Nothing :: Maybe -- ActionEntryActivateFieldCallback. noActionEntryActivateFieldCallback :: Maybe ActionEntryActivateFieldCallback -- | A convenience synonym for Nothing :: Maybe -- ActionEntryActivateFieldCallback_WithClosures. noActionEntryActivateFieldCallback_WithClosures :: Maybe ActionEntryActivateFieldCallback_WithClosures -- | Wrap a ActionEntryActivateFieldCallback into a -- C_ActionEntryActivateFieldCallback. wrap_ActionEntryActivateFieldCallback :: Maybe (Ptr (FunPtr C_ActionEntryActivateFieldCallback)) -> ActionEntryActivateFieldCallback_WithClosures -> C_ActionEntryActivateFieldCallback -- | No description available in the introspection data. type ActionEntryChangeStateFieldCallback = SimpleAction -> GVariant -> IO () -- | No description available in the introspection data. 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 GClosure. genClosure_ActionEntryChangeStateFieldCallback :: MonadIO m => ActionEntryChangeStateFieldCallback -> m (GClosure C_ActionEntryChangeStateFieldCallback) -- | Generate a function pointer callable from C code, from a -- C_ActionEntryChangeStateFieldCallback. mk_ActionEntryChangeStateFieldCallback :: C_ActionEntryChangeStateFieldCallback -> IO (FunPtr C_ActionEntryChangeStateFieldCallback) -- | A convenience synonym for Nothing :: Maybe -- ActionEntryChangeStateFieldCallback. noActionEntryChangeStateFieldCallback :: Maybe ActionEntryChangeStateFieldCallback -- | A convenience synonym for Nothing :: Maybe -- ActionEntryChangeStateFieldCallback_WithClosures. noActionEntryChangeStateFieldCallback_WithClosures :: Maybe ActionEntryChangeStateFieldCallback_WithClosures -- | Wrap a ActionEntryChangeStateFieldCallback into a -- C_ActionEntryChangeStateFieldCallback. 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. -- AsyncReadyCallback callbacks from Task are guaranteed to -- be invoked in a later iteration of the [thread-default main -- context][g-main-context-push-thread-default] where the Task was -- created. All other users of AsyncReadyCallback must likewise -- call it asynchronously in a later iteration of the main context. -- -- The asynchronous operation is guaranteed to have held a reference to -- sourceObject from the time when the *_async() -- 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. -- AsyncReadyCallback callbacks from Task are guaranteed to -- be invoked in a later iteration of the [thread-default main -- context][g-main-context-push-thread-default] where the Task was -- created. All other users of AsyncReadyCallback must likewise -- call it asynchronously in a later iteration of the main context. -- -- The asynchronous operation is guaranteed to have held a reference to -- sourceObject from the time when the *_async() -- 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 GClosure. genClosure_AsyncReadyCallback :: MonadIO m => AsyncReadyCallback -> m (GClosure C_AsyncReadyCallback) -- | Generate a function pointer callable from C code, from a -- C_AsyncReadyCallback. mk_AsyncReadyCallback :: C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback) -- | A convenience synonym for Nothing :: Maybe -- AsyncReadyCallback. noAsyncReadyCallback :: Maybe AsyncReadyCallback -- | A convenience synonym for Nothing :: Maybe -- AsyncReadyCallback_WithClosures. noAsyncReadyCallback_WithClosures :: Maybe AsyncReadyCallback_WithClosures -- | Wrap a AsyncReadyCallback into a C_AsyncReadyCallback. wrap_AsyncReadyCallback :: Maybe (Ptr (FunPtr C_AsyncReadyCallback)) -> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback -- | Invoked when a connection to a message bus has been obtained. -- -- Since: 2.26 type BusAcquiredCallback = DBusConnection -> Text -> IO () -- | Invoked when a connection to a message bus has been obtained. -- -- Since: 2.26 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 GClosure. genClosure_BusAcquiredCallback :: MonadIO m => BusAcquiredCallback -> m (GClosure C_BusAcquiredCallback) -- | Generate a function pointer callable from C code, from a -- C_BusAcquiredCallback. mk_BusAcquiredCallback :: C_BusAcquiredCallback -> IO (FunPtr C_BusAcquiredCallback) -- | A convenience synonym for Nothing :: Maybe -- BusAcquiredCallback. noBusAcquiredCallback :: Maybe BusAcquiredCallback -- | A convenience synonym for Nothing :: Maybe -- BusAcquiredCallback_WithClosures. noBusAcquiredCallback_WithClosures :: Maybe BusAcquiredCallback_WithClosures -- | Wrap a BusAcquiredCallback into a C_BusAcquiredCallback. wrap_BusAcquiredCallback :: Maybe (Ptr (FunPtr C_BusAcquiredCallback)) -> BusAcquiredCallback_WithClosures -> C_BusAcquiredCallback -- | Invoked when the name is acquired. -- -- Since: 2.26 type BusNameAcquiredCallback = DBusConnection -> Text -> IO () -- | Invoked when the name is acquired. -- -- Since: 2.26 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 GClosure. genClosure_BusNameAcquiredCallback :: MonadIO m => BusNameAcquiredCallback -> m (GClosure C_BusNameAcquiredCallback) -- | Generate a function pointer callable from C code, from a -- C_BusNameAcquiredCallback. mk_BusNameAcquiredCallback :: C_BusNameAcquiredCallback -> IO (FunPtr C_BusNameAcquiredCallback) -- | A convenience synonym for Nothing :: Maybe -- BusNameAcquiredCallback. noBusNameAcquiredCallback :: Maybe BusNameAcquiredCallback -- | A convenience synonym for Nothing :: Maybe -- BusNameAcquiredCallback_WithClosures. noBusNameAcquiredCallback_WithClosures :: Maybe BusNameAcquiredCallback_WithClosures -- | Wrap a BusNameAcquiredCallback into a -- C_BusNameAcquiredCallback. 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. -- -- Since: 2.26 type BusNameAppearedCallback = DBusConnection -> Text -> Text -> IO () -- | Invoked when the name being watched is known to have to have an owner. -- -- Since: 2.26 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 GClosure. genClosure_BusNameAppearedCallback :: MonadIO m => BusNameAppearedCallback -> m (GClosure C_BusNameAppearedCallback) -- | Generate a function pointer callable from C code, from a -- C_BusNameAppearedCallback. mk_BusNameAppearedCallback :: C_BusNameAppearedCallback -> IO (FunPtr C_BusNameAppearedCallback) -- | A convenience synonym for Nothing :: Maybe -- BusNameAppearedCallback. noBusNameAppearedCallback :: Maybe BusNameAppearedCallback -- | A convenience synonym for Nothing :: Maybe -- BusNameAppearedCallback_WithClosures. noBusNameAppearedCallback_WithClosures :: Maybe BusNameAppearedCallback_WithClosures -- | Wrap a BusNameAppearedCallback into a -- C_BusNameAppearedCallback. wrap_BusNameAppearedCallback :: Maybe (Ptr (FunPtr C_BusNameAppearedCallback)) -> BusNameAppearedCallback_WithClosures -> C_BusNameAppearedCallback -- | Invoked when the name is lost or connection has been -- closed. -- -- Since: 2.26 type BusNameLostCallback = DBusConnection -> Text -> IO () -- | Invoked when the name is lost or connection has been -- closed. -- -- Since: 2.26 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 GClosure. genClosure_BusNameLostCallback :: MonadIO m => BusNameLostCallback -> m (GClosure C_BusNameLostCallback) -- | Generate a function pointer callable from C code, from a -- C_BusNameLostCallback. mk_BusNameLostCallback :: C_BusNameLostCallback -> IO (FunPtr C_BusNameLostCallback) -- | A convenience synonym for Nothing :: Maybe -- BusNameLostCallback. noBusNameLostCallback :: Maybe BusNameLostCallback -- | A convenience synonym for Nothing :: Maybe -- BusNameLostCallback_WithClosures. noBusNameLostCallback_WithClosures :: Maybe BusNameLostCallback_WithClosures -- | Wrap a BusNameLostCallback into a C_BusNameLostCallback. 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 DBusConnection on which the watch -- was established has been closed. In that case, -- connection will be Nothing. -- -- Since: 2.26 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 DBusConnection on which the watch -- was established has been closed. In that case, -- connection will be Nothing. -- -- Since: 2.26 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 GClosure. genClosure_BusNameVanishedCallback :: MonadIO m => BusNameVanishedCallback -> m (GClosure C_BusNameVanishedCallback) -- | Generate a function pointer callable from C code, from a -- C_BusNameVanishedCallback. mk_BusNameVanishedCallback :: C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback) -- | A convenience synonym for Nothing :: Maybe -- BusNameVanishedCallback. noBusNameVanishedCallback :: Maybe BusNameVanishedCallback -- | A convenience synonym for Nothing :: Maybe -- BusNameVanishedCallback_WithClosures. noBusNameVanishedCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures -- | Wrap a BusNameVanishedCallback into a -- C_BusNameVanishedCallback. 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 Source -- returned by cancellableSourceNew. -- -- Since: 2.28 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 GClosure. genClosure_CancellableSourceFunc :: MonadIO m => CancellableSourceFunc -> m (GClosure C_CancellableSourceFunc) -- | Generate a function pointer callable from C code, from a -- C_CancellableSourceFunc. mk_CancellableSourceFunc :: C_CancellableSourceFunc -> IO (FunPtr C_CancellableSourceFunc) -- | A convenience synonym for Nothing :: Maybe -- CancellableSourceFunc. noCancellableSourceFunc :: Maybe CancellableSourceFunc -- | Wrap a CancellableSourceFunc into a -- C_CancellableSourceFunc. 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 getProperty function in -- DBusInterfaceVTable. -- -- Since: 2.26 type DBusInterfaceGetPropertyFunc = DBusConnection -> Text -> Text -> Text -> Text -> GError -> IO GVariant -- | The type of the getProperty function in -- DBusInterfaceVTable. -- -- Since: 2.26 type DBusInterfaceGetPropertyFunc_WithClosures = DBusConnection -> 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 -> Text -> Text -> Text -> Text -> GError -> Ptr () -> m GVariant -- | Wrap the callback into a GClosure. genClosure_DBusInterfaceGetPropertyFunc :: MonadIO m => DBusInterfaceGetPropertyFunc -> m (GClosure C_DBusInterfaceGetPropertyFunc) -- | Generate a function pointer callable from C code, from a -- C_DBusInterfaceGetPropertyFunc. mk_DBusInterfaceGetPropertyFunc :: C_DBusInterfaceGetPropertyFunc -> IO (FunPtr C_DBusInterfaceGetPropertyFunc) -- | A convenience synonym for Nothing :: Maybe -- DBusInterfaceGetPropertyFunc. noDBusInterfaceGetPropertyFunc :: Maybe DBusInterfaceGetPropertyFunc -- | A convenience synonym for Nothing :: Maybe -- DBusInterfaceGetPropertyFunc_WithClosures. noDBusInterfaceGetPropertyFunc_WithClosures :: Maybe DBusInterfaceGetPropertyFunc_WithClosures -- | Wrap a DBusInterfaceGetPropertyFunc into a -- C_DBusInterfaceGetPropertyFunc. 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 methodCall function in -- DBusInterfaceVTable. -- -- Since: 2.26 type DBusInterfaceMethodCallFunc = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> DBusMethodInvocation -> IO () -- | The type of the methodCall function in -- DBusInterfaceVTable. -- -- Since: 2.26 type DBusInterfaceMethodCallFunc_WithClosures = DBusConnection -> Text -> Text -> 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 -> Text -> Text -> Text -> Text -> GVariant -> b -> Ptr () -> m () -- | Wrap the callback into a GClosure. genClosure_DBusInterfaceMethodCallFunc :: MonadIO m => DBusInterfaceMethodCallFunc -> m (GClosure C_DBusInterfaceMethodCallFunc) -- | Generate a function pointer callable from C code, from a -- C_DBusInterfaceMethodCallFunc. mk_DBusInterfaceMethodCallFunc :: C_DBusInterfaceMethodCallFunc -> IO (FunPtr C_DBusInterfaceMethodCallFunc) -- | A convenience synonym for Nothing :: Maybe -- DBusInterfaceMethodCallFunc. noDBusInterfaceMethodCallFunc :: Maybe DBusInterfaceMethodCallFunc -- | A convenience synonym for Nothing :: Maybe -- DBusInterfaceMethodCallFunc_WithClosures. noDBusInterfaceMethodCallFunc_WithClosures :: Maybe DBusInterfaceMethodCallFunc_WithClosures -- | Wrap a DBusInterfaceMethodCallFunc into a -- C_DBusInterfaceMethodCallFunc. 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 setProperty function in -- DBusInterfaceVTable. -- -- Since: 2.26 type DBusInterfaceSetPropertyFunc = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> GError -> IO Bool -- | The type of the setProperty function in -- DBusInterfaceVTable. -- -- Since: 2.26 type DBusInterfaceSetPropertyFunc_WithClosures = DBusConnection -> 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 -> Text -> Text -> Text -> Text -> GVariant -> GError -> Ptr () -> m Bool -- | Wrap the callback into a GClosure. genClosure_DBusInterfaceSetPropertyFunc :: MonadIO m => DBusInterfaceSetPropertyFunc -> m (GClosure C_DBusInterfaceSetPropertyFunc) -- | Generate a function pointer callable from C code, from a -- C_DBusInterfaceSetPropertyFunc. mk_DBusInterfaceSetPropertyFunc :: C_DBusInterfaceSetPropertyFunc -> IO (FunPtr C_DBusInterfaceSetPropertyFunc) -- | A convenience synonym for Nothing :: Maybe -- DBusInterfaceSetPropertyFunc. noDBusInterfaceSetPropertyFunc :: Maybe DBusInterfaceSetPropertyFunc -- | A convenience synonym for Nothing :: Maybe -- DBusInterfaceSetPropertyFunc_WithClosures. noDBusInterfaceSetPropertyFunc_WithClosures :: Maybe DBusInterfaceSetPropertyFunc_WithClosures -- | Wrap a DBusInterfaceSetPropertyFunc into a -- C_DBusInterfaceSetPropertyFunc. 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 dBusConnectionAddFilter. -- -- A filter function is passed a DBusMessage and expected to -- return a DBusMessage too. Passive filter functions that don't -- modify the message can simply return the message -- object: -- --
-- static GDBusMessage *
-- passive_filter (GDBusConnection *connection
-- GDBusMessage *message,
-- gboolean incoming,
-- gpointer user_data)
-- {
-- // inspect @message
-- return message;
-- }
--
--
-- Filter functions that wants to drop a message can simply return
-- Nothing:
--
--
-- 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;
-- }
--
--
-- Finally, a filter function may modify a message by copying it:
--
--
-- 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, &error);
-- // handle @error being set
-- g_object_unref (message);
--
-- // modify @copy
--
-- return copy;
-- }
--
--
-- If the returned DBusMessage is different from
-- message and cannot be sent on
-- connection (it could use features, such as file
-- descriptors, not compatible with connection), then a
-- warning is logged to standard error. Applications can check this ahead
-- of time using dBusMessageToBlob passing a
-- DBusCapabilityFlags value obtained from
-- connection.
--
-- Since: 2.26
type DBusMessageFilterFunction = DBusConnection -> DBusMessage -> Bool -> IO Maybe DBusMessage
-- | Signature for function used in dBusConnectionAddFilter.
--
-- A filter function is passed a DBusMessage and expected to
-- return a DBusMessage too. Passive filter functions that don't
-- modify the message can simply return the message
-- object:
--
--
-- static GDBusMessage *
-- passive_filter (GDBusConnection *connection
-- GDBusMessage *message,
-- gboolean incoming,
-- gpointer user_data)
-- {
-- // inspect @message
-- return message;
-- }
--
--
-- Filter functions that wants to drop a message can simply return
-- Nothing:
--
--
-- 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;
-- }
--
--
-- Finally, a filter function may modify a message by copying it:
--
--
-- 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, &error);
-- // handle @error being set
-- g_object_unref (message);
--
-- // modify @copy
--
-- return copy;
-- }
--
--
-- If the returned DBusMessage is different from
-- message and cannot be sent on
-- connection (it could use features, such as file
-- descriptors, not compatible with connection), then a
-- warning is logged to standard error. Applications can check this ahead
-- of time using dBusMessageToBlob passing a
-- DBusCapabilityFlags value obtained from
-- connection.
--
-- Since: 2.26
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 GClosure.
genClosure_DBusMessageFilterFunction :: MonadIO m => DBusMessageFilterFunction -> m (GClosure C_DBusMessageFilterFunction)
-- | Generate a function pointer callable from C code, from a
-- C_DBusMessageFilterFunction.
mk_DBusMessageFilterFunction :: C_DBusMessageFilterFunction -> IO (FunPtr C_DBusMessageFilterFunction)
-- | A convenience synonym for Nothing :: Maybe
-- DBusMessageFilterFunction.
noDBusMessageFilterFunction :: Maybe DBusMessageFilterFunction
-- | A convenience synonym for Nothing :: Maybe
-- DBusMessageFilterFunction_WithClosures.
noDBusMessageFilterFunction_WithClosures :: Maybe DBusMessageFilterFunction_WithClosures
-- | Wrap a DBusMessageFilterFunction into a
-- C_DBusMessageFilterFunction.
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 GType
-- to use for an interface proxy (if interfaceName is not
-- Nothing) or object proxy (if interfaceName is
-- Nothing).
--
-- This function is called in the [thread-default main
-- loop][g-main-context-push-thread-default] that manager
-- was constructed in.
--
-- Since: 2.30
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 GClosure.
genClosure_DBusProxyTypeFunc :: MonadIO m => DBusProxyTypeFunc -> m (GClosure C_DBusProxyTypeFunc)
-- | Generate a function pointer callable from C code, from a
-- C_DBusProxyTypeFunc.
mk_DBusProxyTypeFunc :: C_DBusProxyTypeFunc -> IO (FunPtr C_DBusProxyTypeFunc)
-- | A convenience synonym for Nothing :: Maybe
-- DBusProxyTypeFunc.
noDBusProxyTypeFunc :: Maybe DBusProxyTypeFunc
-- | Wrap a DBusProxyTypeFunc into a C_DBusProxyTypeFunc.
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
-- dBusConnectionSignalSubscribe.
--
-- Since: 2.26
type DBusSignalCallback = DBusConnection -> Maybe Text -> Text -> Text -> Text -> GVariant -> IO ()
-- | Signature for callback function used in
-- dBusConnectionSignalSubscribe.
--
-- Since: 2.26
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 GClosure.
genClosure_DBusSignalCallback :: MonadIO m => DBusSignalCallback -> m (GClosure C_DBusSignalCallback)
-- | Generate a function pointer callable from C code, from a
-- C_DBusSignalCallback.
mk_DBusSignalCallback :: C_DBusSignalCallback -> IO (FunPtr C_DBusSignalCallback)
-- | A convenience synonym for Nothing :: Maybe
-- DBusSignalCallback.
noDBusSignalCallback :: Maybe DBusSignalCallback
-- | A convenience synonym for Nothing :: Maybe
-- DBusSignalCallback_WithClosures.
noDBusSignalCallback_WithClosures :: Maybe DBusSignalCallback_WithClosures
-- | Wrap a DBusSignalCallback into a C_DBusSignalCallback.
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 dispatch function in
-- DBusSubtreeVTable.
--
-- Subtrees are flat. node, if non-Nothing, is
-- always exactly one segment of the object path (ie: it never contains a
-- slash).
--
-- Since: 2.26
type DBusSubtreeDispatchFunc = DBusConnection -> Text -> Text -> Text -> Text -> Ptr () -> IO Maybe DBusInterfaceVTable
-- | The type of the dispatch function in
-- DBusSubtreeVTable.
--
-- Subtrees are flat. node, if non-Nothing, is
-- always exactly one segment of the object path (ie: it never contains a
-- slash).
--
-- Since: 2.26
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 GClosure.
genClosure_DBusSubtreeDispatchFunc :: MonadIO m => DBusSubtreeDispatchFunc -> m (GClosure C_DBusSubtreeDispatchFunc)
-- | Generate a function pointer callable from C code, from a
-- C_DBusSubtreeDispatchFunc.
mk_DBusSubtreeDispatchFunc :: C_DBusSubtreeDispatchFunc -> IO (FunPtr C_DBusSubtreeDispatchFunc)
-- | A convenience synonym for Nothing :: Maybe
-- DBusSubtreeDispatchFunc.
noDBusSubtreeDispatchFunc :: Maybe DBusSubtreeDispatchFunc
-- | A convenience synonym for Nothing :: Maybe
-- DBusSubtreeDispatchFunc_WithClosures.
noDBusSubtreeDispatchFunc_WithClosures :: Maybe DBusSubtreeDispatchFunc_WithClosures
-- | Wrap a DBusSubtreeDispatchFunc into a
-- C_DBusSubtreeDispatchFunc.
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 enumerate function in
-- DBusSubtreeVTable.
--
-- This function is called when generating introspection data and also
-- when preparing to dispatch incoming messages in the event that the
-- DBusSubtreeFlagsDispatchToUnenumeratedNodes 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 / character.
--
-- The return value will be freed with strfreev.
--
-- Since: 2.26
type DBusSubtreeEnumerateFunc = DBusConnection -> Text -> Text -> IO [Text]
-- | The type of the enumerate function in
-- DBusSubtreeVTable.
--
-- This function is called when generating introspection data and also
-- when preparing to dispatch incoming messages in the event that the
-- DBusSubtreeFlagsDispatchToUnenumeratedNodes 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 / character.
--
-- The return value will be freed with strfreev.
--
-- Since: 2.26
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 GClosure.
genClosure_DBusSubtreeEnumerateFunc :: MonadIO m => DBusSubtreeEnumerateFunc -> m (GClosure C_DBusSubtreeEnumerateFunc)
-- | Generate a function pointer callable from C code, from a
-- C_DBusSubtreeEnumerateFunc.
mk_DBusSubtreeEnumerateFunc :: C_DBusSubtreeEnumerateFunc -> IO (FunPtr C_DBusSubtreeEnumerateFunc)
-- | A convenience synonym for Nothing :: Maybe
-- DBusSubtreeEnumerateFunc.
noDBusSubtreeEnumerateFunc :: Maybe DBusSubtreeEnumerateFunc
-- | A convenience synonym for Nothing :: Maybe
-- DBusSubtreeEnumerateFunc_WithClosures.
noDBusSubtreeEnumerateFunc_WithClosures :: Maybe DBusSubtreeEnumerateFunc_WithClosures
-- | Wrap a DBusSubtreeEnumerateFunc into a
-- C_DBusSubtreeEnumerateFunc.
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 introspect function in
-- DBusSubtreeVTable.
--
-- Subtrees are flat. node, if non-Nothing, is
-- always exactly one segment of the object path (ie: it never contains a
-- slash).
--
-- This function should return Nothing to indicate that there is
-- no object at this node.
--
-- If this function returns non-Nothing, the return value is
-- expected to be a Nothing-terminated array of pointers to
-- DBusInterfaceInfo structures describing the interfaces
-- implemented by node. This array will have
-- dBusInterfaceInfoUnref called on each item before being freed
-- with free.
--
-- The difference between returning Nothing 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 Nothing case.
--
-- Since: 2.26
type DBusSubtreeIntrospectFunc = DBusConnection -> Text -> Text -> Text -> IO Maybe [DBusInterfaceInfo]
-- | The type of the introspect function in
-- DBusSubtreeVTable.
--
-- Subtrees are flat. node, if non-Nothing, is
-- always exactly one segment of the object path (ie: it never contains a
-- slash).
--
-- This function should return Nothing to indicate that there is
-- no object at this node.
--
-- If this function returns non-Nothing, the return value is
-- expected to be a Nothing-terminated array of pointers to
-- DBusInterfaceInfo structures describing the interfaces
-- implemented by node. This array will have
-- dBusInterfaceInfoUnref called on each item before being freed
-- with free.
--
-- The difference between returning Nothing 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 Nothing case.
--
-- Since: 2.26
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 GClosure.
genClosure_DBusSubtreeIntrospectFunc :: MonadIO m => DBusSubtreeIntrospectFunc -> m (GClosure C_DBusSubtreeIntrospectFunc)
-- | Generate a function pointer callable from C code, from a
-- C_DBusSubtreeIntrospectFunc.
mk_DBusSubtreeIntrospectFunc :: C_DBusSubtreeIntrospectFunc -> IO (FunPtr C_DBusSubtreeIntrospectFunc)
-- | A convenience synonym for Nothing :: Maybe
-- DBusSubtreeIntrospectFunc.
noDBusSubtreeIntrospectFunc :: Maybe DBusSubtreeIntrospectFunc
-- | A convenience synonym for Nothing :: Maybe
-- DBusSubtreeIntrospectFunc_WithClosures.
noDBusSubtreeIntrospectFunc_WithClosures :: Maybe DBusSubtreeIntrospectFunc_WithClosures
-- | Wrap a DBusSubtreeIntrospectFunc into a
-- C_DBusSubtreeIntrospectFunc.
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 Source
-- returned by datagramBasedCreateSource.
--
-- Since: 2.48
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 GClosure.
genClosure_DatagramBasedSourceFunc :: MonadIO m => DatagramBasedSourceFunc -> m (GClosure C_DatagramBasedSourceFunc)
-- | Generate a function pointer callable from C code, from a
-- C_DatagramBasedSourceFunc.
mk_DatagramBasedSourceFunc :: C_DatagramBasedSourceFunc -> IO (FunPtr C_DatagramBasedSourceFunc)
-- | A convenience synonym for Nothing :: Maybe
-- DatagramBasedSourceFunc.
noDatagramBasedSourceFunc :: Maybe DatagramBasedSourceFunc
-- | Wrap a DatagramBasedSourceFunc into a
-- C_DatagramBasedSourceFunc.
wrap_DatagramBasedSourceFunc :: Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc)) -> DatagramBasedSourceFunc -> C_DatagramBasedSourceFunc
-- | Type for the callback on the (unwrapped) C side.
type C_DesktopAppLaunchCallback = Ptr DesktopAppInfo -> Int32 -> Ptr () -> IO ()
-- | During invocation, desktopAppInfoLaunchUrisAsManager may create
-- one or more child processes. This callback is invoked once for each,
-- providing the process ID.
type DesktopAppLaunchCallback = DesktopAppInfo -> Int32 -> IO ()
-- | During invocation, desktopAppInfoLaunchUrisAsManager may create
-- one or more child processes. This callback is invoked once for each,
-- providing the process ID.
type DesktopAppLaunchCallback_WithClosures = DesktopAppInfo -> Int32 -> Ptr () -> IO ()
-- | A simple wrapper that ignores the closure arguments.
drop_closures_DesktopAppLaunchCallback :: DesktopAppLaunchCallback -> DesktopAppLaunchCallback_WithClosures
-- | Given a pointer to a foreign C function, wrap it into a function
-- callable from Haskell.
dynamic_DesktopAppLaunchCallback :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => FunPtr C_DesktopAppLaunchCallback -> a -> Int32 -> Ptr () -> m ()
-- | Wrap the callback into a GClosure.
genClosure_DesktopAppLaunchCallback :: MonadIO m => DesktopAppLaunchCallback -> m (GClosure C_DesktopAppLaunchCallback)
-- | Generate a function pointer callable from C code, from a
-- C_DesktopAppLaunchCallback.
mk_DesktopAppLaunchCallback :: C_DesktopAppLaunchCallback -> IO (FunPtr C_DesktopAppLaunchCallback)
-- | A convenience synonym for Nothing :: Maybe
-- DesktopAppLaunchCallback.
noDesktopAppLaunchCallback :: Maybe DesktopAppLaunchCallback
-- | A convenience synonym for Nothing :: Maybe
-- DesktopAppLaunchCallback_WithClosures.
noDesktopAppLaunchCallback_WithClosures :: Maybe DesktopAppLaunchCallback_WithClosures
-- | Wrap a DesktopAppLaunchCallback into a
-- C_DesktopAppLaunchCallback.
wrap_DesktopAppLaunchCallback :: Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback)) -> DesktopAppLaunchCallback_WithClosures -> C_DesktopAppLaunchCallback
-- | Type for the callback on the (unwrapped) C side.
type C_FileMeasureProgressCallback = CInt -> Word64 -> Word64 -> Word64 -> Ptr () -> IO ()
-- | This callback type is used by fileMeasureDiskUsage 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
-- File will support them. At the minimum, however, one call will
-- always be made immediately.
--
-- In the case that there is no support, reporting will
-- be set to False (and the other values undefined) and no further
-- calls will be made. Otherwise, the reporting will be
-- True 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 fileMeasureDiskUsage the callback is made directly. For
-- g_file_measure_disk_usage_async() 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).
--
-- currentSize is in the same units as requested by the
-- operation (see FileMeasureFlagsApparentSize).
--
-- 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.
--
-- Since: 2.38
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 GClosure.
genClosure_FileMeasureProgressCallback :: MonadIO m => FileMeasureProgressCallback -> m (GClosure C_FileMeasureProgressCallback)
-- | Generate a function pointer callable from C code, from a
-- C_FileMeasureProgressCallback.
mk_FileMeasureProgressCallback :: C_FileMeasureProgressCallback -> IO (FunPtr C_FileMeasureProgressCallback)
-- | A convenience synonym for Nothing :: Maybe
-- FileMeasureProgressCallback.
noFileMeasureProgressCallback :: Maybe FileMeasureProgressCallback
-- | Wrap a FileMeasureProgressCallback into a
-- C_FileMeasureProgressCallback.
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 GClosure.
genClosure_FileProgressCallback :: MonadIO m => FileProgressCallback -> m (GClosure C_FileProgressCallback)
-- | Generate a function pointer callable from C code, from a
-- C_FileProgressCallback.
mk_FileProgressCallback :: C_FileProgressCallback -> IO (FunPtr C_FileProgressCallback)
-- | A convenience synonym for Nothing :: Maybe
-- FileProgressCallback.
noFileProgressCallback :: Maybe FileProgressCallback
-- | Wrap a FileProgressCallback into a
-- C_FileProgressCallback.
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
-- g_file_load_partial_contents_async(), it may become
-- necessary to determine if any more data from the file should be
-- loaded. A FileReadMoreCallback function facilitates this by
-- returning True if more data should be read, or False
-- 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 GClosure.
genClosure_FileReadMoreCallback :: MonadIO m => FileReadMoreCallback -> m (GClosure C_FileReadMoreCallback)
-- | Generate a function pointer callable from C code, from a
-- C_FileReadMoreCallback.
mk_FileReadMoreCallback :: C_FileReadMoreCallback -> IO (FunPtr C_FileReadMoreCallback)
-- | A convenience synonym for Nothing :: Maybe
-- FileReadMoreCallback.
noFileReadMoreCallback :: Maybe FileReadMoreCallback
-- | Wrap a FileReadMoreCallback into a
-- C_FileReadMoreCallback.
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
-- cancellable to see if they have been cancelled.
-- | Deprecated: (Since version 2.36)Use ThreadPool
-- ortaskRunInThread
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 GClosure.
genClosure_IOSchedulerJobFunc :: MonadIO m => IOSchedulerJobFunc -> m (GClosure C_IOSchedulerJobFunc)
-- | Generate a function pointer callable from C code, from a
-- C_IOSchedulerJobFunc.
mk_IOSchedulerJobFunc :: C_IOSchedulerJobFunc -> IO (FunPtr C_IOSchedulerJobFunc)
-- | A convenience synonym for Nothing :: Maybe
-- IOSchedulerJobFunc.
noIOSchedulerJobFunc :: Maybe IOSchedulerJobFunc
-- | Wrap a IOSchedulerJobFunc into a C_IOSchedulerJobFunc.
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 ()
-- | No description available in the introspection data.
type InputStreamClassCloseAsyncFieldCallback = InputStream -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> IO ()
-- | No description available in the introspection data.
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 GClosure.
genClosure_InputStreamClassCloseAsyncFieldCallback :: MonadIO m => InputStreamClassCloseAsyncFieldCallback -> m (GClosure C_InputStreamClassCloseAsyncFieldCallback)
-- | Generate a function pointer callable from C code, from a
-- C_InputStreamClassCloseAsyncFieldCallback.
mk_InputStreamClassCloseAsyncFieldCallback :: C_InputStreamClassCloseAsyncFieldCallback -> IO (FunPtr C_InputStreamClassCloseAsyncFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassCloseAsyncFieldCallback.
noInputStreamClassCloseAsyncFieldCallback :: Maybe InputStreamClassCloseAsyncFieldCallback
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassCloseAsyncFieldCallback_WithClosures.
noInputStreamClassCloseAsyncFieldCallback_WithClosures :: Maybe InputStreamClassCloseAsyncFieldCallback_WithClosures
-- | Wrap a InputStreamClassCloseAsyncFieldCallback into a
-- C_InputStreamClassCloseAsyncFieldCallback.
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
-- | No description available in the introspection data.
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
-- C_InputStreamClassCloseFinishFieldCallback.
mk_InputStreamClassCloseFinishFieldCallback :: C_InputStreamClassCloseFinishFieldCallback -> IO (FunPtr C_InputStreamClassCloseFinishFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassCloseFinishFieldCallback.
noInputStreamClassCloseFinishFieldCallback :: Maybe InputStreamClassCloseFinishFieldCallback
-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassCloseFnFieldCallback = Ptr InputStream -> Ptr Cancellable -> Ptr Ptr GError -> IO CInt
-- | No description available in the introspection data.
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
-- C_InputStreamClassCloseFnFieldCallback.
mk_InputStreamClassCloseFnFieldCallback :: C_InputStreamClassCloseFnFieldCallback -> IO (FunPtr C_InputStreamClassCloseFnFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassCloseFnFieldCallback.
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 ()
-- | No description available in the introspection data.
type InputStreamClassReadAsyncFieldCallback = InputStream -> Maybe ByteString -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> IO Maybe ByteString
-- | No description available in the introspection data.
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 GClosure.
genClosure_InputStreamClassReadAsyncFieldCallback :: MonadIO m => InputStreamClassReadAsyncFieldCallback -> m (GClosure C_InputStreamClassReadAsyncFieldCallback)
-- | Generate a function pointer callable from C code, from a
-- C_InputStreamClassReadAsyncFieldCallback.
mk_InputStreamClassReadAsyncFieldCallback :: C_InputStreamClassReadAsyncFieldCallback -> IO (FunPtr C_InputStreamClassReadAsyncFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassReadAsyncFieldCallback.
noInputStreamClassReadAsyncFieldCallback :: Maybe InputStreamClassReadAsyncFieldCallback
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassReadAsyncFieldCallback_WithClosures.
noInputStreamClassReadAsyncFieldCallback_WithClosures :: Maybe InputStreamClassReadAsyncFieldCallback_WithClosures
-- | Wrap a InputStreamClassReadAsyncFieldCallback into a
-- C_InputStreamClassReadAsyncFieldCallback.
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
-- | No description available in the introspection data.
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
-- C_InputStreamClassReadFinishFieldCallback.
mk_InputStreamClassReadFinishFieldCallback :: C_InputStreamClassReadFinishFieldCallback -> IO (FunPtr C_InputStreamClassReadFinishFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassReadFinishFieldCallback.
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
-- | No description available in the introspection data.
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
-- C_InputStreamClassReadFnFieldCallback.
mk_InputStreamClassReadFnFieldCallback :: C_InputStreamClassReadFnFieldCallback -> IO (FunPtr C_InputStreamClassReadFnFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassReadFnFieldCallback.
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 ()
-- | No description available in the introspection data.
type InputStreamClassSkipAsyncFieldCallback = InputStream -> CSize -> Int32 -> Maybe Cancellable -> Maybe AsyncReadyCallback_WithClosures -> IO ()
-- | No description available in the introspection data.
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 GClosure.
genClosure_InputStreamClassSkipAsyncFieldCallback :: MonadIO m => InputStreamClassSkipAsyncFieldCallback -> m (GClosure C_InputStreamClassSkipAsyncFieldCallback)
-- | Generate a function pointer callable from C code, from a
-- C_InputStreamClassSkipAsyncFieldCallback.
mk_InputStreamClassSkipAsyncFieldCallback :: C_InputStreamClassSkipAsyncFieldCallback -> IO (FunPtr C_InputStreamClassSkipAsyncFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassSkipAsyncFieldCallback.
noInputStreamClassSkipAsyncFieldCallback :: Maybe InputStreamClassSkipAsyncFieldCallback
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassSkipAsyncFieldCallback_WithClosures.
noInputStreamClassSkipAsyncFieldCallback_WithClosures :: Maybe InputStreamClassSkipAsyncFieldCallback_WithClosures
-- | Wrap a InputStreamClassSkipAsyncFieldCallback into a
-- C_InputStreamClassSkipAsyncFieldCallback.
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
-- | No description available in the introspection data.
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
-- C_InputStreamClassSkipFieldCallback.
mk_InputStreamClassSkipFieldCallback :: C_InputStreamClassSkipFieldCallback -> IO (FunPtr C_InputStreamClassSkipFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassSkipFieldCallback.
noInputStreamClassSkipFieldCallback :: Maybe InputStreamClassSkipFieldCallback
-- | Type for the callback on the (unwrapped) C side.
type C_InputStreamClassSkipFinishFieldCallback = Ptr InputStream -> Ptr AsyncResult -> Ptr Ptr GError -> IO Int64
-- | No description available in the introspection data.
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
-- C_InputStreamClassSkipFinishFieldCallback.
mk_InputStreamClassSkipFinishFieldCallback :: C_InputStreamClassSkipFinishFieldCallback -> IO (FunPtr C_InputStreamClassSkipFinishFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- InputStreamClassSkipFinishFieldCallback.
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 Source
-- returned by pollableInputStreamCreateSource and
-- pollableOutputStreamCreateSource.
--
-- Since: 2.28
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 GClosure.
genClosure_PollableSourceFunc :: MonadIO m => PollableSourceFunc -> m (GClosure C_PollableSourceFunc)
-- | Generate a function pointer callable from C code, from a
-- C_PollableSourceFunc.
mk_PollableSourceFunc :: C_PollableSourceFunc -> IO (FunPtr C_PollableSourceFunc)
-- | A convenience synonym for Nothing :: Maybe
-- PollableSourceFunc.
noPollableSourceFunc :: Maybe PollableSourceFunc
-- | Wrap a PollableSourceFunc into a C_PollableSourceFunc.
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
-- data to size bytes.
--
-- The function should have the same semantics as
-- realloc().
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 GClosure.
genClosure_ReallocFunc :: MonadIO m => ReallocFunc -> m (GClosure C_ReallocFunc)
-- | Generate a function pointer callable from C code, from a
-- C_ReallocFunc.
mk_ReallocFunc :: C_ReallocFunc -> IO (FunPtr C_ReallocFunc)
-- | A convenience synonym for Nothing :: Maybe
-- ReallocFunc.
noReallocFunc :: Maybe ReallocFunc
-- | Wrap a ReallocFunc into a C_ReallocFunc.
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
-- | No description available in the introspection data.
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 GClosure.
genClosure_SeekableIfaceCanSeekFieldCallback :: MonadIO m => SeekableIfaceCanSeekFieldCallback -> m (GClosure C_SeekableIfaceCanSeekFieldCallback)
-- | Generate a function pointer callable from C code, from a
-- C_SeekableIfaceCanSeekFieldCallback.
mk_SeekableIfaceCanSeekFieldCallback :: C_SeekableIfaceCanSeekFieldCallback -> IO (FunPtr C_SeekableIfaceCanSeekFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- SeekableIfaceCanSeekFieldCallback.
noSeekableIfaceCanSeekFieldCallback :: Maybe SeekableIfaceCanSeekFieldCallback
-- | Wrap a SeekableIfaceCanSeekFieldCallback into a
-- C_SeekableIfaceCanSeekFieldCallback.
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
-- | No description available in the introspection data.
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 GClosure.
genClosure_SeekableIfaceCanTruncateFieldCallback :: MonadIO m => SeekableIfaceCanTruncateFieldCallback -> m (GClosure C_SeekableIfaceCanTruncateFieldCallback)
-- | Generate a function pointer callable from C code, from a
-- C_SeekableIfaceCanTruncateFieldCallback.
mk_SeekableIfaceCanTruncateFieldCallback :: C_SeekableIfaceCanTruncateFieldCallback -> IO (FunPtr C_SeekableIfaceCanTruncateFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- SeekableIfaceCanTruncateFieldCallback.
noSeekableIfaceCanTruncateFieldCallback :: Maybe SeekableIfaceCanTruncateFieldCallback
-- | Wrap a SeekableIfaceCanTruncateFieldCallback into a
-- C_SeekableIfaceCanTruncateFieldCallback.
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
-- | No description available in the introspection data.
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
-- C_SeekableIfaceSeekFieldCallback.
mk_SeekableIfaceSeekFieldCallback :: C_SeekableIfaceSeekFieldCallback -> IO (FunPtr C_SeekableIfaceSeekFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- SeekableIfaceSeekFieldCallback.
noSeekableIfaceSeekFieldCallback :: Maybe SeekableIfaceSeekFieldCallback
-- | Type for the callback on the (unwrapped) C side.
type C_SeekableIfaceTellFieldCallback = Ptr Seekable -> IO Int64
-- | No description available in the introspection data.
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 GClosure.
genClosure_SeekableIfaceTellFieldCallback :: MonadIO m => SeekableIfaceTellFieldCallback -> m (GClosure C_SeekableIfaceTellFieldCallback)
-- | Generate a function pointer callable from C code, from a
-- C_SeekableIfaceTellFieldCallback.
mk_SeekableIfaceTellFieldCallback :: C_SeekableIfaceTellFieldCallback -> IO (FunPtr C_SeekableIfaceTellFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- SeekableIfaceTellFieldCallback.
noSeekableIfaceTellFieldCallback :: Maybe SeekableIfaceTellFieldCallback
-- | Wrap a SeekableIfaceTellFieldCallback into a
-- C_SeekableIfaceTellFieldCallback.
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
-- | No description available in the introspection data.
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
-- C_SeekableIfaceTruncateFnFieldCallback.
mk_SeekableIfaceTruncateFnFieldCallback :: C_SeekableIfaceTruncateFnFieldCallback -> IO (FunPtr C_SeekableIfaceTruncateFnFieldCallback)
-- | A convenience synonym for Nothing :: Maybe
-- SeekableIfaceTruncateFnFieldCallback.
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 Settings
-- to an object property. The value 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 Settings
-- to an object property. The value 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 GClosure.
genClosure_SettingsBindGetMapping :: MonadIO m => SettingsBindGetMapping -> m (GClosure C_SettingsBindGetMapping)
-- | Generate a function pointer callable from C code, from a
-- C_SettingsBindGetMapping.
mk_SettingsBindGetMapping :: C_SettingsBindGetMapping -> IO (FunPtr C_SettingsBindGetMapping)
-- | A convenience synonym for Nothing :: Maybe
-- SettingsBindGetMapping.
noSettingsBindGetMapping :: Maybe SettingsBindGetMapping
-- | A convenience synonym for Nothing :: Maybe
-- SettingsBindGetMapping_WithClosures.
noSettingsBindGetMapping_WithClosures :: Maybe SettingsBindGetMapping_WithClosures
-- | Wrap a SettingsBindGetMapping into a
-- C_SettingsBindGetMapping.
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 GVariant for storing it in Settings.
type SettingsBindSetMapping = GValue -> VariantType -> IO GVariant
-- | The type for the function that is used to convert an object property
-- value to a GVariant for storing it in Settings.
type SettingsBindSetMapping_WithClosures = GValue -> VariantType -> Ptr () -> IO 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 GVariant
-- | Wrap the callback into a GClosure.
genClosure_SettingsBindSetMapping :: MonadIO m => SettingsBindSetMapping -> m (GClosure C_SettingsBindSetMapping)
-- | Generate a function pointer callable from C code, from a
-- C_SettingsBindSetMapping.
mk_SettingsBindSetMapping :: C_SettingsBindSetMapping -> IO (FunPtr C_SettingsBindSetMapping)
-- | A convenience synonym for Nothing :: Maybe
-- SettingsBindSetMapping.
noSettingsBindSetMapping :: Maybe SettingsBindSetMapping
-- | A convenience synonym for Nothing :: Maybe
-- SettingsBindSetMapping_WithClosures.
noSettingsBindSetMapping_WithClosures :: Maybe SettingsBindSetMapping_WithClosures
-- | Wrap a SettingsBindSetMapping into a
-- C_SettingsBindSetMapping.
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 Settings to a value that is useful to the application.
--
-- If the value is successfully mapped, the result should be stored at
-- result and True returned. If mapping fails (for
-- example, if value is not in the right format) then
-- False should be returned.
--
-- If value is Nothing 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 = GVariant -> IO (Bool, Ptr ())
-- | The type of the function that is used to convert from a value stored
-- in a Settings to a value that is useful to the application.
--
-- If the value is successfully mapped, the result should be stored at
-- result and True returned. If mapping fails (for
-- example, if value is not in the right format) then
-- False should be returned.
--
-- If value is Nothing 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 = 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 -> GVariant -> Ptr () -> m (Bool, Ptr ())
-- | Wrap the callback into a GClosure.
genClosure_SettingsGetMapping :: MonadIO m => SettingsGetMapping -> m (GClosure C_SettingsGetMapping)
-- | Generate a function pointer callable from C code, from a
-- C_SettingsGetMapping.
mk_SettingsGetMapping :: C_SettingsGetMapping -> IO (FunPtr C_SettingsGetMapping)
-- | A convenience synonym for Nothing :: Maybe
-- SettingsGetMapping.
noSettingsGetMapping :: Maybe SettingsGetMapping
-- | A convenience synonym for Nothing :: Maybe
-- SettingsGetMapping_WithClosures.
noSettingsGetMapping_WithClosures :: Maybe SettingsGetMapping_WithClosures
-- | Wrap a SettingsGetMapping into a C_SettingsGetMapping.
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 GClosure.
genClosure_SimpleAsyncThreadFunc :: MonadIO m => SimpleAsyncThreadFunc -> m (GClosure C_SimpleAsyncThreadFunc)
-- | Generate a function pointer callable from C code, from a
-- C_SimpleAsyncThreadFunc.
mk_SimpleAsyncThreadFunc :: C_SimpleAsyncThreadFunc -> IO (FunPtr C_SimpleAsyncThreadFunc)
-- | A convenience synonym for Nothing :: Maybe
-- SimpleAsyncThreadFunc.
noSimpleAsyncThreadFunc :: Maybe SimpleAsyncThreadFunc
-- | Wrap a SimpleAsyncThreadFunc into a
-- C_SimpleAsyncThreadFunc.
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 Source
-- returned by g_socket_create_source().
--
-- Since: 2.22
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 GClosure.
genClosure_SocketSourceFunc :: MonadIO m => SocketSourceFunc -> m (GClosure C_SocketSourceFunc)
-- | Generate a function pointer callable from C code, from a
-- C_SocketSourceFunc.
mk_SocketSourceFunc :: C_SocketSourceFunc -> IO (FunPtr C_SocketSourceFunc)
-- | A convenience synonym for Nothing :: Maybe
-- SocketSourceFunc.
noSocketSourceFunc :: Maybe SocketSourceFunc
-- | Wrap a SocketSourceFunc into a C_SocketSourceFunc.
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
-- taskRunInThread or taskRunInThreadSync.
--
-- If the return-on-cancel flag is set on task, and
-- cancellable gets cancelled, then the Task will
-- be completed immediately (as though taskReturnErrorIfCancelled
-- 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
-- taskSetReturnOnCancel for more details.
--
-- Other than in that case, task will be completed when
-- the TaskThreadFunc returns, not when it calls a
-- g_task_return_ function.
--
-- Since: 2.36
type TaskThreadFunc = Task -> 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 -> b -> Ptr () -> Maybe c -> m ()
-- | Wrap the callback into a GClosure.
genClosure_TaskThreadFunc :: MonadIO m => TaskThreadFunc -> m (GClosure C_TaskThreadFunc)
-- | Generate a function pointer callable from C code, from a
-- C_TaskThreadFunc.
mk_TaskThreadFunc :: C_TaskThreadFunc -> IO (FunPtr C_TaskThreadFunc)
-- | A convenience synonym for Nothing :: Maybe
-- TaskThreadFunc.
noTaskThreadFunc :: Maybe TaskThreadFunc
-- | Wrap a TaskThreadFunc into a C_TaskThreadFunc.
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 vfsRegisterUriScheme to make it
-- possible for a client to associate a URI scheme to a different
-- File implementation.
--
-- The client should return a reference to the new file that has been
-- created for uri, or Nothing to continue with
-- the default implementation.
--
-- Since: 2.50
type VfsFileLookupFunc = Vfs -> Text -> IO File
-- | This function type is used by vfsRegisterUriScheme to make it
-- possible for a client to associate a URI scheme to a different
-- File implementation.
--
-- The client should return a reference to the new file that has been
-- created for uri, or Nothing to continue with
-- the default implementation.
--
-- Since: 2.50
type VfsFileLookupFunc_WithClosures = Vfs -> Text -> Ptr () -> IO 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 File
-- | Wrap the callback into a GClosure.
genClosure_VfsFileLookupFunc :: MonadIO m => VfsFileLookupFunc -> m (GClosure C_VfsFileLookupFunc)
-- | Generate a function pointer callable from C code, from a
-- C_VfsFileLookupFunc.
mk_VfsFileLookupFunc :: C_VfsFileLookupFunc -> IO (FunPtr C_VfsFileLookupFunc)
-- | A convenience synonym for Nothing :: Maybe
-- VfsFileLookupFunc.
noVfsFileLookupFunc :: Maybe VfsFileLookupFunc
-- | A convenience synonym for Nothing :: Maybe
-- VfsFileLookupFunc_WithClosures.
noVfsFileLookupFunc_WithClosures :: Maybe VfsFileLookupFunc_WithClosures
-- | Wrap a VfsFileLookupFunc into a C_VfsFileLookupFunc.
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
-- GOutputVectors and the operation will use all the
-- buffers as if they were one buffer.
--
-- If address is Nothing then the message is sent
-- to the default receiver (as previously set by socketConnect).
--
-- Since: 2.44
module GI.Gio.Structs.OutputMessage
-- | Memory-managed wrapper type.
newtype OutputMessage
OutputMessage :: ManagedPtr OutputMessage -> OutputMessage
-- | Construct a OutputMessage struct initialized to zero.
newZeroOutputMessage :: MonadIO m => m OutputMessage
-- | Set the value of the “address” field to Nothing. When
-- overloading is enabled, this is equivalent to
--
-- -- clear #address --clearOutputMessageAddress :: MonadIO m => OutputMessage -> m () -- | Get the value of the “address” field. When overloading -- is enabled, this is equivalent to -- --
-- get outputMessage #address --getOutputMessageAddress :: MonadIO m => OutputMessage -> m (Maybe SocketAddress) -- | Set the value of the “address” field. When overloading -- is enabled, this is equivalent to -- --
-- set outputMessage [ #address := value ] --setOutputMessageAddress :: MonadIO m => OutputMessage -> Ptr SocketAddress -> m () -- | Get the value of the “bytes_sent” field. When -- overloading is enabled, this is equivalent to -- --
-- get outputMessage #bytesSent --getOutputMessageBytesSent :: MonadIO m => OutputMessage -> m Word32 -- | Set the value of the “bytes_sent” field. When -- overloading is enabled, this is equivalent to -- --
-- set outputMessage [ #bytesSent := value ] --setOutputMessageBytesSent :: MonadIO m => OutputMessage -> Word32 -> m () -- | Get the value of the “num_control_messages” field. When -- overloading is enabled, this is equivalent to -- --
-- get outputMessage #numControlMessages --getOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> m Word32 -- | Set the value of the “num_control_messages” field. When -- overloading is enabled, this is equivalent to -- --
-- set outputMessage [ #numControlMessages := value ] --setOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> Word32 -> m () -- | Get the value of the “num_vectors” field. When -- overloading is enabled, this is equivalent to -- --
-- get outputMessage #numVectors --getOutputMessageNumVectors :: MonadIO m => OutputMessage -> m Word32 -- | Set the value of the “num_vectors” field. When -- overloading is enabled, this is equivalent to -- --
-- set outputMessage [ #numVectors := value ] --setOutputMessageNumVectors :: MonadIO m => OutputMessage -> Word32 -> m () -- | Set the value of the “vectors” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #vectors --clearOutputMessageVectors :: MonadIO m => OutputMessage -> m () -- | Get the value of the “vectors” field. When overloading -- is enabled, this is equivalent to -- --
-- get outputMessage #vectors --getOutputMessageVectors :: MonadIO m => OutputMessage -> m (Maybe OutputVector) -- | Set the value of the “vectors” field. When overloading -- is enabled, this is equivalent to -- --
-- set outputMessage [ #vectors := value ] --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 -- | No description available in the introspection data. module GI.Gio.Structs.InputStreamClass -- | Memory-managed wrapper type. newtype InputStreamClass InputStreamClass :: ManagedPtr InputStreamClass -> InputStreamClass -- | Construct a InputStreamClass struct initialized to zero. newZeroInputStreamClass :: MonadIO m => m InputStreamClass -- | Set the value of the “close_async” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #closeAsync --clearInputStreamClassCloseAsync :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “close_async” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #closeAsync --getInputStreamClassCloseAsync :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassCloseAsyncFieldCallback_WithClosures) -- | Set the value of the “close_async” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputStreamClass [ #closeAsync := value ] --setInputStreamClassCloseAsync :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassCloseAsyncFieldCallback -> m () -- | Set the value of the “close_finish” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #closeFinish --clearInputStreamClassCloseFinish :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “close_finish” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #closeFinish --getInputStreamClassCloseFinish :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassCloseFinishFieldCallback) -- | Set the value of the “close_finish” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputStreamClass [ #closeFinish := value ] --setInputStreamClassCloseFinish :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassCloseFinishFieldCallback -> m () -- | Set the value of the “close_fn” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #closeFn --clearInputStreamClassCloseFn :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “close_fn” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #closeFn --getInputStreamClassCloseFn :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassCloseFnFieldCallback) -- | Set the value of the “close_fn” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputStreamClass [ #closeFn := value ] --setInputStreamClassCloseFn :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassCloseFnFieldCallback -> m () -- | Get the value of the “parent_class” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #parentClass --getInputStreamClassParentClass :: MonadIO m => InputStreamClass -> m ObjectClass -- | Set the value of the “read_async” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #readAsync --clearInputStreamClassReadAsync :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “read_async” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #readAsync --getInputStreamClassReadAsync :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassReadAsyncFieldCallback_WithClosures) -- | Set the value of the “read_async” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputStreamClass [ #readAsync := value ] --setInputStreamClassReadAsync :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassReadAsyncFieldCallback -> m () -- | Set the value of the “read_finish” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #readFinish --clearInputStreamClassReadFinish :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “read_finish” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #readFinish --getInputStreamClassReadFinish :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassReadFinishFieldCallback) -- | Set the value of the “read_finish” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputStreamClass [ #readFinish := value ] --setInputStreamClassReadFinish :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassReadFinishFieldCallback -> m () -- | Set the value of the “read_fn” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #readFn --clearInputStreamClassReadFn :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “read_fn” field. When overloading -- is enabled, this is equivalent to -- --
-- get inputStreamClass #readFn --getInputStreamClassReadFn :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassReadFnFieldCallback) -- | Set the value of the “read_fn” field. When overloading -- is enabled, this is equivalent to -- --
-- set inputStreamClass [ #readFn := value ] --setInputStreamClassReadFn :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassReadFnFieldCallback -> m () -- | Set the value of the “skip” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #skip --clearInputStreamClassSkip :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “skip” field. When overloading is -- enabled, this is equivalent to -- --
-- get inputStreamClass #skip --getInputStreamClassSkip :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassSkipFieldCallback) -- | Set the value of the “skip” field. When overloading is -- enabled, this is equivalent to -- --
-- set inputStreamClass [ #skip := value ] --setInputStreamClassSkip :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassSkipFieldCallback -> m () -- | Set the value of the “skip_async” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #skipAsync --clearInputStreamClassSkipAsync :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “skip_async” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #skipAsync --getInputStreamClassSkipAsync :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassSkipAsyncFieldCallback_WithClosures) -- | Set the value of the “skip_async” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputStreamClass [ #skipAsync := value ] --setInputStreamClassSkipAsync :: MonadIO m => InputStreamClass -> FunPtr C_InputStreamClassSkipAsyncFieldCallback -> m () -- | Set the value of the “skip_finish” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #skipFinish --clearInputStreamClassSkipFinish :: MonadIO m => InputStreamClass -> m () -- | Get the value of the “skip_finish” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputStreamClass #skipFinish --getInputStreamClassSkipFinish :: MonadIO m => InputStreamClass -> m (Maybe InputStreamClassSkipFinishFieldCallback) -- | Set the value of the “skip_finish” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputStreamClass [ #skipFinish := value ] --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 -- GInputVectors and the operation will use all the -- buffers as if they were one buffer, and will set -- bytesReceived to the total number of bytes received -- across all GInputVectors. -- -- This structure closely mirrors struct mmsghdr and struct -- msghdr from the POSIX sockets API (see man 2 recvmmsg). -- -- If address is non-Nothing then it is set to the -- source address the message was received from, and the caller must free -- it afterwards. -- -- If controlMessages is non-Nothing then it is -- set to an array of control messages received with the message (if -- any), and the caller must free it afterwards. -- numControlMessages is set to the number of elements in -- this array, which may be zero. -- -- Flags relevant to this message will be returned in -- flags. For example, MSG_EOR or -- MSG_TRUNC. -- -- Since: 2.48 module GI.Gio.Structs.InputMessage -- | Memory-managed wrapper type. newtype InputMessage InputMessage :: ManagedPtr InputMessage -> InputMessage -- | Construct a InputMessage struct initialized to zero. newZeroInputMessage :: MonadIO m => m InputMessage -- | Set the value of the “address” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #address --clearInputMessageAddress :: MonadIO m => InputMessage -> m () -- | Get the value of the “address” field. When overloading -- is enabled, this is equivalent to -- --
-- get inputMessage #address --getInputMessageAddress :: MonadIO m => InputMessage -> m (Maybe SocketAddress) -- | Set the value of the “address” field. When overloading -- is enabled, this is equivalent to -- --
-- set inputMessage [ #address := value ] --setInputMessageAddress :: MonadIO m => InputMessage -> Ptr SocketAddress -> m () -- | Get the value of the “bytes_received” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputMessage #bytesReceived --getInputMessageBytesReceived :: MonadIO m => InputMessage -> m CSize -- | Set the value of the “bytes_received” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputMessage [ #bytesReceived := value ] --setInputMessageBytesReceived :: MonadIO m => InputMessage -> CSize -> m () -- | Get the value of the “flags” field. When overloading -- is enabled, this is equivalent to -- --
-- get inputMessage #flags --getInputMessageFlags :: MonadIO m => InputMessage -> m Int32 -- | Set the value of the “flags” field. When overloading -- is enabled, this is equivalent to -- --
-- set inputMessage [ #flags := value ] --setInputMessageFlags :: MonadIO m => InputMessage -> Int32 -> m () -- | Get the value of the “num_control_messages” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputMessage #numControlMessages --getInputMessageNumControlMessages :: MonadIO m => InputMessage -> m Word32 -- | Set the value of the “num_control_messages” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputMessage [ #numControlMessages := value ] --setInputMessageNumControlMessages :: MonadIO m => InputMessage -> Word32 -> m () -- | Get the value of the “num_vectors” field. When -- overloading is enabled, this is equivalent to -- --
-- get inputMessage #numVectors --getInputMessageNumVectors :: MonadIO m => InputMessage -> m Word32 -- | Set the value of the “num_vectors” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputMessage [ #numVectors := value ] --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 -- dBusConnectionRegisterSubtree. -- -- Since: 2.26 module GI.Gio.Structs.DBusSubtreeVTable -- | Memory-managed wrapper type. newtype DBusSubtreeVTable DBusSubtreeVTable :: ManagedPtr DBusSubtreeVTable -> DBusSubtreeVTable -- | Construct a DBusSubtreeVTable struct initialized to zero. newZeroDBusSubtreeVTable :: MonadIO m => m DBusSubtreeVTable -- | Set the value of the “dispatch” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #dispatch --clearDBusSubtreeVTableDispatch :: MonadIO m => DBusSubtreeVTable -> m () -- | Get the value of the “dispatch” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusSubtreeVTable #dispatch --getDBusSubtreeVTableDispatch :: MonadIO m => DBusSubtreeVTable -> m (Maybe DBusSubtreeDispatchFunc_WithClosures) -- | Set the value of the “dispatch” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusSubtreeVTable [ #dispatch := value ] --setDBusSubtreeVTableDispatch :: MonadIO m => DBusSubtreeVTable -> FunPtr C_DBusSubtreeDispatchFunc -> m () -- | Set the value of the “enumerate” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #enumerate --clearDBusSubtreeVTableEnumerate :: MonadIO m => DBusSubtreeVTable -> m () -- | Get the value of the “enumerate” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusSubtreeVTable #enumerate --getDBusSubtreeVTableEnumerate :: MonadIO m => DBusSubtreeVTable -> m (Maybe DBusSubtreeEnumerateFunc_WithClosures) -- | Set the value of the “enumerate” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusSubtreeVTable [ #enumerate := value ] --setDBusSubtreeVTableEnumerate :: MonadIO m => DBusSubtreeVTable -> FunPtr C_DBusSubtreeEnumerateFunc -> m () -- | Set the value of the “introspect” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #introspect --clearDBusSubtreeVTableIntrospect :: MonadIO m => DBusSubtreeVTable -> m () -- | Get the value of the “introspect” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusSubtreeVTable #introspect --getDBusSubtreeVTableIntrospect :: MonadIO m => DBusSubtreeVTable -> m (Maybe DBusSubtreeIntrospectFunc_WithClosures) -- | Set the value of the “introspect” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusSubtreeVTable [ #introspect := value ] --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 Nothing as your -- get_property() or set_property() -- function. The D-Bus call will be directed to your -- methodCall function, with the provided -- interfaceName set to -- "org.freedesktop.DBus.Properties". -- -- Ownership of the DBusMethodInvocation object passed to the -- method_call() function is transferred to your handler; -- you must call one of the methods of DBusMethodInvocation 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 -- method_call() 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 -- Get 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 Set calls, and the provided value is also -- checked for being the correct type. -- -- For both Get and Set calls, the -- DBusMethodInvocation passed to the methodCall -- handler can be queried with dBusMethodInvocationGetPropertyInfo -- to get a pointer to the DBusPropertyInfo of the property. -- -- If you have readable properties specified in your interface info, you -- must ensure that you either provide a non-Nothing -- getProperty() function or provide implementations of -- both the Get and GetAll methods on -- org.freedesktop.DBus.Properties interface in your -- methodCall function. Note that the required return -- type of the Get call is (v), not the type of the -- property. GetAll expects a return value of type -- a{sv}. -- -- If you have writable properties specified in your interface info, you -- must ensure that you either provide a non-Nothing -- setProperty() function or provide an implementation of -- the Set call. If implementing the call, you must return the -- value of type G_VARIANT_TYPE_UNIT. -- -- Since: 2.26 module GI.Gio.Structs.DBusInterfaceVTable -- | Memory-managed wrapper type. newtype DBusInterfaceVTable DBusInterfaceVTable :: ManagedPtr DBusInterfaceVTable -> DBusInterfaceVTable -- | Construct a DBusInterfaceVTable struct initialized to zero. newZeroDBusInterfaceVTable :: MonadIO m => m DBusInterfaceVTable -- | Set the value of the “get_property” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #getProperty --clearDBusInterfaceVTableGetProperty :: MonadIO m => DBusInterfaceVTable -> m () -- | Get the value of the “get_property” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusInterfaceVTable #getProperty --getDBusInterfaceVTableGetProperty :: MonadIO m => DBusInterfaceVTable -> m (Maybe DBusInterfaceGetPropertyFunc_WithClosures) -- | Set the value of the “get_property” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusInterfaceVTable [ #getProperty := value ] --setDBusInterfaceVTableGetProperty :: MonadIO m => DBusInterfaceVTable -> FunPtr C_DBusInterfaceGetPropertyFunc -> m () -- | Set the value of the “method_call” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #methodCall --clearDBusInterfaceVTableMethodCall :: MonadIO m => DBusInterfaceVTable -> m () -- | Get the value of the “method_call” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusInterfaceVTable #methodCall --getDBusInterfaceVTableMethodCall :: MonadIO m => DBusInterfaceVTable -> m (Maybe DBusInterfaceMethodCallFunc_WithClosures) -- | Set the value of the “method_call” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusInterfaceVTable [ #methodCall := value ] --setDBusInterfaceVTableMethodCall :: MonadIO m => DBusInterfaceVTable -> FunPtr C_DBusInterfaceMethodCallFunc -> m () -- | Set the value of the “set_property” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #setProperty --clearDBusInterfaceVTableSetProperty :: MonadIO m => DBusInterfaceVTable -> m () -- | Get the value of the “set_property” field. When -- overloading is enabled, this is equivalent to -- --
-- get dBusInterfaceVTable #setProperty --getDBusInterfaceVTableSetProperty :: MonadIO m => DBusInterfaceVTable -> m (Maybe DBusInterfaceSetPropertyFunc_WithClosures) -- | Set the value of the “set_property” field. When -- overloading is enabled, this is equivalent to -- --
-- set dBusInterfaceVTable [ #setProperty := value ] --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 -- actionMapAddActionEntries. -- -- 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 NULL. All -- values after name are optional. Additional optional -- fields may be added in the future. -- -- See actionMapAddActionEntries for an example. module GI.Gio.Structs.ActionEntry -- | Memory-managed wrapper type. newtype ActionEntry ActionEntry :: ManagedPtr ActionEntry -> ActionEntry -- | Construct a ActionEntry struct initialized to zero. newZeroActionEntry :: MonadIO m => m ActionEntry -- | Set the value of the “activate” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #activate --clearActionEntryActivate :: MonadIO m => ActionEntry -> m () -- | Get the value of the “activate” field. When -- overloading is enabled, this is equivalent to -- --
-- get actionEntry #activate --getActionEntryActivate :: MonadIO m => ActionEntry -> m (Maybe ActionEntryActivateFieldCallback_WithClosures) -- | Set the value of the “activate” field. When -- overloading is enabled, this is equivalent to -- --
-- set actionEntry [ #activate := value ] --setActionEntryActivate :: MonadIO m => ActionEntry -> FunPtr C_ActionEntryActivateFieldCallback -> m () -- | Set the value of the “change_state” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #changeState --clearActionEntryChangeState :: MonadIO m => ActionEntry -> m () -- | Get the value of the “change_state” field. When -- overloading is enabled, this is equivalent to -- --
-- get actionEntry #changeState --getActionEntryChangeState :: MonadIO m => ActionEntry -> m (Maybe ActionEntryChangeStateFieldCallback_WithClosures) -- | Set the value of the “change_state” field. When -- overloading is enabled, this is equivalent to -- --
-- set actionEntry [ #changeState := value ] --setActionEntryChangeState :: MonadIO m => ActionEntry -> FunPtr C_ActionEntryChangeStateFieldCallback -> m () -- | Set the value of the “name” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #name --clearActionEntryName :: MonadIO m => ActionEntry -> m () -- | Get the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- get actionEntry #name --getActionEntryName :: MonadIO m => ActionEntry -> m (Maybe Text) -- | Set the value of the “name” field. When overloading is -- enabled, this is equivalent to -- --
-- set actionEntry [ #name := value ] --setActionEntryName :: MonadIO m => ActionEntry -> CString -> m () -- | Set the value of the “parameter_type” field to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #parameterType --clearActionEntryParameterType :: MonadIO m => ActionEntry -> m () -- | Get the value of the “parameter_type” field. When -- overloading is enabled, this is equivalent to -- --
-- get actionEntry #parameterType --getActionEntryParameterType :: MonadIO m => ActionEntry -> m (Maybe Text) -- | Set the value of the “parameter_type” field. When -- overloading is enabled, this is equivalent to -- --
-- set actionEntry [ #parameterType := value ] --setActionEntryParameterType :: MonadIO m => ActionEntry -> CString -> m () -- | Set the value of the “state” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #state --clearActionEntryState :: MonadIO m => ActionEntry -> m () -- | Get the value of the “state” field. When overloading -- is enabled, this is equivalent to -- --
-- get actionEntry #state --getActionEntryState :: MonadIO m => ActionEntry -> m (Maybe Text) -- | Set the value of the “state” field. When overloading -- is enabled, this is equivalent to -- --
-- set actionEntry [ #state := value ] --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 -- | GVolumeMonitor 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. -- -- GVolumeMonitor is not thread-default-context aware (see -- mainContextPushThreadDefault), 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 VolumeMonitor, -- for instance with toVolumeMonitor. class (GObject o, IsDescendantOf VolumeMonitor o) => IsVolumeMonitor o -- | Cast to VolumeMonitor, for types for which this is known to be -- safe. For general casts, use castTo. toVolumeMonitor :: (MonadIO m, IsVolumeMonitor o) => o -> m VolumeMonitor -- | This function should be called by any VolumeMonitor -- implementation when a new Mount object is created that is not -- associated with a Volume object. It must be called just before -- emitting the mountAdded signal. -- -- If the return value is not Nothing, the caller must associate -- the returned Volume object with the Mount. This involves -- returning it in its mountGetVolume 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 volumeMonitorAdoptOrphanMount, the -- implementor must take a reference to mount and return -- it in its volumeGetMount implemented. Also, the implementor -- must listen for the "unmounted" signal on mount and -- give up its reference upon handling that signal. -- -- There are two main use cases for this function. -- -- One is when implementing a user space file system driver that reads -- blocks of a block device that is already represented by the native -- volume monitor (for example a CD Audio file system driver). Such a -- driver will generate its own Mount object that needs to be -- associated with the Volume object that represents the volume. -- -- The other is for implementing a VolumeMonitor whose sole -- purpose is to return Volume objects representing entries in the -- users "favorite servers" list or similar. -- | Deprecated: (Since version 2.20)Instead of using this function, -- VolumeMonitorimplementations 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 -- mountIsShadowed,mountShadow and mountUnshadow -- functions. 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 g_list_free(), -- after its elements have been unreffed with objectUnref. volumeMonitorGetConnectedDrives :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Drive] -- | Finds a Mount object by its UUID (see mountGetUuid) 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 g_list_free(), -- after its elements have been unreffed with objectUnref. volumeMonitorGetMounts :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Mount] -- | Finds a Volume object by its UUID (see volumeGetUuid) 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 g_list_free(), -- after its elements have been unreffed with objectUnref. volumeMonitorGetVolumes :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> m [Volume] -- | Emitted when a drive changes. type VolumeMonitorDriveChangedCallback = Drive -> IO () -- | Connect a signal handler for the driveChanged signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after volumeMonitor #driveChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the driveChanged signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on volumeMonitor #driveChanged callback --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 driveConnected signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #driveConnected callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveConnectedCallback) -> m SignalHandlerId -- | Connect a signal handler for the driveConnected signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on volumeMonitor #driveConnected callback --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 driveDisconnected signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #driveDisconnected callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveDisconnectedCallback) -> m SignalHandlerId -- | Connect a signal handler for the driveDisconnected signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on volumeMonitor #driveDisconnected callback --onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveDisconnectedCallback) -> m SignalHandlerId -- | Emitted when the eject button is pressed on drive. -- -- Since: 2.18 type VolumeMonitorDriveEjectButtonCallback = Drive -> IO () -- | Connect a signal handler for the driveEjectButton signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #driveEjectButton callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveEjectButtonCallback) -> m SignalHandlerId -- | Connect a signal handler for the driveEjectButton signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on volumeMonitor #driveEjectButton callback --onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveEjectButtonCallback) -> m SignalHandlerId -- | Emitted when the stop button is pressed on drive. -- -- Since: 2.22 type VolumeMonitorDriveStopButtonCallback = Drive -> IO () -- | Connect a signal handler for the driveStopButton signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #driveStopButton callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorDriveStopButtonCallback) -> m SignalHandlerId -- | Connect a signal handler for the driveStopButton signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on volumeMonitor #driveStopButton callback --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 mountAdded signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after volumeMonitor #mountAdded callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountAddedCallback) -> m SignalHandlerId -- | Connect a signal handler for the mountAdded signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on volumeMonitor #mountAdded callback --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 mountChanged signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after volumeMonitor #mountChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the mountChanged signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on volumeMonitor #mountChanged callback --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 mountPreUnmount signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #mountPreUnmount callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountPreUnmountCallback) -> m SignalHandlerId -- | Connect a signal handler for the mountPreUnmount signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on volumeMonitor #mountPreUnmount callback --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 mountRemoved signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after volumeMonitor #mountRemoved callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorMountRemovedCallback) -> m SignalHandlerId -- | Connect a signal handler for the mountRemoved signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on volumeMonitor #mountRemoved callback --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 volumeAdded signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after volumeMonitor #volumeAdded callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeAddedCallback) -> m SignalHandlerId -- | Connect a signal handler for the volumeAdded signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on volumeMonitor #volumeAdded callback --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 volumeChanged signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #volumeChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the volumeChanged signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on volumeMonitor #volumeChanged callback --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 volumeRemoved signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #volumeRemoved callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> ((?self :: a) => VolumeMonitorVolumeRemovedCallback) -> m SignalHandlerId -- | Connect a signal handler for the volumeRemoved signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on volumeMonitor #volumeRemoved callback --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.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 Vfs, for -- instance with toVfs. class (GObject o, IsDescendantOf Vfs o) => IsVfs o -- | Cast to Vfs, for types for which this is known to be safe. For -- general casts, use castTo. toVfs :: (MonadIO m, IsVfs o) => o -> m Vfs -- | Gets the default Vfs for the system. vfsGetDefault :: (HasCallStack, MonadIO m) => m Vfs -- | Gets a File for path. vfsGetFileForPath :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m File -- | Gets a File for uri. -- -- 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 Vfs for the system. vfsGetLocal :: (HasCallStack, MonadIO m) => m Vfs -- | Gets a list of URI schemes supported by vfs. 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 parseName cannot be parsed -- by the Vfs module. vfsParseName :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m File -- | Registers uriFunc and parseNameFunc as -- the File URI and parse name lookup functions for URIs with a -- scheme matching scheme. Note that -- scheme is registered only within the running -- application, as opposed to desktop-wide as it happens with GVfs -- backends. -- -- When a File is requested with an URI containing -- scheme (e.g. through fileNewForUri), -- uriFunc will be called to allow a custom constructor. -- The implementation of uriFunc should not be blocking, -- and must not call vfsRegisterUriScheme or -- vfsUnregisterUriScheme. -- -- When fileParseName is called with a parse name obtained from -- such file, parseNameFunc will be called to allow the -- File to be created again. In that case, it's responsibility of -- parseNameFunc to make sure the parse name matches what -- the custom File implementation returned when -- fileGetParseName was previously called. The implementation of -- parseNameFunc should not be blocking, and must not -- call vfsRegisterUriScheme or vfsUnregisterUriScheme. -- -- It's an error to call this function twice with the same scheme. To -- unregister a custom URI scheme, use vfsUnregisterUriScheme. -- -- Since: 2.50 vfsRegisterUriScheme :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> Maybe VfsFileLookupFunc -> Maybe VfsFileLookupFunc -> m Bool -- | Unregisters the URI handler for scheme previously -- registered with vfsRegisterUriScheme. -- -- Since: 2.50 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.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 struct sockaddr_un. -- -- 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 G_IO_ERROR_NOT_SUPPORTED errors. You can use -- unixSocketAddressAbstractNamesSupported to see if abstract -- names are supported. -- -- Since GLib 2.72, GUnixSocketAddress is available on all -- platforms. It requires underlying system support (such as Windows 10 -- with AF_UNIX) at run time. -- -- Before GLib 2.72, <gio/gunixsocketaddress.h> belonged -- to the UNIX-specific GIO interfaces, thus you had to use the -- gio-unix-2.0.pc 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 -- UnixSocketAddress, for instance with -- toUnixSocketAddress. class (GObject o, IsDescendantOf UnixSocketAddress o) => IsUnixSocketAddress o -- | Cast to UnixSocketAddress, for types for which this is known to -- be safe. For general casts, use castTo. toUnixSocketAddress :: (MonadIO m, IsUnixSocketAddress o) => o -> m UnixSocketAddress -- | Checks if abstract UNIX domain socket names are supported. -- -- Since: 2.22 unixSocketAddressAbstractNamesSupported :: (HasCallStack, MonadIO m) => m Bool -- | Gets address's type. -- -- Since: 2.26 unixSocketAddressGetAddressType :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m UnixSocketAddressType -- | Tests if address is abstract. -- -- Since: 2.22 -- | Deprecated: Use unixSocketAddressGetAddressType unixSocketAddressGetIsAbstract :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m Bool -- | Gets address's path, or for abstract sockets the -- "name". -- -- Guaranteed to be zero-terminated, but an abstract socket may contain -- embedded zeros, and thus you should use -- unixSocketAddressGetPathLen to get the true length of this -- string. -- -- Since: 2.22 unixSocketAddressGetPath :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m Text -- | Gets the length of address's path. -- -- For details, see unixSocketAddressGetPath. -- -- Since: 2.22 unixSocketAddressGetPathLen :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m CSize -- | Creates a new UnixSocketAddress for path. -- -- To create abstract socket addresses, on systems that support that, use -- unixSocketAddressNewAbstract. -- -- Since: 2.22 unixSocketAddressNew :: (HasCallStack, MonadIO m) => Text -> m UnixSocketAddress -- | Creates a new UnixSocketAddressTypeAbstractPadded -- UnixSocketAddress for path. -- | Deprecated: Use unixSocketAddressNewWithType. unixSocketAddressNewAbstract :: (HasCallStack, MonadIO m) => [Int8] -> m UnixSocketAddress -- | Creates a new UnixSocketAddress of type type -- with name path. -- -- If type is UnixSocketAddressTypePath, this is -- equivalent to calling unixSocketAddressNew. -- -- If type is UnixSocketAddressTypeAnonymous, -- path and pathLen will be ignored. -- -- If pathType is UnixSocketAddressTypeAbstract, -- then pathLen bytes of path will be -- copied to the socket's path, and only those bytes will be considered -- part of the name. (If pathLen is -1, then -- path is assumed to be NUL-terminated.) For example, if -- path was "test", then calling -- socketAddressGetNativeSize 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 pathType is -- UnixSocketAddressTypeAbstractPadded, then -- pathLen bytes of path will be copied -- to the socket's path, the rest of the path will be padded with 0 -- bytes, and the entire zero-padded buffer will be considered the name. -- (As above, if pathLen is -1, then path -- is assumed to be NUL-terminated.) In this case, -- socketAddressGetNativeSize will always return the full size of -- a struct sockaddr_un, although -- unixSocketAddressGetPathLen will still return just the length -- of path. -- -- UnixSocketAddressTypeAbstract is preferred over -- UnixSocketAddressTypeAbstractPadded 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. -- -- Since: 2.26 unixSocketAddressNewWithType :: (HasCallStack, MonadIO m) => [Int8] -> UnixSocketAddressType -> m UnixSocketAddress -- | Construct a GValueConstruct with valid value for the -- “abstract” property. This is rarely needed directly, but it -- is used by new. constructUnixSocketAddressAbstract :: (IsUnixSocketAddress o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “abstract” property. When -- overloading is enabled, this is equivalent to -- --
-- get unixSocketAddress #abstract --getUnixSocketAddressAbstract :: (MonadIO m, IsUnixSocketAddress o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “address-type” property. This is rarely needed directly, but -- it is used by new. constructUnixSocketAddressAddressType :: (IsUnixSocketAddress o, MonadIO m) => UnixSocketAddressType -> m (GValueConstruct o) -- | Get the value of the “address-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get unixSocketAddress #addressType --getUnixSocketAddressAddressType :: (MonadIO m, IsUnixSocketAddress o) => o -> m UnixSocketAddressType -- | Construct a GValueConstruct with valid value for the -- “path” property. This is rarely needed directly, but it is -- used by new. constructUnixSocketAddressPath :: (IsUnixSocketAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “path” property. When overloading -- is enabled, this is equivalent to -- --
-- get unixSocketAddress #path --getUnixSocketAddressPath :: (MonadIO m, IsUnixSocketAddress o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “path-as-array” property. This is rarely needed directly, but -- it is used by new. constructUnixSocketAddressPathAsArray :: (IsUnixSocketAddress o, MonadIO m) => ByteString -> m (GValueConstruct o) -- | Get the value of the “path-as-array” property. When -- overloading is enabled, this is equivalent to -- --
-- get unixSocketAddress #pathAsArray --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.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 -- | GUnixOutputStream implements OutputStream for writing -- to a UNIX file descriptor, including asynchronous operations. (If the -- file descriptor refers to a socket or pipe, this will use -- poll() to do asynchronous I/O. If it refers to a regular -- file, it will fall back to doing asynchronous I/O in another thread.) -- -- Note that <gio/gunixoutputstream.h> belongs to the -- UNIX-specific GIO interfaces, thus you have to use the -- gio-unix-2.0.pc pkg-config file file or the -- GioUnix-2.0 GIR namespace when using it. module GI.Gio.Objects.UnixOutputStream -- | Memory-managed wrapper type. newtype UnixOutputStream UnixOutputStream :: ManagedPtr UnixOutputStream -> UnixOutputStream -- | Type class for types which can be safely cast to -- UnixOutputStream, for instance with toUnixOutputStream. class (GObject o, IsDescendantOf UnixOutputStream o) => IsUnixOutputStream o -- | Cast to UnixOutputStream, for types for which this is known to -- be safe. For general casts, use castTo. toUnixOutputStream :: (MonadIO m, IsUnixOutputStream o) => o -> m UnixOutputStream -- | Returns whether the file descriptor of stream will be -- closed when the stream is closed. -- -- Since: 2.20 unixOutputStreamGetCloseFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> m Bool -- | Return the UNIX file descriptor that the stream writes to. -- -- Since: 2.20 unixOutputStreamGetFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> m Int32 -- | Creates a new UnixOutputStream for the given -- fd. -- -- If closeFd, is True, the file descriptor will -- be closed when the output stream is destroyed. unixOutputStreamNew :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m UnixOutputStream -- | Sets whether the file descriptor of stream shall be -- closed when the stream is closed. -- -- Since: 2.20 unixOutputStreamSetCloseFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “close-fd” property. This is rarely needed directly, but it -- is used by new. constructUnixOutputStreamCloseFd :: (IsUnixOutputStream o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “close-fd” property. When -- overloading is enabled, this is equivalent to -- --
-- get unixOutputStream #closeFd --getUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Bool -- | Set the value of the “close-fd” property. When -- overloading is enabled, this is equivalent to -- --
-- set unixOutputStream [ #closeFd := value ] --setUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “fd” property. This is rarely needed directly, but it is used -- by new. constructUnixOutputStreamFd :: (IsUnixOutputStream o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “fd” property. When overloading -- is enabled, this is equivalent to -- --
-- get unixOutputStream #fd --getUnixOutputStreamFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Int32 instance GHC.Classes.Eq GI.Gio.Objects.UnixOutputStream.UnixOutputStream instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixOutputStream.UnixOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixOutputStream.UnixOutputStream instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Objects.UnixOutputStream.UnixOutputStream) instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixOutputStream.UnixOutputStream o) => GI.Gio.Objects.UnixOutputStream.IsUnixOutputStream o instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixOutputStream.UnixOutputStream instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixOutputStream.UnixOutputStream -- | GUnixInputStream implements InputStream for reading -- from a UNIX file descriptor, including asynchronous operations. (If -- the file descriptor refers to a socket or pipe, this will use -- poll() to do asynchronous I/O. If it refers to a regular -- file, it will fall back to doing asynchronous I/O in another thread.) -- -- Note that <gio/gunixinputstream.h> belongs to the -- UNIX-specific GIO interfaces, thus you have to use the -- gio-unix-2.0.pc pkg-config file or the GioUnix-2.0 -- GIR namespace when using it. module GI.Gio.Objects.UnixInputStream -- | Memory-managed wrapper type. newtype UnixInputStream UnixInputStream :: ManagedPtr UnixInputStream -> UnixInputStream -- | Type class for types which can be safely cast to -- UnixInputStream, for instance with toUnixInputStream. class (GObject o, IsDescendantOf UnixInputStream o) => IsUnixInputStream o -- | Cast to UnixInputStream, for types for which this is known to -- be safe. For general casts, use castTo. toUnixInputStream :: (MonadIO m, IsUnixInputStream o) => o -> m UnixInputStream -- | Returns whether the file descriptor of stream will be -- closed when the stream is closed. -- -- Since: 2.20 unixInputStreamGetCloseFd :: (HasCallStack, MonadIO m, IsUnixInputStream a) => a -> m Bool -- | Return the UNIX file descriptor that the stream reads from. -- -- Since: 2.20 unixInputStreamGetFd :: (HasCallStack, MonadIO m, IsUnixInputStream a) => a -> m Int32 -- | Creates a new UnixInputStream for the given fd. -- -- If closeFd is True, the file descriptor will be -- closed when the stream is closed. unixInputStreamNew :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m UnixInputStream -- | Sets whether the file descriptor of stream shall be -- closed when the stream is closed. -- -- Since: 2.20 unixInputStreamSetCloseFd :: (HasCallStack, MonadIO m, IsUnixInputStream a) => a -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “close-fd” property. This is rarely needed directly, but it -- is used by new. constructUnixInputStreamCloseFd :: (IsUnixInputStream o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “close-fd” property. When -- overloading is enabled, this is equivalent to -- --
-- get unixInputStream #closeFd --getUnixInputStreamCloseFd :: (MonadIO m, IsUnixInputStream o) => o -> m Bool -- | Set the value of the “close-fd” property. When -- overloading is enabled, this is equivalent to -- --
-- set unixInputStream [ #closeFd := value ] --setUnixInputStreamCloseFd :: (MonadIO m, IsUnixInputStream o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “fd” property. This is rarely needed directly, but it is used -- by new. constructUnixInputStreamFd :: (IsUnixInputStream o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “fd” property. When overloading -- is enabled, this is equivalent to -- --
-- get unixInputStream #fd --getUnixInputStreamFd :: (MonadIO m, IsUnixInputStream o) => o -> m Int32 instance GHC.Classes.Eq GI.Gio.Objects.UnixInputStream.UnixInputStream instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixInputStream.UnixInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixInputStream.UnixInputStream instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Objects.UnixInputStream.UnixInputStream) instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixInputStream.UnixInputStream o) => GI.Gio.Objects.UnixInputStream.IsUnixInputStream o instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.UnixInputStream.UnixInputStream instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.UnixInputStream.UnixInputStream -- | This is the subclass of SocketConnection 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, GUnixConnection is available on all -- platforms. It requires underlying system support (such as Windows 10 -- with AF_UNIX) at run time. -- -- Before GLib 2.72, <gio/gunixconnection.h> belonged to -- the UNIX-specific GIO interfaces, thus you had to use the -- gio-unix-2.0.pc pkg-config file when using it. This is no -- longer necessary since GLib 2.72. -- -- Since: 2.22 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 -- UnixConnection, for instance with toUnixConnection. class (GObject o, IsDescendantOf UnixConnection o) => IsUnixConnection o -- | Cast to UnixConnection, for types for which this is known to be -- safe. For general casts, use castTo. toUnixConnection :: (MonadIO m, IsUnixConnection o) => o -> m UnixConnection -- | Receives credentials from the sending end of the connection. The -- sending end has to call unixConnectionSendCredentials (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: -- --
-- clear #advertisedProtocols --clearTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “advertised-protocols” property. This is rarely needed -- directly, but it is used by new. constructTlsConnectionAdvertisedProtocols :: (IsTlsConnection o, MonadIO m) => [Text] -> m (GValueConstruct o) -- | Get the value of the “advertised-protocols” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #advertisedProtocols --getTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe [Text]) -- | Set the value of the “advertised-protocols” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsConnection [ #advertisedProtocols := value ] --setTlsConnectionAdvertisedProtocols :: (MonadIO m, IsTlsConnection o) => o -> [Text] -> m () -- | Construct a GValueConstruct with valid value for the -- “base-io-stream” property. This is rarely needed directly, -- but it is used by new. constructTlsConnectionBaseIoStream :: (IsTlsConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o) -- | Get the value of the “base-io-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #baseIoStream --getTlsConnectionBaseIoStream :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe IOStream) -- | Construct a GValueConstruct with valid value for the -- “certificate” property. This is rarely needed directly, but -- it is used by new. constructTlsConnectionCertificate :: (IsTlsConnection o, MonadIO m, IsTlsCertificate a) => a -> m (GValueConstruct o) -- | Get the value of the “certificate” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #certificate --getTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsCertificate) -- | Set the value of the “certificate” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsConnection [ #certificate := value ] --setTlsConnectionCertificate :: (MonadIO m, IsTlsConnection o, IsTlsCertificate a) => o -> a -> m () -- | Get the value of the “ciphersuite-name” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #ciphersuiteName --getTlsConnectionCiphersuiteName :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Text) -- | Set the value of the “database” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #database --clearTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “database” property. This is rarely needed directly, but it -- is used by new. constructTlsConnectionDatabase :: (IsTlsConnection o, MonadIO m, IsTlsDatabase a) => a -> m (GValueConstruct o) -- | Get the value of the “database” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #database --getTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsDatabase) -- | Set the value of the “database” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsConnection [ #database := value ] --setTlsConnectionDatabase :: (MonadIO m, IsTlsConnection o, IsTlsDatabase a) => o -> a -> m () -- | Set the value of the “interaction” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #interaction --clearTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “interaction” property. This is rarely needed directly, but -- it is used by new. constructTlsConnectionInteraction :: (IsTlsConnection o, MonadIO m, IsTlsInteraction a) => a -> m (GValueConstruct o) -- | Get the value of the “interaction” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #interaction --getTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsInteraction) -- | Set the value of the “interaction” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsConnection [ #interaction := value ] --setTlsConnectionInteraction :: (MonadIO m, IsTlsConnection o, IsTlsInteraction a) => o -> a -> m () -- | Get the value of the “negotiated-protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #negotiatedProtocol --getTlsConnectionNegotiatedProtocol :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe Text) -- | Get the value of the “peer-certificate” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #peerCertificate --getTlsConnectionPeerCertificate :: (MonadIO m, IsTlsConnection o) => o -> m (Maybe TlsCertificate) -- | Get the value of the “peer-certificate-errors” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #peerCertificateErrors --getTlsConnectionPeerCertificateErrors :: (MonadIO m, IsTlsConnection o) => o -> m [TlsCertificateFlags] -- | Get the value of the “protocol-version” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #protocolVersion --getTlsConnectionProtocolVersion :: (MonadIO m, IsTlsConnection o) => o -> m TlsProtocolVersion -- | Construct a GValueConstruct with valid value for the -- “rehandshake-mode” property. This is rarely needed directly, -- but it is used by new. constructTlsConnectionRehandshakeMode :: (IsTlsConnection o, MonadIO m) => TlsRehandshakeMode -> m (GValueConstruct o) -- | Get the value of the “rehandshake-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #rehandshakeMode --getTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> m TlsRehandshakeMode -- | Set the value of the “rehandshake-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsConnection [ #rehandshakeMode := value ] --setTlsConnectionRehandshakeMode :: (MonadIO m, IsTlsConnection o) => o -> TlsRehandshakeMode -> m () -- | Construct a GValueConstruct with valid value for the -- “require-close-notify” property. This is rarely needed -- directly, but it is used by new. constructTlsConnectionRequireCloseNotify :: (IsTlsConnection o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “require-close-notify” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #requireCloseNotify --getTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> m Bool -- | Set the value of the “require-close-notify” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsConnection [ #requireCloseNotify := value ] --setTlsConnectionRequireCloseNotify :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “use-system-certdb” property. This is rarely needed directly, -- but it is used by new. constructTlsConnectionUseSystemCertdb :: (IsTlsConnection o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “use-system-certdb” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsConnection #useSystemCertdb --getTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> m Bool -- | Set the value of the “use-system-certdb” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsConnection [ #useSystemCertdb := value ] --setTlsConnectionUseSystemCertdb :: (MonadIO m, IsTlsConnection o) => o -> Bool -> m () -- | Emitted during the TLS handshake after the peer certificate has been -- received. You can examine peerCert's certification -- path by calling tlsCertificateGetIssuer on it. -- -- For a client-side connection, peerCert is the server's -- certificate, and the signal will only be emitted if the certificate -- was not acceptable according to conn's -- TlsClientConnection:validation_flags. If you -- would like the certificate to be accepted despite -- errors, return True from the signal handler. -- Otherwise, if no handler accepts the certificate, the handshake will -- fail with TlsErrorBadCertificate. -- -- GLib guarantees that if certificate verification fails, this signal -- will be emitted with at least one error will be set in -- errors, 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 TlsCertificateFlagsExpired 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, peerCert is the -- certificate presented by the client, if this was requested via the -- server's -- TlsServerConnection:authentication_mode. 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 True. -- -- 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 False from the signal handler on the first attempt, and -- then after the connection attempt returns a -- TlsErrorBadCertificate, you can interact with the user, and if -- the user decides to accept the certificate, remember that fact, create -- a new connection, and return True from the signal handler the -- next time. -- -- 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. -- -- Since: 2.28 type TlsConnectionAcceptCertificateCallback = TlsCertificate -> [TlsCertificateFlags] -> IO Bool -- | Connect a signal handler for the acceptCertificate signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after tlsConnection #acceptCertificate callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> ((?self :: a) => TlsConnectionAcceptCertificateCallback) -> m SignalHandlerId -- | Connect a signal handler for the acceptCertificate signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on tlsConnection #acceptCertificate callback --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.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 -- TlsServerConnection). -- -- Since: 2.28 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 -- TlsCertificate, for instance with toTlsCertificate. class (GObject o, IsDescendantOf TlsCertificate o) => IsTlsCertificate o -- | Cast to TlsCertificate, for types for which this is known to be -- safe. For general casts, use castTo. toTlsCertificate :: (MonadIO m, IsTlsCertificate o) => o -> m TlsCertificate -- | Gets the value of TlsCertificate:dnsNames. -- -- Since: 2.70 tlsCertificateGetDnsNames :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe [Bytes]) -- | Gets the value of TlsCertificate:ipAddresses. -- -- Since: 2.70 tlsCertificateGetIpAddresses :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe [InetAddress]) -- | Gets the TlsCertificate representing cert's -- issuer, if known -- -- Since: 2.28 tlsCertificateGetIssuer :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe TlsCertificate) -- | Returns the issuer name from the certificate. -- -- Since: 2.70 tlsCertificateGetIssuerName :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe Text) -- | Returns the time at which the certificate became or will become -- invalid. -- -- Since: 2.70 tlsCertificateGetNotValidAfter :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe DateTime) -- | Returns the time at which the certificate became or will become valid. -- -- Since: 2.70 tlsCertificateGetNotValidBefore :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe DateTime) -- | Returns the subject name from the certificate. -- -- Since: 2.70 tlsCertificateGetSubjectName :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m (Maybe Text) -- | Check if two TlsCertificate 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 TlsCertificate:issuer, -- TlsCertificate:privateKey, or -- TlsCertificate:privateKeyPem properties differ. -- -- Since: 2.34 tlsCertificateIsSame :: (HasCallStack, MonadIO m, IsTlsCertificate a, IsTlsCertificate b) => a -> b -> m Bool -- | Creates one or more GTlsCertificates from the -- PEM-encoded data in file. If file -- cannot be read or parsed, the function will return Nothing and -- set error. If file does not contain -- any PEM-encoded certificates, this will return an empty list and not -- set error. -- -- Since: 2.28 tlsCertificateListNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m [TlsCertificate] -- | Creates a TlsCertificate from the data in file. -- -- As of 2.72, if the filename ends in .p12 or .pfx the -- data is loaded by tlsCertificateNewFromPkcs12 otherwise it is -- loaded by tlsCertificateNewFromPem. See those functions for -- exact details. -- -- If file cannot be read or parsed, the function will -- return Nothing and set error. -- -- Since: 2.28 tlsCertificateNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m TlsCertificate -- | Creates a TlsCertificate from the data in file. -- -- If file cannot be read or parsed, the function will -- return Nothing and set error. -- -- Any unknown file types will error with IOErrorEnumNotSupported. -- Currently only .p12 and .pfx files are supported. -- See tlsCertificateNewFromPkcs12 for more details. -- -- Since: 2.72 tlsCertificateNewFromFileWithPassword :: (HasCallStack, MonadIO m) => [Char] -> Text -> m TlsCertificate -- | Creates a TlsCertificate from the PEM-encoded data in -- certFile and keyFile. The returned -- certificate will be the first certificate found in -- certFile. As of GLib 2.44, if certFile -- 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 -- TlsCertificate:issuer property of each certificate will be set -- accordingly if the verification succeeds. If any certificate in the -- chain cannot be verified, the first certificate in the file will still -- be returned. -- -- If either file cannot be read or parsed, the function will return -- Nothing and set error. Otherwise, this behaves -- like tlsCertificateNewFromPem. -- -- Since: 2.28 tlsCertificateNewFromFiles :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> m TlsCertificate -- | Creates a TlsCertificate from the PEM-encoded data in -- data. If data includes both a -- certificate and a private key, then the returned certificate will -- include the private key data as well. (See the -- TlsCertificate:privateKeyPem property for information about -- supported formats.) -- -- The returned certificate will be the first certificate found in -- data. As of GLib 2.44, if data -- contains more certificates it will try to load a certificate chain. -- All certificates will be verified in the order found (top-level -- certificate should be the last one in the file) and the -- TlsCertificate:issuer property of each certificate will be set -- accordingly if the verification succeeds. If any certificate in the -- chain cannot be verified, the first certificate in the file will still -- be returned. -- -- Since: 2.28 tlsCertificateNewFromPem :: (HasCallStack, MonadIO m) => Text -> Int64 -> m TlsCertificate -- | Creates a TlsCertificate from a PKCS #11 URI. -- -- An example pkcs11Uri would be -- pkcs11:model=Model;manufacturer=Manufacture;serial=1;token=My%20Client%20Certificate;id=%01 -- -- Where the token’s layout is: -- --
-- 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 ---- -- In this case the certificate and private key would both be detected -- and used as expected. pkcsUri may also just reference -- an X.509 certificate object and then optionally -- privateKeyPkcs11Uri 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. -- -- Since: 2.68 tlsCertificateNewFromPkcs11Uris :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> m TlsCertificate -- | Creates a TlsCertificate from the data in data. -- It must contain a certificate and matching private key. -- -- If extra certificates are included they will be verified as a chain -- and the TlsCertificate:issuer 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 12 container as well as encrypted -- private keys. If decryption fails it will error with -- TlsErrorBadCertificatePassword. -- -- This constructor requires support in the current TlsBackend. If -- support is missing it will error with IOErrorEnumNotSupported. -- -- Other parsing failures will error with TlsErrorBadCertificate. -- -- Since: 2.72 tlsCertificateNewFromPkcs12 :: (HasCallStack, MonadIO m) => ByteString -> Maybe Text -> m TlsCertificate -- | This verifies cert and returns a set of -- TlsCertificateFlags 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 cert is valid, TlsCertificateFlagsNoFlags is -- returned. -- -- If identity is not Nothing, -- cert's name(s) will be compared against it, and -- TlsCertificateFlagsBadIdentity will be set in the return value -- if it does not match. If identity is Nothing, -- that bit will never be set in the return value. -- -- If trustedCa is not Nothing, then -- cert (or one of the certificates in its chain) must be -- signed by it, or else TlsCertificateFlagsUnknownCa will be set -- in the return value. If trustedCa is Nothing, -- 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 TlsCertificateFlagsExpired 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, TlsCertificate may not -- perform as many checks on the certificates as TlsConnection -- 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 TlsConnection -- handle the verification. -- -- Since: 2.28 tlsCertificateVerify :: (HasCallStack, MonadIO m, IsTlsCertificate a, IsSocketConnectable b, IsTlsCertificate c) => a -> Maybe b -> Maybe c -> m [TlsCertificateFlags] -- | Construct a GValueConstruct with valid value for the -- “certificate” property. This is rarely needed directly, but -- it is used by new. constructTlsCertificateCertificate :: (IsTlsCertificate o, MonadIO m) => ByteString -> m (GValueConstruct o) -- | Get the value of the “certificate” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #certificate --getTlsCertificateCertificate :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe ByteString) -- | Construct a GValueConstruct with valid value for the -- “certificate-pem” property. This is rarely needed directly, -- but it is used by new. constructTlsCertificateCertificatePem :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “certificate-pem” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #certificatePem --getTlsCertificateCertificatePem :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “issuer” property. This is rarely needed directly, but it is -- used by new. constructTlsCertificateIssuer :: (IsTlsCertificate o, MonadIO m, IsTlsCertificate a) => a -> m (GValueConstruct o) -- | Get the value of the “issuer” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #issuer --getTlsCertificateIssuer :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe TlsCertificate) -- | Get the value of the “issuer-name” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #issuerName --getTlsCertificateIssuerName :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text) -- | Get the value of the “not-valid-after” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #notValidAfter --getTlsCertificateNotValidAfter :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe DateTime) -- | Get the value of the “not-valid-before” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #notValidBefore --getTlsCertificateNotValidBefore :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe DateTime) -- | Construct a GValueConstruct with valid value for the -- “password” property. This is rarely needed directly, but it -- is used by new. constructTlsCertificatePassword :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o) -- | Construct a GValueConstruct with valid value for the -- “pkcs11-uri” property. This is rarely needed directly, but it -- is used by new. constructTlsCertificatePkcs11Uri :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “pkcs11-uri” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #pkcs11Uri --getTlsCertificatePkcs11Uri :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “pkcs12-data” property. This is rarely needed directly, but -- it is used by new. constructTlsCertificatePkcs12Data :: (IsTlsCertificate o, MonadIO m) => ByteString -> m (GValueConstruct o) -- | Construct a GValueConstruct with valid value for the -- “private-key” property. This is rarely needed directly, but -- it is used by new. constructTlsCertificatePrivateKey :: (IsTlsCertificate o, MonadIO m) => ByteString -> m (GValueConstruct o) -- | Get the value of the “private-key” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #privateKey --getTlsCertificatePrivateKey :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe ByteString) -- | Construct a GValueConstruct with valid value for the -- “private-key-pem” property. This is rarely needed directly, -- but it is used by new. constructTlsCertificatePrivateKeyPem :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “private-key-pem” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #privateKeyPem --getTlsCertificatePrivateKeyPem :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “private-key-pkcs11-uri” property. This is rarely needed -- directly, but it is used by new. constructTlsCertificatePrivateKeyPkcs11Uri :: (IsTlsCertificate o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “private-key-pkcs11-uri” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #privateKeyPkcs11Uri --getTlsCertificatePrivateKeyPkcs11Uri :: (MonadIO m, IsTlsCertificate o) => o -> m (Maybe Text) -- | Get the value of the “subject-name” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsCertificate #subjectName --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.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 GThreadedSocketService is a simple subclass of -- SocketService that handles incoming connections by creating a -- worker thread and dispatching the connection to it by emitting the -- signalgio.ThreadedSocketService[run 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 SocketService from accepting new -- connections when all threads are busy. -- -- As with SocketService, you may connect to -- ThreadedSocketService::run, or subclass and override the -- default handler. -- -- Since: 2.22 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 -- ThreadedSocketService, for instance with -- toThreadedSocketService. class (GObject o, IsDescendantOf ThreadedSocketService o) => IsThreadedSocketService o -- | Cast to ThreadedSocketService, for types for which this is -- known to be safe. For general casts, use castTo. toThreadedSocketService :: (MonadIO m, IsThreadedSocketService o) => o -> m ThreadedSocketService -- | Creates a new ThreadedSocketService with no listeners. -- Listeners must be added with one of the SocketListener "add" -- methods. -- -- Since: 2.22 threadedSocketServiceNew :: (HasCallStack, MonadIO m) => Int32 -> m ThreadedSocketService -- | Construct a GValueConstruct with valid value for the -- “max-threads” property. This is rarely needed directly, but -- it is used by new. constructThreadedSocketServiceMaxThreads :: (IsThreadedSocketService o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “max-threads” property. When -- overloading is enabled, this is equivalent to -- --
-- get threadedSocketService #maxThreads --getThreadedSocketServiceMaxThreads :: (MonadIO m, IsThreadedSocketService o) => o -> m Int32 -- | The run signal is emitted in a worker thread in response to an -- incoming connection. This thread is dedicated to handling -- connection 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 run signal, to be run after -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after threadedSocketService #run callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterThreadedSocketServiceRun :: (IsThreadedSocketService a, MonadIO m) => a -> ((?self :: a) => ThreadedSocketServiceRunCallback) -> m SignalHandlerId -- | Connect a signal handler for the run signal, to be run before -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- on threadedSocketService #run callback --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.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 GTcpWrapperConnection can be used to wrap a IOStream -- that is based on a Socket, but which is not actually a -- SocketConnection. This is used by SocketClient so that -- it can always return a SocketConnection, even when the -- connection it has actually created is not directly a -- SocketConnection. -- -- Since: 2.28 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 -- TcpWrapperConnection, for instance with -- toTcpWrapperConnection. class (GObject o, IsDescendantOf TcpWrapperConnection o) => IsTcpWrapperConnection o -- | Cast to TcpWrapperConnection, for types for which this is known -- to be safe. For general casts, use castTo. toTcpWrapperConnection :: (MonadIO m, IsTcpWrapperConnection o) => o -> m TcpWrapperConnection -- | Gets conn's base IOStream tcpWrapperConnectionGetBaseIoStream :: (HasCallStack, MonadIO m, IsTcpWrapperConnection a) => a -> m IOStream -- | Wraps baseIoStream and socket together -- as a SocketConnection. -- -- Since: 2.28 tcpWrapperConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsSocket b) => a -> b -> m TcpWrapperConnection -- | Construct a GValueConstruct with valid value for the -- “base-io-stream” property. This is rarely needed directly, -- but it is used by new. constructTcpWrapperConnectionBaseIoStream :: (IsTcpWrapperConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o) -- | Get the value of the “base-io-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get tcpWrapperConnection #baseIoStream --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.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 SocketConnection that is created for -- TCP/IP sockets. -- -- Since: 2.22 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 TcpConnection, -- for instance with toTcpConnection. class (GObject o, IsDescendantOf TcpConnection o) => IsTcpConnection o -- | Cast to TcpConnection, for types for which this is known to be -- safe. For general casts, use castTo. toTcpConnection :: (MonadIO m, IsTcpConnection o) => o -> m TcpConnection -- | Checks if graceful disconnects are used. See -- tcpConnectionSetGracefulDisconnect. -- -- Since: 2.22 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. -- -- Since: 2.22 tcpConnectionSetGracefulDisconnect :: (HasCallStack, MonadIO m, IsTcpConnection a) => a -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “graceful-disconnect” property. This is rarely needed -- directly, but it is used by new. constructTcpConnectionGracefulDisconnect :: (IsTcpConnection o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “graceful-disconnect” property. When -- overloading is enabled, this is equivalent to -- --
-- get tcpConnection #gracefulDisconnect --getTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> m Bool -- | Set the value of the “graceful-disconnect” property. When -- overloading is enabled, this is equivalent to -- --
-- set tcpConnection [ #gracefulDisconnect := value ] --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.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 GTask represents and manages a cancellable ‘task’. -- --
-- typedef struct {
-- CakeFrostingType frosting;
-- char *message;
-- } DecorationData;
--
-- static void
-- decoration_data_free (DecorationData *decoration)
-- {
-- g_free (decoration->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->frosting, decoration->message, &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 < 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->frosting = frosting;
-- decoration->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);
-- }
--
--
--
-- typedef struct {
-- Cake *cake;
-- CakeFrostingType frosting;
-- char *message;
-- } BakingData;
--
-- static void
-- decoration_data_free (BakingData *bd)
-- {
-- if (bd->cake)
-- g_object_unref (bd->cake);
-- g_free (bd->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, &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->cake, bd->frosting, bd->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->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->frosting = frosting;
-- bd->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);
-- }
--
--
--
-- typedef struct {
-- guint radius;
-- CakeFlavor flavor;
-- CakeFrostingType frosting;
-- char *message;
-- } CakeData;
--
-- static void
-- cake_data_free (CakeData *cake_data)
-- {
-- g_free (cake_data->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->radius, cake_data->flavor,
-- cake_data->frosting, cake_data->message,
-- cancellable, &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->radius = radius;
-- cake_data->flavor = flavor;
-- cake_data->frosting = frosting;
-- cake_data->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);
-- }
--
--
--
-- 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->radius, cake_data->flavor,
-- cake_data->frosting, cake_data->message,
-- &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;
-- }
--
--
-- -- get task #completed --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.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 Subprocess 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. -- -- Since: 2.40 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 -- SubprocessLauncher, for instance with -- toSubprocessLauncher. class (GObject o, IsDescendantOf SubprocessLauncher o) => IsSubprocessLauncher o -- | Cast to SubprocessLauncher, for types for which this is known -- to be safe. For general casts, use castTo. toSubprocessLauncher :: (MonadIO m, IsSubprocessLauncher o) => o -> m SubprocessLauncher -- | Closes all the file descriptors previously passed to the object with -- subprocessLauncherTakeFd, -- subprocessLauncherTakeStderrFd, etc. -- -- After calling this method, any subsequent calls to -- g_subprocess_launcher_spawn() or -- subprocessLauncherSpawnv will return IOErrorEnumClosed. -- This method is idempotent if called more than once. -- -- This function is called automatically when the -- SubprocessLauncher is disposed, but is provided separately so -- that garbage collected language bindings can call it earlier to -- guarantee when FDs are closed. -- -- Since: 2.68 subprocessLauncherClose :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> m () -- | Returns the value of the environment variable variable -- in the environment of processes launched from this launcher. -- -- On UNIX, the returned string can be an arbitrary byte string. On -- Windows, it will be UTF-8. -- -- Since: 2.40 subprocessLauncherGetenv :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [Char] -> m (Maybe [Char]) -- | Creates a new SubprocessLauncher. -- -- The launcher is created with the default options. A copy of the -- environment of the calling process is made at the time of this call -- and will be used as the environment that the process is launched in. -- -- Since: 2.40 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. -- -- Since: 2.40 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 listenv to copy -- the process 'environ' and using the functions environSetenv, -- environUnsetenv, etc. -- -- As an alternative, you can use subprocessLauncherSetenv, -- subprocessLauncherUnsetenv, etc. -- -- Pass an empty array to set an empty environment. Pass Nothing -- to inherit the parent process’ environment. As of GLib 2.54, the -- parent process’ environment will be copied when -- subprocessLauncherSetEnviron is called. Previously, it was -- copied when the subprocess was executed. This means the copied -- environment may now be modified (using -- subprocessLauncherSetenv, etc.) before launching the -- subprocess. -- -- On UNIX, all strings in this array can be arbitrary byte strings. On -- Windows, they should be in UTF-8. -- -- Since: 2.40 subprocessLauncherSetEnviron :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [[Char]] -> m () -- | Sets the flags on the launcher. -- -- The default flags are SubprocessFlagsNone. -- -- You may not set flags that specify conflicting options for how to -- handle a particular stdio stream (eg: specifying both -- SubprocessFlagsStdinPipe and -- SubprocessFlagsStdinInherit). -- -- You may also not set a flag that conflicts with a previous call to a -- function like subprocessLauncherSetStdinFilePath or -- subprocessLauncherTakeStdoutFd. -- -- Since: 2.40 subprocessLauncherSetFlags :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [SubprocessFlags] -> m () -- | Sets the file path to use as the stderr for spawned processes. -- -- If path is Nothing then any previously given -- path is unset. -- -- The file will be created or truncated when the process is spawned, as -- would be the case if using '2>' at the shell. -- -- If you want to send both stdout and stderr to the same file then use -- SubprocessFlagsStderrMerge. -- -- You may not set a stderr file path if a stderr fd is already set or if -- the launcher flags contain any flags directing stderr elsewhere. -- -- This feature is only available on UNIX. -- -- Since: 2.40 subprocessLauncherSetStderrFilePath :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Maybe [Char] -> m () -- | Sets the file path to use as the stdin for spawned processes. -- -- If path is Nothing then any previously given -- path is unset. -- -- The file must exist or spawning the process will fail. -- -- You may not set a stdin file path if a stdin fd is already set or if -- the launcher flags contain any flags directing stdin elsewhere. -- -- This feature is only available on UNIX. -- -- Since: 2.40 subprocessLauncherSetStdinFilePath :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Maybe [Char] -> m () -- | Sets the file path to use as the stdout for spawned processes. -- -- If path is Nothing then any previously given -- path is unset. -- -- The file will be created or truncated when the process is spawned, as -- would be the case if using '>' at the shell. -- -- You may not set a stdout file path if a stdout fd is already set or if -- the launcher flags contain any flags directing stdout elsewhere. -- -- This feature is only available on UNIX. -- -- Since: 2.40 subprocessLauncherSetStdoutFilePath :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Maybe [Char] -> m () -- | Sets the environment variable variable in the -- environment of processes launched from this launcher. -- -- On UNIX, both the variable's name and value can be arbitrary byte -- strings, except that the variable's name cannot contain '='. On -- Windows, they should be in UTF-8. -- -- Since: 2.40 subprocessLauncherSetenv :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [Char] -> [Char] -> Bool -> m () -- | Creates a Subprocess given a provided array of arguments. -- -- Since: 2.40 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 sourceFd; -- it will be closed in the parent when self is freed. -- -- By default, all file descriptors from the parent will be closed. This -- function allows you to create (for example) a custom pipe() -- or socketpair() before launching the process, and choose the -- target descriptor in the child. -- -- An example use case is GNUPG, which has a command line argument -- --passphrase-fd providing a file descriptor number where it -- expects the passphrase to be written. subprocessLauncherTakeFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> Int32 -> m () -- | Sets the file descriptor to use as the stderr for spawned processes. -- -- If fd is -1 then any previously given fd is unset. -- -- Note that the default behaviour is to pass stderr through to the -- stderr of the parent process. -- -- The passed fd belongs to the -- SubprocessLauncher. It will be automatically closed when the -- launcher is finalized. The file descriptor will also be closed on the -- child side when executing the spawned process. -- -- You may not set a stderr fd if a stderr file path is already set or if -- the launcher flags contain any flags directing stderr elsewhere. -- -- This feature is only available on UNIX. -- -- Since: 2.40 subprocessLauncherTakeStderrFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> m () -- | Sets the file descriptor to use as the stdin for spawned processes. -- -- If fd is -1 then any previously given fd is unset. -- -- Note that if your intention is to have the stdin of the calling -- process inherited by the child then SubprocessFlagsStdinInherit -- is a better way to go about doing that. -- -- The passed fd is noted but will not be touched in the -- current process. It is therefore necessary that it be kept open by the -- caller until the subprocess is spawned. The file descriptor will also -- not be explicitly closed on the child side, so it must be marked -- O_CLOEXEC if that's what you want. -- -- You may not set a stdin fd if a stdin file path is already set or if -- the launcher flags contain any flags directing stdin elsewhere. -- -- This feature is only available on UNIX. -- -- Since: 2.40 subprocessLauncherTakeStdinFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> m () -- | Sets the file descriptor to use as the stdout for spawned processes. -- -- If fd is -1 then any previously given fd is unset. -- -- Note that the default behaviour is to pass stdout through to the -- stdout of the parent process. -- -- The passed fd is noted but will not be touched in the -- current process. It is therefore necessary that it be kept open by the -- caller until the subprocess is spawned. The file descriptor will also -- not be explicitly closed on the child side, so it must be marked -- O_CLOEXEC if that's what you want. -- -- You may not set a stdout fd if a stdout file path is already set or if -- the launcher flags contain any flags directing stdout elsewhere. -- -- This feature is only available on UNIX. -- -- Since: 2.40 subprocessLauncherTakeStdoutFd :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> Int32 -> m () -- | Removes the environment variable variable from the -- environment of processes launched from this launcher. -- -- On UNIX, the variable's name can be an arbitrary byte string not -- containing '='. On Windows, it should be in UTF-8. -- -- Since: 2.40 subprocessLauncherUnsetenv :: (HasCallStack, MonadIO m, IsSubprocessLauncher a) => a -> [Char] -> m () -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. 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.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 -- | GSubprocess allows the creation of and interaction with child -- processes. -- -- Processes can be communicated with using standard GIO-style APIs (ie: -- InputStream, OutputStream). 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 -- outputStreamSpliceAsync. This makes GSubprocess -- significantly more powerful and flexible than equivalent APIs in some -- other languages such as the subprocess.py included with -- Python. For example, using GSubprocess 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 subprocessCommunicate API is provided similar to the -- communicate() method of subprocess.py. This enables -- very easy interaction with a subprocess that has been opened with -- pipes. -- -- GSubprocess defaults to tight control over the file -- descriptors open in the child process, avoiding dangling-FD issues -- that are caused by a simple fork()/exec(). The only -- open file descriptors in the spawned process are ones that were -- explicitly specified by the GSubprocess API (unless -- G_SUBPROCESS_FLAGS_INHERIT_FDS was specified). -- -- GSubprocess will quickly reap all child processes as they -- exit, avoiding ‘zombie processes’ remaining around for long periods of -- time. subprocessWait 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, GSubprocess has no API that accepts -- shell-style space-separated strings. It will, however, match the -- typical shell behaviour of searching the PATH for executables -- that do not contain a directory separator in their name. By default, -- the PATH of the current process is used. You can specify -- G_SUBPROCESS_FLAGS_SEARCH_PATH_FROM_ENVP to use the -- PATH of the launcher environment instead. -- -- GSubprocess 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 subprocessNew. The -- SubprocessLauncher 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 GSubprocess will involve calling -- subprocessNew, followed by subprocessWaitAsync or -- subprocessWait. After the process exits, the status can be -- checked using functions such as subprocessGetIfExited (which -- are similar to the familiar WIFEXITED-style POSIX macros). -- -- Note that as of GLib 2.82, creating a GSubprocess causes the -- signal SIGPIPE to be ignored for the remainder of the -- program. If you are writing a command-line utility that uses -- GSubprocess, you may need to take into account the fact that -- your program will not automatically be killed if it tries to write to -- stdout after it has been closed. -- -- Since: 2.40 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 Subprocess, -- for instance with toSubprocess. class (GObject o, IsDescendantOf Subprocess o) => IsSubprocess o -- | Cast to Subprocess, for types for which this is known to be -- safe. For general casts, use castTo. toSubprocess :: (MonadIO m, IsSubprocess o) => o -> m Subprocess -- | Communicate with the subprocess until it terminates, and all input and -- output has been completed. -- -- If stdinBuf is given, the subprocess must have been -- created with SubprocessFlagsStdinPipe. 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 SubprocessFlagsStdoutPipe or -- SubprocessFlagsStderrPipe were used, reads from those streams. -- The data that was read is returned in stdout and/or -- the stderr. -- -- If the subprocess was created with SubprocessFlagsStdoutPipe, -- stdoutBuf will contain the data read from stdout. -- Otherwise, for subprocesses not created with -- SubprocessFlagsStdoutPipe, stdoutBuf will be -- set to Nothing. Similar provisions apply to -- stderrBuf and SubprocessFlagsStderrPipe. -- -- As usual, any output variable may be given as Nothing to ignore -- it. -- -- If you desire the stdout and stderr data to be interleaved, create the -- subprocess with SubprocessFlagsStdoutPipe and -- SubprocessFlagsStderrMerge. The merged result will be returned -- in stdoutBuf and stderrBuf will be set -- to Nothing. -- -- In case of any error (including cancellation), False will be -- returned with error set. Some or all of the stdin data -- may have been written. Any stdout or stderr data that has been read -- will be discarded. None of the out variables (aside from -- error) will have been set to anything in particular -- and should not be inspected. -- -- In the case that True is returned, the subprocess has exited -- and the exit status inspection APIs (eg: subprocessGetIfExited, -- subprocessGetExitStatus) 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). -- -- Since: 2.40 subprocessCommunicate :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe Bytes -> Maybe b -> m (Maybe Bytes, Maybe Bytes) -- | Asynchronous version of subprocessCommunicate. Complete -- invocation with subprocessCommunicateFinish. subprocessCommunicateAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe Bytes -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Complete an invocation of subprocessCommunicateAsync. subprocessCommunicateFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m (Maybe Bytes, Maybe Bytes) -- | Like subprocessCommunicate, but validates the output of the -- process as UTF-8, and returns it as a regular NUL terminated string. -- -- On error, stdoutBuf and stderrBuf 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 subprocessCommunicateUtf8. Complete -- invocation with subprocessCommunicateUtf8Finish. subprocessCommunicateUtf8Async :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe Text -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Complete an invocation of subprocessCommunicateUtf8Async. 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 subprocessWait to monitor the status of the process -- after calling this function. -- -- On Unix, this function sends SIGKILL. -- -- Since: 2.40 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 exit() -- system call or the return value from main. -- -- This is equivalent to the system WEXITSTATUS macro. -- -- It is an error to call this function before subprocessWait and -- unless subprocessGetIfExited returned True. -- -- Since: 2.40 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 GetProcessId() also as a string. -- If the subprocess has terminated, this will return Nothing. -- -- Since: 2.40 subprocessGetIdentifier :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m (Maybe Text) -- | Check if the given subprocess exited normally (ie: by way of -- exit() or return from main()). -- -- This is equivalent to the system WIFEXITED macro. -- -- It is an error to call this function before subprocessWait has -- returned. -- -- Since: 2.40 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 subprocessWait has -- returned. -- -- Since: 2.40 subprocessGetIfSignaled :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Bool -- | Gets the raw status code of the process, as from -- waitpid(). -- -- This value has no particular meaning, but it can be used with the -- macros defined by the system headers such as WIFEXITED. It can also be -- used with spawnCheckWaitStatus. -- -- It is more likely that you want to use subprocessGetIfExited -- followed by subprocessGetExitStatus. -- -- It is an error to call this function before subprocessWait has -- returned. -- -- Since: 2.40 subprocessGetStatus :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Int32 -- | Gets the InputStream from which to read the stderr output of -- subprocess. -- -- The process must have been created with -- SubprocessFlagsStderrPipe, otherwise Nothing will be -- returned. -- -- Since: 2.40 subprocessGetStderrPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m (Maybe InputStream) -- | Gets the OutputStream that you can write to in order to give -- data to the stdin of subprocess. -- -- The process must have been created with -- SubprocessFlagsStdinPipe and not -- SubprocessFlagsStdinInherit, otherwise Nothing will be -- returned. -- -- Since: 2.40 subprocessGetStdinPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m (Maybe OutputStream) -- | Gets the InputStream from which to read the stdout output of -- subprocess. -- -- The process must have been created with -- SubprocessFlagsStdoutPipe, otherwise Nothing will be -- returned. -- -- Since: 2.40 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 exit() system call or return from -- main(). -- -- It is an error to call this function before subprocessWait has -- returned. -- -- Since: 2.40 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 subprocessWait and -- unless subprocessGetIfSignaled returned True. -- -- Since: 2.40 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 Nothing-terminated. -- -- Since: 2.40 subprocessNew :: (HasCallStack, MonadIO m) => [[Char]] -> [SubprocessFlags] -> m Subprocess -- | Sends the UNIX signal signalNum to the subprocess, if -- it is still running. -- -- This API is race-free. If the subprocess has terminated, it will not -- be signalled. -- -- This API is not available on Windows. -- -- Since: 2.40 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 subprocessGetIfExited and -- subprocessGetExitStatus. -- -- This function does not fail in the case of the subprocess having -- abnormal termination. See subprocessWaitCheck for that. -- -- Cancelling cancellable doesn't kill the subprocess. -- Call subprocessForceExit if it is desirable. -- -- Since: 2.40 subprocessWait :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> m () -- | Wait for the subprocess to terminate. -- -- This is the asynchronous version of subprocessWait. -- -- Since: 2.40 subprocessWaitAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Combines subprocessWait with spawnCheckWaitStatus. -- -- Since: 2.40 subprocessWaitCheck :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> m () -- | Combines subprocessWaitAsync with spawnCheckWaitStatus. -- -- This is the asynchronous version of subprocessWaitCheck. -- -- Since: 2.40 subprocessWaitCheckAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Collects the result of a previous call to -- subprocessWaitCheckAsync. -- -- Since: 2.40 subprocessWaitCheckFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m () -- | Collects the result of a previous call to subprocessWaitAsync. -- -- Since: 2.40 subprocessWaitFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m () -- | Construct a GValueConstruct with valid value for the -- “argv” property. This is rarely needed directly, but it is -- used by new. constructSubprocessArgv :: (IsSubprocess o, MonadIO m) => [Text] -> m (GValueConstruct o) -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. 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.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 GSocketService 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 SocketService::incoming -- signal is emitted. -- -- A GSocketService is a subclass of SocketListener and -- you need to add the addresses you want to accept connections on with -- the SocketListener APIs. -- -- There are two options for implementing a network service based on -- GSocketService. The first is to create the service using -- socketServiceNew and to connect to the -- SocketService::incoming signal. The second is to subclass -- GSocketService 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 ThreadedSocketService. -- -- The socket service runs on the main loop of the thread-default context -- (see mainContextPushThreadDefault) 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. -- -- Since: 2.22 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 SocketService, -- for instance with toSocketService. class (GObject o, IsDescendantOf SocketService o) => IsSocketService o -- | Cast to SocketService, for types for which this is known to be -- safe. For general casts, use castTo. 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. -- -- Since: 2.22 socketServiceIsActive :: (HasCallStack, MonadIO m, IsSocketService a) => a -> m Bool -- | Creates a new SocketService with no sockets to listen for. New -- listeners can be added with e.g. socketListenerAddAddress or -- socketListenerAddInetPort. -- -- New services are created active, there is no need to call -- socketServiceStart, unless socketServiceStop has been -- called before. -- -- Since: 2.22 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 socketServiceStop. -- -- This call is thread-safe, so it may be called from a thread handling -- an incoming client request. -- -- Since: 2.22 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 socketServiceStart -- again later to begin listening again. To close the listening sockets, -- call socketListenerClose. (This will happen automatically when -- the SocketService is finalized.) -- -- This must be called before calling socketListenerClose as the -- socket service will start accepting connections immediately when a new -- socket is added. -- -- Since: 2.22 socketServiceStop :: (HasCallStack, MonadIO m, IsSocketService a) => a -> m () -- | Construct a GValueConstruct with valid value for the -- “active” property. This is rarely needed directly, but it is -- used by new. constructSocketServiceActive :: (IsSocketService o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “active” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketService #active --getSocketServiceActive :: (MonadIO m, IsSocketService o) => o -> m Bool -- | Set the value of the “active” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketService [ #active := value ] --setSocketServiceActive :: (MonadIO m, IsSocketService o) => o -> Bool -> m () -- | The incoming signal is emitted when a new incoming connection -- to service needs to be handled. The handler must -- initiate the handling of connection, but may not -- block; in essence, asynchronous operations must be used. -- -- connection will be unreffed once the signal handler -- returns, so you need to ref it yourself if you are planning to use it. -- -- Since: 2.22 type SocketServiceIncomingCallback = SocketConnection -> Maybe Object -> IO Bool -- | Connect a signal handler for the incoming signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after socketService #incoming callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSocketServiceIncoming :: (IsSocketService a, MonadIO m) => a -> ((?self :: a) => SocketServiceIncomingCallback) -> m SignalHandlerId -- | Connect a signal handler for the incoming signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on socketService #incoming callback --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.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 GSocketListener 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 -- socketListenerAddAddress and socketListenerAddInetPort. -- These will be listened on until socketListenerClose is called. -- Dropping your final reference to the GSocketListener will not -- cause socketListenerClose to be called implicitly, as some -- references to the GSocketListener may be held internally. -- -- If you want to implement a network server, also look at -- SocketService and ThreadedSocketService which are -- subclasses of GSocketListener that make this even easier. -- -- Since: 2.22 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 -- SocketListener, for instance with toSocketListener. class (GObject o, IsDescendantOf SocketListener o) => IsSocketListener o -- | Cast to SocketListener, for types for which this is known to be -- safe. For general casts, use castTo. 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 SocketConnection for the socket that -- was accepted. -- -- If sourceObject is not Nothing it will be -- filled out with the source object specified when the corresponding -- socket or address was added to the listener. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- Since: 2.22 socketListenerAccept :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> m (SocketConnection, Maybe Object) -- | This is the asynchronous version of socketListenerAccept. -- -- When the operation is finished callback will be -- called. You can then call socketListenerAcceptFinish to get the -- result of the operation. -- -- Since: 2.22 socketListenerAcceptAsync :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an async accept operation. See -- socketListenerAcceptAsync -- -- Since: 2.22 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 Socket that was accepted. -- -- If you want to accept the high-level SocketConnection, not a -- Socket, which is often the case, then you should use -- socketListenerAccept instead. -- -- If sourceObject is not Nothing it will be -- filled out with the source object specified when the corresponding -- socket or address was added to the listener. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- Since: 2.22 socketListenerAcceptSocket :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> m (Socket, Maybe Object) -- | This is the asynchronous version of socketListenerAcceptSocket. -- -- When the operation is finished callback will be -- called. You can then call socketListenerAcceptSocketFinish to -- get the result of the operation. -- -- Since: 2.22 socketListenerAcceptSocketAsync :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an async accept operation. See -- socketListenerAcceptSocketAsync -- -- Since: 2.22 socketListenerAcceptSocketFinish :: (HasCallStack, MonadIO m, IsSocketListener a, IsAsyncResult b) => a -> b -> m (Socket, Maybe Object) -- | Creates a socket of type type and protocol -- protocol, binds it to address 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 socketListenerAddInetPort. -- -- sourceObject 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 effectiveAddress is -- non-Nothing 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 socketListenerClose to stop listening on -- address; this will not be done automatically when you -- drop your final reference to listener, as references -- may be held internally. -- -- Since: 2.22 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. -- -- sourceObject 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. -- -- Since: 2.24 socketListenerAddAnyInetPort :: (HasCallStack, MonadIO m, IsSocketListener a, IsObject b) => a -> Maybe b -> m Word16 -- | Helper function for socketListenerAddAddress that creates a -- TCP/IP socket listening on IPv4 and IPv6 (if supported) on the -- specified port on all interfaces. -- -- sourceObject 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 socketListenerClose to stop listening on -- port; this will not be done automatically when you -- drop your final reference to listener, as references -- may be held internally. -- -- Since: 2.22 socketListenerAddInetPort :: (HasCallStack, MonadIO m, IsSocketListener a, IsObject b) => a -> Word16 -> Maybe b -> m () -- | Adds socket 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. -- -- sourceObject 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 socket will not be automatically closed when the -- listener is finalized unless the listener held the -- final reference to the socket. Before GLib 2.42, the -- socket was automatically closed on finalization of the -- listener, even if references to it were held -- elsewhere. -- -- Since: 2.22 socketListenerAddSocket :: (HasCallStack, MonadIO m, IsSocketListener a, IsSocket b, IsObject c) => a -> b -> Maybe c -> m () -- | Closes all the sockets in the listener. -- -- Since: 2.22 socketListenerClose :: (HasCallStack, MonadIO m, IsSocketListener a) => a -> m () -- | Creates a new SocketListener with no sockets to listen for. New -- listeners can be added with e.g. socketListenerAddAddress or -- socketListenerAddInetPort. -- -- Since: 2.22 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 -- SocketListener (for example, by calling -- socketListenerAddInetPort) to be effective. -- -- See socketSetListenBacklog for details -- -- Since: 2.22 socketListenerSetBacklog :: (HasCallStack, MonadIO m, IsSocketListener a) => a -> Int32 -> m () -- | Construct a GValueConstruct with valid value for the -- “listen-backlog” property. This is rarely needed directly, -- but it is used by new. constructSocketListenerListenBacklog :: (IsSocketListener o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “listen-backlog” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketListener #listenBacklog --getSocketListenerListenBacklog :: (MonadIO m, IsSocketListener o) => o -> m Int32 -- | Set the value of the “listen-backlog” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketListener [ #listenBacklog := value ] --setSocketListenerListenBacklog :: (MonadIO m, IsSocketListener o) => o -> Int32 -> m () -- | Emitted when listener's activity on -- socket changes state. Note that when -- listener 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. -- -- Since: 2.46 type SocketListenerEventCallback = SocketListenerEvent -> Socket -> IO () -- | Connect a signal handler for the event signal, to be run after -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after socketListener #event callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSocketListenerEvent :: (IsSocketListener a, MonadIO m) => a -> ((?self :: a) => SocketListenerEventCallback) -> m SignalHandlerId -- | Connect a signal handler for the event signal, to be run before -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- on socketListener #event callback --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.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 -- | GSocketConnection is a IOStream for a connected -- socket. They can be created either by SocketClient when -- connecting to a host, or by SocketListener when accepting a new -- client. -- -- The type of the GSocketConnection 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 TcpConnection. -- -- 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 socketConnectionFactoryRegisterType. -- -- To close a GSocketConnection, use iOStreamClose. -- Closing both substreams of the IOStream separately will not -- close the underlying Socket. -- -- Since: 2.22 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 -- SocketConnection, for instance with toSocketConnection. class (GObject o, IsDescendantOf SocketConnection o) => IsSocketConnection o -- | Cast to SocketConnection, for types for which this is known to -- be safe. For general casts, use castTo. toSocketConnection :: (MonadIO m, IsSocketConnection o) => o -> m SocketConnection -- | Connect connection to the specified remote address. -- -- Since: 2.32 socketConnectionConnect :: (HasCallStack, MonadIO m, IsSocketConnection a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe c -> m () -- | Asynchronously connect connection to the specified -- remote address. -- -- This clears the Socket:blocking flag on -- connection's underlying socket if it is currently set. -- -- If Socket:timeout is set, the operation will time out and -- return IOErrorEnumTimedOut after that period. Otherwise, it -- will continue indefinitely until operating system timeouts (if any) -- are hit. -- -- Use socketConnectionConnectFinish to retrieve the result. -- -- Since: 2.32 socketConnectionConnectAsync :: (HasCallStack, MonadIO m, IsSocketConnection a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Gets the result of a socketConnectionConnectAsync call. -- -- Since: 2.32 socketConnectionConnectFinish :: (HasCallStack, MonadIO m, IsSocketConnection a, IsAsyncResult b) => a -> b -> m () -- | Looks up the GType to be used when creating socket connections -- on sockets with the specified family, -- type and protocolId. -- -- If no type is registered, the SocketConnection base type is -- returned. -- -- Since: 2.22 socketConnectionFactoryLookupType :: (HasCallStack, MonadIO m) => SocketFamily -> SocketType -> Int32 -> m GType -- | Looks up the GType to be used when creating socket connections -- on sockets with the specified family, -- type and protocol. -- -- If no type is registered, the SocketConnection base type is -- returned. -- -- Since: 2.22 socketConnectionFactoryRegisterType :: (HasCallStack, MonadIO m) => GType -> SocketFamily -> SocketType -> Int32 -> m () -- | Try to get the local address of a socket connection. -- -- Since: 2.22 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 socketClientConnect or -- socketClientConnectAsync, during emission of -- SocketClientEventConnecting, 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)...". -- -- Since: 2.22 socketConnectionGetRemoteAddress :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m SocketAddress -- | Gets the underlying Socket object of the connection. This can -- be useful if you want to do something unusual on it not supported by -- the SocketConnection APIs. -- -- Since: 2.22 socketConnectionGetSocket :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m Socket -- | Checks if connection is connected. This is equivalent -- to calling socketIsConnected on connection's -- underlying Socket. -- -- Since: 2.32 socketConnectionIsConnected :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m Bool -- | Construct a GValueConstruct with valid value for the -- “socket” property. This is rarely needed directly, but it is -- used by new. constructSocketConnectionSocket :: (IsSocketConnection o, MonadIO m, IsSocket a) => a -> m (GValueConstruct o) -- | Get the value of the “socket” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketConnection #socket --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.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 -- | GSocketClient is a lightweight high-level utility class for -- connecting to a network host using a connection oriented socket type. -- -- You create a GSocketClient object, set any options you want, -- and then call a sync or async connect operation, which returns a -- SocketConnection subclass on success. -- -- The type of the SocketConnection 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 TcpConnection. -- -- As GSocketClient is a lightweight object, you don't need to -- cache it. You can just create a new one any time you need one. -- -- Since: 2.22 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 SocketClient, -- for instance with toSocketClient. class (GObject o, IsDescendantOf SocketClient o) => IsSocketClient o -- | Cast to SocketClient, for types for which this is known to be -- safe. For general casts, use castTo. 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 ProxyResolver, -- SocketClient will consider this protocol as supported but will -- not try to find a Proxy instance to handle handshaking. The -- application must check for this case by calling -- socketConnectionGetRemoteAddress on the returned -- SocketConnection, and seeing if it's a ProxyAddress 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 connectable and make a network -- connection to it. -- -- Upon a successful connection, a new SocketConnection 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 SocketConnection object returned depends on the -- type of the underlying socket that is used. For instance, for a TCP/IP -- connection it will be a TcpConnection. -- -- The socket created will be the same family as the address that the -- connectable resolves to, unless family is set with -- socketClientSetFamily or indirectly via -- socketClientSetLocalAddress. The socket type defaults to -- SocketTypeStream but can be set with -- socketClientSetSocketType. -- -- If a local address is specified with -- socketClientSetLocalAddress the socket will be bound to this -- address before connecting. -- -- Since: 2.22 socketClientConnect :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> m SocketConnection -- | This is the asynchronous version of socketClientConnect. -- -- You may wish to prefer the asynchronous version even in synchronous -- command line programs because, since 2.60, it implements RFC -- 8305 "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 callback will be -- called. You can then call socketClientConnectFinish to get the -- result of the operation. -- -- Since: 2.22 socketClientConnectAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finishes an async connect operation. See -- socketClientConnectAsync -- -- Since: 2.22 socketClientConnectFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection -- | This is a helper function for socketClientConnect. -- -- Attempts to create a TCP connection to the named host. -- -- hostAndPort 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 hostAndPort then -- defaultPort will be used as the port number to connect -- to. -- -- In general, hostAndPort is expected to be provided by -- the user (allowing them to give the hostname, and a port override if -- necessary) and defaultPort 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 SocketConnection 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) Nothing is returned and error (if -- non-Nothing) is set accordingly. -- -- Since: 2.22 socketClientConnectToHost :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> m SocketConnection -- | This is the asynchronous version of socketClientConnectToHost. -- -- When the operation is finished callback will be -- called. You can then call socketClientConnectToHostFinish to -- get the result of the operation. -- -- Since: 2.22 socketClientConnectToHostAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an async connect operation. See -- socketClientConnectToHostAsync -- -- Since: 2.22 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 service at -- domain 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 SocketConnection 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) Nothing is returned and error (if -- non-Nothing) is set accordingly. socketClientConnectToService :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Text -> Maybe b -> m SocketConnection -- | This is the asynchronous version of -- socketClientConnectToService. -- -- Since: 2.22 socketClientConnectToServiceAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an async connect operation. See -- socketClientConnectToServiceAsync -- -- Since: 2.22 socketClientConnectToServiceFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection -- | This is a helper function for socketClientConnect. -- -- Attempts to create a TCP connection with a network URI. -- -- uri may be any valid URI containing an "authority" -- (hostname/port) component. If a port is not specified in the URI, -- defaultPort will be used. TLS will be negotiated if -- SocketClient:tls is True. (tSocketClient does not -- know to automatically assume TLS for certain URI schemes.) -- -- Using this rather than socketClientConnect or -- socketClientConnectToHost allows SocketClient to -- determine when to use application-specific proxy protocols. -- -- Upon a successful connection, a new SocketConnection 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) Nothing is returned and error (if -- non-Nothing) is set accordingly. -- -- Since: 2.26 socketClientConnectToUri :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> m SocketConnection -- | This is the asynchronous version of socketClientConnectToUri. -- -- When the operation is finished callback will be -- called. You can then call socketClientConnectToUriFinish to get -- the result of the operation. -- -- Since: 2.26 socketClientConnectToUriAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an async connect operation. See -- socketClientConnectToUriAsync -- -- Since: 2.26 socketClientConnectToUriFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection -- | Gets the proxy enable state; see socketClientSetEnableProxy -- -- Since: 2.26 socketClientGetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool -- | Gets the socket family of the socket client. -- -- See socketClientSetFamily for details. -- -- Since: 2.22 socketClientGetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketFamily -- | Gets the local address of the socket client. -- -- See socketClientSetLocalAddress for details. -- -- Since: 2.22 socketClientGetLocalAddress :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m (Maybe SocketAddress) -- | Gets the protocol name type of the socket client. -- -- See socketClientSetProtocol for details. -- -- Since: 2.22 socketClientGetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketProtocol -- | Gets the ProxyResolver being used by client. -- Normally, this will be the resolver returned by -- proxyResolverGetDefault, but you can override it with -- socketClientSetProxyResolver. -- -- Since: 2.36 socketClientGetProxyResolver :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m ProxyResolver -- | Gets the socket type of the socket client. -- -- See socketClientSetSocketType for details. -- -- Since: 2.22 socketClientGetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketType -- | Gets the I/O timeout time for sockets created by -- client. -- -- See socketClientSetTimeout for details. -- -- Since: 2.26 socketClientGetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Word32 -- | Gets whether client creates TLS connections. See -- socketClientSetTls for details. -- -- Since: 2.28 socketClientGetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool -- | Gets the TLS validation flags used creating TLS connections via -- client. -- -- This function does not work as originally designed and is impossible -- to use correctly. See SocketClient:tlsValidationFlags for more -- information. -- -- Since: 2.28 -- | Deprecated: (Since version 2.72)Do not attempt to ignore validation -- errors. socketClientGetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m [TlsCertificateFlags] -- | Creates a new SocketClient with the default options. -- -- Since: 2.22 socketClientNew :: (HasCallStack, MonadIO m) => m SocketClient -- | Sets whether or not client attempts to make -- connections via a proxy server. When enabled (the default), -- SocketClient will use a ProxyResolver to determine if a -- proxy protocol such as SOCKS is needed, and automatically do the -- necessary proxy negotiation. -- -- See also socketClientSetProxyResolver. -- -- Since: 2.26 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 SocketFamilyInvalid 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. -- -- Since: 2.22 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 -- Nothing) 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. -- -- Since: 2.22 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 protocol is SocketProtocolDefault that means -- to use the default protocol for the socket family and type. -- -- Since: 2.22 socketClientSetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketProtocol -> m () -- | Overrides the ProxyResolver used by client. 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 SocketClient:enableProxy, which is not -- changed by this function (but which is True by default) -- -- Since: 2.36 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 SocketTypeDatagram, -- as GSocketClient is used for connection oriented services. -- -- Since: 2.22 socketClientSetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketType -> m () -- | Sets the I/O timeout for sockets created by client. -- timeout 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 socketClientConnect, etc, to -- fail with IOErrorEnumTimedOut. -- -- Since: 2.26 socketClientSetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Word32 -> m () -- | Sets whether client creates TLS (aka SSL) connections. -- If tls is True, client will -- wrap its connections in a TlsClientConnection and perform a TLS -- handshake when connecting. -- -- Note that since SocketClient must return a -- SocketConnection, but TlsClientConnection is not a -- SocketConnection, this actually wraps the resulting -- TlsClientConnection in a TcpWrapperConnection when -- returning it. You can use tcpWrapperConnectionGetBaseIoStream -- on the return value to extract the TlsClientConnection. -- -- If you need to modify the behavior of the TLS handshake (eg, by -- setting a client-side certificate to use, or connecting to the -- TlsConnection::acceptCertificate signal), you can connect to -- client's SocketClient::event signal and wait -- for it to be emitted with SocketClientEventTlsHandshaking, -- which will give you a chance to see the TlsClientConnection -- before the handshake starts. -- -- Since: 2.28 socketClientSetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m () -- | Sets the TLS validation flags used when creating TLS connections via -- client. The default value is -- TlsCertificateFlagsValidateAll. -- -- This function does not work as originally designed and is impossible -- to use correctly. See SocketClient:tlsValidationFlags for more -- information. -- -- Since: 2.28 -- | Deprecated: (Since version 2.72)Do not attempt to ignore validation -- errors. socketClientSetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> [TlsCertificateFlags] -> m () -- | Construct a GValueConstruct with valid value for the -- “enable-proxy” property. This is rarely needed directly, but -- it is used by new. constructSocketClientEnableProxy :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “enable-proxy” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketClient #enableProxy --getSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> m Bool -- | Set the value of the “enable-proxy” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketClient [ #enableProxy := value ] --setSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “family” property. This is rarely needed directly, but it is -- used by new. constructSocketClientFamily :: (IsSocketClient o, MonadIO m) => SocketFamily -> m (GValueConstruct o) -- | Get the value of the “family” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketClient #family --getSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> m SocketFamily -- | Set the value of the “family” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketClient [ #family := value ] --setSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> SocketFamily -> m () -- | Set the value of the “local-address” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #localAddress --clearSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “local-address” property. This is rarely needed directly, but -- it is used by new. constructSocketClientLocalAddress :: (IsSocketClient o, MonadIO m, IsSocketAddress a) => a -> m (GValueConstruct o) -- | Get the value of the “local-address” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketClient #localAddress --getSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m (Maybe SocketAddress) -- | Set the value of the “local-address” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketClient [ #localAddress := value ] --setSocketClientLocalAddress :: (MonadIO m, IsSocketClient o, IsSocketAddress a) => o -> a -> m () -- | Construct a GValueConstruct with valid value for the -- “protocol” property. This is rarely needed directly, but it -- is used by new. constructSocketClientProtocol :: (IsSocketClient o, MonadIO m) => SocketProtocol -> m (GValueConstruct o) -- | Get the value of the “protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketClient #protocol --getSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> m SocketProtocol -- | Set the value of the “protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketClient [ #protocol := value ] --setSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> SocketProtocol -> m () -- | Set the value of the “proxy-resolver” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #proxyResolver --clearSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “proxy-resolver” property. This is rarely needed directly, -- but it is used by new. constructSocketClientProxyResolver :: (IsSocketClient o, MonadIO m, IsProxyResolver a) => a -> m (GValueConstruct o) -- | Get the value of the “proxy-resolver” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketClient #proxyResolver --getSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ProxyResolver -- | Set the value of the “proxy-resolver” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketClient [ #proxyResolver := value ] --setSocketClientProxyResolver :: (MonadIO m, IsSocketClient o, IsProxyResolver a) => o -> a -> m () -- | Construct a GValueConstruct with valid value for the -- “timeout” property. This is rarely needed directly, but it is -- used by new. constructSocketClientTimeout :: (IsSocketClient o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketClient #timeout --getSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> m Word32 -- | Set the value of the “timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketClient [ #timeout := value ] --setSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> Word32 -> m () -- | Construct a GValueConstruct with valid value for the -- “tls” property. This is rarely needed directly, but it is -- used by new. constructSocketClientTls :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “tls” property. When overloading -- is enabled, this is equivalent to -- --
-- get socketClient #tls --getSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> m Bool -- | Set the value of the “tls” property. When overloading -- is enabled, this is equivalent to -- --
-- set socketClient [ #tls := value ] --setSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “tls-validation-flags” property. This is rarely needed -- directly, but it is used by new. constructSocketClientTlsValidationFlags :: (IsSocketClient o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o) -- | Get the value of the “tls-validation-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketClient #tlsValidationFlags --getSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> m [TlsCertificateFlags] -- | Set the value of the “tls-validation-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- set socketClient [ #tlsValidationFlags := value ] --setSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> [TlsCertificateFlags] -> m () -- | Construct a GValueConstruct with valid value for the -- “type” property. This is rarely needed directly, but it is -- used by new. constructSocketClientType :: (IsSocketClient o, MonadIO m) => SocketType -> m (GValueConstruct o) -- | Get the value of the “type” property. When overloading -- is enabled, this is equivalent to -- --
-- get socketClient #type --getSocketClientType :: (MonadIO m, IsSocketClient o) => o -> m SocketType -- | Set the value of the “type” property. When overloading -- is enabled, this is equivalent to -- --
-- set socketClient [ #type := value ] --setSocketClientType :: (MonadIO m, IsSocketClient o) => o -> SocketType -> m () -- | Emitted when client's activity on -- connectable 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 event values -- are as follows: -- --
-- after socketClient #event callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> ((?self :: a) => SocketClientEventCallback) -> m SignalHandlerId -- | Connect a signal handler for the event signal, to be run before -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- on socketClient #event callback --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.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 -- | GSocketAddressEnumerator is an enumerator type for -- SocketAddress instances. It is returned by enumeration -- functions such as socketConnectableEnumerate, which returns a -- GSocketAddressEnumerator to list each SocketAddress -- which could be used to connect to that SocketConnectable. -- -- Enumeration is typically a blocking operation, so the asynchronous -- methods socketAddressEnumeratorNextAsync and -- socketAddressEnumeratorNextFinish should be used where -- possible. -- -- Each GSocketAddressEnumerator can only be enumerated once. -- Once socketAddressEnumeratorNext has returned NULL, -- further enumeration with that GSocketAddressEnumerator 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 -- SocketAddressEnumerator, for instance with -- toSocketAddressEnumerator. class (GObject o, IsDescendantOf SocketAddressEnumerator o) => IsSocketAddressEnumerator o -- | Cast to SocketAddressEnumerator, for types for which this is -- known to be safe. For general casts, use castTo. toSocketAddressEnumerator :: (MonadIO m, IsSocketAddressEnumerator o) => o -> m SocketAddressEnumerator -- | Retrieves the next SocketAddress from -- enumerator. Note that this may block for some amount -- of time. (Eg, a NetworkAddress may need to do a DNS lookup -- before it can return an address.) Use -- socketAddressEnumeratorNextAsync if you need to avoid blocking. -- -- If enumerator is expected to yield addresses, but for -- some reason is unable to (eg, because of a DNS error), then the first -- call to socketAddressEnumeratorNext will return an appropriate -- error in *error. However, if the first call to -- socketAddressEnumeratorNext succeeds, then any further internal -- errors (other than cancellable being triggered) will -- be ignored. socketAddressEnumeratorNext :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => a -> Maybe b -> m (Maybe SocketAddress) -- | Asynchronously retrieves the next SocketAddress from -- enumerator and then calls callback, -- which must call socketAddressEnumeratorNextFinish 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 -- socketAddressEnumeratorNextAsync. See -- socketAddressEnumeratorNext 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.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 -- | GSocketAddress is the equivalent of `struct sockaddr`) -- and its subtypes in the BSD sockets API. This is an abstract class; -- use InetSocketAddress for internet sockets, or -- UnixSocketAddress 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 SocketAddress, -- for instance with toSocketAddress. class (GObject o, IsDescendantOf SocketAddress o) => IsSocketAddress o -- | Cast to SocketAddress, for types for which this is known to be -- safe. For general casts, use castTo. toSocketAddress :: (MonadIO m, IsSocketAddress o) => o -> m SocketAddress -- | Gets the socket family type of address. -- -- Since: 2.22 socketAddressGetFamily :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> m SocketFamily -- | Gets the size of address's native struct sockaddr. You -- can use this to allocate memory to pass to -- socketAddressToNative. -- -- Since: 2.22 socketAddressGetNativeSize :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> m Int64 -- | Creates a SocketAddress subclass corresponding to the native -- struct sockaddr native. -- -- Since: 2.22 socketAddressNewFromNative :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m SocketAddress -- | Converts a SocketAddress to a native struct sockaddr, which can -- be passed to low-level functions like connect() or -- bind(). -- -- If not enough space is available, a IOErrorEnumNoSpace error is -- returned. If the address type is not known on the system then a -- IOErrorEnumNotSupported error is returned. -- -- Since: 2.22 socketAddressToNative :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> Ptr () -> CSize -> m () -- | Get the value of the “family” property. When -- overloading is enabled, this is equivalent to -- --
-- get socketAddress #family --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.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 GSocket 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. -- -- GSocket 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 -- SocketClient, SocketService and SocketConnection. -- However there may be cases where direct use of GSocket is -- useful. -- -- GSocket implements the Initable interface, so if it is -- manually constructed by e.g. Object.new() you -- must call initableInit and check the results before using the -- object. This is done automatically in socketNew and -- socketNewFromFd, so these functions can return NULL. -- -- 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 G_IO_ERROR_WOULD_BLOCK error. To know when -- a call would successfully run you can call -- socketConditionCheck, or socketConditionWait. You can -- also use Socket.create_source() and attach it -- to a [typegLib.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 GSocket. -- -- When working in non-blocking mode applications should always be able -- to handle getting a G_IO_ERROR_WOULD_BLOCK 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 G_IO_ERROR_WOULD_BLOCK. -- -- GSockets 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 GSocket causes the signal -- SIGPIPE to be ignored for the remainder of the program. If -- you are writing a command-line utility that uses GSocket, you -- may need to take into account the fact that your program will not -- automatically be killed if it tries to write to stdout after -- it has been closed. -- -- Like most other APIs in GLib, GSocket is not inherently -- thread safe. To use a GSocket concurrently from multiple -- threads, you must implement your own locking. -- --
-- socket = g_socket_new (…, G_SOCKET_TYPE_STREAM, …);
-- if (socket != NULL)
-- {
-- g_socket_set_option (socket, IPPROTO_TCP, TCP_NODELAY, FALSE, &local_error);
-- // handle error if needed
-- }
--
--
-- Since: 2.22
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 Socket, for
-- instance with toSocket.
class (GObject o, IsDescendantOf Socket o) => IsSocket o
-- | Cast to Socket, for types for which this is known to be safe.
-- For general casts, use castTo.
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 Socket object for it.
--
-- The socket must be bound to a local address with
-- socketBind and must be listening for incoming connections
-- (socketListen).
--
-- If there are no outstanding connections then the operation will block
-- or return IOErrorEnumWouldBlock if non-blocking I/O is enabled.
-- To be notified of an incoming connection, wait for the
-- IOConditionIn condition.
--
-- Since: 2.22
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. socketBind 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 socketListen and socketAccept
-- ). 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 socket is a TCP socket, then
-- allowReuse controls the setting of the
-- SO_REUSEADDR socket option; normally it should be True
-- for server sockets (sockets that you will eventually call
-- socketAccept on), and False for client sockets. (Failing
-- to set this flag on a server socket may cause socketBind to
-- return IOErrorEnumAddressInUse if the server program is stopped
-- and then immediately restarted.)
--
-- If socket is a UDP socket, then
-- allowReuse 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.)
--
-- Since: 2.22
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 socketConnect is used in
-- non-blocking mode.
--
-- Since: 2.22
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
-- IOErrorEnumClosed. 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
-- IOConditionIn 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 socketShutdown with only the
-- shutdownWrite 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 socketClose. (This is what
-- TcpConnection does if you call
-- tcpConnectionSetGracefulDisconnect. But of course, this only
-- works if the client will close its connection after the server does.)
--
-- Since: 2.22
socketClose :: (HasCallStack, MonadIO m, IsSocket a) => a -> m ()
-- | Checks on the readiness of socket to perform
-- operations. The operations specified in condition are
-- checked for and masked against the currently-satisfied conditions on
-- socket. The result is returned.
--
-- Note that on Windows, it is possible for an operation to return
-- IOErrorEnumWouldBlock even immediately after
-- socketConditionCheck has claimed that the socket is ready for
-- writing. Rather than calling socketConditionCheck 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 IOErrorEnumWouldBlock.
--
-- It is meaningless to specify IOConditionErr or
-- IOConditionHup in condition; these conditions will always be
-- set in the output if they are true.
--
-- This call never blocks.
--
-- Since: 2.22
socketConditionCheck :: (HasCallStack, MonadIO m, IsSocket a) => a -> [IOCondition] -> m [IOCondition]
-- | Waits for up to timeoutUs microseconds for
-- condition to become true on socket. If
-- the condition is met, True is returned.
--
-- If cancellable is cancelled before the condition is
-- met, or if timeoutUs (or the socket's
-- Socket:timeout) is reached before the condition is met, then
-- False is returned and error, if
-- non-Nothing, is set to the appropriate value
-- (IOErrorEnumCancelled or IOErrorEnumTimedOut).
--
-- If you don't want a timeout, use socketConditionWait.
-- (Alternatively, you can pass -1 for timeoutUs.)
--
-- Note that although timeoutUs is in microseconds for
-- consistency with other GLib APIs, this function actually only has
-- millisecond resolution, and the behavior is undefined if
-- timeoutUs is not an exact number of milliseconds.
--
-- Since: 2.32
socketConditionTimedWait :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [IOCondition] -> Int64 -> Maybe b -> m ()
-- | Waits for condition to become true on
-- socket. When the condition is met, True is
-- returned.
--
-- If cancellable 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 False is returned and
-- error, if non-Nothing, is set to the
-- appropriate value (IOErrorEnumCancelled or
-- IOErrorEnumTimedOut).
--
-- See also socketConditionTimedWait.
--
-- Since: 2.22
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 address. For a connection-less
-- socket it sets the default address for socketSend 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 IOErrorEnumPending 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 socketCheckConnectResult.
--
-- Since: 2.22
socketConnect :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe c -> m ()
-- | Creates a SocketConnection subclass of the right type for
-- socket.
--
-- Since: 2.22
socketConnectionFactoryCreateConnection :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketConnection
-- | Get the amount of data pending in the OS input buffer, without
-- blocking.
--
-- If socket 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 socketReceive with a
-- buffer of that size, rather than calling
-- socketGetAvailableBytes first and then doing a receive of
-- exactly the right size.
--
-- Since: 2.32
socketGetAvailableBytes :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int64
-- | Gets the blocking mode of the socket. For details on blocking I/O, see
-- socketSetBlocking.
--
-- Since: 2.22
socketGetBlocking :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
-- | Gets the broadcast setting on socket; if True,
-- it is possible to send packets to broadcast addresses.
--
-- Since: 2.32
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 SocketFamilyUnix
-- sockets).
--
-- If this operation isn't supported on the OS, the method fails with the
-- IOErrorEnumNotSupported error. On Linux this is implemented by
-- reading the SO_PEERCRED option on the underlying
-- socket.
--
-- This method can be expected to be available on the following
-- platforms:
--
-- -- get socket #blocking --getSocketBlocking :: (MonadIO m, IsSocket o) => o -> m Bool -- | Set the value of the “blocking” property. When -- overloading is enabled, this is equivalent to -- --
-- set socket [ #blocking := value ] --setSocketBlocking :: (MonadIO m, IsSocket o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “broadcast” property. This is rarely needed directly, but it -- is used by new. constructSocketBroadcast :: (IsSocket o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “broadcast” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #broadcast --getSocketBroadcast :: (MonadIO m, IsSocket o) => o -> m Bool -- | Set the value of the “broadcast” property. When -- overloading is enabled, this is equivalent to -- --
-- set socket [ #broadcast := value ] --setSocketBroadcast :: (MonadIO m, IsSocket o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “family” property. This is rarely needed directly, but it is -- used by new. constructSocketFamily :: (IsSocket o, MonadIO m) => SocketFamily -> m (GValueConstruct o) -- | Get the value of the “family” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #family --getSocketFamily :: (MonadIO m, IsSocket o) => o -> m SocketFamily -- | Construct a GValueConstruct with valid value for the -- “fd” property. This is rarely needed directly, but it is used -- by new. constructSocketFd :: (IsSocket o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “fd” property. When overloading -- is enabled, this is equivalent to -- --
-- get socket #fd --getSocketFd :: (MonadIO m, IsSocket o) => o -> m Int32 -- | Construct a GValueConstruct with valid value for the -- “keepalive” property. This is rarely needed directly, but it -- is used by new. constructSocketKeepalive :: (IsSocket o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “keepalive” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #keepalive --getSocketKeepalive :: (MonadIO m, IsSocket o) => o -> m Bool -- | Set the value of the “keepalive” property. When -- overloading is enabled, this is equivalent to -- --
-- set socket [ #keepalive := value ] --setSocketKeepalive :: (MonadIO m, IsSocket o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “listen-backlog” property. This is rarely needed directly, -- but it is used by new. constructSocketListenBacklog :: (IsSocket o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “listen-backlog” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #listenBacklog --getSocketListenBacklog :: (MonadIO m, IsSocket o) => o -> m Int32 -- | Set the value of the “listen-backlog” property. When -- overloading is enabled, this is equivalent to -- --
-- set socket [ #listenBacklog := value ] --setSocketListenBacklog :: (MonadIO m, IsSocket o) => o -> Int32 -> m () -- | Get the value of the “local-address” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #localAddress --getSocketLocalAddress :: (MonadIO m, IsSocket o) => o -> m (Maybe SocketAddress) -- | Construct a GValueConstruct with valid value for the -- “multicast-loopback” property. This is rarely needed -- directly, but it is used by new. constructSocketMulticastLoopback :: (IsSocket o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “multicast-loopback” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #multicastLoopback --getSocketMulticastLoopback :: (MonadIO m, IsSocket o) => o -> m Bool -- | Set the value of the “multicast-loopback” property. When -- overloading is enabled, this is equivalent to -- --
-- set socket [ #multicastLoopback := value ] --setSocketMulticastLoopback :: (MonadIO m, IsSocket o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “multicast-ttl” property. This is rarely needed directly, but -- it is used by new. constructSocketMulticastTtl :: (IsSocket o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “multicast-ttl” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #multicastTtl --getSocketMulticastTtl :: (MonadIO m, IsSocket o) => o -> m Word32 -- | Set the value of the “multicast-ttl” property. When -- overloading is enabled, this is equivalent to -- --
-- set socket [ #multicastTtl := value ] --setSocketMulticastTtl :: (MonadIO m, IsSocket o) => o -> Word32 -> m () -- | Construct a GValueConstruct with valid value for the -- “protocol” property. This is rarely needed directly, but it -- is used by new. constructSocketProtocol :: (IsSocket o, MonadIO m) => SocketProtocol -> m (GValueConstruct o) -- | Get the value of the “protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #protocol --getSocketProtocol :: (MonadIO m, IsSocket o) => o -> m SocketProtocol -- | Get the value of the “remote-address” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #remoteAddress --getSocketRemoteAddress :: (MonadIO m, IsSocket o) => o -> m (Maybe SocketAddress) -- | Construct a GValueConstruct with valid value for the -- “timeout” property. This is rarely needed directly, but it is -- used by new. constructSocketTimeout :: (IsSocket o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- get socket #timeout --getSocketTimeout :: (MonadIO m, IsSocket o) => o -> m Word32 -- | Set the value of the “timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- set socket [ #timeout := value ] --setSocketTimeout :: (MonadIO m, IsSocket o) => o -> Word32 -> m () -- | Construct a GValueConstruct with valid value for the -- “ttl” property. This is rarely needed directly, but it is -- used by new. constructSocketTtl :: (IsSocket o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “ttl” property. When overloading -- is enabled, this is equivalent to -- --
-- get socket #ttl --getSocketTtl :: (MonadIO m, IsSocket o) => o -> m Word32 -- | Set the value of the “ttl” property. When overloading -- is enabled, this is equivalent to -- --
-- set socket [ #ttl := value ] --setSocketTtl :: (MonadIO m, IsSocket o) => o -> Word32 -> m () -- | Construct a GValueConstruct with valid value for the -- “type” property. This is rarely needed directly, but it is -- used by new. constructSocketType :: (IsSocket o, MonadIO m) => SocketType -> m (GValueConstruct o) -- | Get the value of the “type” property. When overloading -- is enabled, this is equivalent to -- --
-- get socket #type --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.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 -- | GSimpleProxyResolver is a simple ProxyResolver -- implementation that handles a single default proxy, multiple -- URI-scheme-specific proxies, and a list of hosts that proxies should -- not be used for. -- -- GSimpleProxyResolver 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 -- socketClientSetProxyResolver. -- -- Since: 2.36 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 -- SimpleProxyResolver, for instance with -- toSimpleProxyResolver. class (GObject o, IsDescendantOf SimpleProxyResolver o) => IsSimpleProxyResolver o -- | Cast to SimpleProxyResolver, for types for which this is known -- to be safe. For general casts, use castTo. toSimpleProxyResolver :: (MonadIO m, IsSimpleProxyResolver o) => o -> m SimpleProxyResolver -- | Creates a new SimpleProxyResolver. See -- SimpleProxyResolver:defaultProxy and -- SimpleProxyResolver:ignoreHosts for more details on how the -- arguments are interpreted. -- -- Since: 2.36 simpleProxyResolverNew :: (HasCallStack, MonadIO m) => Maybe Text -> Maybe [Text] -> m ProxyResolver -- | Sets the default proxy on resolver, to be used for any -- URIs that don't match SimpleProxyResolver:ignoreHosts or a -- proxy set via simpleProxyResolverSetUriProxy. -- -- If defaultProxy starts with "socks://", -- SimpleProxyResolver will treat it as referring to all three of -- the socks5, socks4a, and socks4 proxy types. -- -- Since: 2.36 simpleProxyResolverSetDefaultProxy :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> Maybe Text -> m () -- | Sets the list of ignored hosts. -- -- See SimpleProxyResolver:ignoreHosts for more details on how the -- ignoreHosts argument is interpreted. -- -- Since: 2.36 simpleProxyResolverSetIgnoreHosts :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> [Text] -> m () -- | Adds a URI-scheme-specific proxy to resolver; URIs -- whose scheme matches uriScheme (and which don't match -- SimpleProxyResolver:ignoreHosts) will be proxied via -- proxy. -- -- As with SimpleProxyResolver:defaultProxy, if -- proxy starts with "socks://", -- SimpleProxyResolver will treat it as referring to all three of -- the socks5, socks4a, and socks4 proxy types. -- -- Since: 2.36 simpleProxyResolverSetUriProxy :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> Text -> Text -> m () -- | Set the value of the “default-proxy” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #defaultProxy --clearSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “default-proxy” property. This is rarely needed directly, but -- it is used by new. constructSimpleProxyResolverDefaultProxy :: (IsSimpleProxyResolver o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “default-proxy” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleProxyResolver #defaultProxy --getSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe Text) -- | Set the value of the “default-proxy” property. When -- overloading is enabled, this is equivalent to -- --
-- set simpleProxyResolver [ #defaultProxy := value ] --setSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “ignore-hosts” property. This is rarely needed directly, but -- it is used by new. constructSimpleProxyResolverIgnoreHosts :: (IsSimpleProxyResolver o, MonadIO m) => [Text] -> m (GValueConstruct o) -- | Get the value of the “ignore-hosts” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleProxyResolver #ignoreHosts --getSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe [Text]) -- | Set the value of the “ignore-hosts” property. When -- overloading is enabled, this is equivalent to -- --
-- set simpleProxyResolver [ #ignoreHosts := value ] --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.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 -- | GSimplePermission is a trivial implementation of -- Permission that represents a permission that is either always -- or never allowed. The value is given at construction and doesn’t -- change. -- -- Calling permissionAcquire or permissionRelease on a -- GSimplePermission 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 -- SimplePermission, for instance with toSimplePermission. class (GObject o, IsDescendantOf SimplePermission o) => IsSimplePermission o -- | Cast to SimplePermission, for types for which this is known to -- be safe. For general casts, use castTo. toSimplePermission :: (MonadIO m, IsSimplePermission o) => o -> m SimplePermission -- | Creates a new Permission instance that represents an action -- that is either always or never allowed. -- -- Since: 2.26 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.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 -- | GSimpleIOStream creates a IOStream from an arbitrary -- InputStream and OutputStream. This allows any pair of -- input and output streams to be used with IOStream methods. -- -- This is useful when you obtained a InputStream and a -- OutputStream by other means, for instance creating them with -- platform specific methods as `g_unix_input_stream_new()` (from -- gio-unix-2.0.pc / GioUnix-2.0), and you want to take -- advantage of the methods provided by IOStream. -- -- Since: 2.44 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 -- SimpleIOStream, for instance with toSimpleIOStream. class (GObject o, IsDescendantOf SimpleIOStream o) => IsSimpleIOStream o -- | Cast to SimpleIOStream, for types for which this is known to be -- safe. For general casts, use castTo. toSimpleIOStream :: (MonadIO m, IsSimpleIOStream o) => o -> m SimpleIOStream -- | Creates a new SimpleIOStream wrapping -- inputStream and outputStream. See also -- IOStream. -- -- Since: 2.44 simpleIOStreamNew :: (HasCallStack, MonadIO m, IsInputStream a, IsOutputStream b) => a -> b -> m SimpleIOStream -- | Construct a GValueConstruct with valid value for the -- “input-stream” property. This is rarely needed directly, but -- it is used by new. constructSimpleIOStreamInputStream :: (IsSimpleIOStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o) -- | Get the value of the “input-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleIOStream #inputStream --getSimpleIOStreamInputStream :: (MonadIO m, IsSimpleIOStream o) => o -> m (Maybe InputStream) -- | Construct a GValueConstruct with valid value for the -- “output-stream” property. This is rarely needed directly, but -- it is used by new. constructSimpleIOStreamOutputStream :: (IsSimpleIOStream o, MonadIO m, IsOutputStream a) => a -> m (GValueConstruct o) -- | Get the value of the “output-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get simpleIOStream #outputStream --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.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, GSimpleAsyncResult is deprecated in favor of -- Task, which provides a simpler API. -- -- GSimpleAsyncResult implements AsyncResult. -- -- GSimpleAsyncResult handles -- [typegio.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 gssize 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 AsyncResult’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. -- -- GSimpleAsyncResults are tagged with the calling function to -- ensure that asynchronous functions and their finishing functions are -- used together correctly. -- -- To create a new GSimpleAsyncResult, call -- simpleAsyncResultNew. If the result needs to be created for a -- GError, use simpleAsyncResultNewFromError or -- SimpleAsyncResult.new_take_error(). If a -- GError is not available (e.g. the asynchronous operation -- doesn’t take a GError argument), but the result still needs -- to be created for an error condition, use -- SimpleAsyncResult.new_error() (or -- SimpleAsyncResult.set_error_va() if your -- application or binding requires passing a variable argument list -- directly), and the error can then be propagated through the use of -- simpleAsyncResultPropagateError. -- -- An asynchronous operation can be made to ignore a cancellation event -- by calling simpleAsyncResultSetHandleCancellation with a -- GSimpleAsyncResult for the operation and FALSE. This -- is useful for operations that are dangerous to cancel, such as close -- (which would cause a leak if cancelled before being run). -- -- GSimpleAsyncResult can integrate into GLib’s event loop, -- [typegLib.MainLoop], or it can use -- [typegLib.Thread]s. simpleAsyncResultComplete -- will finish an I/O task directly from the point where it is called. -- simpleAsyncResultCompleteInIdle will finish it from an idle -- handler in the thread-default main context (see -- mainContextPushThreadDefault) where the -- GSimpleAsyncResult was created. -- SimpleAsyncResult.run_in_thread() will run the -- job in a separate thread and then use -- simpleAsyncResultCompleteInIdle to deliver the result. -- -- To set the results of an asynchronous function, -- SimpleAsyncResult.set_op_res_gpointer(), -- simpleAsyncResultSetOpResGboolean, and -- simpleAsyncResultSetOpResGssize are provided, setting the -- operation's result to a gpointer, gboolean, or -- gssize, respectively. -- -- Likewise, to get the result of an asynchronous function, -- SimpleAsyncResult.get_op_res_gpointer(), -- simpleAsyncResultGetOpResGboolean, and -- simpleAsyncResultGetOpResGssize are provided, getting the -- operation’s result as a gpointer, gboolean, and -- gssize, respectively. -- -- For the details of the requirements implementations must respect, see -- AsyncResult. A typical implementation of an asynchronous -- operation using GSimpleAsyncResult looks something like this: -- --
-- 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 < 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);
-- }
--
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
-- SimpleAsyncResult, for instance with
-- toSimpleAsyncResult.
class (GObject o, IsDescendantOf SimpleAsyncResult o) => IsSimpleAsyncResult o
-- | Cast to SimpleAsyncResult, for types for which this is known to
-- be safe. For general casts, use castTo.
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
-- simpleAsyncResultCompleteInIdle.
--
-- Calling this function takes a reference to simple for
-- as long as is needed to complete the call.
-- | Deprecated: (Since version 2.46)Use Task instead.
simpleAsyncResultComplete :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m ()
-- | Completes an asynchronous function in an idle handler in the
-- [thread-default main context][g-main-context-push-thread-default] of
-- the thread that simple was initially created in (and
-- re-pushes that context around the invocation of the callback).
--
-- Calling this function takes a reference to simple for
-- as long as is needed to complete the call.
-- | Deprecated: (Since version 2.46)Use Task instead.
simpleAsyncResultCompleteInIdle :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m ()
-- | Gets the operation result boolean from within the asynchronous result.
-- | Deprecated: (Since version 2.46)Use Task and
-- taskPropagateBoolean instead.
simpleAsyncResultGetOpResGboolean :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m Bool
-- | Gets a gssize from the asynchronous result.
-- | Deprecated: (Since version 2.46)Use Task and
-- taskPropagateInt instead.
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, result is checked to ensure that it is really a
-- SimpleAsyncResult. Second, source is checked to
-- ensure that it matches the source object of result.
-- Third, sourceTag is checked to ensure that it is equal
-- to the sourceTag argument given to
-- simpleAsyncResultNew (which, by convention, is a pointer to the
-- _async function corresponding to the _finish function from which this
-- function is called). (Alternatively, if either
-- sourceTag or result's source tag is
-- Nothing, then the source tag check is skipped.)
--
-- Since: 2.20
-- | Deprecated: (Since version 2.46)Use Task and
-- taskIsValid instead.
simpleAsyncResultIsValid :: (HasCallStack, MonadIO m, IsAsyncResult a, IsObject b) => a -> Maybe b -> Ptr () -> m Bool
-- | Creates a SimpleAsyncResult.
--
-- The common convention is to create the SimpleAsyncResult in the
-- function that starts the asynchronous operation and use that same
-- function as the sourceTag.
--
-- If your operation supports cancellation with Cancellable (which
-- it probably should) then you should provide the user's cancellable to
-- simpleAsyncResultSetCheckCancellable immediately after this
-- function returns.
-- | Deprecated: (Since version 2.46)Use taskNew instead.
simpleAsyncResultNew :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Maybe AsyncReadyCallback -> Ptr () -> m SimpleAsyncResult
-- | Creates a SimpleAsyncResult from an error condition.
-- | Deprecated: (Since version 2.46)Use taskNew and
-- taskReturnError instead.
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 Cancellable given to a prior call to
-- simpleAsyncResultSetCheckCancellable is cancelled then this
-- function will return True with dest set
-- appropriately.
-- | Deprecated: (Since version 2.46)Use Task instead.
simpleAsyncResultPropagateError :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> m ()
-- | Sets a Cancellable to check before dispatching results.
--
-- This function has one very specific purpose: the provided cancellable
-- is checked at the time of simpleAsyncResultPropagateError If it
-- is cancelled, these functions will return an "Operation was cancelled"
-- error (IOErrorEnumCancelled).
--
-- 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 simpleAsyncResultSetHandleCancellation function.
--
-- Since: 2.32
-- | Deprecated: (Since version 2.46)Use Task instead.
simpleAsyncResultSetCheckCancellable :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a, IsCancellable b) => a -> Maybe b -> m ()
-- | Sets the result from a GError.
-- | Deprecated: (Since version 2.46)Use Task and
-- taskReturnError instead.
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
-- simpleAsyncResultSetCheckCancellable. It only refers to the
-- Cancellable passed to
-- g_simple_async_result_run_in_thread().
-- | Deprecated: (Since version 2.46)
simpleAsyncResultSetHandleCancellation :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> Bool -> m ()
-- | Sets the operation result to a boolean within the asynchronous result.
-- | Deprecated: (Since version 2.46)Use Task and
-- taskReturnBoolean instead.
simpleAsyncResultSetOpResGboolean :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a) => a -> Bool -> m ()
-- | Sets the operation result within the asynchronous result to the given
-- opRes.
-- | Deprecated: (Since version 2.46)Use Task and
-- taskReturnInt instead.
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.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
-- | GSimpleActionGroup is a hash table filled with Action
-- objects, implementing the ActionGroup and ActionMap
-- interfaces.
--
-- Since: 2.28
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
-- SimpleActionGroup, for instance with
-- toSimpleActionGroup.
class (GObject o, IsDescendantOf SimpleActionGroup o) => IsSimpleActionGroup o
-- | Cast to SimpleActionGroup, for types for which this is known to
-- be safe. For general casts, use castTo.
toSimpleActionGroup :: (MonadIO m, IsSimpleActionGroup o) => o -> m SimpleActionGroup
-- | A convenience function for creating multiple SimpleAction
-- instances and adding them to the action group.
--
-- Since: 2.30
-- | Deprecated: (Since version 2.38)Use
-- actionMapAddActionEntries
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
-- action then the old action is dropped from the group.
--
-- The action group takes its own reference on action.
--
-- Since: 2.28
-- | Deprecated: (Since version 2.38)Use actionMapAddAction
simpleActionGroupInsert :: (HasCallStack, MonadIO m, IsSimpleActionGroup a, IsAction b) => a -> b -> m ()
-- | Looks up the action with the name actionName in the
-- group.
--
-- If no such action exists, returns Nothing.
--
-- Since: 2.28
-- | Deprecated: (Since version 2.38)Use
-- actionMapLookupAction
simpleActionGroupLookup :: (HasCallStack, MonadIO m, IsSimpleActionGroup a) => a -> Text -> m Action
-- | Creates a new, empty, SimpleActionGroup.
--
-- Since: 2.28
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.
--
-- Since: 2.28
-- | Deprecated: (Since version 2.38)Use
-- actionMapRemoveAction
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.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
-- | GProxyAddressEnumerator is a wrapper around
-- SocketAddressEnumerator which takes the SocketAddress
-- instances returned by the SocketAddressEnumerator and wraps
-- them in ProxyAddress instances, using the given
-- ProxyAddressEnumerator:proxyResolver.
--
-- This enumerator will be returned (for example, by
-- socketConnectableEnumerate) as appropriate when a proxy is
-- configured; there should be no need to manually wrap a
-- SocketAddressEnumerator 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
-- ProxyAddressEnumerator, for instance with
-- toProxyAddressEnumerator.
class (GObject o, IsDescendantOf ProxyAddressEnumerator o) => IsProxyAddressEnumerator o
-- | Cast to ProxyAddressEnumerator, for types for which this is
-- known to be safe. For general casts, use castTo.
toProxyAddressEnumerator :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m ProxyAddressEnumerator
-- | Construct a GValueConstruct with valid value for the
-- “connectable” property. This is rarely needed directly, but
-- it is used by new.
constructProxyAddressEnumeratorConnectable :: (IsProxyAddressEnumerator o, MonadIO m, IsSocketConnectable a) => a -> m (GValueConstruct o)
-- | Get the value of the “connectable” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get proxyAddressEnumerator #connectable --getProxyAddressEnumeratorConnectable :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe SocketConnectable) -- | Construct a GValueConstruct with valid value for the -- “default-port” property. This is rarely needed directly, but -- it is used by new. constructProxyAddressEnumeratorDefaultPort :: (IsProxyAddressEnumerator o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “default-port” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddressEnumerator #defaultPort --getProxyAddressEnumeratorDefaultPort :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m Word32 -- | Set the value of the “proxy-resolver” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #proxyResolver --clearProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “proxy-resolver” property. This is rarely needed directly, -- but it is used by new. constructProxyAddressEnumeratorProxyResolver :: (IsProxyAddressEnumerator o, MonadIO m, IsProxyResolver a) => a -> m (GValueConstruct o) -- | Get the value of the “proxy-resolver” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddressEnumerator #proxyResolver --getProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe ProxyResolver) -- | Set the value of the “proxy-resolver” property. When -- overloading is enabled, this is equivalent to -- --
-- set proxyAddressEnumerator [ #proxyResolver := value ] --setProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o, IsProxyResolver a) => o -> a -> m () -- | Construct a GValueConstruct with valid value for the -- “uri” property. This is rarely needed directly, but it is -- used by new. constructProxyAddressEnumeratorUri :: (IsProxyAddressEnumerator o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “uri” property. When overloading -- is enabled, this is equivalent to -- --
-- get proxyAddressEnumerator #uri --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.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 InetSocketAddress representing a connection via a proxy -- server. -- -- Since: 2.26 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 ProxyAddress, -- for instance with toProxyAddress. class (GObject o, IsDescendantOf ProxyAddress o) => IsProxyAddress o -- | Cast to ProxyAddress, for types for which this is known to be -- safe. For general casts, use castTo. toProxyAddress :: (MonadIO m, IsProxyAddress o) => o -> m ProxyAddress -- | Gets proxy'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. -- -- Since: 2.26 proxyAddressGetDestinationHostname :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text -- | Gets proxy'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. -- -- Since: 2.26 proxyAddressGetDestinationPort :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Word16 -- | Gets the protocol that is being spoken to the destination server; eg, -- "http" or "ftp". -- -- Since: 2.34 proxyAddressGetDestinationProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text -- | Gets proxy's password. -- -- Since: 2.26 proxyAddressGetPassword :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text) -- | Gets proxy's protocol. eg, "socks" or "http" -- -- Since: 2.26 proxyAddressGetProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text -- | Gets the proxy URI that proxy was constructed from. -- -- Since: 2.34 proxyAddressGetUri :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text) -- | Gets proxy's username. -- -- Since: 2.26 proxyAddressGetUsername :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text) -- | Creates a new ProxyAddress for inetaddr with -- protocol that should tunnel through -- destHostname and destPort. -- -- (Note that this method doesn't set the ProxyAddress:uri or -- ProxyAddress:destinationProtocol fields; use -- g_object_new() directly if you want to set those.) -- -- Since: 2.26 proxyAddressNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word16 -> Text -> Text -> Word16 -> Maybe Text -> Maybe Text -> m ProxyAddress -- | Construct a GValueConstruct with valid value for the -- “destination-hostname” property. This is rarely needed -- directly, but it is used by new. constructProxyAddressDestinationHostname :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “destination-hostname” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddress #destinationHostname --getProxyAddressDestinationHostname :: (MonadIO m, IsProxyAddress o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “destination-port” property. This is rarely needed directly, -- but it is used by new. constructProxyAddressDestinationPort :: (IsProxyAddress o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “destination-port” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddress #destinationPort --getProxyAddressDestinationPort :: (MonadIO m, IsProxyAddress o) => o -> m Word32 -- | Construct a GValueConstruct with valid value for the -- “destination-protocol” property. This is rarely needed -- directly, but it is used by new. constructProxyAddressDestinationProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “destination-protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddress #destinationProtocol --getProxyAddressDestinationProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “password” property. This is rarely needed directly, but it -- is used by new. constructProxyAddressPassword :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “password” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddress #password --getProxyAddressPassword :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “protocol” property. This is rarely needed directly, but it -- is used by new. constructProxyAddressProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddress #protocol --getProxyAddressProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “uri” property. This is rarely needed directly, but it is -- used by new. constructProxyAddressUri :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “uri” property. When overloading -- is enabled, this is equivalent to -- --
-- get proxyAddress #uri --getProxyAddressUri :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “username” property. This is rarely needed directly, but it -- is used by new. constructProxyAddressUsername :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “username” property. When -- overloading is enabled, this is equivalent to -- --
-- get proxyAddress #username --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.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 GPermission 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 GPermission might represent the ability for -- the user to write to a Settings object. This -- GPermission 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 Permission, -- for instance with toPermission. class (GObject o, IsDescendantOf Permission o) => IsPermission o -- | Cast to Permission, for types for which this is known to be -- safe. For general casts, use castTo. toPermission :: (MonadIO m, IsPermission o) => o -> m Permission -- | Attempts to acquire the permission represented by -- permission. -- -- The precise method by which this happens depends on the permission and -- the underlying authentication mechanism. A simple example is that a -- dialog may appear asking the user to enter their password. -- -- You should check with permissionGetCanAcquire before calling -- this function. -- -- If the permission is acquired then True is returned. Otherwise, -- False is returned and error is set -- appropriately. -- -- This call is blocking, likely for a very long time (in the case that -- user interaction is required). See permissionAcquireAsync for -- the non-blocking version. -- -- Since: 2.26 permissionAcquire :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe b -> m () -- | Attempts to acquire the permission represented by -- permission. -- -- This is the first half of the asynchronous version of -- permissionAcquire. -- -- Since: 2.26 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 permission. -- -- This is the second half of the asynchronous version of -- permissionAcquire. -- -- Since: 2.26 permissionAcquireFinish :: (HasCallStack, MonadIO m, IsPermission a, IsAsyncResult b) => a -> b -> m () -- | Gets the value of the 'allowed' property. This property is True -- if the caller currently has permission to perform the action that -- permission represents the permission to perform. -- -- Since: 2.26 permissionGetAllowed :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool -- | Gets the value of the 'can-acquire' property. This property is -- True if it is generally possible to acquire the permission by -- calling permissionAcquire. -- -- Since: 2.26 permissionGetCanAcquire :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool -- | Gets the value of the 'can-release' property. This property is -- True if it is generally possible to release the permission by -- calling permissionRelease. -- -- Since: 2.26 permissionGetCanRelease :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool -- | This function is called by the Permission implementation to -- update the properties of the permission. You should never call this -- function except from a Permission implementation. -- -- GObject notify signals are generated, as appropriate. -- -- Since: 2.26 permissionImplUpdate :: (HasCallStack, MonadIO m, IsPermission a) => a -> Bool -> Bool -> Bool -> m () -- | Attempts to release the permission represented by -- permission. -- -- 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 permissionGetCanRelease before calling -- this function. -- -- If the permission is released then True is returned. Otherwise, -- False is returned and error is set -- appropriately. -- -- This call is blocking, likely for a very long time (in the case that -- user interaction is required). See permissionReleaseAsync for -- the non-blocking version. -- -- Since: 2.26 permissionRelease :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe b -> m () -- | Attempts to release the permission represented by -- permission. -- -- This is the first half of the asynchronous version of -- permissionRelease. -- -- Since: 2.26 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 permission. -- -- This is the second half of the asynchronous version of -- permissionRelease. -- -- Since: 2.26 permissionReleaseFinish :: (HasCallStack, MonadIO m, IsPermission a, IsAsyncResult b) => a -> b -> m () -- | Get the value of the “allowed” property. When -- overloading is enabled, this is equivalent to -- --
-- get permission #allowed --getPermissionAllowed :: (MonadIO m, IsPermission o) => o -> m Bool -- | Get the value of the “can-acquire” property. When -- overloading is enabled, this is equivalent to -- --
-- get permission #canAcquire --getPermissionCanAcquire :: (MonadIO m, IsPermission o) => o -> m Bool -- | Get the value of the “can-release” property. When -- overloading is enabled, this is equivalent to -- --
-- get permission #canRelease --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.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 -- | GOutputStream is a base class for implementing streaming -- output. -- -- It has functions to write to a stream (outputStreamWrite), to -- close a stream (outputStreamClose) and to flush pending writes -- (outputStreamFlush). -- -- To copy the content of an input stream to an output stream without -- manually handling the reads and writes, use outputStreamSplice. -- -- See the documentation for IOStream for details of thread safety -- of streaming APIs. -- -- All of these functions have async variants too. -- -- All classes derived from GOutputStream *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 OutputStream, -- for instance with toOutputStream. class (GObject o, IsDescendantOf OutputStream o) => IsOutputStream o -- | Cast to OutputStream, for types for which this is known to be -- safe. For general casts, use castTo. toOutputStream :: (MonadIO m, IsOutputStream o) => o -> m OutputStream -- | Clears the pending flag on stream. 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 -- IOErrorEnumClosed. 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 IOErrorEnumClosed for all -- operations. Still, it is important to check and report the error to -- the user, otherwise there might be a loss of data as all data might -- not be written. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 callback -- will be called. You can then call outputStreamCloseFinish to -- get the result of the operation. -- -- For behaviour details see outputStreamClose. -- -- 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 -- stream. Will block during the operation. Closing the -- stream will implicitly cause a flush. -- -- This function is optional for inherited classes. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 stream. For behaviour details see -- outputStreamFlush. -- -- When the operation is finished callback will be -- called. You can then call outputStreamFlushFinish 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. -- -- Since: 2.24 outputStreamIsClosing :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m Bool -- | Sets stream to have actions pending. If the pending -- flag is already set or stream is closed, it will -- return False and set error. 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 -- callback will be called. You can then call -- outputStreamSpliceFinish to get the result of the operation. -- -- For the synchronous, blocking version of this function, see -- outputStreamSplice. 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 count bytes from buffer -- into the stream. Will block during the operation. -- -- If count is 0, returns 0 and does nothing. A value of -- count larger than G_MAXSSIZE will -- cause a IOErrorEnumInvalidArgument 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 -- count is 0). -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. If an operation was -- partially finished when the operation was cancelled the partial result -- will be returned, without an error. -- -- On error -1 is returned and error is set accordingly. outputStreamWrite :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m Int64 -- | Tries to write count bytes from buffer -- into the stream. Will block during the operation. -- -- This function is similar to outputStreamWrite, except it tries -- to write as many bytes as requested, only stopping on an error. -- -- On a successful write of count bytes, True is -- returned, and bytesWritten is set to -- count. -- -- If there is an error during the operation False is returned and -- error is set to indicate the error status. -- -- As a special exception to the normal conventions for functions that -- use GError, if this function returns False (and sets -- error) then bytesWritten 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 -- outputStreamWrite. outputStreamWriteAll :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m CSize -- | Request an asynchronous write of count bytes from -- buffer into the stream. When the operation is finished -- callback will be called. You can then call -- outputStreamWriteAllFinish to get the result of the operation. -- -- This is the asynchronous version of outputStreamWriteAll. -- -- Call outputStreamWriteAllFinish 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 PRIORITY_DEFAULT. -- -- Note that no copy of buffer will be made, so it must -- stay valid until callback is called. -- -- Since: 2.44 outputStreamWriteAllAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous stream write operation started with -- outputStreamWriteAllAsync. -- -- As a special exception to the normal conventions for functions that -- use GError, if this function returns False (and sets -- error) then bytesWritten 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 -- outputStreamWriteAsync. -- -- Since: 2.44 outputStreamWriteAllFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m CSize -- | Request an asynchronous write of count bytes from -- buffer into the stream. When the operation is finished -- callback will be called. You can then call -- outputStreamWriteFinish to get the result of the operation. -- -- During an async request no other sync and async calls are allowed, and -- will result in IOErrorEnumPending errors. -- -- A value of count larger than -- G_MAXSSIZE will cause a -- IOErrorEnumInvalidArgument error. -- -- On success, the number of bytes written will be passed to the -- callback. It is not an error if this is not the same -- as the requested size, as it can happen e.g. on a partial I/O error, -- but generally we try to write as many bytes as requested. -- -- You are guaranteed that this method will never fail with -- IOErrorEnumWouldBlock - if stream can't accept -- more data, the method will just wait until this changes. -- -- Any outstanding I/O request with higher priority (lower numerical -- value) will be executed before an outstanding request with lower -- priority. Default priority is PRIORITY_DEFAULT. -- -- The asynchronous methods have a default fallback that uses threads to -- implement asynchronicity, so they are optional for inheriting classes. -- However, if you override one you must override all. -- -- For the synchronous, blocking version of this function, see -- outputStreamWrite. -- -- Note that no copy of buffer will be made, so it must -- stay valid until callback is called. See -- outputStreamWriteBytesAsync for a Bytes 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 outputStreamWrite which takes a -- Bytes as input. This can be more convenient for use by language -- bindings or in other cases where the refcounted nature of Bytes -- is helpful over a bare pointer interface. -- -- However, note that this function may still perform partial writes, -- just like outputStreamWrite. If that occurs, to continue -- writing, you will need to create a new Bytes containing just -- the remaining bytes, using bytesNewFromBytes. Passing the same -- Bytes 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 outputStreamWriteAsync, but takes a -- Bytes as input. Due to the refcounted nature of Bytes, -- this allows the stream to avoid taking a copy of the data. -- -- However, note that this function may still perform partial writes, -- just like outputStreamWriteAsync. If that occurs, to continue -- writing, you will need to create a new Bytes containing just -- the remaining bytes, using bytesNewFromBytes. Passing the same -- Bytes instance multiple times potentially can result in -- duplicated data in the output stream. -- -- For the synchronous, blocking version of this function, see -- outputStreamWriteBytes. outputStreamWriteBytesAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> Bytes -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes a stream write-from-tBytes 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 nVectors -- vectors into the stream. Will block during the -- operation. -- -- If nVectors is 0 or the sum of all bytes in -- vectors 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 -- nVectors is 0 or the sum of all bytes in -- vectors is 0). -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 outputStreamWritev may have limitations -- on the aggregate buffer size, and will return -- IOErrorEnumInvalidArgument if these are exceeded. For example, -- when writing to a local file on UNIX platforms, the aggregate buffer -- size must not exceed G_MAXSSIZE bytes. -- -- Since: 2.60 outputStreamWritev :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Maybe b -> m CSize -- | Tries to write the bytes contained in the nVectors -- vectors into the stream. Will block during the -- operation. -- -- This function is similar to outputStreamWritev, except it tries -- to write as many bytes as requested, only stopping on an error. -- -- On a successful write of all nVectors vectors, -- True is returned, and bytesWritten is set to -- the sum of all the sizes of vectors. -- -- If there is an error during the operation False is returned and -- error is set to indicate the error status. -- -- As a special exception to the normal conventions for functions that -- use GError, if this function returns False (and sets -- error) then bytesWritten 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 -- outputStreamWrite. -- -- The content of the individual elements of vectors -- might be changed by this function. -- -- Since: 2.60 outputStreamWritevAll :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Maybe b -> m CSize -- | Request an asynchronous write of the bytes contained in the -- nVectors vectors into the stream. When -- the operation is finished callback will be called. You -- can then call outputStreamWritevAllFinish to get the result of -- the operation. -- -- This is the asynchronous version of outputStreamWritevAll. -- -- Call outputStreamWritevAllFinish 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 PRIORITY_DEFAULT. -- -- Note that no copy of vectors will be made, so it must -- stay valid until callback is called. The content of -- the individual elements of vectors might be changed by -- this function. -- -- Since: 2.60 outputStreamWritevAllAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous stream write operation started with -- outputStreamWritevAllAsync. -- -- As a special exception to the normal conventions for functions that -- use GError, if this function returns False (and sets -- error) then bytesWritten 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 -- outputStreamWritevAsync. -- -- Since: 2.60 outputStreamWritevAllFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m CSize -- | Request an asynchronous write of the bytes contained in -- nVectors vectors into the stream. When -- the operation is finished callback will be called. You -- can then call outputStreamWritevFinish to get the result of the -- operation. -- -- During an async request no other sync and async calls are allowed, and -- will result in IOErrorEnumPending errors. -- -- On success, the number of bytes written will be passed to the -- callback. It is not an error if this is not the same -- as the requested size, as it can happen e.g. on a partial I/O error, -- but generally we try to write as many bytes as requested. -- -- You are guaranteed that this method will never fail with -- IOErrorEnumWouldBlock — if stream can't accept -- more data, the method will just wait until this changes. -- -- Any outstanding I/O request with higher priority (lower numerical -- value) will be executed before an outstanding request with lower -- priority. Default priority is PRIORITY_DEFAULT. -- -- The asynchronous methods have a default fallback that uses threads to -- implement asynchronicity, so they are optional for inheriting classes. -- However, if you override one you must override all. -- -- For the synchronous, blocking version of this function, see -- outputStreamWritev. -- -- Note that no copy of vectors will be made, so it must -- stay valid until callback is called. -- -- Since: 2.60 outputStreamWritevAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> [OutputVector] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes a stream writev operation. -- -- Since: 2.60 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.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 NetworkAddress does with hostnames, -- GNetworkService 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 SrvTarget for more information about SRV records, and see -- SocketConnectable 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 -- NetworkService, for instance with toNetworkService. class (GObject o, IsDescendantOf NetworkService o) => IsNetworkService o -- | Cast to NetworkService, for types for which this is known to be -- safe. For general casts, use castTo. toNetworkService :: (MonadIO m, IsNetworkService o) => o -> m NetworkService -- | Gets the domain that srv serves. This might be either -- UTF-8 or ASCII-encoded, depending on what srv was -- created with. -- -- Since: 2.22 networkServiceGetDomain :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text -- | Gets srv's protocol name (eg, "tcp"). -- -- Since: 2.22 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. -- -- Since: 2.26 networkServiceGetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text -- | Gets srv's service name (eg, "ldap"). -- -- Since: 2.22 networkServiceGetService :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text -- | Creates a new NetworkService representing the given -- service, protocol, and -- domain. This will initially be unresolved; use the -- SocketConnectable interface to resolve it. -- -- Since: 2.22 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. -- -- Since: 2.26 networkServiceSetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “domain” property. This is rarely needed directly, but it is -- used by new. constructNetworkServiceDomain :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “domain” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkService #domain --getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “protocol” property. This is rarely needed directly, but it -- is used by new. constructNetworkServiceProtocol :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkService #protocol --getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “scheme” property. This is rarely needed directly, but it is -- used by new. constructNetworkServiceScheme :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “scheme” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkService #scheme --getNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> m Text -- | Set the value of the “scheme” property. When -- overloading is enabled, this is equivalent to -- --
-- set networkService [ #scheme := value ] --setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “service” property. This is rarely needed directly, but it is -- used by new. constructNetworkServiceService :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “service” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkService #service --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.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 -- | GNetworkAddress 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 SocketConnectable 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 -- NetworkAddress, for instance with toNetworkAddress. class (GObject o, IsDescendantOf NetworkAddress o) => IsNetworkAddress o -- | Cast to NetworkAddress, for types for which this is known to be -- safe. For general casts, use castTo. toNetworkAddress :: (MonadIO m, IsNetworkAddress o) => o -> m NetworkAddress -- | Gets addr's hostname. This might be either UTF-8 or -- ASCII-encoded, depending on what addr was created -- with. -- -- Since: 2.22 networkAddressGetHostname :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m Text -- | Gets addr's port number -- -- Since: 2.22 networkAddressGetPort :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m Word16 -- | Gets addr's scheme -- -- Since: 2.26 networkAddressGetScheme :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m (Maybe Text) -- | Creates a new SocketConnectable for connecting to the given -- hostname and port. -- -- Note that depending on the configuration of the machine, a -- hostname of localhost may refer to the IPv4 -- loopback address only, or to both IPv4 and IPv6; use -- networkAddressNewLoopback to create a NetworkAddress -- that is guaranteed to resolve to both addresses. -- -- Since: 2.22 networkAddressNew :: (HasCallStack, MonadIO m) => Text -> Word16 -> m NetworkAddress -- | Creates a new SocketConnectable for connecting to the local -- host over a loopback connection to the given port. -- This is intended for use in connecting to local services which may be -- running on IPv4 or IPv6. -- -- The connectable will return IPv4 and IPv6 loopback addresses, -- regardless of how the host resolves localhost. By contrast, -- networkAddressNew will often only return an IPv4 address when -- resolving localhost, and an IPv6 address for -- localhost6. -- -- networkAddressGetHostname will always return localhost -- for a NetworkAddress created with this constructor. -- -- Since: 2.44 networkAddressNewLoopback :: (HasCallStack, MonadIO m) => Word16 -> m NetworkAddress -- | Creates a new SocketConnectable for connecting to the given -- hostname and port. May fail and return -- Nothing in case parsing hostAndPort fails. -- -- hostAndPort 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 hostAndPort then -- defaultPort will be used as the port number to connect -- to. -- -- In general, hostAndPort is expected to be provided by -- the user (allowing them to give the hostname, and a port override if -- necessary) and defaultPort is expected to be provided -- by the application. -- -- (The port component of hostAndPort 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.) -- -- Since: 2.22 networkAddressParse :: (HasCallStack, MonadIO m) => Text -> Word16 -> m NetworkAddress -- | Creates a new SocketConnectable for connecting to the given -- uri. May fail and return Nothing in case -- parsing uri fails. -- -- Using this rather than networkAddressNew or -- networkAddressParse allows SocketClient to determine -- when to use application-specific proxy protocols. -- -- Since: 2.26 networkAddressParseUri :: (HasCallStack, MonadIO m) => Text -> Word16 -> m NetworkAddress -- | Construct a GValueConstruct with valid value for the -- “hostname” property. This is rarely needed directly, but it -- is used by new. constructNetworkAddressHostname :: (IsNetworkAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “hostname” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkAddress #hostname --getNetworkAddressHostname :: (MonadIO m, IsNetworkAddress o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “port” property. This is rarely needed directly, but it is -- used by new. constructNetworkAddressPort :: (IsNetworkAddress o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “port” property. When overloading -- is enabled, this is equivalent to -- --
-- get networkAddress #port --getNetworkAddressPort :: (MonadIO m, IsNetworkAddress o) => o -> m Word32 -- | Construct a GValueConstruct with valid value for the -- “scheme” property. This is rarely needed directly, but it is -- used by new. constructNetworkAddressScheme :: (IsNetworkAddress o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “scheme” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkAddress #scheme --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.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 -- | No description available in the introspection data. 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 -- NativeVolumeMonitor, for instance with -- toNativeVolumeMonitor. class (GObject o, IsDescendantOf NativeVolumeMonitor o) => IsNativeVolumeMonitor o -- | Cast to NativeVolumeMonitor, for types for which this is known -- to be safe. For general casts, use castTo. 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.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 struct sockaddr of a type not -- otherwise handled by GLib. -- -- Since: 2.46 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 -- NativeSocketAddress, for instance with -- toNativeSocketAddress. class (GObject o, IsDescendantOf NativeSocketAddress o) => IsNativeSocketAddress o -- | Cast to NativeSocketAddress, for types for which this is known -- to be safe. For general casts, use castTo. toNativeSocketAddress :: (MonadIO m, IsNativeSocketAddress o) => o -> m NativeSocketAddress -- | Creates a new NativeSocketAddress for native -- and len. -- -- Since: 2.46 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.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 -- | GMemoryOutputStream is a class for using arbitrary memory -- chunks as output for GIO streaming output operations. -- -- As of GLib 2.34, GMemoryOutputStream trivially implements -- PollableOutputStream: 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 -- MemoryOutputStream, for instance with -- toMemoryOutputStream. class (GObject o, IsDescendantOf MemoryOutputStream o) => IsMemoryOutputStream o -- | Cast to MemoryOutputStream, for types for which this is known -- to be safe. For general casts, use castTo. toMemoryOutputStream :: (MonadIO m, IsMemoryOutputStream o) => o -> m MemoryOutputStream -- | Gets any loaded data from the ostream. -- -- 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. -- -- Since: 2.18 memoryOutputStreamGetDataSize :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m CSize -- | Gets the size of the currently allocated data area (available from -- memoryOutputStreamGetData). -- -- You probably don't want to use this function on resizable streams. See -- memoryOutputStreamGetDataSize 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 -- g_memory_output_stream_new()) then this is the maximum -- size of the stream and further writes will return -- IOErrorEnumNoSpace. -- -- In any case, if you want the number of bytes currently written to the -- stream, use memoryOutputStreamGetDataSize. memoryOutputStreamGetSize :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m CSize -- | Creates a new MemoryOutputStream, using realloc and -- free for memory allocation. -- -- Since: 2.36 memoryOutputStreamNewResizable :: (HasCallStack, MonadIO m) => m MemoryOutputStream -- | Returns data from the ostream as a Bytes. -- ostream must be closed before calling this function. -- -- Since: 2.34 memoryOutputStreamStealAsBytes :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m Bytes -- | Gets any loaded data from the ostream. Ownership of -- the data is transferred to the caller; when no longer needed it must -- be freed using the free function set in ostream's -- MemoryOutputStream:destroy-function property. -- -- ostream must be closed before calling this function. -- -- Since: 2.26 memoryOutputStreamStealData :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m (Ptr ()) -- | Construct a GValueConstruct with valid value for the -- “data” property. This is rarely needed directly, but it is -- used by new. constructMemoryOutputStreamData :: (IsMemoryOutputStream o, MonadIO m) => Ptr () -> m (GValueConstruct o) -- | Get the value of the “data” property. When overloading -- is enabled, this is equivalent to -- --
-- get memoryOutputStream #data --getMemoryOutputStreamData :: (MonadIO m, IsMemoryOutputStream o) => o -> m (Ptr ()) -- | Get the value of the “data-size” property. When -- overloading is enabled, this is equivalent to -- --
-- get memoryOutputStream #dataSize --getMemoryOutputStreamDataSize :: (MonadIO m, IsMemoryOutputStream o) => o -> m CULong -- | Construct a GValueConstruct with valid value for the -- “size” property. This is rarely needed directly, but it is -- used by new. constructMemoryOutputStreamSize :: (IsMemoryOutputStream o, MonadIO m) => CULong -> m (GValueConstruct o) -- | Get the value of the “size” property. When overloading -- is enabled, this is equivalent to -- --
-- get memoryOutputStream #size --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.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 -- | GMemoryInputStream is a class for using arbitrary memory -- chunks as input for GIO streaming input operations. -- -- As of GLib 2.34, GMemoryInputStream implements -- PollableInputStream. 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 -- MemoryInputStream, for instance with -- toMemoryInputStream. class (GObject o, IsDescendantOf MemoryInputStream o) => IsMemoryInputStream o -- | Cast to MemoryInputStream, for types for which this is known to -- be safe. For general casts, use castTo. toMemoryInputStream :: (MonadIO m, IsMemoryInputStream o) => o -> m MemoryInputStream -- | Appends bytes to data that can be read from the input -- stream. -- -- Since: 2.34 memoryInputStreamAddBytes :: (HasCallStack, MonadIO m, IsMemoryInputStream a) => a -> Bytes -> m () -- | Appends data 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 MemoryInputStream. memoryInputStreamNew :: (HasCallStack, MonadIO m) => m MemoryInputStream -- | Creates a new MemoryInputStream with data from the given -- bytes. -- -- Since: 2.34 memoryInputStreamNewFromBytes :: (HasCallStack, MonadIO m) => Bytes -> m MemoryInputStream -- | Creates a new MemoryInputStream 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.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 -- | GInputStream is a base class for implementing streaming -- input. -- -- It has functions to read from a stream (inputStreamRead), to -- close a stream (inputStreamClose) and to skip some content -- (inputStreamSkip). -- -- To copy the content of an input stream to an output stream without -- manually handling the reads and writes, use outputStreamSplice. -- -- See the documentation for IOStream 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 InputStream, -- for instance with toInputStream. class (GObject o, IsDescendantOf InputStream o) => IsInputStream o -- | Cast to InputStream, for types for which this is known to be -- safe. For general casts, use castTo. toInputStream :: (MonadIO m, IsInputStream o) => o -> m InputStream -- | Clears the pending flag on stream. 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 -- IOErrorEnumClosed. 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 IOErrorEnumClosed for all -- operations. Still, it is important to check and report the error to -- the user. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 callback -- will be called. You can then call inputStreamCloseFinish to get -- the result of the operation. -- -- For behaviour details see inputStreamClose. -- -- 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 -- inputStreamCloseAsync. 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 count bytes from the stream into the -- buffer starting at buffer. Will block during this -- read. -- -- If count is zero returns zero and does nothing. A value of -- count larger than G_MAXSSIZE will -- cause a IOErrorEnumInvalidArgument error. -- -- On success, the number of bytes read into the buffer is returned. It -- is not an error if this is not the same as the requested size, as it -- can happen e.g. near the end of a file. Zero is returned on end of -- file (or if count is zero), but never otherwise. -- -- The returned buffer is not a nul-terminated string, it -- can contain nul bytes at any position, and this function doesn't -- nul-terminate the buffer. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. If an operation was -- partially finished when the operation was cancelled the partial result -- will be returned, without an error. -- -- On error -1 is returned and error is set accordingly. inputStreamRead :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m (Int64, ByteString) -- | Tries to read count bytes from the stream into the -- buffer starting at buffer. Will block during this -- read. -- -- This function is similar to inputStreamRead, except it tries to -- read as many bytes as requested, only stopping on an error or end of -- stream. -- -- On a successful read of count bytes, or if we reached -- the end of the stream, True is returned, and -- bytesRead is set to the number of bytes read into -- buffer. -- -- If there is an error during the operation False is returned and -- error is set to indicate the error status. -- -- As a special exception to the normal conventions for functions that -- use GError, if this function returns False (and sets -- error) then bytesRead 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 -- inputStreamRead. inputStreamReadAll :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m (ByteString, CSize) -- | Request an asynchronous read of count bytes from the -- stream into the buffer starting at buffer. -- -- This is the asynchronous equivalent of inputStreamReadAll. -- -- Call inputStreamReadAllFinish 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 PRIORITY_DEFAULT. -- -- Since: 2.44 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 -- inputStreamReadAllAsync. -- -- As a special exception to the normal conventions for functions that -- use GError, if this function returns False (and sets -- error) then bytesRead 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 -- inputStreamReadAsync. -- -- Since: 2.44 inputStreamReadAllFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m CSize -- | Request an asynchronous read of count bytes from the -- stream into the buffer starting at buffer. When the -- operation is finished callback will be called. You can -- then call inputStreamReadFinish to get the result of the -- operation. -- -- During an async request no other sync and async calls are allowed on -- stream, and will result in IOErrorEnumPending -- errors. -- -- A value of count larger than -- G_MAXSSIZE will cause a -- IOErrorEnumInvalidArgument error. -- -- On success, the number of bytes read into the buffer will be passed to -- the callback. It is not an error if this is not the same as the -- requested size, as it can happen e.g. near the end of a file, but -- generally we try to read as many bytes as requested. Zero is returned -- on end of file (or if count is zero), but never -- otherwise. -- -- Any outstanding i/o request with higher priority (lower numerical -- value) will be executed before an outstanding request with lower -- priority. Default priority is PRIORITY_DEFAULT. -- -- The asynchronous methods have a default fallback that uses threads to -- implement asynchronicity, so they are optional for inheriting classes. -- However, if you override one you must override all. inputStreamReadAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m (Maybe ByteString) -- | Like inputStreamRead, this tries to read count -- bytes from the stream in a blocking fashion. However, rather than -- reading into a user-supplied buffer, this will create a new -- Bytes containing the data that was read. This may be easier to -- use from language bindings. -- -- If count is zero, returns a zero-length Bytes and does nothing. -- A value of count larger than -- G_MAXSSIZE will cause a -- IOErrorEnumInvalidArgument error. -- -- On success, a new Bytes 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 Bytes is -- returned on end of file (or if count is zero), but -- never otherwise. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 Nothing is returned and error is set -- accordingly. -- -- Since: 2.34 inputStreamReadBytes :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Maybe b -> m Bytes -- | Request an asynchronous read of count bytes from the -- stream into a new Bytes. When the operation is finished -- callback will be called. You can then call -- inputStreamReadBytesFinish to get the result of the operation. -- -- During an async request no other sync and async calls are allowed on -- stream, and will result in IOErrorEnumPending -- errors. -- -- A value of count larger than -- G_MAXSSIZE will cause a -- IOErrorEnumInvalidArgument error. -- -- On success, the new Bytes will be passed to the callback. It is -- not an error if this is smaller than the requested size, as it can -- happen e.g. near the end of a file, but generally we try to read as -- many bytes as requested. Zero is returned on end of file (or if -- count is zero), but never otherwise. -- -- Any outstanding I/O request with higher priority (lower numerical -- value) will be executed before an outstanding request with lower -- priority. Default priority is PRIORITY_DEFAULT. -- -- Since: 2.34 inputStreamReadBytesAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous stream read-into-tBytes operation. -- -- Since: 2.34 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 stream to have actions pending. If the pending -- flag is already set or stream is closed, it will -- return False and set error. inputStreamSetPending :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m () -- | Tries to skip count bytes from the stream. Will block -- during the operation. -- -- This is identical to inputStreamRead, from a behaviour -- standpoint, but the bytes that are skipped are not returned to the -- user. Some streams have an implementation that is more efficient than -- reading the data. -- -- This function is optional for inherited classes, as the default -- implementation emulates it using read. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 count bytes from the -- stream. When the operation is finished callback will -- be called. You can then call inputStreamSkipFinish to get the -- result of the operation. -- -- During an async request no other sync and async calls are allowed, and -- will result in IOErrorEnumPending errors. -- -- A value of count larger than -- G_MAXSSIZE will cause a -- IOErrorEnumInvalidArgument error. -- -- On success, the number of bytes skipped will be passed to the -- callback. It is not an error if this is not the same as the requested -- size, as it can happen e.g. near the end of a file, but generally we -- try to skip as many bytes as requested. Zero is returned on end of -- file (or if count is zero), but never otherwise. -- -- Any outstanding i/o request with higher priority (lower numerical -- value) will be executed before an outstanding request with lower -- priority. Default priority is PRIORITY_DEFAULT. -- -- The asynchronous methods have a default fallback that uses threads to -- implement asynchronicity, so they are optional for inheriting classes. -- However, if you override one, you must override all. 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.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 -- InetAddress and a port number. -- -- In UNIX terms, GInetSocketAddress corresponds to a `struct -- sockaddr_in` or `struct sockaddr_in6`). 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 -- InetSocketAddress, for instance with -- toInetSocketAddress. class (GObject o, IsDescendantOf InetSocketAddress o) => IsInetSocketAddress o -- | Cast to InetSocketAddress, for types for which this is known to -- be safe. For general casts, use castTo. toInetSocketAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetSocketAddress -- | Gets address's InetAddress. -- -- Since: 2.22 inetSocketAddressGetAddress :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m InetAddress -- | Gets the sin6_flowinfo field from address, -- which must be an IPv6 address. -- -- Since: 2.32 inetSocketAddressGetFlowinfo :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32 -- | Gets address's port. -- -- Since: 2.22 inetSocketAddressGetPort :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word16 -- | Gets the sin6_scope_id field from address, -- which must be an IPv6 address. -- -- Since: 2.32 inetSocketAddressGetScopeId :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32 -- | Creates a new InetSocketAddress for address and -- port. -- -- Since: 2.22 inetSocketAddressNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word16 -> m InetSocketAddress -- | Creates a new InetSocketAddress for address and -- port. -- -- If address is an IPv6 address, it can also contain a -- scope ID (separated from the address by a %). -- -- Since: 2.40 inetSocketAddressNewFromString :: (HasCallStack, MonadIO m) => Text -> Word32 -> m (Maybe InetSocketAddress) -- | Construct a GValueConstruct with valid value for the -- “address” property. This is rarely needed directly, but it is -- used by new. constructInetSocketAddressAddress :: (IsInetSocketAddress o, MonadIO m, IsInetAddress a) => a -> m (GValueConstruct o) -- | Get the value of the “address” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetSocketAddress #address --getInetSocketAddressAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetAddress -- | Construct a GValueConstruct with valid value for the -- “flowinfo” property. This is rarely needed directly, but it -- is used by new. constructInetSocketAddressFlowinfo :: (IsInetSocketAddress o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “flowinfo” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetSocketAddress #flowinfo --getInetSocketAddressFlowinfo :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32 -- | Construct a GValueConstruct with valid value for the -- “port” property. This is rarely needed directly, but it is -- used by new. constructInetSocketAddressPort :: (IsInetSocketAddress o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “port” property. When overloading -- is enabled, this is equivalent to -- --
-- get inetSocketAddress #port --getInetSocketAddressPort :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32 -- | Construct a GValueConstruct with valid value for the -- “scope-id” property. This is rarely needed directly, but it -- is used by new. constructInetSocketAddressScopeId :: (IsInetSocketAddress o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “scope-id” property. When -- overloading is enabled, this is equivalent to -- --
-- get inetSocketAddress #scopeId --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.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 -- | GIOStream 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 GIOStream objects are SocketConnection, -- which represents a two-way network connection; and -- FileIOStream, which represents a file handle opened in -- read-write mode. -- -- To do the actual reading and writing you need to get the substreams -- with iOStreamGetInputStream and iOStreamGetOutputStream. -- -- The GIOStream object owns the input and the output streams, -- not the other way around, so keeping the substreams alive will not -- keep the GIOStream object alive. If the GIOStream -- object is freed it will be closed, thus closing the substreams, so -- even if the substreams stay alive they will always return -- G_IO_ERROR_CLOSED for all operations. -- -- To close a stream use iOStreamClose 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 -- GIOStream may still be open. However, some streams may -- support ‘half-closed’ states where one direction of the stream is -- actually shut down. -- -- Operations on GIOStreams cannot be started while another -- operation on the GIOStream or its substreams is in progress. -- Specifically, an application can read from the InputStream and -- write to the OutputStream simultaneously (either in separate -- threads, or as asynchronous operations in the same thread), but an -- application cannot start any GIOStream operation while there -- is a GIOStream, GInputStream or -- GOutputStream operation in progress, and an application can’t -- start any GInputStream or GOutputStream operation -- while there is a GIOStream operation in progress. -- -- This is a product of individual stream operations being associated -- with a given [typegLib.MainContext] (the -- thread-default context at the time the operation was started), rather -- than entire streams being associated with a single -- GMainContext. -- -- GIO may run operations on GIOStreams from other (worker) -- threads, and this may be exposed to application code in the behaviour -- of wrapper streams, such as BufferedInputStream or -- TlsConnection. 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). -- -- Since: 2.22 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 IOStream, for -- instance with toIOStream. class (GObject o, IsDescendantOf IOStream o) => IsIOStream o -- | Cast to IOStream, for types for which this is known to be safe. -- For general casts, use castTo. toIOStream :: (MonadIO m, IsIOStream o) => o -> m IOStream -- | Clears the pending flag on stream. -- -- Since: 2.22 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 -- IOErrorEnumClosed. 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 IOErrorEnumClosed for all -- operations. Still, it is important to check and report the error to -- the user, otherwise there might be a loss of data as all data might -- not be written. -- -- If cancellable is not NULL, then the operation can be -- cancelled by triggering the cancellable object from another thread. If -- the operation was cancelled, the error IOErrorEnumCancelled -- 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. -- -- Since: 2.22 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 callback -- will be called. You can then call iOStreamCloseFinish to get -- the result of the operation. -- -- For behaviour details see iOStreamClose. -- -- The asynchronous methods have a default fallback that uses threads to -- implement asynchronicity, so they are optional for inheriting classes. -- However, if you override one you must override all. -- -- Since: 2.22 iOStreamCloseAsync :: (HasCallStack, MonadIO m, IsIOStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Closes a stream. -- -- Since: 2.22 iOStreamCloseFinish :: (HasCallStack, MonadIO m, IsIOStream a, IsAsyncResult b) => a -> b -> m () -- | Gets the input stream for this object. This is used for reading. -- -- Since: 2.22 iOStreamGetInputStream :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m InputStream -- | Gets the output stream for this object. This is used for writing. -- -- Since: 2.22 iOStreamGetOutputStream :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m OutputStream -- | Checks if a stream has pending actions. -- -- Since: 2.22 iOStreamHasPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m Bool -- | Checks if a stream is closed. -- -- Since: 2.22 iOStreamIsClosed :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m Bool -- | Sets stream to have actions pending. If the pending -- flag is already set or stream is closed, it will -- return False and set error. -- -- Since: 2.22 iOStreamSetPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m () -- | Asynchronously splice the output stream of stream1 to -- the input stream of stream2, and splice the output -- stream of stream2 to the input stream of -- stream1. -- -- When the operation is finished callback will be -- called. You can then call iOStreamSpliceFinish to get the -- result of the operation. -- -- Since: 2.28 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. -- -- Since: 2.28 iOStreamSpliceFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m () -- | Get the value of the “closed” property. When -- overloading is enabled, this is equivalent to -- --
-- get iOStream #closed --getIOStreamClosed :: (MonadIO m, IsIOStream o) => o -> m Bool -- | Get the value of the “input-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get iOStream #inputStream --getIOStreamInputStream :: (MonadIO m, IsIOStream o) => o -> m InputStream -- | Get the value of the “output-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get iOStream #outputStream --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.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 -- FilterOutputStream, for instance with -- toFilterOutputStream. class (GObject o, IsDescendantOf FilterOutputStream o) => IsFilterOutputStream o -- | Cast to FilterOutputStream, for types for which this is known -- to be safe. For general casts, use castTo. 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 -- stream is closed. filterOutputStreamGetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterOutputStream a) => a -> m Bool -- | Sets whether the base stream will be closed when -- stream is closed. filterOutputStreamSetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterOutputStream a) => a -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “base-stream” property. This is rarely needed directly, but -- it is used by new. constructFilterOutputStreamBaseStream :: (IsFilterOutputStream o, MonadIO m, IsOutputStream a) => a -> m (GValueConstruct o) -- | Get the value of the “base-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get filterOutputStream #baseStream --getFilterOutputStreamBaseStream :: (MonadIO m, IsFilterOutputStream o) => o -> m OutputStream -- | Construct a GValueConstruct with valid value for the -- “close-base-stream” property. This is rarely needed directly, -- but it is used by new. constructFilterOutputStreamCloseBaseStream :: (IsFilterOutputStream o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “close-base-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get filterOutputStream #closeBaseStream --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.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 -- FilterInputStream, for instance with -- toFilterInputStream. class (GObject o, IsDescendantOf FilterInputStream o) => IsFilterInputStream o -- | Cast to FilterInputStream, for types for which this is known to -- be safe. For general casts, use castTo. 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 -- stream is closed. filterInputStreamGetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> m Bool -- | Sets whether the base stream will be closed when -- stream is closed. filterInputStreamSetCloseBaseStream :: (HasCallStack, MonadIO m, IsFilterInputStream a) => a -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “base-stream” property. This is rarely needed directly, but -- it is used by new. constructFilterInputStreamBaseStream :: (IsFilterInputStream o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o) -- | Get the value of the “base-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get filterInputStream #baseStream --getFilterInputStreamBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m InputStream -- | Construct a GValueConstruct with valid value for the -- “close-base-stream” property. This is rarely needed directly, -- but it is used by new. constructFilterInputStreamCloseBaseStream :: (IsFilterInputStream o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “close-base-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get filterInputStream #closeBaseStream --getFilterInputStreamCloseBaseStream :: (MonadIO m, IsFilterInputStream o) => o -> m Bool -- | Set the value of the “close-base-stream” property. When -- overloading is enabled, this is equivalent to -- --
-- set filterInputStream [ #closeBaseStream := value ] --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.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 -- | GFileOutputStream provides output streams that write their -- content to a file. -- -- GFileOutputStream implements Seekable, 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 seekableTell. -- To find out if a file output stream supports seeking, use -- seekableCanSeek.To position a file output stream, use -- seekableSeek. To find out if a file output stream supports -- truncating, use seekableCanTruncate. To truncate a file output -- stream, use seekableTruncate. 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 -- FileOutputStream, for instance with toFileOutputStream. class (GObject o, IsDescendantOf FileOutputStream o) => IsFileOutputStream o -- | Cast to FileOutputStream, for types for which this is known to -- be safe. For general casts, use castTo. 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 attributes. -- This function blocks while querying the stream. For the asynchronous -- version of this function, see fileOutputStreamQueryInfoAsync. -- While the stream is blocked, the stream will set the pending flag -- internally, and any other operations on the stream will fail with -- IOErrorEnumPending. -- -- Can fail if the stream was already closed (with error -- being set to IOErrorEnumClosed), the stream has pending -- operations (with error being set to -- IOErrorEnumPending), or if querying info is not supported for -- the stream's interface (with error being set to -- IOErrorEnumNotSupported). In all cases of failure, -- Nothing will be returned. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be set, and Nothing will be -- returned. fileOutputStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileOutputStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo -- | Asynchronously queries the stream for a -- FileInfo. When completed, callback will be -- called with a AsyncResult which can be used to finish the -- operation with fileOutputStreamQueryInfoFinish. -- -- For the synchronous version of this function, see -- fileOutputStreamQueryInfo. fileOutputStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileOutputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finalizes the asynchronous query started by -- fileOutputStreamQueryInfoAsync. 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.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 GFileMonitor for a file or directory, use -- fileMonitor, fileMonitorFile, or -- fileMonitorDirectory. -- -- To get informed about changes to the file or directory you are -- monitoring, connect to the FileMonitor::changed signal. The -- signal will be emitted in the thread-default main context (see -- mainContextPushThreadDefault) 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 FileMonitor, -- for instance with toFileMonitor. class (GObject o, IsDescendantOf FileMonitor o) => IsFileMonitor o -- | Cast to FileMonitor, for types for which this is known to be -- safe. For general casts, use castTo. toFileMonitor :: (MonadIO m, IsFileMonitor o) => o -> m FileMonitor -- | Cancels a file monitor. fileMonitorCancel :: (HasCallStack, MonadIO m, IsFileMonitor a) => a -> m Bool -- | Emits the FileMonitor::changed 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][g-main-context-push-thread-default] of -- the thread that the monitor was created in. fileMonitorEmitEvent :: (HasCallStack, MonadIO m, IsFileMonitor a, IsFile b, IsFile c) => a -> b -> 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 monitor will report -- consecutive change events to the same file. fileMonitorSetRateLimit :: (HasCallStack, MonadIO m, IsFileMonitor a) => a -> Int32 -> m () -- | Get the value of the “cancelled” property. When -- overloading is enabled, this is equivalent to -- --
-- get fileMonitor #cancelled --getFileMonitorCancelled :: (MonadIO m, IsFileMonitor o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “rate-limit” property. This is rarely needed directly, but it -- is used by new. constructFileMonitorRateLimit :: (IsFileMonitor o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “rate-limit” property. When -- overloading is enabled, this is equivalent to -- --
-- get fileMonitor #rateLimit --getFileMonitorRateLimit :: (MonadIO m, IsFileMonitor o) => o -> m Int32 -- | Set the value of the “rate-limit” property. When -- overloading is enabled, this is equivalent to -- --
-- set fileMonitor [ #rateLimit := value ] --setFileMonitorRateLimit :: (MonadIO m, IsFileMonitor o) => o -> Int32 -> m () -- | Emitted when file has been changed. -- -- If using FileMonitorFlagsWatchMoves on a directory monitor, and -- the information is available (and if supported by the backend), -- eventType may be FileMonitorEventRenamed, -- FileMonitorEventMovedIn or FileMonitorEventMovedOut. -- -- In all cases file will be a child of the monitored -- directory. For renames, file will be the old name and -- otherFile is the new name. For "moved in" events, -- file is the name of the file that appeared and -- otherFile is the old name that it was moved from (in -- another directory). For "moved out" events, file is -- the name of the file that used to be in this directory and -- otherFile is the name of the file at its new location. -- -- It makes sense to treat FileMonitorEventMovedIn as equivalent -- to FileMonitorEventCreated and FileMonitorEventMovedOut -- as equivalent to FileMonitorEventDeleted, with extra -- information. FileMonitorEventRenamed is equivalent to a -- delete/create pair. This is exactly how the events will be reported in -- the case that the FileMonitorFlagsWatchMoves flag is not in -- use. -- -- If using the deprecated flag FileMonitorFlagsSendMoved flag and -- eventType is FileMonitorEventMoved, -- file will be set to a File containing the old -- path, and otherFile will be set to a File -- containing the new path. -- -- In all the other cases, otherFile will be set to -- NULL. type FileMonitorChangedCallback = File -> Maybe File -> FileMonitorEvent -> IO () -- | Connect a signal handler for the changed signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after fileMonitor #changed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterFileMonitorChanged :: (IsFileMonitor a, MonadIO m) => a -> ((?self :: a) => FileMonitorChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the changed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on fileMonitor #changed callback --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.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 -- | GFileInputStream provides input streams that take their -- content from a file. -- -- GFileInputStream implements Seekable, 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 seekableTell. To find out if a file input stream -- supports seeking, use Seekable.can_seek(). To -- position a file input stream, use -- Seekable.seek(). 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 -- FileInputStream, for instance with toFileInputStream. class (GObject o, IsDescendantOf FileInputStream o) => IsFileInputStream o -- | Cast to FileInputStream, for types for which this is known to -- be safe. For general casts, use castTo. toFileInputStream :: (MonadIO m, IsFileInputStream o) => o -> m FileInputStream -- | Queries a file input stream the given attributes. This -- function blocks while querying the stream. For the asynchronous -- (non-blocking) version of this function, see -- fileInputStreamQueryInfoAsync. While the stream is blocked, the -- stream will set the pending flag internally, and any other operations -- on the stream will fail with IOErrorEnumPending. fileInputStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileInputStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo -- | Queries the stream information asynchronously. When the operation is -- finished callback will be called. You can then call -- fileInputStreamQueryInfoFinish to get the result of the -- operation. -- -- For the synchronous version of this function, see -- fileInputStreamQueryInfo. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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.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 -- | GFileIcon specifies an icon by pointing to an image file to -- be used as icon. -- -- It implements LoadableIcon. 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 FileIcon, for -- instance with toFileIcon. class (GObject o, IsDescendantOf FileIcon o) => IsFileIcon o -- | Cast to FileIcon, for types for which this is known to be safe. -- For general casts, use castTo. toFileIcon :: (MonadIO m, IsFileIcon o) => o -> m FileIcon -- | Gets the File associated with the given icon. 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 GValueConstruct with valid value for the -- “file” property. This is rarely needed directly, but it is -- used by new. constructFileIconFile :: (IsFileIcon o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) -- | Get the value of the “file” property. When overloading -- is enabled, this is equivalent to -- --
-- get fileIcon #file --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.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 -- | GFileIOStream provides I/O streams that both read and write -- to the same file handle. -- -- GFileIOStream implements Seekable, 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 seekableTell. -- -- To find out if a file I/O stream supports seeking, use -- seekableCanSeek. To position a file I/O stream, use -- seekableSeek. To find out if a file I/O stream supports -- truncating, use seekableCanTruncate. To truncate a file I/O -- stream, use seekableTruncate. -- -- The default implementation of all the GFileIOStream -- operations and the implementation of Seekable just call into -- the same operations on the output stream. -- -- Since: 2.22 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 FileIOStream, -- for instance with toFileIOStream. class (GObject o, IsDescendantOf FileIOStream o) => IsFileIOStream o -- | Cast to FileIOStream, for types for which this is known to be -- safe. For general casts, use castTo. 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. -- -- Since: 2.22 fileIOStreamGetEtag :: (HasCallStack, MonadIO m, IsFileIOStream a) => a -> m (Maybe Text) -- | Queries a file io stream for the given attributes. -- This function blocks while querying the stream. For the asynchronous -- version of this function, see fileIOStreamQueryInfoAsync. While -- the stream is blocked, the stream will set the pending flag -- internally, and any other operations on the stream will fail with -- IOErrorEnumPending. -- -- Can fail if the stream was already closed (with error -- being set to IOErrorEnumClosed), the stream has pending -- operations (with error being set to -- IOErrorEnumPending), or if querying info is not supported for -- the stream's interface (with error being set to -- IOErrorEnumNotSupported). I all cases of failure, -- Nothing will be returned. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be set, and Nothing will be -- returned. -- -- Since: 2.22 fileIOStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileIOStream a, IsCancellable b) => a -> Text -> Maybe b -> m FileInfo -- | Asynchronously queries the stream for a -- FileInfo. When completed, callback will be -- called with a AsyncResult which can be used to finish the -- operation with fileIOStreamQueryInfoFinish. -- -- For the synchronous version of this function, see -- fileIOStreamQueryInfo. -- -- Since: 2.22 fileIOStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileIOStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finalizes the asynchronous query started by -- fileIOStreamQueryInfoAsync. -- -- Since: 2.22 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.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 -- | GFileEnumerator allows you to operate on a set of File -- objects, returning a FileInfo structure for each file -- enumerated (e.g. fileEnumerateChildren will return a -- GFileEnumerator for each of the children within a directory). -- -- To get the next file's information from a GFileEnumerator, -- use fileEnumeratorNextFile or its asynchronous version, -- fileEnumeratorNextFilesAsync. Note that the asynchronous -- version will return a list of FileInfo 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 dirReadName. 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 GFileEnumerator, use fileEnumeratorClose, -- or its asynchronous version, fileEnumeratorCloseAsync. Once a -- GFileEnumerator is closed, no further actions may be -- performed on it, and it should be freed with objectUnref. 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 -- FileEnumerator, for instance with toFileEnumerator. class (GObject o, IsDescendantOf FileEnumerator o) => IsFileEnumerator o -- | Cast to FileEnumerator, for types for which this is known to be -- safe. For general casts, use castTo. toFileEnumerator :: (MonadIO m, IsFileEnumerator o) => o -> m FileEnumerator -- | Releases all resources used by this enumerator, making the enumerator -- return IOErrorEnumClosed 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned in -- fileEnumeratorCloseFinish. fileEnumeratorCloseAsync :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes closing a file enumerator, started from -- fileEnumeratorCloseAsync. -- -- If the file enumerator was already closed when -- fileEnumeratorCloseAsync was called, then this function will -- report IOErrorEnumClosed in error, and return -- False. If the file enumerator had pending operation when the -- close operation was started, then this function will report -- IOErrorEnumPending, and return False. If -- cancellable was not Nothing, then the operation -- may have been cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be set, and False will be -- returned. fileEnumeratorCloseFinish :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsAsyncResult b) => a -> b -> m () -- | Return a new File which refers to the file named by -- info in the source directory of -- enumerator. This function is primarily intended to be -- used inside loops with fileEnumeratorNextFile. -- -- To use this, FILE_ATTRIBUTE_STANDARD_NAME must have been listed -- in the attributes list used when creating the FileEnumerator. -- -- This is a convenience method that's equivalent to: -- --
-- gchar *name = g_file_info_get_name (info); -- GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr), -- name); ---- -- Since: 2.36 fileEnumeratorGetChild :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsFileInfo b) => a -> b -> m File -- | Get the File container which is being enumerated. -- -- Since: 2.18 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 fileEnumeratorNextFile that's easier to -- use correctly from C programs. With fileEnumeratorNextFile, the -- gboolean return value signifies "end of iteration or error", which -- requires allocation of a temporary GError. -- -- In contrast, with this function, a False return from -- fileEnumeratorIterate *always* means "error". End of iteration -- is signaled by outInfo or outChild -- being Nothing. -- -- Another crucial difference is that the references for -- outInfo and outChild are owned by -- direnum (they are cached as hidden properties). You -- must not unref them in your own code. This makes memory management -- significantly easier for C code in combination with loops. -- -- Finally, this function optionally allows retrieving a File as -- well. -- -- You must specify at least one of outInfo or -- outChild. -- -- The code pattern for correctly using fileEnumeratorIterate from -- C is: -- --
-- direnum = g_file_enumerate_children (file, ...);
-- while (TRUE)
-- {
-- GFileInfo *info;
-- if (!g_file_enumerator_iterate (direnum, &info, NULL, cancellable, error))
-- goto out;
-- if (!info)
-- break;
-- ... do stuff with "info"; do not unref it! ...
-- }
--
-- out:
-- g_object_unref (direnum); // Note: frees the last @info
--
--
-- Since: 2.44
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 FileInfo returned
-- from this function will contain attributes that match the attribute
-- string that was passed when the FileEnumerator was created.
--
-- See the documentation of FileEnumerator for information about
-- the order of returned files.
--
-- On error, returns Nothing and sets error to the
-- error. If the enumerator is at the end, Nothing will be
-- returned and error 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
-- callback will be called with the requested
-- information.
--
-- See the documentation of FileEnumerator for information about
-- the order of returned files.
--
-- Once the end of the enumerator is reached, or if an error occurs, the
-- callback will be called with an empty list. In this
-- case, the previous call to fileEnumeratorNextFilesAsync will
-- typically have returned fewer than numFiles items.
--
-- If a request is cancelled the callback will be called with
-- IOErrorEnumCancelled.
--
-- This leads to the following pseudo-code usage:
--
--
-- 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,
-- …,
-- &local_error);
-- if (enumerator == NULL)
-- g_error ("Error enumerating: %s", local_error->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,
-- …,
-- &local_error);
--
-- // Process the returned files, but don’t assume that exactly 5 were returned.
-- for (GList *l = files; l != NULL; l = l->next)
-- {
-- GFileInfo *info = l->data;
-- handle_file_info (info);
-- }
-- }
-- while (files != NULL);
--
-- if (local_error != NULL &&
-- !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-- g_error ("Error while enumerating: %s", local_error->message);
--
--
-- During an async request no other sync and async calls are allowed, and
-- will result in IOErrorEnumPending 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 PRIORITY_DEFAULT.
fileEnumeratorNextFilesAsync :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Int32 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes the asynchronous operation started with
-- fileEnumeratorNextFilesAsync.
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 GValueConstruct with valid value for the
-- “container” property. This is rarely needed directly, but it
-- is used by new.
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.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
-- | GDesktopAppInfo is an implementation of AppInfo based
-- on desktop files.
--
-- Note that <gio/gdesktopappinfo.h> belongs to the
-- UNIX-specific GIO interfaces, thus you have to use the
-- gio-unix-2.0.pc pkg-config file or the GioUnix-2.0
-- GIR namespace when using it.
module GI.Gio.Objects.DesktopAppInfo
-- | Memory-managed wrapper type.
newtype DesktopAppInfo
DesktopAppInfo :: ManagedPtr DesktopAppInfo -> DesktopAppInfo
-- | Type class for types which can be safely cast to
-- DesktopAppInfo, for instance with toDesktopAppInfo.
class (GObject o, IsDescendantOf DesktopAppInfo o) => IsDesktopAppInfo o
-- | Cast to DesktopAppInfo, for types for which this is known to be
-- safe. For general casts, use castTo.
toDesktopAppInfo :: (MonadIO m, IsDesktopAppInfo o) => o -> m DesktopAppInfo
-- | Gets the user-visible display name of the ‘additional application
-- actions’ specified by actionName.
--
-- This corresponds to the Name key within the keyfile group for
-- the action.
--
-- Since: 2.38
desktopAppInfoGetActionName :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Text
-- | Looks up a boolean value in the keyfile backing info.
--
-- The key is looked up in the Desktop Entry
-- group.
--
-- Since: 2.36
desktopAppInfoGetBoolean :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Bool
-- | Gets the categories from the desktop file.
desktopAppInfoGetCategories :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe Text)
-- | When info was created from a known filename, return
-- it. In some situations such as a DesktopAppInfo returned from
-- desktopAppInfoNewFromKeyfile, this function will return
-- NULL.
--
-- Since: 2.24
desktopAppInfoGetFilename :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe [Char])
-- | Gets the generic name from the desktop file.
desktopAppInfoGetGenericName :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe Text)
-- | Gets all applications that implement interface.
--
-- An application implements an interface if that interface is listed in
-- the Implements line of the desktop file of the application.
--
-- Since: 2.42
desktopAppInfoGetImplementations :: (HasCallStack, MonadIO m) => Text -> m [DesktopAppInfo]
-- | A desktop file is hidden if the `Hidden` key in it is set to
-- True.
desktopAppInfoGetIsHidden :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Bool
-- | Gets the keywords from the desktop file.
--
-- Since: 2.32
desktopAppInfoGetKeywords :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m [Text]
-- | Looks up a localized string value in the keyfile backing
-- info translated to the current locale.
--
-- The key is looked up in the Desktop Entry
-- group.
--
-- Since: 2.56
desktopAppInfoGetLocaleString :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m (Maybe Text)
-- | Gets the value of the `NoDisplay` key which helps determine if
-- the application info should be shown in menus. See
-- G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and
-- appInfoShouldShow.
--
-- Since: 2.30
desktopAppInfoGetNodisplay :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Bool
-- | Checks if the application info should be shown in menus that list
-- available applications for a specific name of the desktop, based on
-- the `OnlyShowIn` and `NotShowIn` keys.
--
-- desktopEnv should typically be given as NULL,
-- in which case the XDG_CURRENT_DESKTOP environment variable is
-- consulted. If you want to override the default mechanism then you may
-- specify desktopEnv, but this is not recommended.
--
-- Note that appInfoShouldShow for info will
-- include this check (with NULL for desktopEnv)
-- as well as additional checks.
--
-- Since: 2.30
desktopAppInfoGetShowIn :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Maybe Text -> m Bool
-- | Retrieves the StartupWMClass field from info.
-- This represents the WM_CLASS property of the main window of
-- the application, if launched through info.
--
-- Since: 2.34
desktopAppInfoGetStartupWmClass :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe Text)
-- | Looks up a string value in the keyfile backing info.
--
-- The key is looked up in the Desktop Entry
-- group.
--
-- Since: 2.36
desktopAppInfoGetString :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m (Maybe Text)
-- | Looks up a string list value in the keyfile backing
-- info.
--
-- The key is looked up in the Desktop Entry
-- group.
--
-- Since: 2.60
desktopAppInfoGetStringList :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m ([Text], CSize)
-- | Returns whether key exists in the Desktop
-- Entry group of the keyfile backing info.
--
-- Since: 2.36
desktopAppInfoHasKey :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Bool
-- | Activates the named application action.
--
-- You may only call this function on action names that were returned
-- from desktopAppInfoListActions.
--
-- Note that if the main entry of the desktop file indicates that the
-- application supports startup notification, and
-- launchContext is non-NULL, then startup
-- notification will be used when activating the action (and as such,
-- invocation of the action on the receiving side must signal the end of
-- startup notification when it is completed). This is the expected
-- behaviour of applications declaring additional actions, as per the
-- desktop file specification.
--
-- As with appInfoLaunch there is no way to detect failures that
-- occur while using this function.
--
-- Since: 2.38
desktopAppInfoLaunchAction :: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => a -> Text -> Maybe b -> m ()
-- | This function performs the equivalent of appInfoLaunchUris, but
-- is intended primarily for operating system components that launch
-- applications. Ordinary applications should use
-- appInfoLaunchUris.
--
-- If the application is launched via GSpawn, then
-- spawnFlags, userSetup and
-- userSetupData are used for the call to
-- spawnAsync. Additionally, pidCallback (with
-- pidCallbackData) will be called to inform about the
-- PID of the created process. See spawnAsyncWithPipes for
-- information on certain parameter conditions that can enable an
-- optimized `posix_spawn()`) code path to be used.
--
-- If application launching occurs via some other mechanism (for example,
-- D-Bus activation) then spawnFlags,
-- userSetup, userSetupData,
-- pidCallback and pidCallbackData are
-- ignored.
desktopAppInfoLaunchUrisAsManager :: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => a -> [Text] -> Maybe b -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Maybe DesktopAppLaunchCallback -> m ()
-- | Equivalent to desktopAppInfoLaunchUrisAsManager but allows you
-- to pass in file descriptors for the stdin, stdout and stderr streams
-- of the launched process.
--
-- If application launching occurs via some non-spawn mechanism (e.g.
-- D-Bus activation) then stdinFd,
-- stdoutFd and stderrFd are ignored.
--
-- Since: 2.58
desktopAppInfoLaunchUrisAsManagerWithFds :: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => a -> [Text] -> Maybe b -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Maybe DesktopAppLaunchCallback -> Int32 -> Int32 -> Int32 -> m ()
-- | Returns the list of ‘additional application actions’ supported
-- on the desktop file, as per the desktop file specification.
--
-- As per the specification, this is the list of actions that are
-- explicitly listed in the Actions key of the Desktop
-- Entry group.
--
-- Since: 2.38
desktopAppInfoListActions :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m [Text]
-- | Creates a new DesktopAppInfo based on a desktop file ID.
--
-- A desktop file ID is the basename of the desktop file, including the
-- .desktop extension. GIO is looking for a desktop file with
-- this name in the applications subdirectories of the XDG data
-- directories (i.e. the directories specified in the
-- XDG_DATA_HOME and XDG_DATA_DIRS environment
-- variables). GIO also supports the prefix-to-subdirectory mapping that
-- is described in the Menu Spec (i.e. a desktop ID of
-- kde-foo.desktop will match
-- /usr/share/applications/kde/foo.desktop).
desktopAppInfoNew :: (HasCallStack, MonadIO m) => Text -> m (Maybe DesktopAppInfo)
-- | Creates a new DesktopAppInfo.
desktopAppInfoNewFromFilename :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe DesktopAppInfo)
-- | Creates a new DesktopAppInfo.
--
-- Since: 2.18
desktopAppInfoNewFromKeyfile :: (HasCallStack, MonadIO m) => KeyFile -> m (Maybe DesktopAppInfo)
-- | Searches desktop files for ones that match
-- searchString.
--
-- The return value is an array of strvs. Each strv contains a list of
-- applications that matched searchString with an equal
-- score. The outer list is sorted by score so that the first strv
-- contains the best-matching applications, and so on. The algorithm for
-- determining matches is undefined and may change at any time.
--
-- None of the search results are subjected to the normal validation
-- checks performed by desktopAppInfoNew (for example, checking
-- that the executable referenced by a result exists), and so it is
-- possible for desktopAppInfoNew to return NULL when
-- passed an app ID returned by this function. It is expected that
-- calling code will do this when subsequently creating a
-- DesktopAppInfo for each result.
desktopAppInfoSearch :: (HasCallStack, MonadIO m) => Text -> m [[Text]]
-- | Sets the name of the desktop that the application is running in.
--
-- This is used by appInfoShouldShow and
-- desktopAppInfoGetShowIn to evaluate the `OnlyShowIn` and
-- `NotShowIn` keys.
--
-- Should be called only once; subsequent calls are ignored.
-- | Deprecated: (Since version 2.42)do not use this API. Since 2.42 the
-- value of theXDG_CURRENT_DESKTOP environment variable will be
-- used.
desktopAppInfoSetDesktopEnv :: (HasCallStack, MonadIO m) => Text -> m ()
-- | Construct a GValueConstruct with valid value for the
-- “filename” property. This is rarely needed directly, but it
-- is used by new.
constructDesktopAppInfoFilename :: (IsDesktopAppInfo o, MonadIO m) => Text -> m (GValueConstruct o)
-- | Get the value of the “filename” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get desktopAppInfo #filename --getDesktopAppInfoFilename :: (MonadIO m, IsDesktopAppInfo o) => o -> m (Maybe Text) instance GHC.Classes.Eq GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo o) => GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo o instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo) instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo -- | GDebugControllerDBus is an implementation of -- DebugController which exposes debug settings as a D-Bus object. -- -- It is a Initable object, and will register an object at -- /org/gtk/Debugging on the bus given as -- DebugControllerDBus:connection once it’s initialized. The -- object will be unregistered when the last reference to the -- GDebugControllerDBus is dropped. -- -- This D-Bus object can be used by remote processes to enable or disable -- debug output in this process. Remote processes calling -- org.gtk.Debugging.SetDebugEnabled() will affect the value of -- DebugController:debugEnabled and, by default, -- logGetDebugEnabled. -- -- By default, no processes are allowed to call -- SetDebugEnabled() unless a -- DebugControllerDBus::authorize 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 SetDebugEnabled(), installing something like the -- following in $datadir/dbus-1/system.d/: -- --
-- <?xml version="1.0"?> <!--*-nxml-*--> -- <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" -- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> -- <busconfig> -- <policy user="root"> -- <allow send_destination="com.example.MyService" send_interface="org.gtk.Debugging"/> -- </policy> -- <policy context="default"> -- <deny send_destination="com.example.MyService" send_interface="org.gtk.Debugging"/> -- </policy> -- </busconfig> ---- -- This will prevent the SetDebugEnabled() method from being -- called by all except root. It will not prevent the -- DebugEnabled property from being read, as it’s accessed -- through the org.freedesktop.DBus.Properties 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 -- DebugControllerDBus::authorize signal and query polkit in it: -- --
-- 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->connection, NULL, &child_error));
-- if (debug_controller == NULL)
-- {
-- g_error ("Could not register debug controller on bus: %s"),
-- child_error->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, &local_error);
-- if (authority == NULL)
-- {
-- g_warning ("Failed to get polkit authority: %s", local_error->message);
-- return FALSE;
-- }
--
-- if (message_flags & 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,
-- &local_error);
-- if (auth_result == NULL)
-- {
-- g_warning ("Failed to get check polkit authorization: %s", local_error->message);
-- return FALSE;
-- }
--
-- return polkit_authorization_result_get_is_authorized (auth_result);
-- }
--
--
-- Since: 2.72
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
-- DebugControllerDBus, for instance with
-- toDebugControllerDBus.
class (GObject o, IsDescendantOf DebugControllerDBus o) => IsDebugControllerDBus o
-- | Cast to DebugControllerDBus, for types for which this is known
-- to be safe. For general casts, use castTo.
toDebugControllerDBus :: (MonadIO m, IsDebugControllerDBus o) => o -> m DebugControllerDBus
-- | Create a new DebugControllerDBus and synchronously initialize
-- it.
--
-- Initializing the object will export the debug object on
-- connection. The object will remain registered until
-- the last reference to the DebugControllerDBus is dropped.
--
-- Initialization may fail if registering the object on
-- connection fails.
--
-- Since: 2.72
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 DebugControllerDBus::authorize signals have been
-- handled. This is expected to not take long, as it will just be waiting
-- for threads to join. If any DebugControllerDBus::authorize
-- 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 DebugControllerDBus 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
-- DebugControllerDBus::authorize signal handler will cause a
-- deadlock and must not be done.
--
-- Since: 2.72
debugControllerDBusStop :: (HasCallStack, MonadIO m, IsDebugControllerDBus a) => a -> m ()
-- | Construct a GValueConstruct with valid value for the
-- “connection” property. This is rarely needed directly, but it
-- is used by new.
constructDebugControllerDBusConnection :: (IsDebugControllerDBus o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o)
-- | Get the value of the “connection” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get debugControllerDBus #connection --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 -- polkit_authority_check_authorization_sync() to check -- authorization using polkit. -- -- If False is returned then no further handlers are run and the -- request to change the debug settings is rejected. -- -- Otherwise, if True is returned, signal emission continues. If -- no handlers return False, then the debug settings are allowed -- to be changed. -- -- Signal handlers must not modify invocation, or cause -- it to return a value. -- -- The default class handler just returns True. -- -- Since: 2.72 type DebugControllerDBusAuthorizeCallback = DBusMethodInvocation -> IO Bool -- | Connect a signal handler for the authorize signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after debugControllerDBus #authorize callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDebugControllerDBusAuthorize :: (IsDebugControllerDBus a, MonadIO m) => a -> ((?self :: a) => DebugControllerDBusAuthorizeCallback) -> m SignalHandlerId -- | Connect a signal handler for the authorize signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on debugControllerDBus #authorize callback --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.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 OutputStream 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 -- DataOutputStream, for instance with toDataOutputStream. class (GObject o, IsDescendantOf DataOutputStream o) => IsDataOutputStream o -- | Cast to DataOutputStream, for types for which this is known to -- be safe. For general casts, use castTo. 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 baseStream. 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 -- order. dataOutputStreamSetByteOrder :: (HasCallStack, MonadIO m, IsDataOutputStream a) => a -> DataStreamByteOrder -> m () -- | Construct a GValueConstruct with valid value for the -- “byte-order” property. This is rarely needed directly, but it -- is used by new. constructDataOutputStreamByteOrder :: (IsDataOutputStream o, MonadIO m) => DataStreamByteOrder -> m (GValueConstruct o) -- | Get the value of the “byte-order” property. When -- overloading is enabled, this is equivalent to -- --
-- get dataOutputStream #byteOrder --getDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> m DataStreamByteOrder -- | Set the value of the “byte-order” property. When -- overloading is enabled, this is equivalent to -- --
-- set dataOutputStream [ #byteOrder := value ] --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.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 InputStream 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 -- DataInputStream, for instance with toDataInputStream. class (GObject o, IsDescendantOf DataInputStream o) => IsDataInputStream o -- | Cast to DataInputStream, for types for which this is known to -- be safe. For general casts, use castTo. 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 stream. dataInputStreamGetNewlineType :: (HasCallStack, MonadIO m, IsDataInputStream a) => a -> m DataStreamNewlineType -- | Creates a new data input stream for the baseStream. dataInputStreamNew :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m DataInputStream -- | Reads an unsigned 8-bit/1-byte value from stream. dataInputStreamReadByte :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Word8 -- | Reads a 16-bit/2-byte value from stream. -- -- In order to get the correct byte order for this read operation, see -- dataInputStreamGetByteOrder and -- dataInputStreamSetByteOrder. dataInputStreamReadInt16 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Int16 -- | Reads a signed 32-bit/4-byte value from stream. -- -- In order to get the correct byte order for this read operation, see -- dataInputStreamGetByteOrder and -- dataInputStreamSetByteOrder. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. dataInputStreamReadInt32 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Int32 -- | Reads a 64-bit/8-byte value from stream. -- -- In order to get the correct byte order for this read operation, see -- dataInputStreamGetByteOrder and -- dataInputStreamSetByteOrder. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. dataInputStreamReadLine :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m (Maybe ByteString, CSize) -- | The asynchronous version of dataInputStreamReadLine. It is an -- error to have two outstanding calls to this function. -- -- When the operation is finished, callback will be -- called. You can then call dataInputStreamReadLineFinish to get -- the result of the operation. -- -- Since: 2.20 dataInputStreamReadLineAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous call started by -- dataInputStreamReadLineAsync. Note the warning about string -- encoding in dataInputStreamReadLine applies here as well. -- -- Since: 2.20 dataInputStreamReadLineFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Maybe ByteString, CSize) -- | Finish an asynchronous call started by -- dataInputStreamReadLineAsync. -- -- Since: 2.30 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- Since: 2.30 dataInputStreamReadLineUtf8 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m (Maybe Text, CSize) -- | Reads an unsigned 16-bit/2-byte value from stream. -- -- In order to get the correct byte order for this read operation, see -- dataInputStreamGetByteOrder and -- dataInputStreamSetByteOrder. dataInputStreamReadUint16 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe b -> m Word16 -- | Reads an unsigned 32-bit/4-byte value from stream. -- -- In order to get the correct byte order for this read operation, see -- dataInputStreamGetByteOrder and -- dataInputStreamSetByteOrder. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 stream. -- -- In order to get the correct byte order for this read operation, see -- dataInputStreamGetByteOrder. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 dataInputStreamReadUntilAsync, this -- function consumes the stop character that it finds. -- -- Don't use this function in new code. Its functionality is inconsistent -- with dataInputStreamReadUntilAsync. Both functions will be -- marked as deprecated in a future release. Use -- dataInputStreamReadUpto instead, but note that that function -- does not consume the stop character. -- | Deprecated: (Since version 2.56)Use dataInputStreamReadUpto -- instead, which has moreconsistent behaviour regarding the stop -- character. dataInputStreamReadUntil :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Maybe b -> m (Text, CSize) -- | The asynchronous version of dataInputStreamReadUntil. It is an -- error to have two outstanding calls to this function. -- -- Note that, in contrast to dataInputStreamReadUntil, this -- function does not consume the stop character that it finds. You must -- read it for yourself. -- -- When the operation is finished, callback will be -- called. You can then call dataInputStreamReadUntilFinish to get -- the result of the operation. -- -- Don't use this function in new code. Its functionality is inconsistent -- with dataInputStreamReadUntil. Both functions will be marked as -- deprecated in a future release. Use -- dataInputStreamReadUptoAsync instead. -- -- Since: 2.20 -- | Deprecated: (Since version 2.56)Use -- dataInputStreamReadUptoAsync instead, whichhas more consistent -- behaviour regarding the stop character. dataInputStreamReadUntilAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous call started by -- dataInputStreamReadUntilAsync. -- -- Since: 2.20 -- | Deprecated: (Since version 2.56)Use -- dataInputStreamReadUptoFinish instead, whichhas more consistent -- behaviour regarding the stop character. 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 dataInputStreamReadUntil, this function does not -- consume the stop character. You have to use -- dataInputStreamReadByte to get it before calling -- dataInputStreamReadUpto again. -- -- Note that stopChars may contain '\0' if -- stopCharsLen is specified. -- -- The returned string will always be nul-terminated on success. -- -- Since: 2.26 dataInputStreamReadUpto :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Maybe b -> m (Text, CSize) -- | The asynchronous version of dataInputStreamReadUpto. It is an -- error to have two outstanding calls to this function. -- -- In contrast to dataInputStreamReadUntil, this function does not -- consume the stop character. You have to use -- dataInputStreamReadByte to get it before calling -- dataInputStreamReadUpto again. -- -- Note that stopChars may contain '\0' if -- stopCharsLen is specified. -- -- When the operation is finished, callback will be -- called. You can then call dataInputStreamReadUptoFinish to get -- the result of the operation. -- -- Since: 2.26 dataInputStreamReadUptoAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous call started by -- dataInputStreamReadUptoAsync. -- -- Note that this function does not consume the stop character. You have -- to use dataInputStreamReadByte to get it before calling -- dataInputStreamReadUptoAsync again. -- -- The returned string will always be nul-terminated on success. -- -- Since: 2.24 dataInputStreamReadUptoFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, CSize) -- | This function sets the byte order for the given -- stream. All subsequent reads from the -- stream will be read in the given -- order. dataInputStreamSetByteOrder :: (HasCallStack, MonadIO m, IsDataInputStream a) => a -> DataStreamByteOrder -> m () -- | Sets the newline type for the stream. -- -- 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 GValueConstruct with valid value for the -- “byte-order” property. This is rarely needed directly, but it -- is used by new. constructDataInputStreamByteOrder :: (IsDataInputStream o, MonadIO m) => DataStreamByteOrder -> m (GValueConstruct o) -- | Get the value of the “byte-order” property. When -- overloading is enabled, this is equivalent to -- --
-- get dataInputStream #byteOrder --getDataInputStreamByteOrder :: (MonadIO m, IsDataInputStream o) => o -> m DataStreamByteOrder -- | Set the value of the “byte-order” property. When -- overloading is enabled, this is equivalent to -- --
-- set dataInputStream [ #byteOrder := value ] --setDataInputStreamByteOrder :: (MonadIO m, IsDataInputStream o) => o -> DataStreamByteOrder -> m () -- | Construct a GValueConstruct with valid value for the -- “newline-type” property. This is rarely needed directly, but -- it is used by new. constructDataInputStreamNewlineType :: (IsDataInputStream o, MonadIO m) => DataStreamNewlineType -> m (GValueConstruct o) -- | Get the value of the “newline-type” property. When -- overloading is enabled, this is equivalent to -- --
-- get dataInputStream #newlineType --getDataInputStreamNewlineType :: (MonadIO m, IsDataInputStream o) => o -> m DataStreamNewlineType -- | Set the value of the “newline-type” property. When -- overloading is enabled, this is equivalent to -- --
-- set dataInputStream [ #newlineType := value ] --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.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 -- | GDBusServer 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 `org.freedesktop.DBus` -- interface. -- -- 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 -- busOwnName. -- -- An example of peer-to-peer communication with GDBus can be found in -- gdbus-example-peer.c. -- -- Note that a minimal GDBusServer will accept connections from -- any peer. In many use-cases it will be necessary to add a -- DBusAuthObserver that only accepts connections that have -- successfully authenticated as the same user that is running the -- GDBusServer. Since GLib 2.68 this can be achieved more simply -- by passing the -- G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flag to -- the server. -- -- Since: 2.26 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 DBusServer, -- for instance with toDBusServer. class (GObject o, IsDescendantOf DBusServer o) => IsDBusServer o -- | Cast to DBusServer, for types for which this is known to be -- safe. For general casts, use castTo. toDBusServer :: (MonadIO m, IsDBusServer o) => o -> m DBusServer -- | Gets a D-Bus address string that can be used by clients to -- connect to server. -- -- This is valid and non-empty if initializing the DBusServer -- succeeded. -- -- Since: 2.26 dBusServerGetClientAddress :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Text -- | Gets the flags for server. -- -- Since: 2.26 dBusServerGetFlags :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m [DBusServerFlags] -- | Gets the GUID for server, as provided to -- dBusServerNewSync. -- -- Since: 2.26 dBusServerGetGuid :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Text -- | Gets whether server is active. -- -- Since: 2.26 dBusServerIsActive :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m Bool -- | Creates a new D-Bus server that listens on the first address in -- address that works. -- -- Once constructed, you can use dBusServerGetClientAddress 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-Nothing DBusAuthObserver. -- -- Connect to the DBusServer::newConnection signal to handle -- incoming connections. -- -- The returned DBusServer isn't active - you have to start it -- with dBusServerStart. -- -- DBusServer is used in this [example][gdbus-peer-to-peer]. -- -- This is a synchronous failable constructor. There is currently no -- asynchronous version. -- -- Since: 2.26 dBusServerNewSync :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) => Text -> [DBusServerFlags] -> Text -> Maybe a -> Maybe b -> m DBusServer -- | Starts server. -- -- Since: 2.26 dBusServerStart :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m () -- | Stops server. -- -- Since: 2.26 dBusServerStop :: (HasCallStack, MonadIO m, IsDBusServer a) => a -> m () -- | Get the value of the “active” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusServer #active --getDBusServerActive :: (MonadIO m, IsDBusServer o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “address” property. This is rarely needed directly, but it is -- used by new. constructDBusServerAddress :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “address” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusServer #address --getDBusServerAddress :: (MonadIO m, IsDBusServer o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “authentication-observer” property. This is rarely needed -- directly, but it is used by new. constructDBusServerAuthenticationObserver :: (IsDBusServer o, MonadIO m, IsDBusAuthObserver a) => a -> m (GValueConstruct o) -- | Get the value of the “authentication-observer” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusServer #authenticationObserver --getDBusServerAuthenticationObserver :: (MonadIO m, IsDBusServer o) => o -> m (Maybe DBusAuthObserver) -- | Get the value of the “client-address” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusServer #clientAddress --getDBusServerClientAddress :: (MonadIO m, IsDBusServer o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. constructDBusServerFlags :: (IsDBusServer o, MonadIO m) => [DBusServerFlags] -> m (GValueConstruct o) -- | Get the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusServer #flags --getDBusServerFlags :: (MonadIO m, IsDBusServer o) => o -> m [DBusServerFlags] -- | Construct a GValueConstruct with valid value for the -- “guid” property. This is rarely needed directly, but it is -- used by new. constructDBusServerGuid :: (IsDBusServer o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “guid” property. When overloading -- is enabled, this is equivalent to -- --
-- get dBusServer #guid --getDBusServerGuid :: (MonadIO m, IsDBusServer o) => o -> m Text -- | Emitted when a new authenticated connection has been made. Use -- dBusConnectionGetPeerCredentials to figure out what identity -- (if any), was authenticated. -- -- If you want to accept the connection, take a reference to the -- connection object and return True. When you are -- done with the connection call dBusConnectionClose 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 -- DBusConnection::closed signal. -- -- If DBusServer:flags contains DBusServerFlagsRunInThread -- then the signal is emitted in a new thread dedicated to the -- connection. Otherwise the signal is emitted in the [thread-default -- main context][g-main-context-push-thread-default] of the thread that -- server was constructed in. -- -- You are guaranteed that signal handlers for this signal runs before -- incoming messages on connection are processed. This -- means that it's suitable to call -- g_dbus_connection_register_object() or similar from -- the signal handler. -- -- Since: 2.26 type DBusServerNewConnectionCallback = DBusConnection -> IO Bool -- | Connect a signal handler for the newConnection signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusServer #newConnection callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> ((?self :: a) => DBusServerNewConnectionCallback) -> m SignalHandlerId -- | Connect a signal handler for the newConnection signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusServer #newConnection callback --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.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 -- | GDBusProxy is a base class used for proxies to access a D-Bus -- interface on a remote object. A GDBusProxy can be constructed -- for both well-known and unique names. -- -- By default, GDBusProxy 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 -- [flagsgio.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 DBusProxy:gNameOwner. Connect to the Object::notify -- 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 -- G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set). -- -- If the proxy is for a stateless D-Bus service, where the name owner -- may be started and stopped between calls, the -- DBusProxy:gNameOwner tracking of GDBusProxy 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 GDBusProxy — use direct D-Bus -- method calls and signal connections. -- -- The generic DBusProxy::gPropertiesChanged and -- DBusProxy::gSignal signals are not very convenient to work -- with. Therefore, the recommended way of working with proxies is to -- subclass GDBusProxy, and have more natural properties and -- signals in your derived class. This example shows how this can -- easily be done using the `gdbus-codegen` tool. -- -- A GDBusProxy instance can be used from multiple threads but -- note that all signals (e.g. DBusProxy::gSignal, -- DBusProxy::gPropertiesChanged and Object::notify) are -- emitted in the thread-default main context (see -- mainContextPushThreadDefault) of the thread where the instance -- was constructed. -- -- An example using a proxy for a well-known name can be found in -- `gdbus-example-watch-proxy.c`. -- -- Since: 2.26 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 DBusProxy, for -- instance with toDBusProxy. class (GObject o, IsDescendantOf DBusProxy o) => IsDBusProxy o -- | Cast to DBusProxy, for types for which this is known to be -- safe. For general casts, use castTo. toDBusProxy :: (MonadIO m, IsDBusProxy o) => o -> m DBusProxy -- | Asynchronously invokes the methodName method on -- proxy. -- -- If methodName contains any dots, then -- name is split into interface and method name parts. -- This allows using proxy for invoking methods on other -- interfaces. -- -- If the DBusConnection associated with proxy is -- closed then the operation will fail with IOErrorEnumClosed. If -- cancellable is canceled, the operation will fail with -- IOErrorEnumCancelled. If parameters contains a -- value not compatible with the D-Bus protocol, the operation fails with -- IOErrorEnumInvalidArgument. -- -- If the parameters GVariant is floating, it is -- consumed. This allows convenient 'inline' use of -- g_variant_new(), e.g.: -- --
-- g_dbus_proxy_call (proxy,
-- "TwoStrings",
-- g_variant_new ("(ss)",
-- "Thing One",
-- "Thing Two"),
-- G_DBUS_CALL_FLAGS_NONE,
-- -1,
-- NULL,
-- (GAsyncReadyCallback) two_strings_done,
-- &data);
--
--
-- If proxy has an expected interface (see
-- DBusProxy:gInterfaceInfo) and methodName is
-- referenced by it, then the return value is checked against the return
-- type.
--
-- This is an asynchronous method. When the operation is finished,
-- callback will be invoked in the [thread-default main
-- context][g-main-context-push-thread-default] of the thread you are
-- calling this method from. You can then call dBusProxyCallFinish
-- to get the result of the operation. See dBusProxyCallSync for
-- the synchronous version of this method.
--
-- If callback is Nothing then the D-Bus method
-- call message will be sent with the
-- DBusMessageFlagsNoReplyExpected flag set.
--
-- Since: 2.26
dBusProxyCall :: (HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) => a -> Text -> Maybe GVariant -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes an operation started with dBusProxyCall.
--
-- Since: 2.26
dBusProxyCallFinish :: (HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) => a -> b -> m GVariant
-- | Synchronously invokes the methodName method on
-- proxy.
--
-- If methodName contains any dots, then
-- name is split into interface and method name parts.
-- This allows using proxy for invoking methods on other
-- interfaces.
--
-- If the DBusConnection associated with proxy is
-- disconnected then the operation will fail with
-- IOErrorEnumClosed. If cancellable is canceled,
-- the operation will fail with IOErrorEnumCancelled. If
-- parameters contains a value not compatible with the
-- D-Bus protocol, the operation fails with
-- IOErrorEnumInvalidArgument.
--
-- If the parameters GVariant is floating, it is
-- consumed. This allows convenient 'inline' use of
-- g_variant_new(), e.g.:
--
--
-- g_dbus_proxy_call_sync (proxy,
-- "TwoStrings",
-- g_variant_new ("(ss)",
-- "Thing One",
-- "Thing Two"),
-- G_DBUS_CALL_FLAGS_NONE,
-- -1,
-- NULL,
-- &error);
--
--
-- The calling thread is blocked until a reply is received. See
-- dBusProxyCall for the asynchronous version of this method.
--
-- If proxy has an expected interface (see
-- DBusProxy:gInterfaceInfo) and methodName is
-- referenced by it, then the return value is checked against the return
-- type.
--
-- Since: 2.26
dBusProxyCallSync :: (HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) => a -> Text -> Maybe GVariant -> [DBusCallFlags] -> Int32 -> Maybe b -> m GVariant
-- | Like dBusProxyCall but also takes a UnixFDList object.
--
-- This method is only available on UNIX.
--
-- Since: 2.30
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 dBusProxyCallWithUnixFdList.
--
-- Since: 2.30
dBusProxyCallWithUnixFdListFinish :: (HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) => a -> b -> m (GVariant, UnixFDList)
-- | Like dBusProxyCallSync but also takes and returns
-- UnixFDList objects.
--
-- This method is only available on UNIX.
--
-- Since: 2.30
dBusProxyCallWithUnixFdListSync :: (HasCallStack, MonadIO m, IsDBusProxy a, IsUnixFDList b, IsCancellable c) => a -> Text -> Maybe GVariant -> [DBusCallFlags] -> Int32 -> Maybe b -> Maybe c -> m (GVariant, UnixFDList)
-- | Looks up the value for a property from the cache. This call does no
-- blocking IO.
--
-- If proxy has an expected interface (see
-- DBusProxy:gInterfaceInfo) and propertyName is
-- referenced by it, then value is checked against the
-- type of the property.
--
-- Since: 2.26
dBusProxyGetCachedProperty :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Text -> m (Maybe GVariant)
-- | Gets the names of all cached properties on proxy.
--
-- Since: 2.26
dBusProxyGetCachedPropertyNames :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe [Text])
-- | Gets the connection proxy is for.
--
-- Since: 2.26
dBusProxyGetConnection :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m DBusConnection
-- | Gets the timeout to use if -1 (specifying default timeout) is passed
-- as timeoutMsec in the dBusProxyCall and
-- dBusProxyCallSync functions.
--
-- See the DBusProxy:gDefaultTimeout property for more details.
--
-- Since: 2.26
dBusProxyGetDefaultTimeout :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Int32
-- | Gets the flags that proxy was constructed with.
--
-- Since: 2.26
dBusProxyGetFlags :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m [DBusProxyFlags]
-- | Returns the DBusInterfaceInfo, if any, specifying the interface
-- that proxy conforms to. See the
-- DBusProxy:gInterfaceInfo property for more details.
--
-- Since: 2.26
dBusProxyGetInterfaceInfo :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe DBusInterfaceInfo)
-- | Gets the D-Bus interface name proxy is for.
--
-- Since: 2.26
dBusProxyGetInterfaceName :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Text
-- | Gets the name that proxy was constructed for.
--
-- When connected to a message bus, this will usually be
-- non-Nothing. However, it may be Nothing for a proxy that
-- communicates using a peer-to-peer pattern.
--
-- Since: 2.26
dBusProxyGetName :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe Text)
-- | The unique name that owns the name that proxy is for
-- or Nothing if no-one currently owns that name. You may connect
-- to the Object::notify signal to track changes to the
-- DBusProxy:gNameOwner property.
--
-- Since: 2.26
dBusProxyGetNameOwner :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m (Maybe Text)
-- | Gets the object path proxy is for.
--
-- Since: 2.26
dBusProxyGetObjectPath :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Text
-- | Creates a proxy for accessing interfaceName on the
-- remote object at objectPath owned by
-- name at connection and asynchronously
-- loads D-Bus properties unless the
-- DBusProxyFlagsDoNotLoadProperties flag is used. Connect to the
-- DBusProxy::gPropertiesChanged signal to get notified about
-- property changes.
--
-- If the DBusProxyFlagsDoNotConnectSignals flag is not set, also
-- sets up match rules for signals. Connect to the
-- DBusProxy::gSignal signal to handle signals from the remote
-- object.
--
-- If both DBusProxyFlagsDoNotLoadProperties and
-- DBusProxyFlagsDoNotConnectSignals are set, this constructor is
-- guaranteed to complete immediately without blocking.
--
-- If name is a well-known name and the
-- DBusProxyFlagsDoNotAutoStart and
-- DBusProxyFlagsDoNotAutoStartAtConstruction 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,
-- callback will be invoked and you can use
-- dBusProxyNewFinish to get the result.
--
-- See dBusProxyNewSync and for a synchronous version of this
-- constructor.
--
-- DBusProxy is used in this [example][gdbus-wellknown-proxy].
--
-- Since: 2.26
dBusProxyNew :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Maybe Text -> Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes creating a DBusProxy.
--
-- Since: 2.26
dBusProxyNewFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusProxy
-- | Like dBusProxyNew but takes a BusType instead of a
-- DBusConnection.
--
-- DBusProxy is used in this [example][gdbus-wellknown-proxy].
--
-- Since: 2.26
dBusProxyNewForBus :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Text -> Text -> Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
-- | Finishes creating a DBusProxy.
--
-- Since: 2.26
dBusProxyNewForBusFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusProxy
-- | Like dBusProxyNewSync but takes a BusType instead of a
-- DBusConnection.
--
-- DBusProxy is used in this [example][gdbus-wellknown-proxy].
--
-- Since: 2.26
dBusProxyNewForBusSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Text -> Text -> Text -> Maybe a -> m DBusProxy
-- | Creates a proxy for accessing interfaceName on the
-- remote object at objectPath owned by
-- name at connection and synchronously
-- loads D-Bus properties unless the
-- DBusProxyFlagsDoNotLoadProperties flag is used.
--
-- If the DBusProxyFlagsDoNotConnectSignals flag is not set, also
-- sets up match rules for signals. Connect to the
-- DBusProxy::gSignal signal to handle signals from the remote
-- object.
--
-- If both DBusProxyFlagsDoNotLoadProperties and
-- DBusProxyFlagsDoNotConnectSignals are set, this constructor is
-- guaranteed to return immediately without blocking.
--
-- If name is a well-known name and the
-- DBusProxyFlagsDoNotAutoStart and
-- DBusProxyFlagsDoNotAutoStartAtConstruction 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 dBusProxyNew
-- and dBusProxyNewFinish for the asynchronous version.
--
-- DBusProxy is used in this [example][gdbus-wellknown-proxy].
--
-- Since: 2.26
dBusProxyNewSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusProxyFlags] -> Maybe DBusInterfaceInfo -> Maybe Text -> Text -> Text -> Maybe b -> m DBusProxy
-- | If value is not Nothing, sets the cached value
-- for the property with name propertyName to the value
-- in value.
--
-- If value is Nothing, then the cached value is
-- removed from the property cache.
--
-- If proxy has an expected interface (see
-- DBusProxy:gInterfaceInfo) and propertyName is
-- referenced by it, then value is checked against the
-- type of the property.
--
-- If the value GVariant is floating, it is
-- consumed. This allows convenient 'inline' use of
-- g_variant_new(), e.g.
--
--
-- g_dbus_proxy_set_cached_property (proxy,
-- "SomeProperty",
-- g_variant_new ("(si)",
-- "A String",
-- 42));
--
--
-- Normally you will not need to use this method since
-- proxy is tracking changes using the
-- org.freedesktop.DBus.Properties.PropertiesChanged D-Bus
-- signal. However, for performance reasons an object may decide to not
-- use this signal for some properties and instead use a proprietary
-- out-of-band mechanism to transmit changes.
--
-- As a concrete example, consider an object with a property
-- ChatroomParticipants which is an array of strings. Instead of
-- transmitting the same (long) array every time the property changes, it
-- is more efficient to only transmit the delta using e.g. signals
-- ChatroomParticipantJoined(String name) and
-- ChatroomParticipantParted(String name).
--
-- Since: 2.26
dBusProxySetCachedProperty :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Text -> Maybe GVariant -> m ()
-- | Sets the timeout to use if -1 (specifying default timeout) is passed
-- as timeoutMsec in the dBusProxyCall and
-- dBusProxyCallSync functions.
--
-- See the DBusProxy:gDefaultTimeout property for more details.
--
-- Since: 2.26
dBusProxySetDefaultTimeout :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Int32 -> m ()
-- | Ensure that interactions with proxy conform to the
-- given interface. See the DBusProxy:gInterfaceInfo property for
-- more details.
--
-- Since: 2.26
dBusProxySetInterfaceInfo :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Maybe DBusInterfaceInfo -> m ()
-- | Construct a GValueConstruct with valid value for the
-- “g-bus-type” property. This is rarely needed directly, but it
-- is used by new.
constructDBusProxyGBusType :: (IsDBusProxy o, MonadIO m) => BusType -> m (GValueConstruct o)
-- | Construct a GValueConstruct with valid value for the
-- “g-connection” property. This is rarely needed directly, but
-- it is used by new.
constructDBusProxyGConnection :: (IsDBusProxy o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o)
-- | Get the value of the “g-connection” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get dBusProxy #gConnection --getDBusProxyGConnection :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe DBusConnection) -- | Construct a GValueConstruct with valid value for the -- “g-default-timeout” property. This is rarely needed directly, -- but it is used by new. constructDBusProxyGDefaultTimeout :: (IsDBusProxy o, MonadIO m) => Int32 -> m (GValueConstruct o) -- | Get the value of the “g-default-timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusProxy #gDefaultTimeout --getDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> m Int32 -- | Set the value of the “g-default-timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- set dBusProxy [ #gDefaultTimeout := value ] --setDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> Int32 -> m () -- | Construct a GValueConstruct with valid value for the -- “g-flags” property. This is rarely needed directly, but it is -- used by new. constructDBusProxyGFlags :: (IsDBusProxy o, MonadIO m) => [DBusProxyFlags] -> m (GValueConstruct o) -- | Get the value of the “g-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusProxy #gFlags --getDBusProxyGFlags :: (MonadIO m, IsDBusProxy o) => o -> m [DBusProxyFlags] -- | Set the value of the “g-interface-info” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #gInterfaceInfo --clearDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “g-interface-info” property. This is rarely needed directly, -- but it is used by new. constructDBusProxyGInterfaceInfo :: (IsDBusProxy o, MonadIO m) => DBusInterfaceInfo -> m (GValueConstruct o) -- | Get the value of the “g-interface-info” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusProxy #gInterfaceInfo --getDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe DBusInterfaceInfo) -- | Set the value of the “g-interface-info” property. When -- overloading is enabled, this is equivalent to -- --
-- set dBusProxy [ #gInterfaceInfo := value ] --setDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> DBusInterfaceInfo -> m () -- | Construct a GValueConstruct with valid value for the -- “g-interface-name” property. This is rarely needed directly, -- but it is used by new. constructDBusProxyGInterfaceName :: (IsDBusProxy o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “g-interface-name” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusProxy #gInterfaceName --getDBusProxyGInterfaceName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “g-name” property. This is rarely needed directly, but it is -- used by new. constructDBusProxyGName :: (IsDBusProxy o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “g-name” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusProxy #gName --getDBusProxyGName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text) -- | Get the value of the “g-name-owner” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusProxy #gNameOwner --getDBusProxyGNameOwner :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “g-object-path” property. This is rarely needed directly, but -- it is used by new. constructDBusProxyGObjectPath :: (IsDBusProxy o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “g-object-path” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusProxy #gObjectPath --getDBusProxyGObjectPath :: (MonadIO m, IsDBusProxy 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 changedProperties and -- invalidatedProperties are guaranteed to never be -- Nothing (either may be empty though). -- -- If the proxy has the flag -- DBusProxyFlagsGetInvalidatedProperties set, then -- invalidatedProperties will always be empty. -- -- This signal corresponds to the PropertiesChanged D-Bus signal -- on the org.freedesktop.DBus.Properties interface. -- -- Since: 2.26 type DBusProxyGPropertiesChangedCallback = GVariant -> [Text] -> IO () -- | Connect a signal handler for the gPropertiesChanged signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusProxy #gPropertiesChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> ((?self :: a) => DBusProxyGPropertiesChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the gPropertiesChanged signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusProxy #gPropertiesChanged callback --onDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> ((?self :: a) => DBusProxyGPropertiesChangedCallback) -> m SignalHandlerId -- | Emitted when a signal from the remote object and interface that -- proxy is for, has been received. -- -- Since 2.72 this signal supports detailed connections. You can connect -- to the detailed signal g-signal::x in order to receive -- callbacks only when signal x is received from the remote -- object. -- -- Since: 2.26 type DBusProxyGSignalCallback = Maybe Text -> Text -> GVariant -> IO () -- | Connect a signal handler for the gSignal signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after dBusProxy #gSignal callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “g-signal::detail” -- 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 -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => DBusProxyGSignalCallback) -> m SignalHandlerId -- | Connect a signal handler for the gSignal signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on dBusProxy #gSignal callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “g-signal::detail” -- 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.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 GDBusObjectSkeleton 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 DBusObjectManager. -- -- Since: 2.30 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 -- DBusObjectSkeleton, for instance with -- toDBusObjectSkeleton. class (GObject o, IsDescendantOf DBusObjectSkeleton o) => IsDBusObjectSkeleton o -- | Cast to DBusObjectSkeleton, for types for which this is known -- to be safe. For general casts, use castTo. toDBusObjectSkeleton :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m DBusObjectSkeleton -- | Adds interface_ to object. -- -- If object already contains a -- DBusInterfaceSkeleton with the same interface name, it is -- removed before interface_ is added. -- -- Note that object takes its own reference on -- interface_ and holds it until removed. -- -- Since: 2.30 dBusObjectSkeletonAddInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m () -- | This method simply calls dBusInterfaceSkeletonFlush on all -- interfaces belonging to object. See that method for -- when flushing is useful. -- -- Since: 2.30 dBusObjectSkeletonFlush :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> m () -- | Creates a new DBusObjectSkeleton. -- -- Since: 2.30 dBusObjectSkeletonNew :: (HasCallStack, MonadIO m) => Text -> m DBusObjectSkeleton -- | Removes interface_ from object. -- -- Since: 2.30 dBusObjectSkeletonRemoveInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m () -- | Removes the DBusInterface with interfaceName -- from object. -- -- If no D-Bus interface of the given interface exists, this function -- does nothing. -- -- Since: 2.30 dBusObjectSkeletonRemoveInterfaceByName :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m () -- | Sets the object path for object. -- -- Since: 2.30 dBusObjectSkeletonSetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m () -- | Set the value of the “g-object-path” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #gObjectPath --clearDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “g-object-path” property. This is rarely needed directly, but -- it is used by new. constructDBusObjectSkeletonGObjectPath :: (IsDBusObjectSkeleton o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “g-object-path” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectSkeleton #gObjectPath --getDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m (Maybe Text) -- | Set the value of the “g-object-path” property. When -- overloading is enabled, this is equivalent to -- --
-- set dBusObjectSkeleton [ #gObjectPath := value ] --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 DBusInterfaceSkeleton's -- DBusInterfaceSkeleton::gAuthorizeMethod signal, except that it -- is for the enclosing object. -- -- The default class handler just returns True. -- -- Since: 2.30 type DBusObjectSkeletonAuthorizeMethodCallback = DBusInterfaceSkeleton -> DBusMethodInvocation -> IO Bool -- | Connect a signal handler for the authorizeMethod signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObjectSkeleton #authorizeMethod callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusObjectSkeletonAuthorizeMethodCallback) -> m SignalHandlerId -- | Connect a signal handler for the authorizeMethod signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusObjectSkeleton #authorizeMethod callback --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.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 GDBusObjectProxy is an object used to represent a remote -- object with one or more D-Bus interfaces. Normally, you don’t -- instantiate a GDBusObjectProxy yourself — typically -- DBusObjectManagerClient is used to obtain it. -- -- Since: 2.30 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 -- DBusObjectProxy, for instance with toDBusObjectProxy. class (GObject o, IsDescendantOf DBusObjectProxy o) => IsDBusObjectProxy o -- | Cast to DBusObjectProxy, for types for which this is known to -- be safe. For general casts, use castTo. toDBusObjectProxy :: (MonadIO m, IsDBusObjectProxy o) => o -> m DBusObjectProxy -- | Gets the connection that proxy is for. -- -- Since: 2.30 dBusObjectProxyGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectProxy a) => a -> m DBusConnection -- | Creates a new DBusObjectProxy for the given connection and -- object path. -- -- Since: 2.30 dBusObjectProxyNew :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> m DBusObjectProxy -- | Construct a GValueConstruct with valid value for the -- “g-connection” property. This is rarely needed directly, but -- it is used by new. constructDBusObjectProxyGConnection :: (IsDBusObjectProxy o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o) -- | Get the value of the “g-connection” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectProxy #gConnection --getDBusObjectProxyGConnection :: (MonadIO m, IsDBusObjectProxy o) => o -> m (Maybe DBusConnection) -- | Construct a GValueConstruct with valid value for the -- “g-object-path” property. This is rarely needed directly, but -- it is used by new. constructDBusObjectProxyGObjectPath :: (IsDBusObjectProxy o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “g-object-path” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectProxy #gObjectPath --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.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 -- | GDBusObjectManagerServer is used to export DBusObject -- instances using the standardized -- `org.freedesktop.DBus.ObjectManager` 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 -- net.example.ExampleService1, the object manager should -- typically be exported at /net/example/ExampleService1, 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, /. -- -- See DBusObjectManagerClient for the client-side code that is -- intended to be used with GDBusObjectManagerServer or any -- D-Bus object implementing the -- org.freedesktop.DBus.ObjectManager interface. -- -- Since: 2.30 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 -- DBusObjectManagerServer, for instance with -- toDBusObjectManagerServer. class (GObject o, IsDescendantOf DBusObjectManagerServer o) => IsDBusObjectManagerServer o -- | Cast to DBusObjectManagerServer, for types for which this is -- known to be safe. For general casts, use castTo. toDBusObjectManagerServer :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m DBusObjectManagerServer -- | Exports object on manager. -- -- If there is already a DBusObject exported at the object path, -- then the old object is removed. -- -- The object path for object must be in the hierarchy -- rooted by the object path for manager. -- -- Note that manager will take a reference on -- object for as long as it is exported. -- -- Since: 2.30 dBusObjectManagerServerExport :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m () -- | Like dBusObjectManagerServerExport but appends a string of the -- form _N (with N being a natural number) to object's -- object path if an object with the given path already exists. As such, -- the DBusObjectProxy:gObjectPath property of -- object may be modified. -- -- Since: 2.30 dBusObjectManagerServerExportUniquely :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m () -- | Gets the DBusConnection used by manager. -- -- Since: 2.30 dBusObjectManagerServerGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a) => a -> m (Maybe DBusConnection) -- | Returns whether object is currently exported on -- manager. -- -- Since: 2.34 dBusObjectManagerServerIsExported :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m Bool -- | Creates a new DBusObjectManagerServer object. -- -- The returned server isn't yet exported on any connection. To do so, -- use dBusObjectManagerServerSetConnection. Normally you want to -- export all of your objects before doing so to avoid -- InterfacesAdded signals being emitted. -- -- Since: 2.30 dBusObjectManagerServerNew :: (HasCallStack, MonadIO m) => Text -> m DBusObjectManagerServer -- | Exports all objects managed by manager on -- connection. If connection is -- Nothing, stops exporting objects. dBusObjectManagerServerSetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusConnection b) => a -> Maybe b -> m () -- | If manager has an object at path, -- removes the object. Otherwise does nothing. -- -- Note that objectPath must be in the hierarchy rooted -- by the object path for manager. -- -- Since: 2.30 dBusObjectManagerServerUnexport :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a) => a -> Text -> m Bool -- | Set the value of the “connection” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #connection --clearDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “connection” property. This is rarely needed directly, but it -- is used by new. constructDBusObjectManagerServerConnection :: (IsDBusObjectManagerServer o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o) -- | Get the value of the “connection” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerServer #connection --getDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe DBusConnection) -- | Set the value of the “connection” property. When -- overloading is enabled, this is equivalent to -- --
-- set dBusObjectManagerServer [ #connection := value ] --setDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o, IsDBusConnection a) => o -> a -> m () -- | Construct a GValueConstruct with valid value for the -- “object-path” property. This is rarely needed directly, but -- it is used by new. constructDBusObjectManagerServerObjectPath :: (IsDBusObjectManagerServer o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “object-path” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerServer #objectPath --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.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 -- | GDBusObjectManagerClient is used to create, monitor and -- delete object proxies for remote objects exported by a -- DBusObjectManagerServer (or any code implementing the -- org.freedesktop.DBus.ObjectManager interface). -- -- Once an instance of this type has been created, you can connect to the -- DBusObjectManager::objectAdded and -- signalgio.DBusObjectManager[objectRemoved -- signals] and inspect the DBusObjectProxy objects returned by -- dBusObjectManagerGetObjects. -- -- If the name for a GDBusObjectManagerClient 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 -- G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START 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, -- GDBusObjectManagerClient object construction still succeeds -- but there will be no object proxies (e.g. -- dBusObjectManagerGetObjects returns the empty list) and the -- DBusObjectManagerClient:nameOwner property is NULL. -- -- The owner of the requested name can come and go (for example consider -- a system service being restarted) – GDBusObjectManagerClient -- handles this case too; simply connect to the Object::notify -- signal to watch for changes on the -- DBusObjectManagerClient:nameOwner property. When the name owner -- vanishes, the behavior is that -- DBusObjectManagerClient:nameOwner is set to NULL (this -- includes emission of the Object::notify signal) and then -- DBusObjectManager::objectRemoved signals are synthesized for -- all currently existing object proxies. Since -- DBusObjectManagerClient:nameOwner is NULL when this -- happens, you can use this information to disambiguate a synthesized -- signal from a genuine signal caused by object removal on the remote -- DBusObjectManager. Similarly, when a new name owner appears, -- DBusObjectManager::objectAdded signals are synthesized while -- DBusObjectManagerClient:nameOwner is still NULL. Only -- when all object proxies have been added, the -- DBusObjectManagerClient:nameOwner is set to the new name owner -- (this includes emission of the Object::notify signal). -- Furthermore, you are guaranteed that -- DBusObjectManagerClient:nameOwner will alternate between a name -- owner (e.g. :1.42) and NULL even in the case where -- the name of interest is atomically replaced -- -- Ultimately, GDBusObjectManagerClient is used to obtain -- DBusProxy instances. All signals (including the -- org.freedesktop.DBus.Properties::PropertiesChanged signal) -- delivered to DBusProxy 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 -- DBusObjectProxy and DBusProxy objects, the -- DBusObject::interfaceAdded, -- DBusObject::interfaceRemoved, -- DBusProxy::gPropertiesChanged and DBusProxy::gSignal -- signals are also emitted on the GDBusObjectManagerClient -- instance managing these objects. The signals emitted are -- DBusObjectManager::interfaceAdded, -- DBusObjectManager::interfaceRemoved, -- DBusObjectManagerClient::interfaceProxyPropertiesChanged and -- DBusObjectManagerClient::interfaceProxySignal. -- -- Note that all callbacks and signals are emitted in the thread-default -- main context (see mainContextPushThreadDefault) that the -- GDBusObjectManagerClient object was constructed in. -- Additionally, the DBusObjectProxy and DBusProxy objects -- originating from the GDBusObjectManagerClient object will be -- created in the same context and, consequently, will deliver signals in -- the same main loop. -- -- Since: 2.30 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 -- DBusObjectManagerClient, for instance with -- toDBusObjectManagerClient. class (GObject o, IsDescendantOf DBusObjectManagerClient o) => IsDBusObjectManagerClient o -- | Cast to DBusObjectManagerClient, for types for which this is -- known to be safe. For general casts, use castTo. toDBusObjectManagerClient :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m DBusObjectManagerClient -- | Gets the DBusConnection used by manager. -- -- Since: 2.30 dBusObjectManagerClientGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m DBusConnection -- | Gets the flags that manager was constructed with. -- -- Since: 2.30 dBusObjectManagerClientGetFlags :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m [DBusObjectManagerClientFlags] -- | Gets the name that manager is for, or Nothing -- if not a message bus connection. -- -- Since: 2.30 dBusObjectManagerClientGetName :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m Text -- | The unique name that owns the name that manager is for -- or Nothing if no-one currently owns that name. You can connect -- to the Object::notify signal to track changes to the -- DBusObjectManagerClient:nameOwner property. -- -- Since: 2.30 dBusObjectManagerClientGetNameOwner :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m (Maybe Text) -- | Asynchronously creates a new DBusObjectManagerClient object. -- -- This is an asynchronous failable constructor. When the result is -- ready, callback will be invoked in the [thread-default -- main context][g-main-context-push-thread-default] of the thread you -- are calling this method from. You can then call -- dBusObjectManagerClientNewFinish to get the result. See -- dBusObjectManagerClientNewSync for the synchronous version. -- -- Since: 2.30 dBusObjectManagerClientNew :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusObjectManagerClientFlags] -> Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an operation started with dBusObjectManagerClientNew. -- -- Since: 2.30 dBusObjectManagerClientNewFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusObjectManagerClient -- | Like dBusObjectManagerClientNew but takes a BusType -- instead of a DBusConnection. -- -- This is an asynchronous failable constructor. When the result is -- ready, callback will be invoked in the [thread-default -- main loop][g-main-context-push-thread-default] of the thread you are -- calling this method from. You can then call -- dBusObjectManagerClientNewForBusFinish to get the result. See -- dBusObjectManagerClientNewForBusSync for the synchronous -- version. -- -- Since: 2.30 dBusObjectManagerClientNewForBus :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusObjectManagerClientFlags] -> Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe a -> Maybe AsyncReadyCallback -> m () -- | Finishes an operation started with -- dBusObjectManagerClientNewForBus. -- -- Since: 2.30 dBusObjectManagerClientNewForBusFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusObjectManagerClient -- | Like dBusObjectManagerClientNewSync but takes a BusType -- instead of a DBusConnection. -- -- This is a synchronous failable constructor - the calling thread is -- blocked until a reply is received. See -- dBusObjectManagerClientNewForBus for the asynchronous version. -- -- Since: 2.30 dBusObjectManagerClientNewForBusSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusObjectManagerClientFlags] -> Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe a -> m DBusObjectManagerClient -- | Creates a new DBusObjectManagerClient object. -- -- This is a synchronous failable constructor - the calling thread is -- blocked until a reply is received. See -- dBusObjectManagerClientNew for the asynchronous version. -- -- Since: 2.30 dBusObjectManagerClientNewSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusObjectManagerClientFlags] -> Maybe Text -> Text -> Maybe DBusProxyTypeFunc -> Maybe b -> m DBusObjectManagerClient -- | Construct a GValueConstruct with valid value for the -- “bus-type” property. This is rarely needed directly, but it -- is used by new. constructDBusObjectManagerClientBusType :: (IsDBusObjectManagerClient o, MonadIO m) => BusType -> m (GValueConstruct o) -- | Construct a GValueConstruct with valid value for the -- “connection” property. This is rarely needed directly, but it -- is used by new. constructDBusObjectManagerClientConnection :: (IsDBusObjectManagerClient o, MonadIO m, IsDBusConnection a) => a -> m (GValueConstruct o) -- | Get the value of the “connection” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #connection --getDBusObjectManagerClientConnection :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m DBusConnection -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. constructDBusObjectManagerClientFlags :: (IsDBusObjectManagerClient o, MonadIO m) => [DBusObjectManagerClientFlags] -> m (GValueConstruct o) -- | Get the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #flags --getDBusObjectManagerClientFlags :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m [DBusObjectManagerClientFlags] -- | Construct a GValueConstruct with valid value for the -- “get-proxy-type-destroy-notify” property. This is rarely -- needed directly, but it is used by new. constructDBusObjectManagerClientGetProxyTypeDestroyNotify :: (IsDBusObjectManagerClient o, MonadIO m) => Ptr () -> m (GValueConstruct o) -- | Get the value of the “get-proxy-type-destroy-notify” -- property. When overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #getProxyTypeDestroyNotify --getDBusObjectManagerClientGetProxyTypeDestroyNotify :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ()) -- | Construct a GValueConstruct with valid value for the -- “get-proxy-type-func” property. This is rarely needed -- directly, but it is used by new. constructDBusObjectManagerClientGetProxyTypeFunc :: (IsDBusObjectManagerClient o, MonadIO m) => Ptr () -> m (GValueConstruct o) -- | Get the value of the “get-proxy-type-func” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #getProxyTypeFunc --getDBusObjectManagerClientGetProxyTypeFunc :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ()) -- | Construct a GValueConstruct with valid value for the -- “get-proxy-type-user-data” property. This is rarely needed -- directly, but it is used by new. constructDBusObjectManagerClientGetProxyTypeUserData :: (IsDBusObjectManagerClient o, MonadIO m) => Ptr () -> m (GValueConstruct o) -- | Get the value of the “get-proxy-type-user-data” property. -- When overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #getProxyTypeUserData --getDBusObjectManagerClientGetProxyTypeUserData :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ()) -- | Construct a GValueConstruct with valid value for the -- “name” property. This is rarely needed directly, but it is -- used by new. constructDBusObjectManagerClientName :: (IsDBusObjectManagerClient o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “name” property. When overloading -- is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #name --getDBusObjectManagerClientName :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m Text -- | Get the value of the “name-owner” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #nameOwner --getDBusObjectManagerClientNameOwner :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “object-path” property. This is rarely needed directly, but -- it is used by new. constructDBusObjectManagerClientObjectPath :: (IsDBusObjectManagerClient o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “object-path” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusObjectManagerClient #objectPath --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 -- changedProperties and -- invalidatedProperties are guaranteed to never be -- Nothing (either may be empty though). -- -- This signal exists purely as a convenience to avoid having to connect -- signals to all interface proxies managed by manager. -- -- This signal is emitted in the [thread-default main -- context][g-main-context-push-thread-default] that -- manager was constructed in. -- -- Since: 2.30 type DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback = DBusObjectProxy -> DBusProxy -> GVariant -> [Text] -> IO () -- | Connect a signal handler for the -- interfaceProxyPropertiesChanged signal, to be run after the -- default handler. When overloading is enabled, this is -- equivalent to -- --
-- after dBusObjectManagerClient #interfaceProxyPropertiesChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectManagerClientInterfaceProxyPropertiesChanged :: (IsDBusObjectManagerClient a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the -- interfaceProxyPropertiesChanged signal, to be run before the -- default handler. When overloading is enabled, this is -- equivalent to -- --
-- on dBusObjectManagerClient #interfaceProxyPropertiesChanged callback --onDBusObjectManagerClientInterfaceProxyPropertiesChanged :: (IsDBusObjectManagerClient a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback) -> m SignalHandlerId -- | Emitted when a D-Bus signal is received on -- interfaceProxy. -- -- This signal exists purely as a convenience to avoid having to connect -- signals to all interface proxies managed by manager. -- -- This signal is emitted in the [thread-default main -- context][g-main-context-push-thread-default] that -- manager was constructed in. -- -- Since: 2.30 type DBusObjectManagerClientInterfaceProxySignalCallback = DBusObjectProxy -> DBusProxy -> Text -> Text -> GVariant -> IO () -- | Connect a signal handler for the interfaceProxySignal signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after dBusObjectManagerClient #interfaceProxySignal callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusObjectManagerClientInterfaceProxySignal :: (IsDBusObjectManagerClient a, MonadIO m) => a -> ((?self :: a) => DBusObjectManagerClientInterfaceProxySignalCallback) -> m SignalHandlerId -- | Connect a signal handler for the interfaceProxySignal signal, -- to be run before the default handler. When overloading is -- enabled, this is equivalent to -- --
-- on dBusObjectManagerClient #interfaceProxySignal callback --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.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 GDBusMethodInvocation 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 GDBusMethodInvocation object is to -- receive it as an argument to the handle_method_call() -- function in a [typegio.DBusInterfaceVTable] that was -- passed to dBusConnectionRegisterObject. -- -- Since: 2.26 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 -- DBusMethodInvocation, for instance with -- toDBusMethodInvocation. class (GObject o, IsDescendantOf DBusMethodInvocation o) => IsDBusMethodInvocation o -- | Cast to DBusMethodInvocation, for types for which this is known -- to be safe. For general casts, use castTo. toDBusMethodInvocation :: (MonadIO m, IsDBusMethodInvocation o) => o -> m DBusMethodInvocation -- | Gets the DBusConnection the method was invoked on. -- -- Since: 2.26 dBusMethodInvocationGetConnection :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m DBusConnection -- | Gets the name of the D-Bus interface the method was invoked on. -- -- 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 -- DBusInterfaceVTable for more information. -- -- Since: 2.26 dBusMethodInvocationGetInterfaceName :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m Text -- | Gets the DBusMessage for the method invocation. This is useful -- if you need to use low-level protocol features, such as UNIX file -- descriptor passing, that cannot be properly expressed in the -- GVariant API. -- -- See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for -- an example of how to use this low-level API to send and receive UNIX -- file descriptors. -- -- Since: 2.26 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 Nothing -- will be returned. See dBusMethodInvocationGetPropertyInfo and -- DBusInterfaceVTable for more information. -- -- Since: 2.26 dBusMethodInvocationGetMethodInfo :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m (Maybe DBusMethodInfo) -- | Gets the name of the method that was invoked. -- -- Since: 2.26 dBusMethodInvocationGetMethodName :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m Text -- | Gets the object path the method was invoked on. -- -- Since: 2.26 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. -- -- Since: 2.26 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 property_get() -- or property_set() vtable pointers being unset. -- -- See DBusInterfaceVTable for more information. -- -- If the call was GetAll, Nothing will be returned. -- -- Since: 2.38 dBusMethodInvocationGetPropertyInfo :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m (Maybe DBusPropertyInfo) -- | Gets the bus name that invoked the method. -- -- Since: 2.26 dBusMethodInvocationGetSender :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> m Text -- | Finishes handling a D-Bus method call by returning an error. -- -- This method will take ownership of invocation. See -- DBusInterfaceVTable for more information about the ownership of -- invocation. -- -- Since: 2.26 dBusMethodInvocationReturnDbusError :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> Text -> Text -> m () -- | Like g_dbus_method_invocation_return_error() but -- without printf()-style formatting. -- -- This method will take ownership of invocation. See -- DBusInterfaceVTable for more information about the ownership of -- invocation. -- -- Since: 2.26 dBusMethodInvocationReturnErrorLiteral :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> Word32 -> Int32 -> Text -> m () -- | Like g_dbus_method_invocation_return_error() but takes -- a GError instead of the error domain, error code and message. -- -- This method will take ownership of invocation. See -- DBusInterfaceVTable for more information about the ownership of -- invocation. -- -- Since: 2.26 dBusMethodInvocationReturnGerror :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> GError -> m () -- | Finishes handling a D-Bus method call by returning -- parameters. If the parameters GVariant -- is floating, it is consumed. -- -- It is an error if parameters is not of the right -- format: it must be a tuple containing the out-parameters of the D-Bus -- method. Even if the method has a single out-parameter, it must be -- contained in a tuple. If the method has no out-parameters, -- parameters may be Nothing or an empty tuple. -- --
-- GDBusMethodInvocation *invocation = some_invocation;
-- g_autofree gchar *result_string = NULL;
-- g_autoptr (GError) error = NULL;
--
-- result_string = calculate_result (&error);
--
-- if (error != NULL)
-- g_dbus_method_invocation_return_gerror (invocation, error);
-- else
-- g_dbus_method_invocation_return_value (invocation,
-- g_variant_new ("(s)", result_string));
--
-- // Do not free @invocation here; returning a value does that
--
--
-- This method will take ownership of invocation. See
-- DBusInterfaceVTable for more information about the ownership of
-- invocation.
--
-- Since 2.48, if the method call requested for a reply not to be sent
-- then this call will sink parameters and free
-- invocation, but otherwise do nothing (as per the
-- recommendations of the D-Bus specification).
--
-- Since: 2.26
dBusMethodInvocationReturnValue :: (HasCallStack, MonadIO m, IsDBusMethodInvocation a) => a -> Maybe GVariant -> m ()
-- | Like dBusMethodInvocationReturnValue but also takes a
-- UnixFDList.
--
-- This method is only available on UNIX.
--
-- This method will take ownership of invocation. See
-- DBusInterfaceVTable for more information about the ownership of
-- invocation.
--
-- Since: 2.30
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.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
-- | GDBusMenuModel is an implementation of MenuModel that
-- can be used as a proxy for a menu model that is exported over D-Bus
-- with dBusConnectionExportMenuModel.
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 DBusMenuModel,
-- for instance with toDBusMenuModel.
class (GObject o, IsDescendantOf DBusMenuModel o) => IsDBusMenuModel o
-- | Cast to DBusMenuModel, for types for which this is known to be
-- safe. For general casts, use castTo.
toDBusMenuModel :: (MonadIO m, IsDBusMenuModel o) => o -> m DBusMenuModel
-- | Obtains a DBusMenuModel for the menu model which is exported at
-- the given busName and objectPath.
--
-- 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.
--
-- Since: 2.32
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.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.
--
-- Since: 2.30
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
-- DBusInterfaceSkeleton, for instance with
-- toDBusInterfaceSkeleton.
class (GObject o, IsDescendantOf DBusInterfaceSkeleton o) => IsDBusInterfaceSkeleton o
-- | Cast to DBusInterfaceSkeleton, for types for which this is
-- known to be safe. For general casts, use castTo.
toDBusInterfaceSkeleton :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m DBusInterfaceSkeleton
-- | Exports interface_ at objectPath on
-- connection.
--
-- This can be called multiple times to export the same
-- interface_ onto multiple connections however the
-- objectPath provided must be the same for all
-- connections.
--
-- Use dBusInterfaceSkeletonUnexport to unexport the object.
--
-- Since: 2.30
dBusInterfaceSkeletonExport :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> Text -> m ()
-- | If interface_ 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
-- org.freedesktop.DBus.Properties.PropertiesChanged signal
-- later (e.g. in an idle handler). This technique is useful for
-- collapsing multiple property changes into one.
--
-- Since: 2.30
dBusInterfaceSkeletonFlush :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m ()
-- | Gets the first connection that interface_ is exported
-- on, if any.
--
-- Since: 2.30
dBusInterfaceSkeletonGetConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m (Maybe DBusConnection)
-- | Gets a list of the connections that interface_ is
-- exported on.
--
-- Since: 2.32
dBusInterfaceSkeletonGetConnections :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m [DBusConnection]
-- | Gets the DBusInterfaceSkeletonFlags that describes what the
-- behavior of interface_
--
-- Since: 2.30
dBusInterfaceSkeletonGetFlags :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m [DBusInterfaceSkeletonFlags]
-- | Gets D-Bus introspection information for the D-Bus interface
-- implemented by interface_.
--
-- Since: 2.30
dBusInterfaceSkeletonGetInfo :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m DBusInterfaceInfo
-- | Gets the object path that interface_ is exported on,
-- if any.
--
-- Since: 2.30
dBusInterfaceSkeletonGetObjectPath :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m (Maybe Text)
-- | Gets all D-Bus properties for interface_.
--
-- Since: 2.30
dBusInterfaceSkeletonGetProperties :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m GVariant
-- | Gets the interface vtable for the D-Bus interface implemented by
-- interface_. The returned function pointers should
-- expect interface_ itself to be passed as
-- userData.
--
-- Since: 2.30
dBusInterfaceSkeletonGetVtable :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m DBusInterfaceVTable
-- | Checks if interface_ is exported on
-- connection.
--
-- Since: 2.32
dBusInterfaceSkeletonHasConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> m Bool
-- | Sets flags describing what the behavior of skeleton
-- should be.
--
-- Since: 2.30
dBusInterfaceSkeletonSetFlags :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> [DBusInterfaceSkeletonFlags] -> m ()
-- | Stops exporting interface_ on all connections it is
-- exported on.
--
-- To unexport interface_ from only a single connection,
-- use dBusInterfaceSkeletonUnexportFromConnection
--
-- Since: 2.30
dBusInterfaceSkeletonUnexport :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m ()
-- | Stops exporting interface_ on
-- connection.
--
-- To stop exporting on all connections the interface is exported on, use
-- dBusInterfaceSkeletonUnexport.
--
-- Since: 2.32
dBusInterfaceSkeletonUnexportFromConnection :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a, IsDBusConnection b) => a -> b -> m ()
-- | Construct a GValueConstruct with valid value for the
-- “g-flags” property. This is rarely needed directly, but it is
-- used by new.
constructDBusInterfaceSkeletonGFlags :: (IsDBusInterfaceSkeleton o, MonadIO m) => [DBusInterfaceSkeletonFlags] -> m (GValueConstruct o)
-- | Get the value of the “g-flags” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get dBusInterfaceSkeleton #gFlags --getDBusInterfaceSkeletonGFlags :: (MonadIO m, IsDBusInterfaceSkeleton o) => o -> m [DBusInterfaceSkeletonFlags] -- | Set the value of the “g-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- set dBusInterfaceSkeleton [ #gFlags := value ] --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. -- polkit_authority_check_authorization_sync() with the -- POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION flag -- set. -- -- If False is returned then no further handlers are run and the -- signal handler must take a reference to invocation and -- finish handling the call (e.g. return an error via -- g_dbus_method_invocation_return_error()). -- -- Otherwise, if True is returned, signal emission continues. If -- no handlers return False, then the method is dispatched. If -- interface has an enclosing DBusObjectSkeleton, -- then the DBusObjectSkeleton::authorizeMethod signal handlers -- run before the handlers for this signal. -- -- The default class handler just returns True. -- -- Please note that the common case is optimized: if no signals handlers -- are connected and the default class handler isn't overridden (for both -- interface and the enclosing DBusObjectSkeleton, -- if any) and DBusInterfaceSkeleton:gFlags does not have the -- DBusInterfaceSkeletonFlagsHandleMethodInvocationsInThread flags -- set, no dedicated thread is ever used and the call will be handled in -- the same thread as the object that interface belongs -- to was exported in. -- -- Since: 2.30 type DBusInterfaceSkeletonGAuthorizeMethodCallback = DBusMethodInvocation -> IO Bool -- | Connect a signal handler for the gAuthorizeMethod signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusInterfaceSkeleton #gAuthorizeMethod callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusInterfaceSkeletonGAuthorizeMethodCallback) -> m SignalHandlerId -- | Connect a signal handler for the gAuthorizeMethod signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusInterfaceSkeleton #gAuthorizeMethod callback --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.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 GDBusConnection type is used for D-Bus connections to -- remote peers such as a message buses. -- -- It is a low-level API that offers a lot of flexibility. For instance, -- it lets you establish a connection over any transport that can by -- represented as a IOStream. -- -- 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 -- busOwnName, busWatchName or dBusProxyNewForBus -- APIs. -- -- As an exception to the usual GLib rule that a particular object must -- not be used by two threads at the same time, GDBusConnections -- methods may be called from any thread. This is so that busGet -- and busGetSync can safely return the same -- GDBusConnection when called from any thread. -- -- Most of the ways to obtain a GDBusConnection automatically -- initialize it (i.e. connect to D-Bus): for instance, -- dBusConnectionNew and busGet, and the synchronous -- versions of those methods, give you an initialized connection. -- Language bindings for GIO should use -- Initable.new() or -- AsyncInitable.new_async(), which also -- initialize the connection. -- -- If you construct an uninitialized GDBusConnection, such as -- via Object.new(), you must initialize it via -- initableInit or asyncInitableInitAsync before using its -- methods or properties. Calling methods or accessing properties on a -- GDBusConnection that has not completed initialization -- successfully is considered to be invalid, and leads to undefined -- behaviour. In particular, if initialization fails with a -- GError, the only valid thing you can do with that -- GDBusConnection is to free it with objectUnref. -- --
-- 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);
--
--
-- This is an asynchronous method. When the operation is finished,
-- callback will be invoked in the [thread-default main
-- context][g-main-context-push-thread-default] of the thread you are
-- calling this method from. You can then call
-- dBusConnectionCallFinish to get the result of the operation.
-- See dBusConnectionCallSync for the synchronous version of this
-- function.
--
-- If callback is Nothing then the D-Bus method
-- call message will be sent with the
-- DBusMessageFlagsNoReplyExpected flag set.
--
-- Since: 2.26
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 dBusConnectionCall.
--
-- Since: 2.26
dBusConnectionCallFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m GVariant
-- | Synchronously invokes the methodName method on the
-- interfaceName D-Bus interface on the remote object at
-- objectPath owned by busName.
--
-- If connection is closed then the operation will fail
-- with IOErrorEnumClosed. If cancellable is
-- canceled, the operation will fail with IOErrorEnumCancelled. If
-- parameters contains a value not compatible with the
-- D-Bus protocol, the operation fails with
-- IOErrorEnumInvalidArgument.
--
-- If replyType is non-Nothing 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 replyType
-- then any non-Nothing return value will be of this type.
--
-- If the parameters GVariant is floating, it is
-- consumed. This allows convenient 'inline' use of
-- g_variant_new(), e.g.:
--
--
-- g_dbus_connection_call_sync (connection,
-- "org.freedesktop.StringThings",
-- "/org/freedesktop/StringThings",
-- "org.freedesktop.StringThings",
-- "TwoStrings",
-- g_variant_new ("(ss)",
-- "Thing One",
-- "Thing Two"),
-- NULL,
-- G_DBUS_CALL_FLAGS_NONE,
-- -1,
-- NULL,
-- &error);
--
--
-- The calling thread is blocked until a reply is received. See
-- dBusConnectionCall for the asynchronous version of this method.
--
-- Since: 2.26
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 dBusConnectionCall but also takes a UnixFDList
-- object.
--
-- The file descriptors normally correspond to
-- G_VARIANT_TYPE_HANDLE values in the body of the
-- message. For example, if a message contains two file descriptors,
-- fdList would have length 2, and
-- g_variant_new_handle (0) and g_variant_new_handle
-- (1) 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 G_VARIANT_TYPE_HANDLE in the body of the
-- message.
--
-- This method is only available on UNIX.
--
-- Since: 2.30
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
-- dBusConnectionCallWithUnixFdList.
--
-- The file descriptors normally correspond to
-- G_VARIANT_TYPE_HANDLE values in the body of the
-- message. For example, if variantGetHandle returns 5, that is
-- intended to be a reference to the file descriptor that can be accessed
-- by g_unix_fd_list_get (*out_fd_list, 5, ...).
--
-- 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 G_VARIANT_TYPE_HANDLE in the body of the
-- message.
--
-- Since: 2.30
dBusConnectionCallWithUnixFdListFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m (GVariant, UnixFDList)
-- | Like dBusConnectionCallSync but also takes and returns
-- UnixFDList objects. See dBusConnectionCallWithUnixFdList
-- and dBusConnectionCallWithUnixFdListFinish for more details.
--
-- This method is only available on UNIX.
--
-- Since: 2.30
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, UnixFDList)
-- | Closes connection. Note that this never causes the
-- process to exit (this might only happen if the other end of a shared
-- message bus connection disconnects, see
-- DBusConnection:exitOnClose).
--
-- Once the connection is closed, operations such as sending a message
-- will return with the error IOErrorEnumClosed. Closing a
-- connection will not automatically flush the connection so queued
-- messages may be lost. Use dBusConnectionFlush if you need such
-- guarantees.
--
-- If connection is already closed, this method fails
-- with IOErrorEnumClosed.
--
-- When connection has been closed, the
-- DBusConnection::closed signal is emitted in the [thread-default
-- main context][g-main-context-push-thread-default] of the thread that
-- connection was constructed in.
--
-- This is an asynchronous method. When the operation is finished,
-- callback will be invoked in the [thread-default main
-- context][g-main-context-push-thread-default] of the thread you are
-- calling this method from. You can then call
-- dBusConnectionCloseFinish to get the result of the operation.
-- See dBusConnectionCloseSync for the synchronous version.
--
-- Since: 2.26
dBusConnectionClose :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes an operation started with dBusConnectionClose.
--
-- Since: 2.26
dBusConnectionCloseFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m ()
-- | Synchronously closes connection. The calling thread is
-- blocked until this is done. See dBusConnectionClose for the
-- asynchronous version of this method and more details about what it
-- does.
--
-- Since: 2.26
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 parameters is not compatible
-- with the D-Bus protocol (IOErrorEnumInvalidArgument), or if
-- connection has been closed (IOErrorEnumClosed).
--
-- Since: 2.26
dBusConnectionEmitSignal :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> m ()
-- | Exports actionGroup on connection at
-- objectPath.
--
-- 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 error set accordingly).
--
-- You can unexport the action group using
-- dBusConnectionUnexportActionGroup 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.
--
-- Since: 2.32
dBusConnectionExportActionGroup :: (HasCallStack, MonadIO m, IsDBusConnection a, IsActionGroup b) => a -> Text -> b -> m Word32
-- | Exports menu on connection at
-- objectPath.
--
-- 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 error set accordingly).
--
-- Exporting menus with sections containing more than
-- MENU_EXPORTER_MAX_SECTION_SIZE items is not supported and
-- results in undefined behavior.
--
-- You can unexport the menu model using
-- dBusConnectionUnexportMenuModel with the return value of this
-- function.
--
-- Since: 2.32
dBusConnectionExportMenuModel :: (HasCallStack, MonadIO m, IsDBusConnection a, IsMenuModel b) => a -> Text -> b -> m Word32
-- | Asynchronously flushes connection, that is, writes all
-- queued outgoing message to the transport and then flushes the
-- transport (using outputStreamFlushAsync). This is useful in
-- programs that wants to emit a D-Bus signal and then exit immediately.
-- Without flushing the connection, there is no guaranteed that the
-- message has been sent to the networking buffers in the OS kernel.
--
-- This is an asynchronous method. When the operation is finished,
-- callback will be invoked in the [thread-default main
-- context][g-main-context-push-thread-default] of the thread you are
-- calling this method from. You can then call
-- dBusConnectionFlushFinish to get the result of the operation.
-- See dBusConnectionFlushSync for the synchronous version.
--
-- Since: 2.26
dBusConnectionFlush :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes an operation started with dBusConnectionFlush.
--
-- Since: 2.26
dBusConnectionFlushFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m ()
-- | Synchronously flushes connection. The calling thread
-- is blocked until this is done. See dBusConnectionFlush for the
-- asynchronous version of this method and more details about what it
-- does.
--
-- Since: 2.26
dBusConnectionFlushSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe b -> m ()
-- | Gets the capabilities negotiated with the remote peer
--
-- Since: 2.26
dBusConnectionGetCapabilities :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m [DBusCapabilityFlags]
-- | Gets whether the process is terminated when connection
-- is closed by the remote peer. See DBusConnection:exitOnClose
-- for more details.
--
-- Since: 2.26
dBusConnectionGetExitOnClose :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Bool
-- | Gets the flags used to construct this connection
--
-- Since: 2.60
dBusConnectionGetFlags :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m [DBusConnectionFlags]
-- | The GUID of the peer performing the role of server when
-- authenticating. See DBusConnection:guid for more details.
--
-- Since: 2.26
dBusConnectionGetGuid :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Text
-- | Retrieves the last serial number assigned to a DBusMessage on
-- the current thread. This includes messages sent via both low-level API
-- such as dBusConnectionSendMessage as well as high-level API
-- such as dBusConnectionEmitSignal, dBusConnectionCall or
-- dBusProxyCall.
--
-- Since: 2.34
dBusConnectionGetLastSerial :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Word32
-- | Gets the credentials of the authenticated peer. This will always
-- return Nothing unless connection acted as a
-- server (e.g. DBusConnectionFlagsAuthenticationServer 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
-- Nothing for message bus clients.
--
-- Since: 2.26
dBusConnectionGetPeerCredentials :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m (Maybe Credentials)
-- | Gets the underlying stream used for IO.
--
-- While the DBusConnection is active, it will interact with this
-- stream from a worker thread, so it is not safe to interact with the
-- stream directly.
--
-- Since: 2.26
dBusConnectionGetStream :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m IOStream
-- | Gets the unique name of connection as assigned by the
-- message bus. This can also be used to figure out if
-- connection is a message bus connection.
--
-- Since: 2.26
dBusConnectionGetUniqueName :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m (Maybe Text)
-- | Gets whether connection is closed.
--
-- Since: 2.26
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 stream.
--
-- If stream is a SocketConnection, then the
-- corresponding Socket will be put into non-blocking mode.
--
-- The D-Bus connection will interact with stream from a
-- worker thread. As a result, the caller should not interact with
-- stream after this method has been called, except by
-- calling objectUnref on it.
--
-- If observer is not Nothing it may be used to
-- control the authentication process.
--
-- When the operation is finished, callback will be
-- invoked. You can then call dBusConnectionNewFinish to get the
-- result of the operation.
--
-- This is an asynchronous failable constructor. See
-- dBusConnectionNewSync for the synchronous version.
--
-- Since: 2.26
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 dBusConnectionNew.
--
-- Since: 2.26
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
-- address which must be in the D-Bus address
-- format.
--
-- This constructor can only be used to initiate client-side connections
-- - use dBusConnectionNew if you need to act as the server. In
-- particular, flags cannot contain the
-- DBusConnectionFlagsAuthenticationServer,
-- DBusConnectionFlagsAuthenticationAllowAnonymous or
-- DBusConnectionFlagsAuthenticationRequireSameUser flags.
--
-- When the operation is finished, callback will be
-- invoked. You can then call dBusConnectionNewForAddressFinish to
-- get the result of the operation.
--
-- If observer is not Nothing it may be used to
-- control the authentication process.
--
-- This is an asynchronous failable constructor. See
-- dBusConnectionNewForAddressSync for the synchronous version.
--
-- Since: 2.26
dBusConnectionNewForAddress :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) => Text -> [DBusConnectionFlags] -> Maybe a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes an operation started with dBusConnectionNewForAddress.
--
-- Since: 2.26
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
-- address which must be in the D-Bus address
-- format.
--
-- This constructor can only be used to initiate client-side connections
-- - use dBusConnectionNewSync if you need to act as the server.
-- In particular, flags cannot contain the
-- DBusConnectionFlagsAuthenticationServer,
-- DBusConnectionFlagsAuthenticationAllowAnonymous or
-- DBusConnectionFlagsAuthenticationRequireSameUser flags.
--
-- This is a synchronous failable constructor. See
-- dBusConnectionNewForAddress for the asynchronous version.
--
-- If observer is not Nothing it may be used to
-- control the authentication process.
--
-- Since: 2.26
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 stream.
--
-- If stream is a SocketConnection, then the
-- corresponding Socket will be put into non-blocking mode.
--
-- The D-Bus connection will interact with stream from a
-- worker thread. As a result, the caller should not interact with
-- stream after this method has been called, except by
-- calling objectUnref on it.
--
-- If observer is not Nothing it may be used to
-- control the authentication process.
--
-- This is a synchronous failable constructor. See
-- dBusConnectionNew for the asynchronous version.
--
-- Since: 2.26
dBusConnectionNewSync :: (HasCallStack, MonadIO m, IsIOStream a, IsDBusAuthObserver b, IsCancellable c) => a -> Maybe Text -> [DBusConnectionFlags] -> Maybe b -> Maybe c -> m DBusConnection
-- | Version of g_dbus_connection_register_object() using
-- closures instead of a DBusInterfaceVTable for easier binding in
-- other languages.
--
-- Since: 2.46
dBusConnectionRegisterObject :: (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 enumerate and introspection
-- functions in vtable are used to convey, to remote
-- callers, what nodes exist in the subtree rooted by
-- objectPath.
--
-- When handling remote calls into any node in the subtree, first the
-- enumerate function is used to check if the node
-- exists. If the node exists or the
-- DBusSubtreeFlagsDispatchToUnenumeratedNodes flag is set the
-- introspection function is used to check if the node
-- supports the requested method. If so, the dispatch
-- function is used to determine where to dispatch the call. The
-- collected DBusInterfaceVTable and gpointer will
-- be used to call into the interface vtable for processing the request.
--
-- All calls into user-provided code will be invoked in the
-- [thread-default main context][g-main-context-push-thread-default] of
-- the thread you are calling this method from.
--
-- If an existing subtree is already registered at
-- objectPath or then error is set to
-- IOErrorEnumExists.
--
-- Note that it is valid to register regular objects (using
-- g_dbus_connection_register_object()) in a subtree
-- registered with dBusConnectionRegisterSubtree - if so, the
-- subtree handler is tried as the last resort. One way to think about a
-- subtree handler is to consider it a fallback handler for object paths
-- not registered via g_dbus_connection_register_object()
-- or other bindings.
--
-- Note that vtable will be copied so you cannot change
-- it after registration.
--
-- See this [server][gdbus-subtree-server] for an example of how to use
-- this method.
--
-- Since: 2.26
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 dBusConnectionRemoveFilter, so you cannot just
-- free data that the filter might be using. Instead, you should pass a
-- DestroyNotify to dBusConnectionAddFilter, which will be
-- called when it is guaranteed that the data is no longer needed.
--
-- Since: 2.26
dBusConnectionRemoveFilter :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
-- | Asynchronously sends message to the peer represented
-- by connection.
--
-- Unless flags contain the
-- DBusSendMessageFlagsPreserveSerial flag, the serial number will
-- be assigned by connection and set on
-- message via dBusMessageSetSerial. If
-- outSerial is not Nothing, then the serial
-- number used will be written to this location prior to submitting the
-- message to the underlying transport. While it has a volatile
-- qualifier, this is a historical artifact and the argument passed to it
-- should not be volatile.
--
-- If connection is closed then the operation will fail
-- with IOErrorEnumClosed. If message is not
-- well-formed, the operation fails with
-- IOErrorEnumInvalidArgument.
--
-- See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for
-- an example of how to use this low-level API to send and receive UNIX
-- file descriptors.
--
-- Note that message must be unlocked, unless
-- flags contain the
-- DBusSendMessageFlagsPreserveSerial flag.
--
-- Since: 2.26
dBusConnectionSendMessage :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) => a -> b -> [DBusSendMessageFlags] -> m Word32
-- | Asynchronously sends message to the peer represented
-- by connection.
--
-- Unless flags contain the
-- DBusSendMessageFlagsPreserveSerial flag, the serial number will
-- be assigned by connection and set on
-- message via dBusMessageSetSerial. If
-- outSerial is not Nothing, then the serial
-- number used will be written to this location prior to submitting the
-- message to the underlying transport. While it has a volatile
-- qualifier, this is a historical artifact and the argument passed to it
-- should not be volatile.
--
-- If connection is closed then the operation will fail
-- with IOErrorEnumClosed. If cancellable is
-- canceled, the operation will fail with IOErrorEnumCancelled. If
-- message is not well-formed, the operation fails with
-- IOErrorEnumInvalidArgument.
--
-- This is an asynchronous method. When the operation is finished,
-- callback will be invoked in the [thread-default main
-- context][g-main-context-push-thread-default] of the thread you are
-- calling this method from. You can then call
-- dBusConnectionSendMessageWithReplyFinish to get the result of
-- the operation. See dBusConnectionSendMessageWithReplySync for
-- the synchronous version.
--
-- Note that message must be unlocked, unless
-- flags contain the
-- DBusSendMessageFlagsPreserveSerial flag.
--
-- See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for
-- an example of how to use this low-level API to send and receive UNIX
-- file descriptors.
--
-- Since: 2.26
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
-- dBusConnectionSendMessageWithReply.
--
-- Note that error is only set if a local in-process
-- error occurred. That is to say that the returned DBusMessage
-- object may be of type DBusMessageTypeError. Use
-- dBusMessageToGerror to transcode this to a GError.
--
-- See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for
-- an example of how to use this low-level API to send and receive UNIX
-- file descriptors.
--
-- Since: 2.26
dBusConnectionSendMessageWithReplyFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m DBusMessage
-- | Synchronously sends message to the peer represented by
-- connection and blocks the calling thread until a reply
-- is received or the timeout is reached. See
-- dBusConnectionSendMessageWithReply for the asynchronous version
-- of this method.
--
-- Unless flags contain the
-- DBusSendMessageFlagsPreserveSerial flag, the serial number will
-- be assigned by connection and set on
-- message via dBusMessageSetSerial. If
-- outSerial is not Nothing, then the serial
-- number used will be written to this location prior to submitting the
-- message to the underlying transport. While it has a volatile
-- qualifier, this is a historical artifact and the argument passed to it
-- should not be volatile.
--
-- If connection is closed then the operation will fail
-- with IOErrorEnumClosed. If cancellable is
-- canceled, the operation will fail with IOErrorEnumCancelled. If
-- message is not well-formed, the operation fails with
-- IOErrorEnumInvalidArgument.
--
-- Note that error is only set if a local in-process
-- error occurred. That is to say that the returned DBusMessage
-- object may be of type DBusMessageTypeError. Use
-- dBusMessageToGerror to transcode this to a GError.
--
-- See this [server][gdbus-server] and [client][gdbus-unix-fd-client] for
-- an example of how to use this low-level API to send and receive UNIX
-- file descriptors.
--
-- Note that message must be unlocked, unless
-- flags contain the
-- DBusSendMessageFlagsPreserveSerial flag.
--
-- Since: 2.26
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
-- connection is closed by the remote peer. See
-- DBusConnection:exitOnClose 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 exitOnClose to
-- False for the shared session bus connection, you should make
-- sure that your application exits when the user session ends.
--
-- Since: 2.26
dBusConnectionSetExitOnClose :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Bool -> m ()
-- | Subscribes to signals on connection and invokes
-- callback whenever the signal is received. Note that
-- callback will be invoked in the [thread-default main
-- context][g-main-context-push-thread-default] of the thread you are
-- calling this method from.
--
-- If connection is not a message bus connection,
-- sender must be Nothing.
--
-- If sender is a well-known name note that
-- callback is invoked with the unique name for the owner
-- of sender, not the well-known name as one would
-- expect. This is because the message bus rewrites the name. As such, to
-- avoid certain race conditions, users should be tracking the name owner
-- of the well-known name and use that when processing the received
-- signal.
--
-- If one of DBusSignalFlagsMatchArg0Namespace or
-- DBusSignalFlagsMatchArg0Path are given, arg0 is
-- interpreted as part of a namespace or path. The first argument of a
-- signal is matched against that part as specified by D-Bus.
--
-- If userDataFreeFunc is non-Nothing, it will be
-- called (in the thread-default main context of the thread you are
-- calling this method from) at some point after userData
-- is no longer needed. (It is not guaranteed to be called synchronously
-- when the signal is unsubscribed from, and may be called after
-- connection has been destroyed.)
--
-- As callback is potentially invoked in a different
-- thread from where it’s emitted, it’s possible for this to happen after
-- dBusConnectionSignalUnsubscribe has been called in another
-- thread. Due to this, userData should have a strong
-- reference which is freed with userDataFreeFunc, rather
-- than pointing to data whose lifecycle is tied to the signal
-- subscription. For example, if a Object is used to store the
-- subscription ID from dBusConnectionSignalSubscribe, a strong
-- reference to that Object must be passed to
-- userData, and objectUnref passed to
-- userDataFreeFunc. You are responsible for breaking the
-- resulting reference count cycle by explicitly unsubscribing from the
-- signal when dropping the last external reference to the Object.
-- Alternatively, a weak reference may be used.
--
-- It is guaranteed that if you unsubscribe from a signal using
-- dBusConnectionSignalUnsubscribe from the same thread which made
-- the corresponding dBusConnectionSignalSubscribe call,
-- callback will not be invoked after
-- dBusConnectionSignalUnsubscribe returns.
--
-- The returned subscription identifier is an opaque value which is
-- guaranteed to never be zero.
--
-- This function can never fail.
--
-- Since: 2.26
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
-- MainContext after this function has returned. You should
-- continue to iterate the MainContext until the
-- DestroyNotify function passed to
-- dBusConnectionSignalSubscribe is called, in order to avoid
-- memory leaks through callbacks queued on the MainContext after
-- it’s stopped being iterated. Alternatively, any idle source with a
-- priority lower than PRIORITY_DEFAULT that was scheduled after
-- unsubscription, also indicates that all resources of this subscription
-- are released.
--
-- Since: 2.26
dBusConnectionSignalUnsubscribe :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
-- | If connection was created with
-- DBusConnectionFlagsDelayMessageProcessing, this method starts
-- processing messages. Does nothing on if connection
-- wasn't created with this flag or if the method has already been
-- called.
--
-- Since: 2.26
dBusConnectionStartMessageProcessing :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m ()
-- | Reverses the effect of a previous call to
-- dBusConnectionExportActionGroup.
--
-- It is an error to call this function with an ID that wasn’t returned
-- from dBusConnectionExportActionGroup or to call it with the
-- same ID more than once.
--
-- Since: 2.32
dBusConnectionUnexportActionGroup :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
-- | Reverses the effect of a previous call to
-- dBusConnectionExportMenuModel.
--
-- It is an error to call this function with an ID that wasn't returned
-- from dBusConnectionExportMenuModel or to call it with the same
-- ID more than once.
--
-- Since: 2.32
dBusConnectionUnexportMenuModel :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
-- | Unregisters an object.
--
-- Since: 2.26
dBusConnectionUnregisterObject :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m Bool
-- | Unregisters a subtree.
--
-- Since: 2.26
dBusConnectionUnregisterSubtree :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m Bool
-- | Construct a GValueConstruct with valid value for the
-- “address” property. This is rarely needed directly, but it is
-- used by new.
constructDBusConnectionAddress :: (IsDBusConnection o, MonadIO m) => Text -> m (GValueConstruct o)
-- | Construct a GValueConstruct with valid value for the
-- “authentication-observer” property. This is rarely needed
-- directly, but it is used by new.
constructDBusConnectionAuthenticationObserver :: (IsDBusConnection o, MonadIO m, IsDBusAuthObserver a) => a -> m (GValueConstruct o)
-- | Get the value of the “capabilities” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get dBusConnection #capabilities --getDBusConnectionCapabilities :: (MonadIO m, IsDBusConnection o) => o -> m [DBusCapabilityFlags] -- | Get the value of the “closed” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusConnection #closed --getDBusConnectionClosed :: (MonadIO m, IsDBusConnection o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “exit-on-close” property. This is rarely needed directly, but -- it is used by new. constructDBusConnectionExitOnClose :: (IsDBusConnection o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “exit-on-close” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusConnection #exitOnClose --getDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> m Bool -- | Set the value of the “exit-on-close” property. When -- overloading is enabled, this is equivalent to -- --
-- set dBusConnection [ #exitOnClose := value ] --setDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. constructDBusConnectionFlags :: (IsDBusConnection o, MonadIO m) => [DBusConnectionFlags] -> m (GValueConstruct o) -- | Get the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusConnection #flags --getDBusConnectionFlags :: (MonadIO m, IsDBusConnection o) => o -> m [DBusConnectionFlags] -- | Construct a GValueConstruct with valid value for the -- “guid” property. This is rarely needed directly, but it is -- used by new. constructDBusConnectionGuid :: (IsDBusConnection o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “guid” property. When overloading -- is enabled, this is equivalent to -- --
-- get dBusConnection #guid --getDBusConnectionGuid :: (MonadIO m, IsDBusConnection o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “stream” property. This is rarely needed directly, but it is -- used by new. constructDBusConnectionStream :: (IsDBusConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o) -- | Get the value of the “stream” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusConnection #stream --getDBusConnectionStream :: (MonadIO m, IsDBusConnection o) => o -> m IOStream -- | Get the value of the “unique-name” property. When -- overloading is enabled, this is equivalent to -- --
-- get dBusConnection #uniqueName --getDBusConnectionUniqueName :: (MonadIO m, IsDBusConnection o) => o -> m (Maybe Text) -- | Emitted when the connection is closed. -- -- The cause of this event can be -- --
-- after dBusConnection #closed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> ((?self :: a) => DBusConnectionClosedCallback) -> m SignalHandlerId -- | Connect a signal handler for the closed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on dBusConnection #closed callback --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.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 -- | GDBusAuthObserver provides a mechanism for participating in -- how a DBusServer (or a DBusConnection) authenticates -- remote peers. -- -- Simply instantiate a GDBusAuthObserver and connect to the -- signals you are interested in. Note that new signals may be added in -- the future. -- --
-- static gboolean
-- on_allow_mechanism (GDBusAuthObserver *observer,
-- const gchar *mechanism,
-- gpointer user_data)
-- {
-- if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
-- {
-- return TRUE;
-- }
--
-- return FALSE;
-- }
--
--
--
-- 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;
-- }
--
--
-- Since: 2.26
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
-- DBusAuthObserver, for instance with toDBusAuthObserver.
class (GObject o, IsDescendantOf DBusAuthObserver o) => IsDBusAuthObserver o
-- | Cast to DBusAuthObserver, for types for which this is known to
-- be safe. For general casts, use castTo.
toDBusAuthObserver :: (MonadIO m, IsDBusAuthObserver o) => o -> m DBusAuthObserver
-- | Emits the DBusAuthObserver::allowMechanism signal on
-- observer.
--
-- Since: 2.34
dBusAuthObserverAllowMechanism :: (HasCallStack, MonadIO m, IsDBusAuthObserver a) => a -> Text -> m Bool
-- | Emits the DBusAuthObserver::authorizeAuthenticatedPeer signal
-- on observer.
--
-- Since: 2.26
dBusAuthObserverAuthorizeAuthenticatedPeer :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsIOStream b, IsCredentials c) => a -> b -> Maybe c -> m Bool
-- | Creates a new DBusAuthObserver object.
--
-- Since: 2.26
dBusAuthObserverNew :: (HasCallStack, MonadIO m) => m DBusAuthObserver
-- | Emitted to check if mechanism is allowed to be used.
--
-- Since: 2.34
type DBusAuthObserverAllowMechanismCallback = Text -> IO Bool
-- | Connect a signal handler for the allowMechanism signal, to be
-- run after the default handler. When overloading is enabled,
-- this is equivalent to
--
-- -- after dBusAuthObserver #allowMechanism callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusAuthObserverAllowMechanism :: (IsDBusAuthObserver a, MonadIO m) => a -> ((?self :: a) => DBusAuthObserverAllowMechanismCallback) -> m SignalHandlerId -- | Connect a signal handler for the allowMechanism signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dBusAuthObserver #allowMechanism callback --onDBusAuthObserverAllowMechanism :: (IsDBusAuthObserver a, MonadIO m) => a -> ((?self :: a) => DBusAuthObserverAllowMechanismCallback) -> m SignalHandlerId -- | Emitted to check if a peer that is successfully authenticated is -- authorized. -- -- Since: 2.26 type DBusAuthObserverAuthorizeAuthenticatedPeerCallback = IOStream -> Maybe Credentials -> IO Bool -- | Connect a signal handler for the authorizeAuthenticatedPeer -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after dBusAuthObserver #authorizeAuthenticatedPeer callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDBusAuthObserverAuthorizeAuthenticatedPeer :: (IsDBusAuthObserver a, MonadIO m) => a -> ((?self :: a) => DBusAuthObserverAuthorizeAuthenticatedPeerCallback) -> m SignalHandlerId -- | Connect a signal handler for the authorizeAuthenticatedPeer -- signal, to be run before the default handler. When overloading -- is enabled, this is equivalent to -- --
-- on dBusAuthObserver #authorizeAuthenticatedPeer callback --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.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 -- | GDBusActionGroup is an implementation of the -- ActionGroup interface. -- -- GDBusActionGroup can be used as a proxy for an action group -- that is exported over D-Bus with -- dBusConnectionExportActionGroup. 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 -- DBusActionGroup, for instance with toDBusActionGroup. class (GObject o, IsDescendantOf DBusActionGroup o) => IsDBusActionGroup o -- | Cast to DBusActionGroup, for types for which this is known to -- be safe. For general casts, use castTo. toDBusActionGroup :: (MonadIO m, IsDBusActionGroup o) => o -> m DBusActionGroup -- | Obtains a DBusActionGroup for the action group which is -- exported at the given busName and -- objectPath. -- -- 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 -- actionGroupListActions to get the initial list. -- -- Since: 2.32 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.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 OutputStream and allows -- conversion of data of various types during reading. -- -- As of GLib 2.34, GConverterOutputStream implements -- PollableOutputStream. 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 -- ConverterOutputStream, for instance with -- toConverterOutputStream. class (GObject o, IsDescendantOf ConverterOutputStream o) => IsConverterOutputStream o -- | Cast to ConverterOutputStream, for types for which this is -- known to be safe. For general casts, use castTo. toConverterOutputStream :: (MonadIO m, IsConverterOutputStream o) => o -> m ConverterOutputStream -- | Gets the Converter that is used by -- converterStream. -- -- Since: 2.24 converterOutputStreamGetConverter :: (HasCallStack, MonadIO m, IsConverterOutputStream a) => a -> m Converter -- | Creates a new converter output stream for the -- baseStream. converterOutputStreamNew :: (HasCallStack, MonadIO m, IsOutputStream a, IsConverter b) => a -> b -> m ConverterOutputStream -- | Construct a GValueConstruct with valid value for the -- “converter” property. This is rarely needed directly, but it -- is used by new. constructConverterOutputStreamConverter :: (IsConverterOutputStream o, MonadIO m, IsConverter a) => a -> m (GValueConstruct o) -- | Get the value of the “converter” property. When -- overloading is enabled, this is equivalent to -- --
-- get converterOutputStream #converter --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.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 InputStream and allows -- conversion of data of various types during reading. -- -- As of GLib 2.34, GConverterInputStream implements -- PollableInputStream. 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 -- ConverterInputStream, for instance with -- toConverterInputStream. class (GObject o, IsDescendantOf ConverterInputStream o) => IsConverterInputStream o -- | Cast to ConverterInputStream, for types for which this is known -- to be safe. For general casts, use castTo. toConverterInputStream :: (MonadIO m, IsConverterInputStream o) => o -> m ConverterInputStream -- | Gets the Converter that is used by -- converterStream. -- -- Since: 2.24 converterInputStreamGetConverter :: (HasCallStack, MonadIO m, IsConverterInputStream a) => a -> m Converter -- | Creates a new converter input stream for the -- baseStream. converterInputStreamNew :: (HasCallStack, MonadIO m, IsInputStream a, IsConverter b) => a -> b -> m ConverterInputStream -- | Construct a GValueConstruct with valid value for the -- “converter” property. This is rarely needed directly, but it -- is used by new. constructConverterInputStreamConverter :: (IsConverterInputStream o, MonadIO m, IsConverter a) => a -> m (GValueConstruct o) -- | Get the value of the “converter” property. When -- overloading is enabled, this is equivalent to -- --
-- get converterInputStream #converter --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.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 -- | GBytesIcon specifies an image held in memory in a common -- format (usually PNG) to be used as icon. -- -- Since: 2.38 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 BytesIcon, for -- instance with toBytesIcon. class (GObject o, IsDescendantOf BytesIcon o) => IsBytesIcon o -- | Cast to BytesIcon, for types for which this is known to be -- safe. For general casts, use castTo. toBytesIcon :: (MonadIO m, IsBytesIcon o) => o -> m BytesIcon -- | Gets the Bytes associated with the given icon. -- -- Since: 2.38 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 loadableIconLoad is called) if the -- image is invalid. -- -- Since: 2.38 bytesIconNew :: (HasCallStack, MonadIO m) => Bytes -> m BytesIcon -- | Construct a GValueConstruct with valid value for the -- “bytes” property. This is rarely needed directly, but it is -- used by new. constructBytesIconBytes :: (IsBytesIcon o, MonadIO m) => Bytes -> m (GValueConstruct o) -- | Get the value of the “bytes” property. When -- overloading is enabled, this is equivalent to -- --
-- get bytesIcon #bytes --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.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 FilterOutputStream and -- provides for buffered writes. -- -- By default, GBufferedOutputStream's buffer size is set at 4 -- kilobytes. -- -- To create a buffered output stream, use -- bufferedOutputStreamNew, or bufferedOutputStreamNewSized -- to specify the buffer's size at construction. -- -- To get the size of a buffer within a buffered input stream, use -- bufferedOutputStreamGetBufferSize. To change the size of a -- buffered output stream's buffer, use -- bufferedOutputStreamSetBufferSize. 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 -- BufferedOutputStream, for instance with -- toBufferedOutputStream. class (GObject o, IsDescendantOf BufferedOutputStream o) => IsBufferedOutputStream o -- | Cast to BufferedOutputStream, for types for which this is known -- to be safe. For general casts, use castTo. 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 stream. 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 stream's buffer should -- automatically grow. If autoGrow 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 size. bufferedOutputStreamSetBufferSize :: (HasCallStack, MonadIO m, IsBufferedOutputStream a) => a -> CSize -> m () -- | Construct a GValueConstruct with valid value for the -- “auto-grow” property. This is rarely needed directly, but it -- is used by new. constructBufferedOutputStreamAutoGrow :: (IsBufferedOutputStream o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “auto-grow” property. When -- overloading is enabled, this is equivalent to -- --
-- get bufferedOutputStream #autoGrow --getBufferedOutputStreamAutoGrow :: (MonadIO m, IsBufferedOutputStream o) => o -> m Bool -- | Set the value of the “auto-grow” property. When -- overloading is enabled, this is equivalent to -- --
-- set bufferedOutputStream [ #autoGrow := value ] --setBufferedOutputStreamAutoGrow :: (MonadIO m, IsBufferedOutputStream o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “buffer-size” property. This is rarely needed directly, but -- it is used by new. constructBufferedOutputStreamBufferSize :: (IsBufferedOutputStream o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “buffer-size” property. When -- overloading is enabled, this is equivalent to -- --
-- get bufferedOutputStream #bufferSize --getBufferedOutputStreamBufferSize :: (MonadIO m, IsBufferedOutputStream o) => o -> m Word32 -- | Set the value of the “buffer-size” property. When -- overloading is enabled, this is equivalent to -- --
-- set bufferedOutputStream [ #bufferSize := value ] --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.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 FilterInputStream and provides -- for buffered reads. -- -- By default, GBufferedInputStream's buffer size is set at 4 -- kilobytes. -- -- To create a buffered input stream, use bufferedInputStreamNew, -- or bufferedInputStreamNewSized to specify the buffer's size at -- construction. -- -- To get the size of a buffer within a buffered input stream, use -- bufferedInputStreamGetBufferSize. To change the size of a -- buffered input stream's buffer, use -- bufferedInputStreamSetBufferSize. 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 -- BufferedInputStream, for instance with -- toBufferedInputStream. class (GObject o, IsDescendantOf BufferedInputStream o) => IsBufferedInputStream o -- | Cast to BufferedInputStream, for types for which this is known -- to be safe. For general casts, use castTo. toBufferedInputStream :: (MonadIO m, IsBufferedInputStream o) => o -> m BufferedInputStream -- | Tries to read count bytes from the stream into the -- buffer. Will block during this read. -- -- If count is zero, returns zero and does nothing. A -- value of count larger than G_MAXSSIZE will -- cause a [errorgio.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 count is zero), but never otherwise. -- -- If count is -1 then the attempted read size is equal -- to the number of bytes that are required to fill the buffer. -- -- If cancellable is not NULL, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- [errorgio.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 -1 is returned and error is set -- accordingly. -- -- For the asynchronous, non-blocking, version of this function, see -- bufferedInputStreamFillAsync. bufferedInputStreamFill :: (HasCallStack, MonadIO m, IsBufferedInputStream a, IsCancellable b) => a -> Int64 -> Maybe b -> m Int64 -- | Reads data into stream's buffer asynchronously, up to -- count size. ioPriority can be used to -- prioritize reads. For the synchronous version of this function, see -- bufferedInputStreamFill. -- -- If count is -1 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 InputStream from the given -- baseStream, with a buffer set to the default size (4 -- kilobytes). bufferedInputStreamNew :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m BufferedInputStream -- | Creates a new BufferedInputStream from the given -- baseStream, with a buffer set to size. bufferedInputStreamNewSized :: (HasCallStack, MonadIO m, IsInputStream a) => a -> CSize -> m BufferedInputStream -- | Peeks in the buffer, copying data of size count into -- buffer, offset offset bytes. 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 -1 is returned but it's not an exceptional error and -- error is not set. -- -- If cancellable is not NULL, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- [errorgio.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 -1 is returned and error is set -- accordingly. bufferedInputStreamReadByte :: (HasCallStack, MonadIO m, IsBufferedInputStream a, IsCancellable b) => a -> Maybe b -> m Int32 -- | Sets the size of the internal buffer of stream to -- size, or to the size of the contents of the buffer. -- The buffer can never be resized smaller than its current contents. bufferedInputStreamSetBufferSize :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> CSize -> m () -- | Construct a GValueConstruct with valid value for the -- “buffer-size” property. This is rarely needed directly, but -- it is used by new. constructBufferedInputStreamBufferSize :: (IsBufferedInputStream o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “buffer-size” property. When -- overloading is enabled, this is equivalent to -- --
-- get bufferedInputStream #bufferSize --getBufferedInputStreamBufferSize :: (MonadIO m, IsBufferedInputStream o) => o -> m Word32 -- | Set the value of the “buffer-size” property. When -- overloading is enabled, this is equivalent to -- --
-- set bufferedInputStream [ #bufferSize := value ] --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.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 -- | GApplicationCommandLine represents a command-line invocation -- of an application. -- -- It is created by Application and emitted in the -- Application::commandLine 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 GApplicationCommandLine object can provide the -- argc and argv parameters for use with -- the OptionContext command-line parsing API, with the -- applicationCommandLineGetArguments function. See -- [gapplication-example-cmdline3.c][gapplication-example-cmdline3] 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 -- applicationCommandLineDone method is called. This method is -- also automatically called when the object is disposed. -- -- The main use for GApplicationCommandLine (and the -- Application::commandLine signal) is 'Emacs server' like use -- cases: You can set the EDITOR 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 -- Application::commandLine 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. -- --
-- static int
-- command_line (GApplication *application,
-- GApplicationCommandLine *cmdline)
-- {
-- gchar **argv;
-- gint argc;
-- gint i;
--
-- argv = g_application_command_line_get_arguments (cmdline, &argc);
--
-- g_application_command_line_print (cmdline,
-- "This text is written back\n"
-- "to stdout of the caller\n");
--
-- for (i = 0; i < argc; i++)
-- g_print ("argument %d: %s\n", i, argv[i]);
--
-- g_strfreev (argv);
--
-- return 0;
-- }
--
--
-- The complete example can be found here:
-- gapplication-example-cmdline.c
--
-- In more complicated cases, the handling of the commandline can be
-- split between the launcher and the primary instance.
--
--
-- 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)->local_command_line = test_local_cmdline;
--
-- ...
-- }
--
--
-- In this example of split commandline handling, options that start with
-- --local- are handled locally, all other options are passed to
-- the Application::commandLine handler which runs in the primary
-- instance.
--
-- The complete example can be found here:
-- gapplication-example-cmdline2.c
--
-- If handling the commandline requires a lot of work, it may be better
-- to defer it.
--
--
-- 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;
-- }
--
--
-- In this example the commandline is not completely handled before the
-- Application::commandLine handler returns. Instead, we keep a
-- reference to the GApplicationCommandLine 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:
-- gapplication-example-cmdline3.c
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
-- ApplicationCommandLine, for instance with
-- toApplicationCommandLine.
class (GObject o, IsDescendantOf ApplicationCommandLine o) => IsApplicationCommandLine o
-- | Cast to ApplicationCommandLine, for types for which this is
-- known to be safe. For general casts, use castTo.
toApplicationCommandLine :: (MonadIO m, IsApplicationCommandLine o) => o -> m ApplicationCommandLine
-- | Creates a File corresponding to a filename that was given as
-- part of the invocation of cmdline.
--
-- This differs from fileNewForCommandlineArg in that it resolves
-- relative pathnames using the current working directory of the invoking
-- process rather than the local process.
--
-- Since: 2.36
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 Application::commandLine
-- handler, after the exit status is set and all messages are printed.
--
-- After this call, applicationCommandLineSetExitStatus has no
-- effect. Subsequent calls to this method are no-ops.
--
-- This method is automatically called when the
-- ApplicationCommandLine object is disposed — so you can omit the
-- call in non-garbage collected languages.
--
-- Since: 2.80
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 OptionContext, you
-- must use optionContextParseStrv.
--
-- The return value is Nothing-terminated and should be freed
-- using strfreev.
--
-- Since: 2.28
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 Nothing.
--
-- The return value should not be modified or freed and is valid for as
-- long as cmdline exists.
--
-- Since: 2.28
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 getEnviron, ie as a
-- Nothing-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
-- ApplicationFlagsSendEnvironment to affect that. Even with this
-- flag set it is possible that the environment is still not available
-- (due to invocation messages from other applications).
--
-- The return value should not be modified or freed and is valid for as
-- long as cmdline exists.
--
-- See applicationCommandLineGetenv if you are only interested in
-- the value of a single environment variable.
--
-- Since: 2.28
applicationCommandLineGetEnviron :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m [[Char]]
-- | Gets the exit status of cmdline. See
-- applicationCommandLineSetExitStatus for more information.
--
-- Since: 2.28
applicationCommandLineGetExitStatus :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m Int32
-- | Determines if cmdline represents a remote invocation.
--
-- Since: 2.28
applicationCommandLineGetIsRemote :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m Bool
-- | Gets the options that were passed to
-- g_application_command_line().
--
-- If you did not override local_command_line() then
-- these are the same options that were parsed according to the
-- GOptionEntrys added to the application with
-- applicationAddMainOptionEntries and possibly modified from your
-- GApplicationhandleLocalOptions handler.
--
-- If no options were sent then an empty dictionary is returned so that
-- you don't need to check for Nothing.
--
-- The data has been passed via an untrusted external process, so the
-- types of all values must be checked before being used.
--
-- Since: 2.40
applicationCommandLineGetOptionsDict :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m VariantDict
-- | Gets the platform data associated with the invocation of
-- cmdline.
--
-- This is a GVariant dictionary containing information about the
-- context in which the invocation occurred. It typically contains
-- information like the current working directory and the startup
-- notification ID.
--
-- 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 Nothing.
--
-- Since: 2.28
applicationCommandLineGetPlatformData :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m (Maybe GVariant)
-- | Gets the stdin of the invoking process.
--
-- The InputStream 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
-- Nothing will be returned. In the future, support may be
-- expanded to other platforms.
--
-- You must only call this function once per commandline invocation.
--
-- Since: 2.34
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 getenv. The strings
-- may contain non-utf8 data.
--
-- The remote application usually does not send an environment. Use
-- ApplicationFlagsSendEnvironment to affect that. Even with this
-- flag set it is possible that the environment is still not available
-- (due to invocation messages from other applications).
--
-- The return value should not be modified or freed and is valid for as
-- long as cmdline exists.
--
-- Since: 2.28
applicationCommandLineGetenv :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> [Char] -> m (Maybe Text)
-- | Prints a message using the stdout print handler in the invoking
-- process.
--
-- Unlike g_application_command_line_print(),
-- message is not a printf()-style format
-- string. Use this function if message contains text you
-- don't have control over, that could include printf() escape
-- sequences.
--
-- Since: 2.80
applicationCommandLinePrintLiteral :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Text -> m ()
-- | Prints a message using the stderr print handler in the invoking
-- process.
--
-- Unlike g_application_command_line_printerr(),
-- message is not a printf()-style format
-- string. Use this function if message contains text you
-- don't have control over, that could include printf() escape
-- sequences.
--
-- Since: 2.80
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 Application::commandLine 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
-- cmdline. 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 ApplicationCommandLine is used.
--
-- This method is a no-op if applicationCommandLineDone has been
-- called.
--
-- Since: 2.28
applicationCommandLineSetExitStatus :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Int32 -> m ()
-- | Construct a GValueConstruct with valid value for the
-- “arguments” property. This is rarely needed directly, but it
-- is used by new.
constructApplicationCommandLineArguments :: (IsApplicationCommandLine o, MonadIO m) => GVariant -> m (GValueConstruct o)
-- | Get the value of the “is-remote” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get applicationCommandLine #isRemote --getApplicationCommandLineIsRemote :: (MonadIO m, IsApplicationCommandLine o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “options” property. This is rarely needed directly, but it is -- used by new. constructApplicationCommandLineOptions :: (IsApplicationCommandLine o, MonadIO m) => GVariant -> m (GValueConstruct o) -- | Construct a GValueConstruct with valid value for the -- “platform-data” property. This is rarely needed directly, but -- it is used by new. 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.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 -- | GApplication is the core class for application support. -- -- A GApplication 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 -- GtkApplication or MxApplication. In general, you -- should not use this class outside of a higher level framework. -- -- GApplication provides convenient life-cycle management by -- maintaining a "use count" for the primary application instance. The -- use count can be changed using applicationHold and -- applicationRelease. If it drops to zero, the application exits. -- Higher-level classes such as GtkApplication employ the use -- count to ensure that the application stays alive as long as it has any -- opened windows. -- -- Another feature that GApplication (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 GApplication 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 main() -- function of a GApplication should do very little more than -- instantiating the application instance, possibly connecting signal -- handlers, then calling applicationRun. 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 applicationRun promptly returns. See -- the code examples below. -- -- If used, the expected form of an application identifier is the same as -- that of a D-Bus well-known bus name. Examples include: -- com.example.MyApp, -- org.example.internal_apps.Calculator, -- org._7_zip.Archiver. For details on valid application -- identifiers, see applicationIdIsValid. -- -- 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 Application attempts to acquire the bus name -- of your application (which happens in applicationRegister). -- Unfortunately, this means that you cannot use -- Application:isRemote to decide if you want to register object -- paths. -- -- GApplication also implements the ActionGroup and -- ActionMap interfaces and lets you easily export actions by -- adding them with actionMapAddAction. When invoking an action by -- calling actionGroupActivateAction on the application, it is -- always invoked in the primary instance. The actions are also exported -- on the session bus, and GIO provides the DBusActionGroup -- wrapper to conveniently access them remotely. GIO provides a -- DBusMenuModel wrapper for remote access to exported -- MenuModels. -- -- Note: Due to the fact that actions are exported on the session bus, -- using maybe parameters is not supported, since D-Bus does not -- support maybe types. -- -- There is a number of different entry points into a -- GApplication: -- --
-- clear #actionGroup --clearApplicationActionGroup :: (MonadIO m, IsApplication o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “action-group” property. This is rarely needed directly, but -- it is used by new. constructApplicationActionGroup :: (IsApplication o, MonadIO m, IsActionGroup a) => a -> m (GValueConstruct o) -- | Set the value of the “action-group” property. When -- overloading is enabled, this is equivalent to -- --
-- set application [ #actionGroup := value ] --setApplicationActionGroup :: (MonadIO m, IsApplication o, IsActionGroup a) => o -> a -> m () -- | Set the value of the “application-id” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #applicationId --clearApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “application-id” property. This is rarely needed directly, -- but it is used by new. constructApplicationApplicationId :: (IsApplication o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “application-id” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #applicationId --getApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> m (Maybe Text) -- | Set the value of the “application-id” property. When -- overloading is enabled, this is equivalent to -- --
-- set application [ #applicationId := value ] --setApplicationApplicationId :: (MonadIO m, IsApplication o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “flags” property. This is rarely needed directly, but it is -- used by new. constructApplicationFlags :: (IsApplication o, MonadIO m) => [ApplicationFlags] -> m (GValueConstruct o) -- | Get the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #flags --getApplicationFlags :: (MonadIO m, IsApplication o) => o -> m [ApplicationFlags] -- | Set the value of the “flags” property. When -- overloading is enabled, this is equivalent to -- --
-- set application [ #flags := value ] --setApplicationFlags :: (MonadIO m, IsApplication o) => o -> [ApplicationFlags] -> m () -- | Construct a GValueConstruct with valid value for the -- “inactivity-timeout” property. This is rarely needed -- directly, but it is used by new. constructApplicationInactivityTimeout :: (IsApplication o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “inactivity-timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #inactivityTimeout --getApplicationInactivityTimeout :: (MonadIO m, IsApplication o) => o -> m Word32 -- | Set the value of the “inactivity-timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- set application [ #inactivityTimeout := value ] --setApplicationInactivityTimeout :: (MonadIO m, IsApplication o) => o -> Word32 -> m () -- | Get the value of the “is-busy” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #isBusy --getApplicationIsBusy :: (MonadIO m, IsApplication o) => o -> m Bool -- | Get the value of the “is-registered” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #isRegistered --getApplicationIsRegistered :: (MonadIO m, IsApplication o) => o -> m Bool -- | Get the value of the “is-remote” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #isRemote --getApplicationIsRemote :: (MonadIO m, IsApplication o) => o -> m Bool -- | Set the value of the “resource-base-path” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #resourceBasePath --clearApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “resource-base-path” property. This is rarely needed -- directly, but it is used by new. constructApplicationResourceBasePath :: (IsApplication o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “resource-base-path” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #resourceBasePath --getApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> m (Maybe Text) -- | Set the value of the “resource-base-path” property. When -- overloading is enabled, this is equivalent to -- --
-- set application [ #resourceBasePath := value ] --setApplicationResourceBasePath :: (MonadIO m, IsApplication o) => o -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “version” property. This is rarely needed directly, but it is -- used by new. constructApplicationVersion :: (IsApplication o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “version” property. When -- overloading is enabled, this is equivalent to -- --
-- get application #version --getApplicationVersion :: (MonadIO m, IsApplication o) => o -> m (Maybe Text) -- | Set the value of the “version” property. When -- overloading is enabled, this is equivalent to -- --
-- set application [ #version := value ] --setApplicationVersion :: (MonadIO m, IsApplication o) => o -> Text -> m () -- | The activate signal is emitted on the primary instance when an -- activation occurs. See applicationActivate. type ApplicationActivateCallback = IO () -- | Connect a signal handler for the activate signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after application #activate callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterApplicationActivate :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationActivateCallback) -> m SignalHandlerId -- | Connect a signal handler for the activate signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on application #activate callback --onApplicationActivate :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationActivateCallback) -> m SignalHandlerId -- | The commandLine signal is emitted on the primary instance when -- a commandline is not handled locally. See applicationRun and -- the ApplicationCommandLine documentation for more information. type ApplicationCommandLineCallback = ApplicationCommandLine -> IO Int32 -- | Connect a signal handler for the commandLine signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after application #commandLine callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterApplicationCommandLine :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationCommandLineCallback) -> m SignalHandlerId -- | Connect a signal handler for the commandLine signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on application #commandLine callback --onApplicationCommandLine :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationCommandLineCallback) -> m SignalHandlerId -- | The handleLocalOptions 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 applicationAddMainOptionEntries and -- applicationAddOptionGroup. -- -- Signal handlers can inspect options (along with values -- pointed to from the argData of an installed -- GOptionEntrys) 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 -- ApplicationFlagsHandlesCommandLine the "normal processing" will -- send the options dictionary to the primary instance -- where it can be read with applicationCommandLineGetOptionsDict. -- The signal handler can modify the dictionary before returning, and the -- modified dictionary will be sent. -- -- In the event that ApplicationFlagsHandlesCommandLine 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 applicationActivate. One or more -- arguments results in a call to applicationOpen. -- -- If you want to handle the local commandline arguments for yourself by -- converting them to calls to applicationOpen or -- actionGroupActivateAction then you must be sure to register the -- application first. You should probably not call -- applicationActivate for yourself, however: just return -1 and -- allow the default handler to do it for you. This will ensure that the -- --gapplication-service switch works properly (i.e. no -- activation in that case). -- -- Note that this signal is emitted from the default implementation of -- local_command_line(). If you override that function -- and don't chain up then this signal will never be emitted. -- -- You can override local_command_line() if you need more -- powerful capabilities than what is provided here, but this should not -- normally be required. -- -- Since: 2.40 type ApplicationHandleLocalOptionsCallback = VariantDict -> IO Int32 -- | Connect a signal handler for the handleLocalOptions signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after application #handleLocalOptions callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterApplicationHandleLocalOptions :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationHandleLocalOptionsCallback) -> m SignalHandlerId -- | Connect a signal handler for the handleLocalOptions signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on application #handleLocalOptions callback --onApplicationHandleLocalOptions :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationHandleLocalOptionsCallback) -> m SignalHandlerId -- | The nameLost 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 ApplicationFlagsAllowReplacement -- flag. -- -- The default handler for this signal calls applicationQuit. -- -- Since: 2.60 type ApplicationNameLostCallback = IO Bool -- | Connect a signal handler for the nameLost signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after application #nameLost callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterApplicationNameLost :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameLostCallback) -> m SignalHandlerId -- | Connect a signal handler for the nameLost signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on application #nameLost callback --onApplicationNameLost :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationNameLostCallback) -> m SignalHandlerId -- | The open signal is emitted on the primary instance when there -- are files to open. See applicationOpen for more information. type ApplicationOpenCallback = [File] -> Text -> IO () -- | Connect a signal handler for the open signal, to be run after -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after application #open callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterApplicationOpen :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationOpenCallback) -> m SignalHandlerId -- | Connect a signal handler for the open signal, to be run before -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- on application #open callback --onApplicationOpen :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationOpenCallback) -> m SignalHandlerId -- | The shutdown signal is emitted only on the registered primary -- instance immediately after the main loop terminates. type ApplicationShutdownCallback = IO () -- | Connect a signal handler for the shutdown signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after application #shutdown callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterApplicationShutdown :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationShutdownCallback) -> m SignalHandlerId -- | Connect a signal handler for the shutdown signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on application #shutdown callback --onApplicationShutdown :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationShutdownCallback) -> m SignalHandlerId -- | The startup signal is emitted on the primary instance -- immediately after registration. See applicationRegister. type ApplicationStartupCallback = IO () -- | Connect a signal handler for the startup signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after application #startup callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterApplicationStartup :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationStartupCallback) -> m SignalHandlerId -- | Connect a signal handler for the startup signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on application #startup callback --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.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 -- AppLaunchContext, for instance with toAppLaunchContext. class (GObject o, IsDescendantOf AppLaunchContext o) => IsAppLaunchContext o -- | Cast to AppLaunchContext, for types for which this is known to -- be safe. For general casts, use castTo. toAppLaunchContext :: (MonadIO m, IsAppLaunchContext o) => o -> m AppLaunchContext -- | Gets the display string for the context. This is used -- to ensure new applications are started on the same display as the -- launching application, by setting the DISPLAY environment -- variable. 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 context is used to launch an application. -- This is a NULL-terminated array of strings, where each string -- has the form KEY=VALUE. -- -- Since: 2.32 appLaunchContextGetEnvironment :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> m [[Char]] -- | Initiates startup notification for the application and returns the -- XDG_ACTIVATION_TOKEN or DESKTOP_STARTUP_ID 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 are interoperable. -- -- Activation tokens are defined in the XDG Activation Protocol, -- and startup notification IDs are defined in the freedesktop.org -- Startup Notification Protocol. -- -- Support for the XDG Activation Protocol was added in GLib 2.76. Since -- GLib 2.82 info and files can be -- NULL. If that’s not supported by the backend, the returned -- token will be NULL. 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 -- appLaunchContextGetStartupNotifyId. 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 -- `GdkAppLaunchContext`. appLaunchContextNew :: (HasCallStack, MonadIO m) => m AppLaunchContext -- | Arranges for variable to be set to -- value in the child’s environment when -- context is used to launch an application. -- -- Since: 2.32 appLaunchContextSetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> [Char] -> [Char] -> m () -- | Arranges for variable to be unset in the child’s -- environment when context is used to launch an -- application. -- -- Since: 2.32 appLaunchContextUnsetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> [Char] -> m () -- | The AppLaunchContext::launchFailed signal is emitted when a -- AppInfo 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. -- -- Since: 2.36 type AppLaunchContextLaunchFailedCallback = Text -> IO () -- | Connect a signal handler for the launchFailed signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after appLaunchContext #launchFailed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchFailedCallback) -> m SignalHandlerId -- | Connect a signal handler for the launchFailed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on appLaunchContext #launchFailed callback --onAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchFailedCallback) -> m SignalHandlerId -- | The AppLaunchContext::launchStarted signal is emitted when a -- AppInfo is about to be launched. If non-null the -- platformData is an GVariant dictionary mapping strings -- to variants (ie a{sv}), which contains additional, -- platform-specific data about this launch. On UNIX, at least the -- startup-notification-id keys will be present. -- -- The value of the startup-notification-id key (type -- s) is a startup notification ID corresponding to the format -- from the -- <https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt -- startup-notification specification>. It allows tracking the -- progress of the launchee through startup. -- -- It is guaranteed that this signal is followed by either a -- AppLaunchContext::launched or -- AppLaunchContext::launchFailed 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. -- -- Since: 2.72 type AppLaunchContextLaunchStartedCallback = AppInfo -> Maybe GVariant -> IO () -- | Connect a signal handler for the launchStarted signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after appLaunchContext #launchStarted callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterAppLaunchContextLaunchStarted :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchStartedCallback) -> m SignalHandlerId -- | Connect a signal handler for the launchStarted signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on appLaunchContext #launchStarted callback --onAppLaunchContextLaunchStarted :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchStartedCallback) -> m SignalHandlerId -- | The AppLaunchContext::launched signal is emitted when a -- AppInfo 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 platformData is an GVariant dictionary mapping -- strings to variants (ie a{sv}), which contains additional, -- platform-specific data about this launch. On UNIX, at least the -- pid and startup-notification-id keys will be -- present. -- -- Since 2.72 the pid may be 0 if the process id wasn’t known -- (for example if the process was launched via D-Bus). The pid -- may not be set at all in subsequent releases. -- -- On Windows, pid is guaranteed to be valid only for the -- duration of the AppLaunchContext::launched signal emission; -- after the signal is emitted, GLib will call spawnClosePid. If -- you need to keep the [aliasgLib.Pid] after the signal -- has been emitted, then you can duplicate pid using -- DuplicateHandle(). -- -- Since: 2.36 type AppLaunchContextLaunchedCallback = AppInfo -> GVariant -> IO () -- | Connect a signal handler for the launched signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after appLaunchContext #launched callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> ((?self :: a) => AppLaunchContextLaunchedCallback) -> m SignalHandlerId -- | Connect a signal handler for the launched signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on appLaunchContext #launched callback --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.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 GVolume 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 GVolume is currently mounted, the corresponding -- Mount can be retrieved using volumeGetMount. -- -- Mounting a GVolume instance is an asynchronous operation. For -- more information about asynchronous operations, see AsyncResult -- and Task. To mount a GVolume, first call -- volumeMount with (at least) the GVolume instance, -- optionally a MountOperation object and a -- [typegio.AsyncReadyCallback]. -- -- Typically, one will only want to pass NULL for the -- MountOperation 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 AsyncResult instance will be -- passed to the callback. That callback should then call -- volumeMountFinish with the GVolume instance and the -- AsyncResult data to see if the operation was completed -- successfully. If a [typegLib.Error] is present when -- volumeMountFinish is called, then it will be filled with any -- error information. -- -- Note, when porting from GnomeVFS, GVolume is the moral -- equivalent of GnomeVFSDrive. -- --
-- GMount *mount; -- GFile *mount_root -- GFile *volume_activation_root; -- -- mount = g_volume_get_mount (volume); // mounted, so never NULL -- mount_root = g_mount_get_root (mount); -- volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL ---- -- then the expression -- --
-- (g_file_has_prefix (volume_activation_root, mount_root) || -- g_file_equal (volume_activation_root, mount_root)) ---- -- will always be True. -- -- Activation roots are typically used in VolumeMonitor -- implementations to find the underlying mount to shadow, see -- mountIsShadowed for more details. -- -- Since: 2.18 volumeGetActivationRoot :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe File) -- | Gets the drive for the volume. volumeGetDrive :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe Drive) -- | Gets the icon for volume. volumeGetIcon :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Icon -- | Gets the identifier of the given kind for volume. See -- the introduction for more information about volume identifiers. volumeGetIdentifier :: (HasCallStack, MonadIO m, IsVolume a) => a -> Text -> m (Maybe Text) -- | Gets the mount for the volume. volumeGetMount :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe Mount) -- | Gets the name of volume. volumeGetName :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Text -- | Gets the sort key for volume, if any. -- -- Since: 2.32 volumeGetSortKey :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe Text) -- | Gets the symbolic icon for volume. -- -- Since: 2.34 volumeGetSymbolicIcon :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Icon -- | Gets the UUID for the volume. The reference is -- typically based on the file system UUID for the volume in question and -- should be considered an opaque string. Returns Nothing 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 volumeMountFinish with the volume and -- AsyncResult returned in the callback. 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, error will be set to contain the errors and -- False will be returned. -- -- If the mount operation succeeded, volumeGetMount on -- volume is guaranteed to return the mount right after -- calling this function; there's no need to listen for the 'mount-added' -- signal on VolumeMonitor. 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 changed signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after volume #changed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeChanged :: (IsVolume a, MonadIO m) => a -> ((?self :: a) => VolumeChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the changed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on volume #changed callback --onVolumeChanged :: (IsVolume a, MonadIO m) => a -> ((?self :: a) => VolumeChangedCallback) -> m SignalHandlerId -- | This signal is emitted when the Volume 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 removed signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after volume #removed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterVolumeRemoved :: (IsVolume a, MonadIO m) => a -> ((?self :: a) => VolumeRemovedCallback) -> m SignalHandlerId -- | Connect a signal handler for the removed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on volume #removed callback --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.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 -- | GTlsServerConnection is the server-side subclass of -- TlsConnection, representing a server-side TLS connection. -- -- Since: 2.28 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 -- TlsServerConnection, for instance with -- toTlsServerConnection. class (GObject o, IsDescendantOf TlsServerConnection o) => IsTlsServerConnection o -- | Cast to TlsServerConnection, for types for which this is known -- to be safe. For general casts, use castTo. toTlsServerConnection :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsServerConnection -- | Creates a new TlsServerConnection wrapping -- baseIoStream (which must have pollable input and -- output streams). -- -- See the documentation for TlsConnection:baseIoStream for -- restrictions on when application code can run operations on the -- baseIoStream after this function has returned. -- -- Since: 2.28 tlsServerConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsTlsCertificate b) => a -> Maybe b -> m TlsServerConnection -- | Construct a GValueConstruct with valid value for the -- “authentication-mode” property. This is rarely needed -- directly, but it is used by new. constructTlsServerConnectionAuthenticationMode :: (IsTlsServerConnection o, MonadIO m) => TlsAuthenticationMode -> m (GValueConstruct o) -- | Get the value of the “authentication-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsServerConnection #authenticationMode --getTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsAuthenticationMode -- | Set the value of the “authentication-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsServerConnection [ #authenticationMode := value ] --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.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 -- | GTlsFileDatabase is implemented by TlsDatabase objects -- which load their certificate information from a file. It is an -- interface which TLS library specific subtypes implement. -- -- Since: 2.30 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 -- TlsFileDatabase, for instance with toTlsFileDatabase. class (GObject o, IsDescendantOf TlsFileDatabase o) => IsTlsFileDatabase o -- | Cast to TlsFileDatabase, for types for which this is known to -- be safe. For general casts, use castTo. toTlsFileDatabase :: (MonadIO m, IsTlsFileDatabase o) => o -> m TlsFileDatabase -- | Creates a new TlsFileDatabase which uses anchor certificate -- authorities in anchors to verify certificate chains. -- -- The certificates in anchors must be PEM encoded. -- -- Since: 2.30 tlsFileDatabaseNew :: (HasCallStack, MonadIO m) => [Char] -> m TlsFileDatabase -- | Set the value of the “anchors” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #anchors --clearTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “anchors” property. This is rarely needed directly, but it is -- used by new. constructTlsFileDatabaseAnchors :: (IsTlsFileDatabase o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “anchors” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsFileDatabase #anchors --getTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m (Maybe Text) -- | Set the value of the “anchors” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsFileDatabase [ #anchors := value ] --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.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 -- | GTlsClientConnection is the client-side subclass of -- TlsConnection, representing a client-side TLS connection. -- -- Since: 2.28 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 -- TlsClientConnection, for instance with -- toTlsClientConnection. class (GObject o, IsDescendantOf TlsClientConnection o) => IsTlsClientConnection o -- | Cast to TlsClientConnection, for types for which this is known -- to be safe. For general casts, use castTo. 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. -- source should have already completed a handshake and, -- since TLS 1.3, it should have been used to read data at least once. -- conn should not have completed a handshake. -- -- It is not possible to know whether a call to this function will -- actually do anything. Because session resumption is normally used only -- for performance benefit, the TLS backend might not implement this -- function. Even if implemented, it may not actually succeed in allowing -- conn to resume source's TLS session, -- because the server may not have sent a session resumption token to -- source, or it may refuse to accept the token from -- conn. There is no way to know whether a call to this -- function is actually successful. -- -- Using this function is not required to benefit from session -- resumption. If the TLS backend supports session resumption, the -- session will be resumed automatically if it is possible to do so -- without weakening the privacy guarantees normally provided by TLS, -- without need to call this function. For example, with TLS 1.3, a -- session ticket will be automatically copied from any -- TlsClientConnection 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. -- -- Since: 2.46 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 Nothing. -- -- Each item in the list is a ByteArray which contains the -- complete subject DN of the certificate authority. -- -- Since: 2.28 tlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m [ByteString] -- | Gets conn's expected server identity -- -- Since: 2.28 tlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m (Maybe SocketConnectable) -- | SSL 3.0 is no longer supported. See -- tlsClientConnectionSetUseSsl3 for details. -- -- Since: 2.28 -- | Deprecated: (Since version 2.56)SSL 3.0 is insecure. tlsClientConnectionGetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m Bool -- | Gets conn's validation flags -- -- This function does not work as originally designed and is impossible -- to use correctly. See TlsClientConnection:validationFlags for -- more information. -- -- Since: 2.28 -- | Deprecated: (Since version 2.72)Do not attempt to ignore validation -- errors. tlsClientConnectionGetValidationFlags :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m [TlsCertificateFlags] -- | Creates a new TlsClientConnection wrapping -- baseIoStream (which must have pollable input and -- output streams) which is assumed to communicate with the server -- identified by serverIdentity. -- -- See the documentation for TlsConnection:baseIoStream for -- restrictions on when application code can run operations on the -- baseIoStream after this function has returned. -- -- Since: 2.28 tlsClientConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsSocketConnectable b) => a -> Maybe b -> m TlsClientConnection -- | Sets conn's expected server identity, which is used -- both to tell servers on virtual hosts which certificate to present, -- and also to let conn know what name to look for in the -- certificate when performing TlsCertificateFlagsBadIdentity -- validation, if enabled. -- -- Since: 2.28 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. -- -- Since: 2.28 -- | Deprecated: (Since version 2.56)SSL 3.0 is insecure. tlsClientConnectionSetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> Bool -> m () -- | Sets conn's validation flags, to override the default -- set of checks performed when validating a server certificate. By -- default, TlsCertificateFlagsValidateAll is used. -- -- This function does not work as originally designed and is impossible -- to use correctly. See TlsClientConnection:validationFlags for -- more information. -- -- Since: 2.28 -- | Deprecated: (Since version 2.72)Do not attempt to ignore validation -- errors. tlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> [TlsCertificateFlags] -> m () -- | Get the value of the “accepted-cas” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsClientConnection #acceptedCas --getTlsClientConnectionAcceptedCas :: (MonadIO m, IsTlsClientConnection o) => o -> m [Ptr ()] -- | Construct a GValueConstruct with valid value for the -- “server-identity” property. This is rarely needed directly, -- but it is used by new. constructTlsClientConnectionServerIdentity :: (IsTlsClientConnection o, MonadIO m, IsSocketConnectable a) => a -> m (GValueConstruct o) -- | Get the value of the “server-identity” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsClientConnection #serverIdentity --getTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o) => o -> m (Maybe SocketConnectable) -- | Set the value of the “server-identity” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsClientConnection [ #serverIdentity := value ] --setTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o, IsSocketConnectable a) => o -> a -> m () -- | Construct a GValueConstruct with valid value for the -- “use-ssl3” property. This is rarely needed directly, but it -- is used by new. constructTlsClientConnectionUseSsl3 :: (IsTlsClientConnection o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “use-ssl3” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsClientConnection #useSsl3 --getTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> m Bool -- | Set the value of the “use-ssl3” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsClientConnection [ #useSsl3 := value ] --setTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> Bool -> m () -- | Construct a GValueConstruct with valid value for the -- “validation-flags” property. This is rarely needed directly, -- but it is used by new. constructTlsClientConnectionValidationFlags :: (IsTlsClientConnection o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o) -- | Get the value of the “validation-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get tlsClientConnection #validationFlags --getTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> m [TlsCertificateFlags] -- | Set the value of the “validation-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- set tlsClientConnection [ #validationFlags := value ] --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.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. -- -- Since: 2.28 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 TlsBackend, -- for instance with toTlsBackend. class (GObject o, IsDescendantOf TlsBackend o) => IsTlsBackend o -- | Cast to TlsBackend, for types for which this is known to be -- safe. For general casts, use castTo. toTlsBackend :: (MonadIO m, IsTlsBackend o) => o -> m TlsBackend -- | Gets the GType of backend's -- TlsCertificate implementation. -- -- Since: 2.28 tlsBackendGetCertificateType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType -- | Gets the GType of backend's -- TlsClientConnection implementation. -- -- Since: 2.28 tlsBackendGetClientConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType -- | Gets the default TlsBackend for the system. -- -- Since: 2.28 tlsBackendGetDefault :: (HasCallStack, MonadIO m) => m TlsBackend -- | Gets the default TlsDatabase used to verify TLS connections. -- -- Since: 2.30 tlsBackendGetDefaultDatabase :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m TlsDatabase -- | Gets the GType of backend’s -- DtlsClientConnection implementation. -- -- Since: 2.48 tlsBackendGetDtlsClientConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType -- | Gets the GType of backend’s -- DtlsServerConnection implementation. -- -- Since: 2.48 tlsBackendGetDtlsServerConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType -- | Gets the GType of backend's -- TlsFileDatabase implementation. -- -- Since: 2.30 tlsBackendGetFileDatabaseType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType -- | Gets the GType of backend's -- TlsServerConnection implementation. -- -- Since: 2.28 tlsBackendGetServerConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType -- | Set the default TlsDatabase used to verify TLS connections -- -- Any subsequent call to tlsBackendGetDefaultDatabase will return -- the database set in this call. Existing databases and connections are -- not modified. -- -- Setting a Nothing default database will reset to using the -- system default database as if tlsBackendSetDefaultDatabase had -- never been called. -- -- Since: 2.60 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. -- -- Since: 2.48 tlsBackendSupportsDtls :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m Bool -- | Checks if TLS is supported; if this returns False for the -- default TlsBackend, it means no "real" TLS backend is -- available. -- -- Since: 2.28 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.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 -- GSocketConnectable. Callers can then use -- socketConnectableEnumerate to get a -- SocketAddressEnumerator to try out each socket address in turn -- until one succeeds, as shown in the sample code below. -- --
-- 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 && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
-- {
-- conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &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;
-- }
-- }
--
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
-- SocketConnectable, for instance with
-- toSocketConnectable.
class (GObject o, IsDescendantOf SocketConnectable o) => IsSocketConnectable o
-- | Cast to SocketConnectable, for types for which this is known to
-- be safe. For general casts, use castTo.
toSocketConnectable :: (MonadIO m, IsSocketConnectable o) => o -> m SocketConnectable
-- | Creates a SocketAddressEnumerator for
-- connectable.
--
-- Since: 2.22
socketConnectableEnumerate :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m SocketAddressEnumerator
-- | Creates a SocketAddressEnumerator for
-- connectable that will return a ProxyAddress for
-- each of its addresses that you must connect to via a proxy.
--
-- If connectable does not implement
-- socketConnectableProxyEnumerate, this will fall back to calling
-- socketConnectableEnumerate.
--
-- Since: 2.26
socketConnectableProxyEnumerate :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m SocketAddressEnumerator
-- | Format a SocketConnectable 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 SocketConnectable implementation does not support string
-- formatting, the implementation’s type name will be returned as a
-- fallback.
--
-- Since: 2.48
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.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
-- | GProxyResolver provides synchronous and asynchronous network
-- proxy resolution. GProxyResolver is used within
-- SocketClient through the method
-- socketConnectableProxyEnumerate.
--
-- Implementations of GProxyResolver based on libproxy
-- and GNOME settings can be found in glib-networking. GIO comes
-- with an implementation for use inside Flatpak portals.
--
-- Since: 2.26
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 ProxyResolver,
-- for instance with toProxyResolver.
class (GObject o, IsDescendantOf ProxyResolver o) => IsProxyResolver o
-- | Cast to ProxyResolver, for types for which this is known to be
-- safe. For general casts, use castTo.
toProxyResolver :: (MonadIO m, IsProxyResolver o) => o -> m ProxyResolver
-- | Gets the default ProxyResolver for the system.
--
-- Since: 2.26
proxyResolverGetDefault :: (HasCallStack, MonadIO m) => m ProxyResolver
-- | Checks if resolver can be used on this system. (This
-- is used internally; proxyResolverGetDefault will only return a
-- proxy resolver that returns True for this method.)
--
-- Since: 2.26
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 uri. The returned proxy URIs
-- are of the form
-- <protocol>://[user[:password]@]host[:port] or
-- direct://, where <protocol> 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 none 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).
--
-- direct:// is used when no proxy is needed. Direct connection
-- should not be attempted unless it is part of the returned array of
-- proxies.
--
-- Since: 2.26
proxyResolverLookup :: (HasCallStack, MonadIO m, IsProxyResolver a, IsCancellable b) => a -> Text -> Maybe b -> m [Text]
-- | Asynchronous lookup of proxy. See proxyResolverLookup for more
-- details.
--
-- Since: 2.26
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
-- proxyResolverLookupAsync is complete. See
-- proxyResolverLookup for more details.
--
-- Since: 2.26
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.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 GProxy handles connecting to a remote host via a given type
-- of proxy server. It is implemented by the gio-proxy extension
-- point. The extensions are named after their proxy protocol name. As an
-- example, a SOCKS5 proxy implementation can be retrieved with the name
-- socks5 using the function
-- iOExtensionPointGetExtensionByName.
--
-- Since: 2.26
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 Proxy, for
-- instance with toProxy.
class (GObject o, IsDescendantOf Proxy o) => IsProxy o
-- | Cast to Proxy, for types for which this is known to be safe.
-- For general casts, use castTo.
toProxy :: (MonadIO m, IsProxy o) => o -> m Proxy
-- | Given connection to communicate with a proxy (eg, a
-- SocketConnection that is connected to the proxy server), this
-- does the necessary handshake to connect to
-- proxyAddress, and if required, wraps the
-- IOStream to handle proxy payload.
--
-- Since: 2.26
proxyConnect :: (HasCallStack, MonadIO m, IsProxy a, IsIOStream b, IsProxyAddress c, IsCancellable d) => a -> b -> c -> Maybe d -> m IOStream
-- | Asynchronous version of proxyConnect.
--
-- Since: 2.26
proxyConnectAsync :: (HasCallStack, MonadIO m, IsProxy a, IsIOStream b, IsProxyAddress c, IsCancellable d) => a -> b -> c -> Maybe d -> Maybe AsyncReadyCallback -> m ()
-- | See proxyConnect.
--
-- Since: 2.26
proxyConnectFinish :: (HasCallStack, MonadIO m, IsProxy a, IsAsyncResult b) => a -> b -> m IOStream
-- | Find the gio-proxy extension point for a proxy implementation
-- that supports the specified protocol.
--
-- Since: 2.26
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 False if proxy
-- is implementing such a protocol. When False is returned, the
-- caller should resolve the destination hostname first, and then pass a
-- ProxyAddress containing the stringified IP address to
-- proxyConnect or proxyConnectAsync.
--
-- Since: 2.26
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.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
-- | GPollableOutputStream is implemented by OutputStreams
-- 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 GPollableOutputStream but have
-- only certain instances of that class be pollable. If
-- pollableOutputStreamCanPoll returns false, then the behavior of
-- other GPollableOutputStream methods is undefined.
--
-- Since: 2.28
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
-- PollableOutputStream, for instance with
-- toPollableOutputStream.
class (GObject o, IsDescendantOf PollableOutputStream o) => IsPollableOutputStream o
-- | Cast to PollableOutputStream, for types for which this is known
-- to be safe. For general casts, use castTo.
toPollableOutputStream :: (MonadIO m, IsPollableOutputStream o) => o -> m PollableOutputStream
-- | Checks if stream is actually pollable. Some classes
-- may implement PollableOutputStream but have only certain
-- instances of that class be pollable. If this method returns
-- False, then the behavior of other PollableOutputStream
-- 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.
--
-- Since: 2.28
pollableOutputStreamCanPoll :: (HasCallStack, MonadIO m, IsPollableOutputStream a) => a -> m Bool
-- | Creates a Source that triggers when stream can
-- be written, or cancellable is triggered or an error
-- occurs. The callback on the source is of the PollableSourceFunc
-- type.
--
-- As with pollableOutputStreamIsWritable, it is possible that the
-- stream may not actually be writable even after the source triggers, so
-- you should use pollableOutputStreamWriteNonblocking rather than
-- outputStreamWrite from the callback.
--
-- The behaviour of this method is undefined if
-- pollableOutputStreamCanPoll returns False for
-- stream.
--
-- Since: 2.28
pollableOutputStreamCreateSource :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> Maybe b -> m Source
-- | Checks if stream 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 outputStreamWrite
-- after this returns True would still block. To guarantee
-- non-blocking behavior, you should always use
-- pollableOutputStreamWriteNonblocking, which will return a
-- IOErrorEnumWouldBlock error rather than blocking.
--
-- The behaviour of this method is undefined if
-- pollableOutputStreamCanPoll returns False for
-- stream.
--
-- Since: 2.28
pollableOutputStreamIsWritable :: (HasCallStack, MonadIO m, IsPollableOutputStream a) => a -> m Bool
-- | Attempts to write up to count bytes from
-- buffer to stream, as with
-- outputStreamWrite. If stream is not currently
-- writable, this will immediately return IOErrorEnumWouldBlock,
-- and you can use pollableOutputStreamCreateSource to create a
-- Source that will be triggered when stream is
-- writable.
--
-- Note that since this method never blocks, you cannot actually use
-- cancellable to cancel it. However, it will return an
-- error if cancellable has already been cancelled when
-- you call, which may happen if you call this method after a source
-- triggers due to having been cancelled.
--
-- Also note that if IOErrorEnumWouldBlock is returned some
-- underlying transports like D/TLS require that you re-send the same
-- buffer and count in the next write
-- call.
--
-- The behaviour of this method is undefined if
-- pollableOutputStreamCanPoll returns False for
-- stream.
pollableOutputStreamWriteNonblocking :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> Maybe ByteString -> Maybe b -> m Int64
-- | Attempts to write the bytes contained in the nVectors
-- vectors to stream, as with
-- outputStreamWritev. If stream is not currently
-- writable, this will immediately return
-- %gPOLLABLERETURNWOULDBLOCK, and you can use
-- pollableOutputStreamCreateSource to create a Source that
-- will be triggered when stream is writable.
-- error will *not* be set in that case.
--
-- Note that since this method never blocks, you cannot actually use
-- cancellable to cancel it. However, it will return an
-- error if cancellable has already been cancelled when
-- you call, which may happen if you call this method after a source
-- triggers due to having been cancelled.
--
-- Also note that if PollableReturnWouldBlock is returned some
-- underlying transports like D/TLS require that you re-send the same
-- vectors and nVectors in the next write
-- call.
--
-- The behaviour of this method is undefined if
-- pollableOutputStreamCanPoll returns False for
-- stream.
--
-- Since: 2.60
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.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
-- | GPollableInputStream is implemented by InputStreams
-- 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 GPollableInputStream but have only
-- certain instances of that class be pollable. If
-- pollableInputStreamCanPoll returns false, then the behavior of
-- other GPollableInputStream methods is undefined.
--
-- Since: 2.28
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
-- PollableInputStream, for instance with
-- toPollableInputStream.
class (GObject o, IsDescendantOf PollableInputStream o) => IsPollableInputStream o
-- | Cast to PollableInputStream, for types for which this is known
-- to be safe. For general casts, use castTo.
toPollableInputStream :: (MonadIO m, IsPollableInputStream o) => o -> m PollableInputStream
-- | Checks if stream is actually pollable. Some classes
-- may implement PollableInputStream but have only certain
-- instances of that class be pollable. If this method returns
-- False, then the behavior of other PollableInputStream
-- 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.
--
-- Since: 2.28
pollableInputStreamCanPoll :: (HasCallStack, MonadIO m, IsPollableInputStream a) => a -> m Bool
-- | Creates a Source that triggers when stream can
-- be read, or cancellable is triggered or an error
-- occurs. The callback on the source is of the PollableSourceFunc
-- type.
--
-- As with pollableInputStreamIsReadable, it is possible that the
-- stream may not actually be readable even after the source triggers, so
-- you should use pollableInputStreamReadNonblocking rather than
-- inputStreamRead from the callback.
--
-- The behaviour of this method is undefined if
-- pollableInputStreamCanPoll returns False for
-- stream.
--
-- Since: 2.28
pollableInputStreamCreateSource :: (HasCallStack, MonadIO m, IsPollableInputStream a, IsCancellable b) => a -> Maybe b -> m Source
-- | Checks if stream 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 inputStreamRead
-- after this returns True would still block. To guarantee
-- non-blocking behavior, you should always use
-- pollableInputStreamReadNonblocking, which will return a
-- IOErrorEnumWouldBlock error rather than blocking.
--
-- The behaviour of this method is undefined if
-- pollableInputStreamCanPoll returns False for
-- stream.
--
-- Since: 2.28
pollableInputStreamIsReadable :: (HasCallStack, MonadIO m, IsPollableInputStream a) => a -> m Bool
-- | Attempts to read up to count bytes from
-- stream into buffer, as with
-- inputStreamRead. If stream is not currently
-- readable, this will immediately return IOErrorEnumWouldBlock,
-- and you can use pollableInputStreamCreateSource to create a
-- Source that will be triggered when stream is
-- readable.
--
-- Note that since this method never blocks, you cannot actually use
-- cancellable to cancel it. However, it will return an
-- error if cancellable has already been cancelled when
-- you call, which may happen if you call this method after a source
-- triggers due to having been cancelled.
--
-- The behaviour of this method is undefined if
-- pollableInputStreamCanPoll returns False for
-- stream.
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.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
-- | GNetworkMonitor 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.
--
-- Since: 2.32
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
-- NetworkMonitor, for instance with toNetworkMonitor.
class (GObject o, IsDescendantOf NetworkMonitor o) => IsNetworkMonitor o
-- | Cast to NetworkMonitor, for types for which this is known to be
-- safe. For general casts, use castTo.
toNetworkMonitor :: (MonadIO m, IsNetworkMonitor o) => o -> m NetworkMonitor
-- | Attempts to determine whether or not the host pointed to by
-- connectable can be reached, without actually trying to
-- connect to it.
--
-- This may return True even when
-- NetworkMonitor:networkAvailable is False, if, for
-- example, monitor can determine that
-- connectable refers to a host on a local network.
--
-- If monitor believes that an attempt to connect to
-- connectable will succeed, it will return True.
-- Otherwise, it will return False and set error
-- to an appropriate error (such as IOErrorEnumHostUnreachable).
--
-- Note that although this does not attempt to connect to
-- connectable, 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
-- networkMonitorCanReachAsync.
--
-- Since: 2.32
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 connectable can be reached, without actually
-- trying to connect to it.
--
-- For more details, see networkMonitorCanReach.
--
-- When the operation is finished, callback will be
-- called. You can then call networkMonitorCanReachFinish 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
-- networkMonitorCanReachAsync.
networkMonitorCanReachFinish :: (HasCallStack, MonadIO m, IsNetworkMonitor a, IsAsyncResult b) => a -> b -> m ()
-- | Gets a more detailed networking state than
-- networkMonitorGetNetworkAvailable.
--
-- If NetworkMonitor:networkAvailable is False, then the
-- connectivity state will be NetworkConnectivityLocal.
--
-- If NetworkMonitor:networkAvailable is True, then the
-- connectivity state will be NetworkConnectivityFull (if there is
-- full Internet connectivity), NetworkConnectivityLimited (if the
-- host has a default route, but appears to be unable to actually reach
-- the full Internet), or NetworkConnectivityPortal (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 NetworkConnectivityLimited and
-- NetworkConnectivityPortal, 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.
--
-- Since: 2.44
networkMonitorGetConnectivity :: (HasCallStack, MonadIO m, IsNetworkMonitor a) => a -> m NetworkConnectivity
-- | Gets the default NetworkMonitor for the system.
--
-- Since: 2.32
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 NetworkMonitor:networkAvailable for more details.
--
-- Since: 2.32
networkMonitorGetNetworkAvailable :: (HasCallStack, MonadIO m, IsNetworkMonitor a) => a -> m Bool
-- | Checks if the network is metered. See
-- NetworkMonitor:networkMetered for more details.
--
-- Since: 2.46
networkMonitorGetNetworkMetered :: (HasCallStack, MonadIO m, IsNetworkMonitor a) => a -> m Bool
-- | Get the value of the “connectivity” property. When
-- overloading is enabled, this is equivalent to
--
-- -- get networkMonitor #connectivity --getNetworkMonitorConnectivity :: (MonadIO m, IsNetworkMonitor o) => o -> m NetworkConnectivity -- | Get the value of the “network-available” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkMonitor #networkAvailable --getNetworkMonitorNetworkAvailable :: (MonadIO m, IsNetworkMonitor o) => o -> m Bool -- | Get the value of the “network-metered” property. When -- overloading is enabled, this is equivalent to -- --
-- get networkMonitor #networkMetered --getNetworkMonitorNetworkMetered :: (MonadIO m, IsNetworkMonitor o) => o -> m Bool -- | Emitted when the network configuration changes. -- -- Since: 2.32 type NetworkMonitorNetworkChangedCallback = Bool -> IO () -- | Connect a signal handler for the networkChanged signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after networkMonitor #networkChanged callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterNetworkMonitorNetworkChanged :: (IsNetworkMonitor a, MonadIO m) => a -> ((?self :: a) => NetworkMonitorNetworkChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the networkChanged signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on networkMonitor #networkChanged callback --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.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 GMount interface represents a user-visible mount, such as -- a mounted file system. -- -- GMount 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 GMount might be associated with a Volume (such as a -- USB flash drive) which hosts it. -- -- Unmounting a GMount instance is an asynchronous operation. -- For more information about asynchronous operations, see -- AsyncResult and Task. To unmount a GMount -- instance, first call mountUnmountWithOperation with (at least) -- the GMount instance and a -- [typegio.AsyncReadyCallback]. The callback will be -- fired when the operation has resolved (either with success or -- failure), and a AsyncResult structure will be passed to the -- callback. That callback should then call -- mountUnmountWithOperationFinish with the GMount and -- the AsyncResult data to see if the operation was completed -- successfully. If an error is present when -- mountUnmountWithOperationFinish is called, then it will be -- filled with any error information. -- -- Note, when porting from GnomeVFS, GMount is the moral -- equivalent of GnomeVFSVolume. 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 Mount, for -- instance with toMount. class (GObject o, IsDescendantOf Mount o) => IsMount o -- | Cast to Mount, for types for which this is known to be safe. -- For general casts, use castTo. toMount :: (MonadIO m, IsMount o) => o -> m Mount -- | Checks if mount can be ejected. mountCanEject :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool -- | Checks if mount 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 mountEjectFinish with the mount and -- AsyncResult data returned in the callback. -- | Deprecated: (Since version 2.22)Use mountEjectWithOperation -- instead. 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, error will be set to contain the errors and -- False will be returned. -- | Deprecated: (Since version 2.22)Use -- mountEjectWithOperationFinish instead. mountEjectFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m () -- | Ejects a mount. This is an asynchronous operation, and is finished by -- calling mountEjectWithOperationFinish with the -- mount and AsyncResult data returned in the -- callback. -- -- Since: 2.22 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, error will be set to contain the errors and -- False will be returned. -- -- Since: 2.22 mountEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m () -- | Gets the default location of mount. The default -- location of the given mount is a path that reflects -- the main entry point for the user (e.g. the home directory, or the -- root of the volume). mountGetDefaultLocation :: (HasCallStack, MonadIO m, IsMount a) => a -> m File -- | Gets the drive for the mount. -- -- This is a convenience method for getting the Volume and then -- using that object to get the Drive. mountGetDrive :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Drive) -- | Gets the icon for mount. mountGetIcon :: (HasCallStack, MonadIO m, IsMount a) => a -> m Icon -- | Gets the name of mount. mountGetName :: (HasCallStack, MonadIO m, IsMount a) => a -> m Text -- | Gets the root directory on mount. mountGetRoot :: (HasCallStack, MonadIO m, IsMount a) => a -> m File -- | Gets the sort key for mount, if any. -- -- Since: 2.32 mountGetSortKey :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Text) -- | Gets the symbolic icon for mount. -- -- Since: 2.34 mountGetSymbolicIcon :: (HasCallStack, MonadIO m, IsMount a) => a -> m Icon -- | Gets the UUID for the mount. The reference is -- typically based on the file system UUID for the mount in question and -- should be considered an opaque string. Returns Nothing if there -- is no UUID available. mountGetUuid :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Text) -- | Gets the volume for the mount. mountGetVolume :: (HasCallStack, MonadIO m, IsMount a) => a -> m (Maybe Volume) -- | Tries to guess the type of content stored on mount. -- Returns one or more textual identifiers of well-known content types -- (typically prefixed with "x-content/"), e.g. x-content/image-dcf for -- camera memory cards. See the shared-mime-info specification for -- more on x-content types. -- -- This is an asynchronous operation (see -- mountGuessContentTypeSync for the synchronous version), and is -- finished by calling mountGuessContentTypeFinish with the -- mount and AsyncResult data returned in the -- callback. -- -- Since: 2.18 mountGuessContentType :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> Bool -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes guessing content types of mount. If any -- errors occurred during the operation, error will be -- set to contain the errors and False will be returned. In -- particular, you may get an IOErrorEnumNotSupported if the mount -- does not support content guessing. -- -- Since: 2.18 mountGuessContentTypeFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m [Text] -- | Tries to guess the type of content stored on mount. -- Returns one or more textual identifiers of well-known content types -- (typically prefixed with "x-content/"), e.g. x-content/image-dcf for -- camera memory cards. See the shared-mime-info specification for -- more on x-content types. -- -- This is a synchronous operation and as such may block doing IO; see -- mountGuessContentType for the asynchronous version. -- -- Since: 2.18 mountGuessContentTypeSync :: (HasCallStack, MonadIO m, IsMount a, IsCancellable b) => a -> Bool -> Maybe b -> m [Text] -- | Determines if mount is shadowed. Applications or -- libraries should avoid displaying mount in the user -- interface if it is shadowed. -- -- A mount is said to be shadowed if there exists one or more user -- visible objects (currently Mount objects) with a root that is -- inside the root of mount. -- -- One application of shadow mounts is when exposing a single file system -- that is used to address several logical volumes. In this situation, a -- VolumeMonitor implementation would create two Volume -- objects (for example, one for the camera functionality of the device -- and one for a SD card reader on the device) with activation URIs -- gphoto2://[usb:001,002]/store1/ and -- gphoto2://[usb:001,002]/store2/. When the underlying mount -- (with root gphoto2://[usb:001,002]/) is mounted, said -- VolumeMonitor implementation would create two Mount -- 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 Volume is set. -- -- Since: 2.20 mountIsShadowed :: (HasCallStack, MonadIO m, IsMount a) => a -> m Bool -- | Remounts a mount. This is an asynchronous operation, and is finished -- by calling mountRemountFinish with the mount -- and GAsyncResults data returned in the -- callback. -- -- Remounting is useful when some setting affecting the operation of the -- volume has been changed, as these may need a remount to take affect. -- While this is semantically equivalent with unmounting and then -- remounting not all backends might need to actually be unmounted. 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, error will be set to contain the errors and -- False will be returned. mountRemountFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m () -- | Increments the shadow count on mount. Usually used by -- VolumeMonitor implementations when creating a shadow mount for -- mount, see mountIsShadowed for more -- information. The caller will need to emit the Mount::changed -- signal on mount manually. -- -- Since: 2.20 mountShadow :: (HasCallStack, MonadIO m, IsMount a) => a -> m () -- | Unmounts a mount. This is an asynchronous operation, and is finished -- by calling mountUnmountFinish with the mount -- and AsyncResult data returned in the callback. -- | Deprecated: (Since version 2.22)Use -- mountUnmountWithOperation instead. 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, error will be set to contain the errors and -- False will be returned. -- | Deprecated: (Since version 2.22)Use -- mountUnmountWithOperationFinish instead. mountUnmountFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m () -- | Unmounts a mount. This is an asynchronous operation, and is finished -- by calling mountUnmountWithOperationFinish with the -- mount and AsyncResult data returned in the -- callback. -- -- Since: 2.22 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, error will be set to contain the errors and -- False will be returned. -- -- Since: 2.22 mountUnmountWithOperationFinish :: (HasCallStack, MonadIO m, IsMount a, IsAsyncResult b) => a -> b -> m () -- | Decrements the shadow count on mount. Usually used by -- VolumeMonitor implementations when destroying a shadow mount -- for mount, see mountIsShadowed for more -- information. The caller will need to emit the Mount::changed -- signal on mount manually. -- -- Since: 2.20 mountUnshadow :: (HasCallStack, MonadIO m, IsMount a) => a -> m () -- | Emitted when the mount has been changed. type MountChangedCallback = IO () -- | Connect a signal handler for the changed signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after mount #changed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the changed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on mount #changed callback --onMountChanged :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountChangedCallback) -> m SignalHandlerId -- | This signal may be emitted when the Mount is about to be -- unmounted. -- -- This signal depends on the backend and is only emitted if GIO was used -- to unmount. -- -- Since: 2.22 type MountPreUnmountCallback = IO () -- | Connect a signal handler for the preUnmount signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after mount #preUnmount callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId -- | Connect a signal handler for the preUnmount signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on mount #preUnmount callback --onMountPreUnmount :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountPreUnmountCallback) -> m SignalHandlerId -- | This signal is emitted when the Mount 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 unmounted signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after mount #unmounted callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterMountUnmounted :: (IsMount a, MonadIO m) => a -> ((?self :: a) => MountUnmountedCallback) -> m SignalHandlerId -- | Connect a signal handler for the unmounted signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on mount #unmounted callback --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.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 -- | GLoadableIcon extends the Icon 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 LoadableIcon, -- for instance with toLoadableIcon. class (GObject o, IsDescendantOf LoadableIcon o) => IsLoadableIcon o -- | Cast to LoadableIcon, for types for which this is known to be -- safe. For general casts, use castTo. toLoadableIcon :: (MonadIO m, IsLoadableIcon o) => o -> m LoadableIcon -- | Loads a loadable icon. For the asynchronous version of this function, -- see loadableIconLoadAsync. loadableIconLoad :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) => a -> Int32 -> Maybe b -> m (InputStream, Text) -- | Loads an icon asynchronously. To finish this function, see -- loadableIconLoadFinish. For the synchronous, blocking version -- of this function, see loadableIconLoad. loadableIconLoadAsync :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous icon load started in -- loadableIconLoadAsync. 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.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 -- | GFile is a high level abstraction for manipulating files on a -- virtual file system. GFiles are lightweight, immutable -- objects that do no I/O upon creation. It is necessary to understand -- that GFile objects do not represent files, merely an -- identifier for a file. All file content I/O is implemented as -- streaming operations (see InputStream and OutputStream). -- -- To construct a GFile, you can use: -- --
-- g_autoptr(GError) local_error = NULL;
-- if (!g_file_delete (my_file, my_cancellable, &local_error) &&
-- !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->message);
-- }
--
--
-- If cancellable is not Nothing, then the
-- operation can be cancelled by triggering the cancellable object from
-- another thread. If the operation was cancelled, the error
-- IOErrorEnumCancelled will be returned.
fileDelete :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m ()
-- | Asynchronously delete a file. If the file is a
-- directory, it will only be deleted if it is empty. This has the same
-- semantics as unlink.
--
-- Since: 2.34
fileDeleteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes deleting a file started with fileDeleteAsync.
--
-- Since: 2.34
fileDeleteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()
-- | Duplicates a File handle. This operation does not duplicate the
-- actual file or directory represented by the File; see
-- fileCopy if attempting to copy a file.
--
-- fileDup is useful when a second handle is needed to the same
-- underlying file, for use in a separate thread (tFile is not
-- thread-safe). For use within the same thread, use objectRef 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, callback will be called with
-- userUser data, and the operation can be finalized with
-- fileEjectMountableFinish.
--
-- If cancellable is not Nothing, then the
-- operation can be cancelled by triggering the cancellable object from
-- another thread. If the operation was cancelled, the error
-- IOErrorEnumCancelled will be returned.
-- | Deprecated: (Since version 2.22)Use
-- fileEjectMountableWithOperation instead.
fileEjectMountable :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes an asynchronous eject operation started by
-- fileEjectMountable.
-- | Deprecated: (Since version 2.22)Use
-- fileEjectMountableWithOperationFinishinstead.
fileEjectMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m ()
-- | Starts an asynchronous eject on a mountable. When this operation has
-- completed, callback will be called with
-- userUser data, and the operation can be finalized with
-- fileEjectMountableWithOperationFinish.
--
-- If cancellable is not Nothing, then the
-- operation can be cancelled by triggering the cancellable object from
-- another thread. If the operation was cancelled, the error
-- IOErrorEnumCancelled will be returned.
--
-- Since: 2.22
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
-- fileEjectMountableWithOperation.
--
-- Since: 2.22
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 FileEnumerator object that will give out
-- FileInfo objects for all the files in the directory.
--
-- The attributes value is a string that specifies the
-- file attributes that should be gathered. It is not an error if it's
-- not possible to read a particular requested attribute from a file - it
-- just won't be set. attributes should be a
-- comma-separated list of attributes or attribute wildcards. The
-- wildcard "*" means all attributes, and a wildcard like "standard::*"
-- means all attributes in the standard namespace. An example attribute
-- query be "standard::*,owneruser". The standard attributes are
-- available as defines, like FILE_ATTRIBUTE_STANDARD_NAME.
-- FILE_ATTRIBUTE_STANDARD_NAME should always be specified if you
-- plan to call fileEnumeratorGetChild or
-- fileEnumeratorIterate on the returned enumerator.
--
-- If cancellable is not Nothing, then the
-- operation can be cancelled by triggering the cancellable object from
-- another thread. If the operation was cancelled, the error
-- IOErrorEnumCancelled will be returned.
--
-- If the file does not exist, the IOErrorEnumNotFound error will
-- be returned. If the file is not a directory, the
-- IOErrorEnumNotDirectory 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 FileEnumerator object that will give
-- out FileInfo objects for all the files in the directory.
--
-- For more details, see fileEnumerateChildren which is the
-- synchronous version of this call.
--
-- When the operation is finished, callback will be
-- called. You can then call fileEnumerateChildrenFinish 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
-- fileEnumerateChildrenAsync.
fileEnumerateChildrenFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileEnumerator
-- | Checks if the two given GFiles refer to the same file.
--
-- Note that two GFiles that differ can still refer to
-- the same file on the filesystem due to various forms of filename
-- aliasing.
--
-- This call does no blocking I/O.
fileEqual :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> b -> m Bool
-- | Gets a Mount for the File.
--
-- Mount is returned only for user interesting locations, see
-- VolumeMonitor. If the FileIface for file
-- does not have a mount, error will be
-- set to IOErrorEnumNotFound and Nothing
-- will be returned.
--
-- If cancellable is not Nothing, then the
-- operation can be cancelled by triggering the cancellable object from
-- another thread. If the operation was cancelled, the error
-- IOErrorEnumCancelled 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 fileFindEnclosingMount which is the
-- synchronous version of this call.
--
-- When the operation is finished, callback will be
-- called. You can then call fileFindEnclosingMountFinish 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
-- fileFindEnclosingMountAsync.
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
-- File.
--
-- 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 FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
-- attribute with fileQueryInfo.
--
-- This call does no blocking I/O.
fileGetBasename :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe [Char])
-- | Gets a child of file with basename equal to
-- name.
--
-- Note that the file with that specific name might not exist, but you
-- can still have a File 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 file for a given
-- displayName (i.e. a UTF-8 version of the name). If
-- this function fails, it returns Nothing and
-- error will be set. This is very useful when
-- constructing a File 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 file. If the
-- file represents the root directory of the file system,
-- then Nothing 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 file. A parse name is a
-- UTF-8 string that describes the file such that one can get the
-- File back using fileParseName.
--
-- This is generally used to show the File 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 File, if one exists. If
-- non-Nothing, 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 descendant relative to
-- parent.
--
-- 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 file.
--
-- This call does no blocking I/O.
fileGetUri :: (HasCallStack, MonadIO m, IsFile a) => a -> m Text
-- | Gets the URI scheme for a File. RFC 3986 decodes the scheme as:
--
-- -- URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] ---- -- Common schemes include "file", "http", "ftp", etc. -- -- The scheme can be different from the one used to construct the -- File, in that it might be replaced with one that is logically -- equivalent to the File. -- -- This call does no blocking I/O. fileGetUriScheme :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe Text) -- | Checks if file has a parent, and optionally, if it is -- parent. -- -- If parent is Nothing then this function returns -- True if file has any parent at all. If -- parent is non-Nothing then True is only -- returned if file is an immediate child of -- parent. -- -- Since: 2.24 fileHasParent :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> Maybe b -> m Bool -- | Checks whether file has the prefix specified by -- prefix. -- -- In other words, if the names of initial elements of -- file's pathname match prefix. Only -- full pathname elements are matched, so a path like /foo is not -- considered a prefix of /foobar, only of /foo/bar. -- -- A File is not a prefix of itself. If you want to check for -- equality, use fileEqual. -- -- This call does no I/O, as it works purely on names. As such it can -- sometimes return False even if file is inside a -- prefix (from a filesystem point of view), because the -- prefix of file is an alias of prefix. fileHasPrefix :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> b -> m Bool -- | Checks to see if a File 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 File. -- -- 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 False, but fileGetPath 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 file and returns it as -- Bytes. -- -- If file is a resource:// based URI, the resulting -- bytes will reference the embedded resource instead of a copy. -- Otherwise, this is equivalent to calling fileLoadContents and -- bytesNewTake. -- -- For resources, etagOut will be set to Nothing. -- -- The data contained in the resulting Bytes is always -- zero-terminated, but this is not included in the Bytes length. -- The resulting Bytes should be freed with bytesUnref when -- no longer in use. -- -- Since: 2.56 fileLoadBytes :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m (Bytes, Maybe Text) -- | Asynchronously loads the contents of file as -- Bytes. -- -- If file is a resource:// based URI, the resulting -- bytes will reference the embedded resource instead of a copy. -- Otherwise, this is equivalent to calling fileLoadContentsAsync -- and bytesNewTake. -- -- callback should call fileLoadBytesFinish to get -- the result of this asynchronous operation. -- -- See fileLoadBytes for more information. -- -- Since: 2.56 fileLoadBytesAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Completes an asynchronous request to fileLoadBytesAsync. -- -- For resources, etagOut will be set to Nothing. -- -- The data contained in the resulting Bytes is always -- zero-terminated, but this is not included in the Bytes length. -- The resulting Bytes should be freed with bytesUnref when -- no longer in use. -- -- See fileLoadBytes for more information. -- -- Since: 2.56 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 -- length. The returned contents should -- be freed with free when no longer needed. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileLoadContents :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m (ByteString, Maybe Text) -- | Starts an asynchronous load of the file's contents. -- -- For more details, see fileLoadContents which is the synchronous -- version of this call. -- -- When the load operation has completed, callback will -- be called with user data. To finish the operation, -- call fileLoadContentsFinish with the AsyncResult -- returned by the callback. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileLoadContentsAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous load of the file's contents. -- The contents are placed in contents, and -- length is set to the size of the -- contents string. The contents should -- be freed with free when no longer needed. If -- etagOut is present, it will be set to the new entity -- tag for the file. fileLoadContentsFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m (ByteString, Maybe Text) -- | Finishes an asynchronous partial load operation that was started with -- g_file_load_partial_contents_async(). The data is -- always zero-terminated, but this is not included in the resultant -- length. The returned contents should -- be freed with free 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 -- File. To recursively create directories, see -- fileMakeDirectoryWithParents. This function will fail if the -- parent directory does not exist, setting error to -- IOErrorEnumNotFound. If the file system doesn't support -- creating directories, this function will fail, setting -- error to IOErrorEnumNotSupported. -- -- For a local File the newly created directory will have the -- default (current) ownership and permissions of the current process. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileMakeDirectory :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m () -- | Asynchronously creates a directory. -- -- Since: 2.38 fileMakeDirectoryAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous directory creation, started with -- fileMakeDirectoryAsync. -- -- Since: 2.38 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 error to -- IOErrorEnumNotSupported. If the directory itself already -- exists, this function will fail setting error to -- IOErrorEnumExists, unlike the similar mkdirWithParents. -- -- For a local File the newly created directories will have the -- default (current) ownership and permissions of the current process. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- Since: 2.18 fileMakeDirectoryWithParents :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m () -- | Creates a symbolic link named file which contains the -- string symlinkValue. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileMakeSymbolicLink :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [Char] -> Maybe b -> m () -- | Asynchronously creates a symbolic link named file -- which contains the string symlinkValue. -- -- Since: 2.74 fileMakeSymbolicLinkAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [Char] -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous symbolic link creation, started with -- fileMakeSymbolicLinkAsync. -- -- Since: 2.74 fileMakeSymbolicLinkFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Recursively measures the disk usage of file. -- -- This is essentially an analog of the 'du' command, but it also reports -- the number of directories and non-directory files encountered -- (including things like symbolic links). -- -- By default, errors are only reported against the toplevel file itself. -- Errors found while recursing are silently ignored, unless -- FileMeasureFlagsReportAnyError is given in -- flags. -- -- The returned size, diskUsage, is in bytes and should -- be formatted with formatSize in order to get something -- reasonable for showing in a user interface. -- -- progressCallback and progressData can -- be given to request periodic progress updates while scanning. See the -- documentation for FileMeasureProgressCallback for information -- about when and how the callback will be invoked. -- -- Since: 2.38 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 -- g_file_measure_disk_usage_async(). See -- fileMeasureDiskUsage for more information. -- -- Since: 2.38 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- Since: 2.18 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- It does not make sense for flags to contain -- FileMonitorFlagsWatchHardLinks, 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 fileMonitor. 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- If flags contains -- FileMonitorFlagsWatchHardLinks then the monitor will also -- attempt to report changes made to the file via another filename (ie, a -- hard link). Without this flag, you can only rely on changes made -- through the filename contained in file to be reported. -- Using this flag may result in an increase in resource usage, and may -- not have any effect depending on the FileMonitor backend and/or -- filesystem type. fileMonitorFile :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileMonitorFlags] -> Maybe b -> m FileMonitor -- | Starts a mountOperation, mounting the volume that -- contains the file location. -- -- When this operation has completed, callback will be -- called with userUser data, and the operation can be -- finalized with fileMountEnclosingVolumeFinish. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 fileMountEnclosingVolume. fileMountEnclosingVolumeFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Mounts a file of type G_FILE_TYPE_MOUNTABLE. Using -- mountOperation, you can request callbacks when, for -- instance, passwords are needed during authentication. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- When the operation is finished, callback will be -- called. You can then call fileMountMountableFinish 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 fileMountMountable for details. -- -- Finish an asynchronous mount operation that was started with -- fileMountMountable. fileMountMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m File -- | Tries to move the file or directory source to the -- location specified by destination. If native move -- operations are supported then this is used, otherwise a copy + delete -- fallback is used. The native implementation may support moving -- directories (for instance on moves inside the same filesystem), but -- the fallback code does not. -- -- If the flag FileCopyFlagsOverwrite is specified an already -- existing destination file is overwritten. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- If progressCallback is not Nothing, then the -- operation can be monitored by setting this to a -- FileProgressCallback function. -- progressCallbackData will be passed to this function. -- It is guaranteed that this callback will be called after all data has -- been transferred with the total number of bytes copied during the -- operation. -- -- If the source file does not exist, then the -- IOErrorEnumNotFound error is returned, independent on the -- status of the destination. -- -- If FileCopyFlagsOverwrite is not specified and the target -- exists, then the error IOErrorEnumExists is returned. -- -- If trying to overwrite a file over a directory, the -- IOErrorEnumIsDirectory error is returned. If trying to -- overwrite a directory with a directory the -- IOErrorEnumWouldMerge error is returned. -- -- If the source is a directory and the target does not exist, or -- FileCopyFlagsOverwrite is specified and the target is a file, -- then the IOErrorEnumWouldRecurse 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 fileMoveAsync using closures instead of callbacks -- for easier binding in other languages. -- -- Since: 2.82 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 -- g_file_move_async(). -- -- Since: 2.72 fileMoveFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Constructs a File from a vector of elements using the correct -- separator for filenames. -- -- Using this function is equivalent to calling buildFilenamev, -- followed by fileNewForPath on the result. -- -- Since: 2.78 fileNewBuildFilenamev :: (HasCallStack, MonadIO m) => [[Char]] -> m File -- | Creates a File with the given argument from the command line. -- The value of arg can be either a URI, an absolute path -- or a relative path resolved relative to the current working directory. -- This operation never fails, but the returned object might not support -- any I/O operation if arg points to a malformed path. -- -- Note that on Windows, this function expects its argument to be in -- UTF-8 -- not the system code page. This means that you should not use -- this function with string from argv as it is passed to -- main(). g_win32_get_command_line() -- will return a UTF-8 version of the commandline. Application -- also uses UTF-8 but applicationCommandLineCreateFileForArg may -- be more useful for you there. It is also always possible to use this -- function with OptionContext arguments of type -- OptionArgFilename. fileNewForCommandlineArg :: (HasCallStack, MonadIO m) => [Char] -> m File -- | Creates a File with the given argument from the command line. -- -- This function is similar to fileNewForCommandlineArg 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 applicationCommandLineCreateFileForArg. -- -- Since: 2.36 fileNewForCommandlineArgAndCwd :: (HasCallStack, MonadIO m) => [Char] -> [Char] -> m File -- | Constructs a File for a given path. This operation never fails, -- but the returned object might not support any I/O operation if -- path is malformed. fileNewForPath :: (HasCallStack, MonadIO m) => [Char] -> m File -- | Constructs a File for a given URI. This operation never fails, -- but the returned object might not support any I/O operation if -- uri is malformed or if the uri type is not supported. fileNewForUri :: (HasCallStack, MonadIO m) => Text -> m File -- | Opens a file in the preferred directory for temporary files (as -- returned by getTmpDir) and returns a File and -- FileIOStream pointing to it. -- -- tmpl should be a string in the GLib file name encoding -- containing a sequence of six 'X' characters, and containing no -- directory components. If it is Nothing, a default template is -- used. -- -- Unlike the other File constructors, this will return -- Nothing if a temporary file could not be created. -- -- Since: 2.32 fileNewTmp :: (HasCallStack, MonadIO m) => Maybe [Char] -> m (File, FileIOStream) -- | Asynchronously opens a file in the preferred directory for temporary -- files (as returned by getTmpDir) as fileNewTmp. -- -- tmpl should be a string in the GLib file name encoding -- containing a sequence of six 'X' characters, and containing no -- directory components. If it is Nothing, a default template is -- used. -- -- Since: 2.74 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 getTmpDir) as -- dirMakeTmp. -- -- tmpl should be a string in the GLib file name encoding -- containing a sequence of six 'X' characters, and containing no -- directory components. If it is Nothing, a default template is -- used. -- -- Since: 2.74 fileNewTmpDirAsync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe [Char] -> Int32 -> Maybe a -> Maybe AsyncReadyCallback -> m () -- | Finishes a temporary directory creation started by -- fileNewTmpDirAsync. -- -- Since: 2.74 fileNewTmpDirFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m File -- | Finishes a temporary file creation started by fileNewTmpAsync. -- -- Since: 2.74 fileNewTmpFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (File, FileIOStream) -- | Opens an existing file for reading and writing. The result is a -- FileIOStream that can be used to read and write the contents of -- the file. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- If the file does not exist, the IOErrorEnumNotFound error will -- be returned. If the file is a directory, the -- IOErrorEnumIsDirectory 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. -- -- Since: 2.22 fileOpenReadwrite :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m FileIOStream -- | Asynchronously opens file for reading and writing. -- -- For more details, see fileOpenReadwrite which is the -- synchronous version of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileOpenReadwriteFinish to get the -- result of the operation. -- -- Since: 2.22 fileOpenReadwriteAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous file read operation started with -- fileOpenReadwriteAsync. -- -- Since: 2.22 fileOpenReadwriteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileIOStream -- | Constructs a File with the given parseName -- (i.e. something given by fileGetParseName). This operation -- never fails, but the returned object might not support any I/O -- operation if the parseName cannot be parsed. fileParseName :: (HasCallStack, MonadIO m) => Text -> m File -- | Exactly like fileGetPath, but caches the result via -- g_object_set_qdata_full(). This is useful for example -- in C applications which mix g_file_* APIs with native ones. -- It also avoids an extra duplicated string when possible, so will be -- generally more efficient. -- -- This call does no blocking I/O. -- -- Since: 2.56 filePeekPath :: (HasCallStack, MonadIO m, IsFile a) => a -> m (Maybe [Char]) -- | Polls a file of type FileTypeMountable. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- When the operation is finished, callback will be -- called. You can then call fileMountMountableFinish to get the -- result of the operation. -- -- Since: 2.22 filePollMountable :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes a poll operation. See filePollMountable for details. -- -- Finish an asynchronous poll operation that was polled with -- filePollMountable. -- -- Since: 2.22 filePollMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Returns the AppInfo that is registered as the default -- application to handle the file specified by file. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileQueryDefaultHandler :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m AppInfo -- | Async version of fileQueryDefaultHandler. -- -- Since: 2.60 fileQueryDefaultHandlerAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes a fileQueryDefaultHandlerAsync operation. -- -- Since: 2.60 fileQueryDefaultHandlerFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m AppInfo -- | Utility function to check if a particular file exists. This is -- implemented using fileQueryInfo and as such does blocking I/O. -- -- Note that in many cases it is racy to first check for file -- existence 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 fileCreate -- which will either atomically create the file or fail with a -- IOErrorEnumExists 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 FileType of a file. This is -- implemented using fileQueryInfo 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. -- -- Since: 2.18 fileQueryFileType :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [FileQueryInfoFlags] -> Maybe b -> m FileType -- | Similar to fileQueryInfo, but obtains information about the -- filesystem the file is on, rather than the file -- itself. For instance the amount of space available and the type of the -- filesystem. -- -- The attributes value is a string that specifies the -- attributes that should be gathered. It is not an error if it's not -- possible to read a particular requested attribute from a file - it -- just won't be set. attributes should be a -- comma-separated list of attributes or attribute wildcards. The -- wildcard "*" means all attributes, and a wildcard like "filesystem::*" -- means all attributes in the filesystem namespace. The standard -- namespace for filesystem attributes is "filesystem". Common attributes -- of interest are FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size -- of the filesystem in bytes), FILE_ATTRIBUTE_FILESYSTEM_FREE -- (number of bytes available), and FILE_ATTRIBUTE_FILESYSTEM_TYPE -- (type of the filesystem). -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- If the file does not exist, the IOErrorEnumNotFound 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 file is on. The result is a -- FileInfo object that contains key-value attributes (such as -- type or size for the file). -- -- For more details, see fileQueryFilesystemInfo which is the -- synchronous version of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileQueryInfoFinish 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 -- fileQueryFilesystemInfoAsync. fileQueryFilesystemInfoFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileInfo -- | Gets the requested information about specified file. -- The result is a FileInfo object that contains key-value -- attributes (such as the type or size of the file). -- -- The attributes value is a string that specifies the -- file attributes that should be gathered. It is not an error if it's -- not possible to read a particular requested attribute from a file - it -- just won't be set. attributes should be a -- comma-separated list of attributes or attribute wildcards. The -- wildcard "*" means all attributes, and a wildcard like "standard::*" -- means all attributes in the standard namespace. An example attribute -- query be "standard::*,owneruser". The standard attributes are -- available as defines, like FILE_ATTRIBUTE_STANDARD_NAME. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 FileQueryInfoFlagsNofollowSymlinks in -- flags the information about the symlink itself will be -- returned. Also, for symlinks that point to non-existing files the -- information about the symlink itself will be returned. -- -- If the file does not exist, the IOErrorEnumNotFound error will -- be returned. Other errors are possible too, and depend on what kind of -- filesystem 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 -- file. The result is a FileInfo object that -- contains key-value attributes (such as type or size for the file). -- -- For more details, see fileQueryInfo which is the synchronous -- version of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileQueryInfoFinish 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 -- fileQueryInfoAsync. 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 FileInputStream that -- can be used to read the contents of the file. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- If the file does not exist, the IOErrorEnumNotFound error will -- be returned. If the file is a directory, the -- IOErrorEnumIsDirectory 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 file for reading. -- -- For more details, see fileRead which is the synchronous version -- of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileReadFinish 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 -- fileReadAsync. 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 FileCreateFlagsPrivate in flags the -- file will be made readable only to the current user, to the level that -- is supported on the target filesystem. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- If you pass in a non-Nothing etag value and -- file already exists, then this value is compared to -- the current entity tag of the file, and if they differ an -- IOErrorEnumWrongEtag error is returned. This generally means -- that the file has been changed since you last read it. You can get the -- new etag from fileOutputStreamGetEtag after you've finished -- writing and closed the FileOutputStream. When you load a new -- file you can use fileInputStreamQueryInfo to get the etag of -- the file. -- -- If makeBackup is True, this function will -- attempt to make a backup of the current file before overwriting it. If -- this fails a IOErrorEnumCantCreateBackup error will be -- returned. If you want to replace anyway, try again with -- makeBackup set to False. -- -- If the file is a directory the IOErrorEnumIsDirectory error -- will be returned, and if the file is some other form of non-regular -- file then a IOErrorEnumNotRegularFile error will be returned. -- Some file systems don't allow all file names, and may return an -- IOErrorEnumInvalidFilename error, and if the name is to long -- IOErrorEnumFilenameTooLong 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 fileReplace which is the synchronous -- version of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileReplaceFinish 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 file with -- contents of length bytes. -- -- If etag is specified (not Nothing), any -- existing file must have that etag, or the error -- IOErrorEnumWrongEtag will be returned. -- -- If makeBackup is True, this function will -- attempt to make a backup of file. Internally, it uses -- fileReplace, so will try to replace the file contents in the -- safest way possible. For example, atomic renames are used when -- replacing local files’ contents. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- The returned newEtag 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 file with the -- given contents of length bytes. -- etag will replace the document's current entity tag. -- -- When this operation has completed, callback will be -- called with userUser data, and the operation can be -- finalized with fileReplaceContentsFinish. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- If makeBackup is True, this function will -- attempt to make a backup of file. -- -- Note that no copy of contents will be made, so it must -- stay valid until callback is called. See -- fileReplaceContentsBytesAsync for a Bytes 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 fileReplaceContentsAsync but takes a Bytes input -- instead. This function will keep a ref on contents -- until the operation is done. Unlike fileReplaceContentsAsync -- this allows forgetting about the content without waiting for the -- callback. -- -- When this operation has completed, callback will be -- called with userUser data, and the operation can be -- finalized with fileReplaceContentsFinish. -- -- Since: 2.40 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 file. -- See fileReplaceContentsAsync. Sets newEtag 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 -- fileReplaceAsync. 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 fileReplace 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. -- -- Since: 2.22 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 fileReplaceReadwrite which is the -- synchronous version of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileReplaceReadwriteFinish to get the -- result of the operation. -- -- Since: 2.22 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 -- fileReplaceReadwriteAsync. -- -- Since: 2.22 fileReplaceReadwriteFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileIOStream -- | Resolves a relative path for file to an absolute path. -- -- This call does no blocking I/O. -- -- If the relativePath is an absolute path name, the -- resolution is done absolutely (without taking file -- path as base). fileResolveRelativePath :: (HasCallStack, MonadIO m, IsFile a) => a -> [Char] -> m File -- | Sets an attribute in the file with attribute name -- attribute to valueP. -- -- Some attributes can be unset by setting type to -- FileAttributeTypeInvalid and valueP to -- Nothing. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttribute :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> FileAttributeType -> Ptr () -> [FileQueryInfoFlags] -> Maybe b -> m () -- | Sets attribute of type -- FileAttributeTypeByteString to value. If -- attribute is of a different type, this operation will -- fail, returning False. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttributeByteString :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Text -> [FileQueryInfoFlags] -> Maybe b -> m () -- | Sets attribute of type FileAttributeTypeInt32 -- to value. If attribute is of a -- different type, this operation will fail. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttributeInt32 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Int32 -> [FileQueryInfoFlags] -> Maybe b -> m () -- | Sets attribute of type FileAttributeTypeInt64 -- to value. If attribute is of a -- different type, this operation will fail. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttributeInt64 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Int64 -> [FileQueryInfoFlags] -> Maybe b -> m () -- | Sets attribute of type FileAttributeTypeString -- to value. If attribute is of a -- different type, this operation will fail. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttributeString :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Text -> [FileQueryInfoFlags] -> Maybe b -> m () -- | Sets attribute of type FileAttributeTypeUint32 -- to value. If attribute is of a -- different type, this operation will fail. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttributeUint32 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Word32 -> [FileQueryInfoFlags] -> Maybe b -> m () -- | Sets attribute of type FileAttributeTypeUint64 -- to value. If attribute is of a -- different type, this operation will fail. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttributeUint64 :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Text -> Word64 -> [FileQueryInfoFlags] -> Maybe b -> m () -- | Asynchronously sets the attributes of file with -- info. -- -- For more details, see fileSetAttributesFromInfo, which is the -- synchronous version of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileSetAttributesFinish 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 -- fileSetAttributesAsync. fileSetAttributesFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m FileInfo -- | Tries to set all attributes in the FileInfo on the target -- values, not stopping on the first error. -- -- If there is any error during this operation then error -- will be set to the first error. Error on particular fields are flagged -- by setting the "status" field in the attribute value to -- FileAttributeStatusErrorSetting, which means you can also -- detect further errors. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileSetAttributesFromInfo :: (HasCallStack, MonadIO m, IsFile a, IsFileInfo b, IsCancellable c) => a -> b -> [FileQueryInfoFlags] -> Maybe c -> m () -- | Renames file to the specified display name. -- -- The display name is converted from UTF-8 to the correct encoding for -- the target filesystem if possible and the file is -- renamed to this. -- -- If you want to implement a rename operation in the user interface the -- edit name (FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as -- the initial value in the rename widget, and then the result after -- editing should be passed to fileSetDisplayName. -- -- On success the resulting converted filename is returned. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled 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 File. -- -- For more details, see fileSetDisplayName which is the -- synchronous version of this call. -- -- When the operation is finished, callback will be -- called. You can then call fileSetDisplayNameFinish 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 -- fileSetDisplayNameAsync. fileSetDisplayNameFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m File -- | Starts a file of type FileTypeMountable. Using -- startOperation, you can request callbacks when, for -- instance, passwords are needed during authentication. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- When the operation is finished, callback will be -- called. You can then call fileMountMountableFinish to get the -- result of the operation. -- -- Since: 2.22 fileStartMountable :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [DriveStartFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finishes a start operation. See fileStartMountable for details. -- -- Finish an asynchronous start operation that was started with -- fileStartMountable. -- -- Since: 2.22 fileStartMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Stops a file of type FileTypeMountable. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- When the operation is finished, callback will be -- called. You can then call fileStopMountableFinish to get the -- result of the operation. -- -- Since: 2.22 fileStopMountable :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finishes a stop operation, see fileStopMountable for details. -- -- Finish an asynchronous stop operation that was started with -- fileStopMountable. -- -- Since: 2.22 fileStopMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Checks if file supports [thread-default -- contexts][g-main-context-push-thread-default-context]. If this returns -- False, you cannot perform asynchronous operations on -- file in a thread that has a thread-default context. -- -- Since: 2.22 fileSupportsThreadContexts :: (HasCallStack, MonadIO m, IsFile a) => a -> m Bool -- | Sends file 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 -- unixMountIsSystemInternal), so this call can return the -- IOErrorEnumNotSupported error. Since GLib 2.66, the -- x-gvfs-notrash unix mount option can be used to disable -- fileTrash support for particular mounts, the -- IOErrorEnumNotSupported error will be returned in that case. -- Since 2.82, the x-gvfs-trash unix mount option can be used to -- enable fileTrash support for particular system mounts. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. fileTrash :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Maybe b -> m () -- | Asynchronously sends file to the Trash location, if -- possible. -- -- Since: 2.38 fileTrashAsync :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous file trashing operation, started with -- fileTrashAsync. -- -- Since: 2.38 fileTrashFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Unmounts a file of type G_FILE_TYPE_MOUNTABLE. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- When the operation is finished, callback will be -- called. You can then call fileUnmountMountableFinish to get the -- result of the operation. -- | Deprecated: (Since version 2.22)Use -- fileUnmountMountableWithOperation instead. fileUnmountMountable :: (HasCallStack, MonadIO m, IsFile a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an unmount operation, see fileUnmountMountable for -- details. -- -- Finish an asynchronous unmount operation that was started with -- fileUnmountMountable. -- | Deprecated: (Since version 2.22)Use -- fileUnmountMountableWithOperationFinishinstead. fileUnmountMountableFinish :: (HasCallStack, MonadIO m, IsFile a, IsAsyncResult b) => a -> b -> m () -- | Unmounts a file of type FileTypeMountable. -- -- If cancellable is not Nothing, then the -- operation can be cancelled by triggering the cancellable object from -- another thread. If the operation was cancelled, the error -- IOErrorEnumCancelled will be returned. -- -- When the operation is finished, callback will be -- called. You can then call fileUnmountMountableFinish to get the -- result of the operation. -- -- Since: 2.22 fileUnmountMountableWithOperation :: (HasCallStack, MonadIO m, IsFile a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finishes an unmount operation, see -- fileUnmountMountableWithOperation for details. -- -- Finish an asynchronous unmount operation that was started with -- fileUnmountMountableWithOperation. -- -- Since: 2.22 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.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 -- | GDtlsServerConnection is the server-side subclass of -- DtlsConnection, representing a server-side DTLS connection. -- -- Since: 2.48 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 -- DtlsServerConnection, for instance with -- toDtlsServerConnection. class (GObject o, IsDescendantOf DtlsServerConnection o) => IsDtlsServerConnection o -- | Cast to DtlsServerConnection, for types for which this is known -- to be safe. For general casts, use castTo. toDtlsServerConnection :: (MonadIO m, IsDtlsServerConnection o) => o -> m DtlsServerConnection -- | Creates a new DtlsServerConnection wrapping -- baseSocket. -- -- Since: 2.48 dtlsServerConnectionNew :: (HasCallStack, MonadIO m, IsDatagramBased a, IsTlsCertificate b) => a -> Maybe b -> m DtlsServerConnection -- | Construct a GValueConstruct with valid value for the -- “authentication-mode” property. This is rarely needed -- directly, but it is used by new. constructDtlsServerConnectionAuthenticationMode :: (IsDtlsServerConnection o, MonadIO m) => TlsAuthenticationMode -> m (GValueConstruct o) -- | Get the value of the “authentication-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsServerConnection #authenticationMode --getDtlsServerConnectionAuthenticationMode :: (MonadIO m, IsDtlsServerConnection o) => o -> m TlsAuthenticationMode -- | Set the value of the “authentication-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsServerConnection [ #authenticationMode := value ] --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.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 -- | GDtlsConnection is the base DTLS connection class type, which -- wraps a DatagramBased and provides DTLS encryption on top of -- it. Its subclasses, DtlsClientConnection and -- DtlsServerConnection, implement client-side and server-side -- DTLS, respectively. -- -- For TLS support, see TlsConnection. -- -- As DTLS is datagram based, GDtlsConnection implements -- DatagramBased, presenting a datagram-socket-like API for the -- encrypted connection. This operates over a base datagram connection, -- which is also a GDatagramBased -- (DtlsConnection:baseSocket). -- -- To close a DTLS connection, use dtlsConnectionClose. -- -- Neither DtlsServerConnection or DtlsClientConnection set -- the peer address on their base DatagramBased if it is a -- Socket — it is up to the caller to do that if they wish. If -- they do not, and socketClose is called on the base socket, the -- GDtlsConnection will not raise a -- G_IO_ERROR_NOT_CONNECTED error on further I/O. -- -- Since: 2.48 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 -- DtlsConnection, for instance with toDtlsConnection. class (GObject o, IsDescendantOf DtlsConnection o) => IsDtlsConnection o -- | Cast to DtlsConnection, for types for which this is known to be -- safe. For general casts, use castTo. toDtlsConnection :: (MonadIO m, IsDtlsConnection o) => o -> m DtlsConnection -- | Close the DTLS connection. This is equivalent to calling -- dtlsConnectionShutdown to shut down both sides of the -- connection. -- -- Closing a DtlsConnection waits for all buffered but -- untransmitted data to be sent before it completes. It then sends a -- close_notify DTLS alert to the peer and may wait for a -- close_notify to be received from the peer. It does not close -- the underlying DtlsConnection:baseSocket; that must be closed -- separately. -- -- Once conn is closed, all other operations will return -- IOErrorEnumClosed. Closing a DtlsConnection multiple -- times will not return an error. -- -- GDtlsConnections will be automatically closed when the -- last reference is dropped, but you might want to call this function to -- make sure resources are released as early as possible. -- -- If cancellable is cancelled, the DtlsConnection -- may be left partially-closed and any pending untransmitted data may be -- lost. Call dtlsConnectionClose again to complete closing the -- DtlsConnection. -- -- Since: 2.48 dtlsConnectionClose :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Maybe b -> m () -- | Asynchronously close the DTLS connection. See -- dtlsConnectionClose for more information. -- -- Since: 2.48 dtlsConnectionCloseAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous TLS close operation. See -- dtlsConnectionClose for more information. -- -- Since: 2.48 dtlsConnectionCloseFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m () -- | Used by DtlsConnection implementations to emit the -- DtlsConnection::acceptCertificate signal. -- -- Since: 2.48 dtlsConnectionEmitAcceptCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsCertificate b) => a -> b -> [TlsCertificateFlags] -> m Bool -- | Gets conn's certificate, as set by -- dtlsConnectionSetCertificate. -- -- Since: 2.48 dtlsConnectionGetCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe TlsCertificate) -- | Query the TLS backend for TLS channel binding data of -- type for conn. -- -- This call retrieves TLS channel binding data as specified in RFC -- 5056, RFC 5929, and related RFCs. The binding data is -- returned in data. The data is resized -- by the callee using ByteArray buffer management and will be -- freed when the data is destroyed by -- byteArrayUnref. If data is Nothing, it -- will only check whether TLS backend is able to fetch the data (e.g. -- whether type is supported by the TLS backend). It does -- not guarantee that the data will be available though. That could -- happen if TLS connection does not support type or the -- binding data is not available yet due to additional negotiation or -- input required. -- -- Since: 2.66 dtlsConnectionGetChannelBindingData :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> TlsChannelBindingType -> m ByteString -- | Returns the name of the current DTLS ciphersuite, or Nothing 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. -- -- Since: 2.70 dtlsConnectionGetCiphersuiteName :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe Text) -- | Gets the certificate database that conn uses to verify -- peer certificates. See dtlsConnectionSetDatabase. -- -- Since: 2.48 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 -- Nothing is returned, then no user interaction will occur for -- this connection. -- -- Since: 2.48 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 conn's protocols, or the -- TLS backend does not support ALPN, then this will be Nothing. -- See dtlsConnectionSetAdvertisedProtocols. -- -- Since: 2.60 dtlsConnectionGetNegotiatedProtocol :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe Text) -- | Gets conn's peer's certificate after the handshake has -- completed or failed. (It is not set during the emission of -- DtlsConnection::acceptCertificate.) -- -- Since: 2.48 dtlsConnectionGetPeerCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m (Maybe TlsCertificate) -- | Gets the errors associated with validating conn's -- peer's certificate, after the handshake has completed or failed. (It -- is not set during the emission of -- DtlsConnection::acceptCertificate.) -- -- Since: 2.48 dtlsConnectionGetPeerCertificateErrors :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m [TlsCertificateFlags] -- | Returns the current DTLS protocol version, which may be -- TlsProtocolVersionUnknown 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 TlsProtocolVersion. -- -- Since: 2.70 dtlsConnectionGetProtocolVersion :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsProtocolVersion -- | Gets conn rehandshaking mode. See -- dtlsConnectionSetRehandshakeMode for details. -- -- Since: 2.48 -- | 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. dtlsConnectionGetRehandshakeMode :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsRehandshakeMode -- | Tests whether or not conn expects a proper TLS close -- notification when the connection is closed. See -- dtlsConnectionSetRequireCloseNotify for details. -- -- Since: 2.48 dtlsConnectionGetRequireCloseNotify :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m Bool -- | Attempts a TLS handshake on conn. -- -- On the client side, it is never necessary to call this method; -- although the connection needs to perform a handshake after connecting, -- DtlsConnection will handle this for you automatically when you -- try to send or receive data on the connection. You can call -- dtlsConnectionHandshake manually if you want to know whether -- the initial handshake succeeded or failed (as opposed to just -- immediately trying to use conn to read or write, in -- which case, if it fails, it may not be possible to tell if it failed -- before or after completing the handshake), but beware that servers may -- reject client authentication after the handshake has completed, so a -- successful handshake does not indicate the connection will be usable. -- -- Likewise, on the server side, although a handshake is necessary at the -- beginning of the communication, you do not need to call this function -- explicitly unless you want clearer error reporting. -- -- Previously, calling dtlsConnectionHandshake 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. -- -- DtlsConnection::accept_certificate may be -- emitted during the handshake. -- -- Since: 2.48 dtlsConnectionHandshake :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Maybe b -> m () -- | Asynchronously performs a TLS handshake on conn. See -- dtlsConnectionHandshake for more information. -- -- Since: 2.48 dtlsConnectionHandshakeAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous TLS handshake operation. See -- dtlsConnectionHandshake for more information. -- -- Since: 2.48 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 -- dtlsConnectionGetNegotiatedProtocol to find the negotiated -- protocol after the handshake. Specifying Nothing for the the -- value of protocols will disable ALPN negotiation. -- -- See IANA TLS ALPN Protocol IDs for a list of registered -- protocol IDs. -- -- Since: 2.60 dtlsConnectionSetAdvertisedProtocols :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> Maybe [Text] -> m () -- | This sets the certificate that conn will present to -- its peer during the TLS handshake. For a DtlsServerConnection, -- it is mandatory to set this, and that will normally be done at -- construct time. -- -- For a DtlsClientConnection, this is optional. If a handshake -- fails with TlsErrorCertificateRequired, that means that the -- server requires a certificate, and if you try connecting again, you -- should call this method first. You can call -- dtlsClientConnectionGetAcceptedCas 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 dtlsClientConnectionGetAcceptedCas will return -- non-Nothing.) -- -- Since: 2.48 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 -- tlsBackendGetDefaultDatabase. If set to Nothing, then -- peer certificate validation will always set the -- TlsCertificateFlagsUnknownCa error (meaning -- DtlsConnection::acceptCertificate will always be emitted on -- client-side connections, unless that bit is not set in -- DtlsClientConnection:validationFlags). -- -- There are nonintuitive security implications when using a non-default -- database. See DtlsConnection:database for details. -- -- Since: 2.48 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 interaction argument will normally be a derived -- subclass of TlsInteraction. Nothing can also be provided -- if no user interaction should occur for this connection. -- -- Since: 2.48 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. -- -- Since: 2.48 -- | 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. dtlsConnectionSetRehandshakeMode :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> TlsRehandshakeMode -> m () -- | Sets whether or not conn expects a proper TLS close -- notification before the connection is closed. If this is True -- (the default), then conn will expect to receive a TLS -- close notification from its peer before the connection is closed, and -- will return a TlsErrorEof 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 dtlsConnectionSetRequireCloseNotify to -- tell conn to allow an "unannounced" connection close, -- in which case the close will show up as a 0-length read, as in a -- non-TLS DatagramBased, 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 dtlsConnectionCloseAsync -- on conn itself, this will send a close notification -- regardless of the setting of this property. If you explicitly want to -- do an unclean close, you can close conn's -- DtlsConnection:baseSocket rather than closing -- conn itself. -- -- Since: 2.48 dtlsConnectionSetRequireCloseNotify :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> Bool -> m () -- | Shut down part or all of a DTLS connection. -- -- If shutdownRead is True then the receiving side -- of the connection is shut down, and further reading is disallowed. -- Subsequent calls to datagramBasedReceiveMessages will return -- IOErrorEnumClosed. -- -- If shutdownWrite is True then the sending side -- of the connection is shut down, and further writing is disallowed. -- Subsequent calls to datagramBasedSendMessages will return -- IOErrorEnumClosed. -- -- It is allowed for both shutdownRead and -- shutdownWrite to be TRUE — this is equivalent to -- calling dtlsConnectionClose. -- -- If cancellable is cancelled, the DtlsConnection -- may be left partially-closed and any pending untransmitted data may be -- lost. Call dtlsConnectionShutdown again to complete closing the -- DtlsConnection. -- -- Since: 2.48 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 -- dtlsConnectionShutdown for more information. -- -- Since: 2.48 dtlsConnectionShutdownAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Bool -> Bool -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous TLS shutdown operation. See -- dtlsConnectionShutdown for more information. -- -- Since: 2.48 dtlsConnectionShutdownFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m () -- | Set the value of the “advertised-protocols” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #advertisedProtocols --clearDtlsConnectionAdvertisedProtocols :: (MonadIO m, IsDtlsConnection o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “advertised-protocols” property. This is rarely needed -- directly, but it is used by new. constructDtlsConnectionAdvertisedProtocols :: (IsDtlsConnection o, MonadIO m) => [Text] -> m (GValueConstruct o) -- | Get the value of the “advertised-protocols” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #advertisedProtocols --getDtlsConnectionAdvertisedProtocols :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe [Text]) -- | Set the value of the “advertised-protocols” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsConnection [ #advertisedProtocols := value ] --setDtlsConnectionAdvertisedProtocols :: (MonadIO m, IsDtlsConnection o) => o -> [Text] -> m () -- | Construct a GValueConstruct with valid value for the -- “base-socket” property. This is rarely needed directly, but -- it is used by new. constructDtlsConnectionBaseSocket :: (IsDtlsConnection o, MonadIO m, IsDatagramBased a) => a -> m (GValueConstruct o) -- | Get the value of the “base-socket” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #baseSocket --getDtlsConnectionBaseSocket :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe DatagramBased) -- | Construct a GValueConstruct with valid value for the -- “certificate” property. This is rarely needed directly, but -- it is used by new. constructDtlsConnectionCertificate :: (IsDtlsConnection o, MonadIO m, IsTlsCertificate a) => a -> m (GValueConstruct o) -- | Get the value of the “certificate” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #certificate --getDtlsConnectionCertificate :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsCertificate) -- | Set the value of the “certificate” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsConnection [ #certificate := value ] --setDtlsConnectionCertificate :: (MonadIO m, IsDtlsConnection o, IsTlsCertificate a) => o -> a -> m () -- | Get the value of the “ciphersuite-name” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #ciphersuiteName --getDtlsConnectionCiphersuiteName :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe Text) -- | Set the value of the “database” property to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #database --clearDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “database” property. This is rarely needed directly, but it -- is used by new. constructDtlsConnectionDatabase :: (IsDtlsConnection o, MonadIO m, IsTlsDatabase a) => a -> m (GValueConstruct o) -- | Get the value of the “database” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #database --getDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsDatabase) -- | Set the value of the “database” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsConnection [ #database := value ] --setDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o, IsTlsDatabase a) => o -> a -> m () -- | Set the value of the “interaction” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #interaction --clearDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o) => o -> m () -- | Construct a GValueConstruct with valid value for the -- “interaction” property. This is rarely needed directly, but -- it is used by new. constructDtlsConnectionInteraction :: (IsDtlsConnection o, MonadIO m, IsTlsInteraction a) => a -> m (GValueConstruct o) -- | Get the value of the “interaction” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #interaction --getDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsInteraction) -- | Set the value of the “interaction” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsConnection [ #interaction := value ] --setDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o, IsTlsInteraction a) => o -> a -> m () -- | Get the value of the “negotiated-protocol” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #negotiatedProtocol --getDtlsConnectionNegotiatedProtocol :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe Text) -- | Get the value of the “peer-certificate” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #peerCertificate --getDtlsConnectionPeerCertificate :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe TlsCertificate) -- | Get the value of the “peer-certificate-errors” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #peerCertificateErrors --getDtlsConnectionPeerCertificateErrors :: (MonadIO m, IsDtlsConnection o) => o -> m [TlsCertificateFlags] -- | Get the value of the “protocol-version” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #protocolVersion --getDtlsConnectionProtocolVersion :: (MonadIO m, IsDtlsConnection o) => o -> m TlsProtocolVersion -- | Construct a GValueConstruct with valid value for the -- “rehandshake-mode” property. This is rarely needed directly, -- but it is used by new. constructDtlsConnectionRehandshakeMode :: (IsDtlsConnection o, MonadIO m) => TlsRehandshakeMode -> m (GValueConstruct o) -- | Get the value of the “rehandshake-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #rehandshakeMode --getDtlsConnectionRehandshakeMode :: (MonadIO m, IsDtlsConnection o) => o -> m TlsRehandshakeMode -- | Set the value of the “rehandshake-mode” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsConnection [ #rehandshakeMode := value ] --setDtlsConnectionRehandshakeMode :: (MonadIO m, IsDtlsConnection o) => o -> TlsRehandshakeMode -> m () -- | Construct a GValueConstruct with valid value for the -- “require-close-notify” property. This is rarely needed -- directly, but it is used by new. constructDtlsConnectionRequireCloseNotify :: (IsDtlsConnection o, MonadIO m) => Bool -> m (GValueConstruct o) -- | Get the value of the “require-close-notify” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsConnection #requireCloseNotify --getDtlsConnectionRequireCloseNotify :: (MonadIO m, IsDtlsConnection o) => o -> m Bool -- | Set the value of the “require-close-notify” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsConnection [ #requireCloseNotify := value ] --setDtlsConnectionRequireCloseNotify :: (MonadIO m, IsDtlsConnection o) => o -> Bool -> m () -- | Emitted during the TLS handshake after the peer certificate has been -- received. You can examine peerCert's certification -- path by calling tlsCertificateGetIssuer on it. -- -- For a client-side connection, peerCert is the server's -- certificate, and the signal will only be emitted if the certificate -- was not acceptable according to conn's -- DtlsClientConnection:validation_flags. If you -- would like the certificate to be accepted despite -- errors, return True from the signal handler. -- Otherwise, if no handler accepts the certificate, the handshake will -- fail with TlsErrorBadCertificate. -- -- GLib guarantees that if certificate verification fails, this signal -- will be emitted with at least one error will be set in -- errors, 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 TlsCertificateFlagsExpired 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, peerCert is the -- certificate presented by the client, if this was requested via the -- server's -- DtlsServerConnection:authentication_mode. 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 True. -- -- 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 False from the signal handler on the first attempt, and -- then after the connection attempt returns a -- TlsErrorBadCertificate, you can interact with the user, and if -- the user decides to accept the certificate, remember that fact, create -- a new connection, and return True from the signal handler the -- next time. -- -- 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. -- -- Since: 2.48 type DtlsConnectionAcceptCertificateCallback = TlsCertificate -> [TlsCertificateFlags] -> IO Bool -- | Connect a signal handler for the acceptCertificate signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dtlsConnection #acceptCertificate callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDtlsConnectionAcceptCertificate :: (IsDtlsConnection a, MonadIO m) => a -> ((?self :: a) => DtlsConnectionAcceptCertificateCallback) -> m SignalHandlerId -- | Connect a signal handler for the acceptCertificate signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on dtlsConnection #acceptCertificate callback --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.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 -- | GDtlsClientConnection is the client-side subclass of -- DtlsConnection, representing a client-side DTLS connection. -- -- Since: 2.48 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 -- DtlsClientConnection, for instance with -- toDtlsClientConnection. class (GObject o, IsDescendantOf DtlsClientConnection o) => IsDtlsClientConnection o -- | Cast to DtlsClientConnection, for types for which this is known -- to be safe. For general casts, use castTo. 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 Nothing. -- -- Each item in the list is a ByteArray which contains the -- complete subject DN of the certificate authority. -- -- Since: 2.48 dtlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m [ByteString] -- | Gets conn's expected server identity -- -- Since: 2.48 dtlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m SocketConnectable -- | Gets conn's validation flags -- -- This function does not work as originally designed and is impossible -- to use correctly. See DtlsClientConnection:validationFlags for -- more information. -- -- Since: 2.48 -- | Deprecated: (Since version 2.74)Do not attempt to ignore validation -- errors. dtlsClientConnectionGetValidationFlags :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m [TlsCertificateFlags] -- | Creates a new DtlsClientConnection wrapping -- baseSocket which is assumed to communicate with the -- server identified by serverIdentity. -- -- Since: 2.48 dtlsClientConnectionNew :: (HasCallStack, MonadIO m, IsDatagramBased a, IsSocketConnectable b) => a -> Maybe b -> m DtlsClientConnection -- | Sets conn's expected server identity, which is used -- both to tell servers on virtual hosts which certificate to present, -- and also to let conn know what name to look for in the -- certificate when performing TlsCertificateFlagsBadIdentity -- validation, if enabled. -- -- Since: 2.48 dtlsClientConnectionSetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a, IsSocketConnectable b) => a -> b -> m () -- | Sets conn's validation flags, to override the default -- set of checks performed when validating a server certificate. By -- default, TlsCertificateFlagsValidateAll is used. -- -- This function does not work as originally designed and is impossible -- to use correctly. See DtlsClientConnection:validationFlags for -- more information. -- -- Since: 2.48 -- | Deprecated: (Since version 2.74)Do not attempt to ignore validation -- errors. dtlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> [TlsCertificateFlags] -> m () -- | Get the value of the “accepted-cas” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsClientConnection #acceptedCas --getDtlsClientConnectionAcceptedCas :: (MonadIO m, IsDtlsClientConnection o) => o -> m [Ptr ()] -- | Construct a GValueConstruct with valid value for the -- “server-identity” property. This is rarely needed directly, -- but it is used by new. constructDtlsClientConnectionServerIdentity :: (IsDtlsClientConnection o, MonadIO m, IsSocketConnectable a) => a -> m (GValueConstruct o) -- | Get the value of the “server-identity” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsClientConnection #serverIdentity --getDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o) => o -> m SocketConnectable -- | Set the value of the “server-identity” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsClientConnection [ #serverIdentity := value ] --setDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o, IsSocketConnectable a) => o -> a -> m () -- | Construct a GValueConstruct with valid value for the -- “validation-flags” property. This is rarely needed directly, -- but it is used by new. constructDtlsClientConnectionValidationFlags :: (IsDtlsClientConnection o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o) -- | Get the value of the “validation-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- get dtlsClientConnection #validationFlags --getDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> m [TlsCertificateFlags] -- | Set the value of the “validation-flags” property. When -- overloading is enabled, this is equivalent to -- --
-- set dtlsClientConnection [ #validationFlags := value ] --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.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 -- | GDrive 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. -- -- GDrive is a container class for Volume objects that -- stem from the same piece of media. As such, GDrive 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 GDrive 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. -- -- GDrive 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 GDrive may -- vary according to implementation. To choose the correct verbs in e.g. -- a file manager, use driveGetStartStopType. -- -- For porting from GnomeVFS note that there is no equivalent of -- GDrive 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 Drive, for -- instance with toDrive. class (GObject o, IsDescendantOf Drive o) => IsDrive o -- | Cast to Drive, for types for which this is known to be safe. -- For general casts, use castTo. 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. -- -- Since: 2.22 driveCanStart :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Checks if a drive can be started degraded. -- -- Since: 2.22 driveCanStartDegraded :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Checks if a drive can be stopped. -- -- Since: 2.22 driveCanStop :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Asynchronously ejects a drive. -- -- When the operation is finished, callback will be -- called. You can then call driveEjectFinish to obtain the result -- of the operation. -- | Deprecated: (Since version 2.22)Use driveEjectWithOperation -- instead. driveEject :: (HasCallStack, MonadIO m, IsDrive a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes ejecting a drive. -- | Deprecated: (Since version 2.22)Use -- driveEjectWithOperationFinish instead. driveEjectFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m () -- | Ejects a drive. This is an asynchronous operation, and is finished by -- calling driveEjectWithOperationFinish with the -- drive and AsyncResult data returned in the -- callback. -- -- Since: 2.22 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, error will be set to contain the errors and -- False will be returned. -- -- Since: 2.22 driveEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m () -- | Gets the kinds of identifiers that drive has. Use -- driveGetIdentifier to obtain the identifiers themselves. driveEnumerateIdentifiers :: (HasCallStack, MonadIO m, IsDrive a) => a -> m [Text] -- | Gets the icon for drive. driveGetIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon -- | Gets the identifier of the given kind for drive. The -- only identifier currently available is -- DRIVE_IDENTIFIER_KIND_UNIX_DEVICE. driveGetIdentifier :: (HasCallStack, MonadIO m, IsDrive a) => a -> Text -> m (Maybe Text) -- | Gets the name of drive. driveGetName :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Text -- | Gets the sort key for drive, if any. -- -- Since: 2.32 driveGetSortKey :: (HasCallStack, MonadIO m, IsDrive a) => a -> m (Maybe Text) -- | Gets a hint about how a drive can be started/stopped. -- -- Since: 2.22 driveGetStartStopType :: (HasCallStack, MonadIO m, IsDrive a) => a -> m DriveStartStopType -- | Gets the icon for drive. -- -- Since: 2.34 driveGetSymbolicIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon -- | Get a list of mountable volumes for drive. -- -- The returned list should be freed with g_list_free(), -- after its elements have been unreffed with objectUnref. driveGetVolumes :: (HasCallStack, MonadIO m, IsDrive a) => a -> m [Volume] -- | Checks if the drive has media. Note that the OS may -- not be polling the drive for media changes; see -- driveIsMediaCheckAutomatic for more details. driveHasMedia :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Check if drive has any mountable volumes. driveHasVolumes :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Checks if drive is capable of automatically detecting -- media changes. driveIsMediaCheckAutomatic :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Checks if the drive supports removable media. driveIsMediaRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Checks if the Drive and/or its media is considered removable by -- the user. See driveIsMediaRemovable. -- -- Since: 2.50 driveIsRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool -- | Asynchronously polls drive to see if media has been -- inserted or removed. -- -- When the operation is finished, callback will be -- called. You can then call drivePollForMediaFinish 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 drivePollForMedia on a -- drive. drivePollForMediaFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m () -- | Asynchronously starts a drive. -- -- When the operation is finished, callback will be -- called. You can then call driveStartFinish to obtain the result -- of the operation. -- -- Since: 2.22 driveStart :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [DriveStartFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finishes starting a drive. -- -- Since: 2.22 driveStartFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m () -- | Asynchronously stops a drive. -- -- When the operation is finished, callback will be -- called. You can then call driveStopFinish to obtain the result -- of the operation. -- -- Since: 2.22 driveStop :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finishes stopping a drive. -- -- Since: 2.22 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 changed signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after drive #changed callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the changed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on drive #changed callback --onDriveChanged :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveChangedCallback) -> m SignalHandlerId -- | This signal is emitted when the Drive 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 disconnected signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after drive #disconnected callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDriveDisconnected :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveDisconnectedCallback) -> m SignalHandlerId -- | Connect a signal handler for the disconnected signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on drive #disconnected callback --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 ejectButton signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after drive #ejectButton callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDriveEjectButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveEjectButtonCallback) -> m SignalHandlerId -- | Connect a signal handler for the ejectButton signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on drive #ejectButton callback --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. -- -- Since: 2.22 type DriveStopButtonCallback = IO () -- | Connect a signal handler for the stopButton signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after drive #stopButton callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterDriveStopButton :: (IsDrive a, MonadIO m) => a -> ((?self :: a) => DriveStopButtonCallback) -> m SignalHandlerId -- | Connect a signal handler for the stopButton signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on drive #stopButton callback --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.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 -- | DesktopAppInfoLookup is an opaque data structure and can only -- be accessed using the following functions. module GI.Gio.Interfaces.DesktopAppInfoLookup -- | Memory-managed wrapper type. -- | Deprecated: (Since version 2.28)The DesktopAppInfoLookup -- interface isdeprecated and unused by GIO. newtype DesktopAppInfoLookup -- | Deprecated: (Since version 2.28)The DesktopAppInfoLookup -- interface isdeprecated and unused by GIO. DesktopAppInfoLookup :: ManagedPtr DesktopAppInfoLookup -> DesktopAppInfoLookup -- | Type class for types which can be safely cast to -- DesktopAppInfoLookup, for instance with -- toDesktopAppInfoLookup. class (GObject o, IsDescendantOf DesktopAppInfoLookup o) => IsDesktopAppInfoLookup o -- | Cast to DesktopAppInfoLookup, for types for which this is known -- to be safe. For general casts, use castTo. toDesktopAppInfoLookup :: (MonadIO m, IsDesktopAppInfoLookup o) => o -> m DesktopAppInfoLookup -- | Gets the default application for launching applications using this URI -- scheme for a particular DesktopAppInfoLookup implementation. -- -- The DesktopAppInfoLookup interface and this function is used to -- implement appInfoGetDefaultForUriScheme backends in a GIO -- module. There is no reason for applications to use it directly. -- Applications should use appInfoGetDefaultForUriScheme. -- | Deprecated: (Since version 2.28)The DesktopAppInfoLookup -- interface isdeprecated and unused by GIO. desktopAppInfoLookupGetDefaultForUriScheme :: (HasCallStack, MonadIO m, IsDesktopAppInfoLookup a) => a -> Text -> m (Maybe AppInfo) instance GHC.Classes.Eq GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup o) => GI.Gio.Interfaces.DesktopAppInfoLookup.IsDesktopAppInfoLookup o instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup) instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup -- | Interface for socket-like objects with datagram semantics. -- -- A GDatagramBased 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 Socket, which wraps the UNIX socket API on -- UNIX and winsock2 on Windows. -- -- GDatagramBased is entirely platform independent, and is -- intended to be used alongside higher-level networking APIs such as -- IOStream. -- -- 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, GSocket -- uses recvmmsg() and sendmmsg() 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 GDatagramBased 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 G_IO_ERROR_WOULD_BLOCK 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 G_IO_ERROR_TIMED_OUT -- if no progress was made. To know when a call would successfully run -- you can call datagramBasedConditionCheck or -- datagramBasedConditionWait. You can also use -- datagramBasedCreateSource and attach it to a MainContext -- to get callbacks when I/O is possible. -- -- When running a non-blocking operation applications should always be -- able to handle getting a G_IO_ERROR_WOULD_BLOCK 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 -- G_IO_ERROR_WOULD_BLOCK. -- -- As with GSocket, GDatagramBaseds can be either -- connection oriented (for example, SCTP) or connectionless (for -- example, UDP). GDatagramBaseds 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 GDatagramBased API. -- For connectionless socket types the target/source address is specified -- or received in each I/O operation. -- -- Like most other APIs in GLib, GDatagramBased is not -- inherently thread safe. To use a GDatagramBased concurrently -- from multiple threads, you must implement your own locking. -- -- Since: 2.48 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 DatagramBased, -- for instance with toDatagramBased. class (GObject o, IsDescendantOf DatagramBased o) => IsDatagramBased o -- | Cast to DatagramBased, for types for which this is known to be -- safe. For general casts, use castTo. toDatagramBased :: (MonadIO m, IsDatagramBased o) => o -> m DatagramBased -- | Checks on the readiness of datagramBased to perform -- operations. The operations specified in condition are -- checked for and masked against the currently-satisfied conditions on -- datagramBased. The result is returned. -- -- IOConditionIn will be set in the return value if data is -- available to read with datagramBasedReceiveMessages, 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 -- socketClose or socketShutdown with -- shutdownRead set, if it’s a Socket). -- -- If the connection is shut down or closed (by calling -- socketClose or socketShutdown with -- shutdownRead set, if it’s a Socket, for -- example), all calls to this function will return -- IOErrorEnumClosed. -- -- IOConditionOut will be set if it is expected that at least one -- byte can be sent using datagramBasedSendMessages without -- blocking. It will not be set if the datagram_based has been closed -- locally. -- -- IOConditionHup will be set if the connection has been closed -- locally. -- -- IOConditionErr will be set if there was an asynchronous error -- in transmitting data previously enqueued using -- datagramBasedSendMessages. -- -- Note that on Windows, it is possible for an operation to return -- IOErrorEnumWouldBlock even immediately after -- datagramBasedConditionCheck has claimed that the -- DatagramBased is ready for writing. Rather than calling -- datagramBasedConditionCheck and then writing to the -- DatagramBased if it succeeds, it is generally better to simply -- try writing right away, and try again later if the initial attempt -- returns IOErrorEnumWouldBlock. -- -- It is meaningless to specify IOConditionErr or -- IOConditionHup in condition; these conditions -- will always be set in the output if they are true. Apart from these -- flags, the output is guaranteed to be masked by -- condition. -- -- This call never blocks. -- -- Since: 2.48 datagramBasedConditionCheck :: (HasCallStack, MonadIO m, IsDatagramBased a) => a -> [IOCondition] -> m [IOCondition] -- | Waits for up to timeout microseconds for condition to -- become true on datagramBased. If the condition is met, -- True is returned. -- -- If cancellable is cancelled before the condition is -- met, or if timeout is reached before the condition is -- met, then False is returned and error is set -- appropriately (IOErrorEnumCancelled or -- IOErrorEnumTimedOut). -- -- Since: 2.48 datagramBasedConditionWait :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [IOCondition] -> Int64 -> Maybe b -> m () -- | Creates a Source that can be attached to a MainContext -- to monitor for the availability of the specified -- condition on the DatagramBased. The -- Source keeps a reference to the datagramBased. -- -- The callback on the source is of the DatagramBasedSourceFunc -- type. -- -- It is meaningless to specify IOConditionErr or -- IOConditionHup in condition; these conditions -- will always be reported in the callback if they are true. -- -- If non-Nothing, cancellable can be used to -- cancel the source, which will cause the source to trigger, reporting -- the current condition (which is likely 0 unless cancellation happened -- at the same time as a condition change). You can check for this in the -- callback using cancellableIsCancelled. -- -- Since: 2.48 datagramBasedCreateSource :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [IOCondition] -> Maybe b -> m Source -- | Receive one or more data messages from datagramBased -- in one go. -- -- messages must point to an array of InputMessage -- structs and numMessages must be the length of this -- array. Each InputMessage contains a pointer to an array of -- InputVector structs describing the buffers that the data -- received in each message will be written to. -- -- flags modify how all messages are received. The -- commonly available arguments for this are available in the -- SocketMsgFlags 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 -- InputMessage.flags. -- -- The other members of InputMessage are treated as described in -- its documentation. -- -- If timeout is negative the call will block until -- numMessages have been received, the connection is -- closed remotely (EOS), cancellable is cancelled, or an -- error occurs. -- -- If timeout is 0 the call will return up to -- numMessages without blocking, or -- IOErrorEnumWouldBlock if no messages are queued in the -- operating system to be received. -- -- If timeout is positive the call will block on the same -- conditions as if timeout were negative. If the timeout -- is reached before any messages are received, -- IOErrorEnumTimedOut is returned, otherwise it will return the -- number of messages received before timing out. (Note: This is -- effectively the behaviour of MSG_WAITFORONE with -- recvmmsg().) -- -- To be notified when messages are available, wait for the -- IOConditionIn condition. Note though that you may still receive -- IOErrorEnumWouldBlock from datagramBasedReceiveMessages -- even if you were previously notified of a IOConditionIn -- condition. -- -- If the remote peer closes the connection, any messages queued in the -- underlying receive buffer will be returned, and subsequent calls to -- datagramBasedReceiveMessages will return 0 (with no error set). -- -- If the connection is shut down or closed (by calling -- socketClose or socketShutdown with -- shutdownRead set, if it’s a Socket, for -- example), all calls to this function will return -- IOErrorEnumClosed. -- -- On error -1 is returned and error is set accordingly. -- An error will only be returned if zero messages could be received; -- otherwise the number of messages successfully received before the -- error will be returned. If cancellable is cancelled, -- IOErrorEnumCancelled is returned as with any other error. -- -- Since: 2.48 datagramBasedReceiveMessages :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [InputMessage] -> Int32 -> Int64 -> Maybe b -> m Int32 -- | Send one or more data messages from datagramBased in -- one go. -- -- messages must point to an array of -- OutputMessage structs and numMessages must be -- the length of this array. Each OutputMessage contains an -- address to send the data to, and a pointer to an array of -- OutputVector structs to describe the buffers that the data to -- be sent for each message will be gathered from. -- -- flags modify how the message is sent. The commonly -- available arguments for this are available in the -- SocketMsgFlags 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 OutputMessage are treated as described in -- its documentation. -- -- If timeout is negative the call will block until -- numMessages have been sent, -- cancellable is cancelled, or an error occurs. -- -- If timeout is 0 the call will send up to -- numMessages without blocking, or will return -- IOErrorEnumWouldBlock if there is no space to send messages. -- -- If timeout is positive the call will block on the same -- conditions as if timeout were negative. If the timeout -- is reached before any messages are sent, IOErrorEnumTimedOut 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 -- IOConditionOut condition. Note though that you may still -- receive IOErrorEnumWouldBlock from -- datagramBasedSendMessages even if you were previously notified -- of a IOConditionOut 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 -- socketClose or socketShutdown with -- shutdownWrite set, if it’s a Socket, for -- example), all calls to this function will return -- IOErrorEnumClosed. -- -- On error -1 is returned and error is set accordingly. -- An error will only be returned if zero messages could be sent; -- otherwise the number of messages successfully sent before the error -- will be returned. If cancellable is cancelled, -- IOErrorEnumCancelled is returned as with any other error. -- -- Since: 2.48 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.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 -- | GAsyncInitable is an interface for asynchronously -- initializable objects. -- -- This is the asynchronous version of Initable; it behaves the -- same in all ways except that initialization is asynchronous. For more -- details see the descriptions on GInitable. -- -- A class may implement both the GInitable and -- GAsyncInitable 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 -- AsyncInitable.new_async() directly, or -- indirectly via a foo_thing_new_async() wrapper. This -- will call asyncInitableInitAsync under the covers, calling back -- with NULL and a set GError on failure. -- -- A typical implementation might look something like this: -- --
-- enum {
-- NOT_INITIALIZED,
-- INITIALIZING,
-- INITIALIZED
-- };
--
-- static void
-- _foo_ready_cb (Foo *self)
-- {
-- GList *l;
--
-- self->priv->state = INITIALIZED;
--
-- for (l = self->priv->init_results; l != NULL; l = l->next)
-- {
-- GTask *task = l->data;
--
-- if (self->priv->success)
-- g_task_return_boolean (task, TRUE);
-- else
-- g_task_return_new_error (task, ...);
-- g_object_unref (task);
-- }
--
-- g_list_free (self->priv->init_results);
-- self->priv->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->priv->state)
-- {
-- case NOT_INITIALIZED:
-- _foo_get_ready (self);
-- self->priv->init_results = g_list_append (self->priv->init_results,
-- task);
-- self->priv->state = INITIALIZING;
-- break;
-- case INITIALIZING:
-- self->priv->init_results = g_list_append (self->priv->init_results,
-- task);
-- break;
-- case INITIALIZED:
-- if (!self->priv->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->init_async = foo_init_async;
-- iface->init_finish = foo_init_finish;
-- }
--
--
-- Since: 2.22
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 AsyncInitable,
-- for instance with toAsyncInitable.
class (GObject o, IsDescendantOf AsyncInitable o) => IsAsyncInitable o
-- | Cast to AsyncInitable, for types for which this is known to be
-- safe. For general casts, use castTo.
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 Initable
-- you can optionally call initableInit instead.
--
-- This method is intended for language bindings. If writing in C,
-- g_async_initable_new_async() should typically be used
-- instead.
--
-- When the initialization is finished, callback will be
-- called. You can then call asyncInitableInitFinish to get the
-- result of the initialization.
--
-- Implementations may also support cancellation. If
-- cancellable is not Nothing, then initialization
-- can be cancelled by triggering the cancellable object from another
-- thread. If the operation was cancelled, the error
-- IOErrorEnumCancelled will be returned. If
-- cancellable is not Nothing, and the object
-- doesn't support cancellable initialization, the error
-- IOErrorEnumNotSupported will be returned.
--
-- As with Initable, if the object is not initialized, or
-- initialization returns with an error, then all operations on the
-- object except objectRef and objectUnref are considered
-- to be invalid, and have undefined behaviour. They will often fail with
-- g_critical() or g_warning(), but this
-- must not be relied on.
--
-- Callers should not assume that a class which implements
-- AsyncInitable can be initialized multiple times; for more
-- information, see initableInit. If a class explicitly supports
-- being initialized multiple times, implementation requires yielding all
-- subsequent calls to init_async() on the results of the
-- first call.
--
-- For classes that also support the Initable interface, the
-- default implementation of this method will run the initableInit
-- function in a thread, so if you want to support asynchronous
-- initialization via threads, just implement the AsyncInitable
-- interface without overriding any interface methods.
--
-- Since: 2.22
asyncInitableInitAsync :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes asynchronous initialization and returns the result. See
-- asyncInitableInitAsync.
--
-- Since: 2.22
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 Nothing on error.
--
-- Since: 2.22
asyncInitableNewFinish :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsAsyncResult b) => a -> b -> m Object
-- | Helper function for constructing AsyncInitable object. This is
-- similar to objectNewv but also initializes the object
-- asynchronously.
--
-- When the initialization is finished, callback will be
-- called. You can then call asyncInitableNewFinish to get the new
-- object and check for any errors.
--
-- Since: 2.22
-- | Deprecated: (Since version 2.54)Use
-- g_object_new_with_properties()
-- andasyncInitableInitAsync instead. See Parameter for
-- more information.
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.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).
--
-- GAppInfo and GAppLaunchContext 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
-- fileGetPath) when using appInfoLaunch 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:
--
-- -- Exec=totem %U ---- -- and a single URI, sftp://foo/file.avi, then -- /home/user/.gvfs/sftp on foo/file.avi will be passed. This -- will only work if a set of suitable GIO extensions (such as GVfs 2.26 -- 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 mailto:, 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 File constructors (since GVfs -- implements the GVfs extension point). As such, if the application -- needs to examine the URI, it needs to use fileGetUri or similar -- on File. In other words, an application cannot assume that the -- URI passed to e.g. fileNewForCommandlineArg is equal to the -- result of fileGetUri. The following snippet illustrates this: -- --
-- 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);
--
--
-- This code will work when both cdda://sr0/Track 1.wav and
-- /home/user/.gvfs/cdda on sr0/Track 1.wav 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 AppInfo, for
-- instance with toAppInfo.
class (GObject o, IsDescendantOf AppInfo o) => IsAppInfo o
-- | Cast to AppInfo, for types for which this is known to be safe.
-- For general casts, use castTo.
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 AppInfo can be deleted. See
-- appInfoDelete.
--
-- Since: 2.20
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 AppInfo from the given information.
--
-- Note that for commandline, the quoting rules of the
-- Exec key of the freedesktop.org Desktop Entry
-- Specification are applied. For example, if the
-- commandline contains percent-encoded URIs, the
-- percent-character must be doubled in order to prevent it from being
-- swallowed by Exec key unquoting. See the specification
-- for exact quoting rules.
appInfoCreateFromCommandline :: (HasCallStack, MonadIO m) => [Char] -> Maybe Text -> [AppInfoCreateFlags] -> m AppInfo
-- | Tries to delete a AppInfo.
--
-- On some platforms, there may be a difference between user-defined
-- AppInfos which can be deleted, and system-wide ones which
-- cannot. See appInfoCanDelete.
--
-- Since: 2.20
appInfoDelete :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool
-- | Creates a duplicate of a AppInfo.
appInfoDup :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m AppInfo
-- | Checks if two AppInfos 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
-- `NoDisplay=true` set or are excluded from display by means of
-- `OnlyShowIn` or `NotShowIn`. See
-- appInfoShouldShow.
--
-- The returned list does not include applications which have the
-- `Hidden` key set.
appInfoGetAll :: (HasCallStack, MonadIO m) => m [AppInfo]
-- | Gets a list of all AppInfos for a given content type, including
-- the recommended and fallback AppInfos. See
-- appInfoGetRecommendedForType and
-- appInfoGetFallbackForType.
appInfoGetAllForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]
-- | Gets the commandline with which the application will be started.
--
-- Since: 2.20
appInfoGetCommandline :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m (Maybe [Char])
-- | Gets the default AppInfo for a given content type.
appInfoGetDefaultForType :: (HasCallStack, MonadIO m) => Text -> Bool -> m (Maybe AppInfo)
-- | Asynchronously gets the default AppInfo for a given content
-- type.
--
-- Since: 2.74
appInfoGetDefaultForTypeAsync :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Bool -> Maybe a -> Maybe AsyncReadyCallback -> m ()
-- | Finishes a default AppInfo lookup started by
-- appInfoGetDefaultForTypeAsync.
--
-- If no #AppInfo is found, then error will be set
-- to [errorgio.IOErrorEnum.NOT_FOUND].
--
-- Since: 2.74
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 :. For example, http, ftp or
-- sip.
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 :, e.g. http, ftp or
-- sip.
--
-- Since: 2.74
appInfoGetDefaultForUriSchemeAsync :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
-- | Finishes a default AppInfo lookup started by
-- appInfoGetDefaultForUriSchemeAsync.
--
-- If no AppInfo is found, then error will be set
-- to [errorgio.IOErrorEnum.NOT_FOUND].
--
-- Since: 2.74
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.
--
-- Since: 2.24
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 appInfoLaunch
-- 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 AppInfos for a given content type, i.e.
-- those applications which claim to support the given content type by
-- MIME type subclassing and not directly.
--
-- Since: 2.28
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 NULL, depending on how the
-- appinfo 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 AppInfos 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 appInfoSetAsLastUsedForType has been
-- called.
--
-- Since: 2.28
appInfoGetRecommendedForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]
-- | Retrieves the list of content types that appInfo
-- claims to support. If this information is not provided by the
-- environment, this function will return NULL.
--
-- This function does not take in consideration associations added with
-- appInfoAddSupportsType, but only those exported directly by the
-- application.
--
-- Since: 2.34
appInfoGetSupportedTypes :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m [Text]
-- | Launches the application. Passes files to the launched
-- application as arguments, using the optional context
-- to get information about the details of the launcher (like what screen
-- it is on). On error, error will be set accordingly.
--
-- To launch the application without arguments pass a NULL
-- files list.
--
-- Note that even if the launch is successful the application launched
-- can fail to start if it runs into problems during startup. There is no
-- way to detect this.
--
-- Some URIs can be changed when passed through a GFile (for instance
-- unsupported URIs with strange formats like mailto:), so if you have a
-- textual URI you want to pass in as argument, consider using
-- appInfoLaunchUris instead.
--
-- The launched application inherits the environment of the launching
-- process, but it can be modified with appLaunchContextSetenv and
-- appLaunchContextUnsetenv.
--
-- On UNIX, this function sets the GIO_LAUNCHED_DESKTOP_FILE
-- environment variable with the path of the launched desktop file and
-- GIO_LAUNCHED_DESKTOP_FILE_PID to the process id of the
-- launched process. This can be used to ignore
-- GIO_LAUNCHED_DESKTOP_FILE, should it be inherited by further
-- processes. The DISPLAY, XDG_ACTIVATION_TOKEN and
-- DESKTOP_STARTUP_ID environment variables are also set, based
-- on information provided in context.
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 appInfoLaunchDefaultForUriAsync instead.
appInfoLaunchDefaultForUri :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => Text -> Maybe a -> m ()
-- | Async version of appInfoLaunchDefaultForUri.
--
-- 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.
--
-- Since: 2.50
appInfoLaunchDefaultForUriAsync :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsCancellable b) => Text -> Maybe a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
-- | Finishes an asynchronous launch-default-for-uri operation.
--
-- Since: 2.50
appInfoLaunchDefaultForUriFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
-- | Launches the application. This passes the uris to the
-- launched application as arguments, using the optional
-- context to get information about the details of the
-- launcher (like what screen it is on). On error, error
-- will be set accordingly. 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 NULL
-- uris 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 appInfoLaunchUris.
--
-- The callback is invoked immediately after the
-- application launch, but it waits for activation in case of
-- D-Bus–activated applications and also provides extended error
-- information for sandboxed applications, see notes for
-- appInfoLaunchDefaultForUriAsync.
--
-- Since: 2.60
appInfoLaunchUrisAsync :: (HasCallStack, MonadIO m, IsAppInfo a, IsAppLaunchContext b, IsCancellable c) => a -> [Text] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
-- | Finishes a appInfoLaunchUrisAsync operation.
--
-- Since: 2.60
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
-- appInfoSetAsDefaultForType,
-- appInfoSetAsDefaultForExtension, appInfoAddSupportsType
-- or appInfoRemoveSupportsType.
--
-- Since: 2.20
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
-- appInfoGetRecommendedForType, 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.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
-- | GActionMap is an interface for action containers.
--
-- The GActionMap interface is implemented by ActionGroup
-- implementations that operate by containing a number of named
-- Action instances, such as SimpleActionGroup.
--
-- 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.
--
-- Since: 2.32
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 ActionMap, for
-- instance with toActionMap.
class (GObject o, IsDescendantOf ActionMap o) => IsActionMap o
-- | Cast to ActionMap, for types for which this is known to be
-- safe. For general casts, use castTo.
toActionMap :: (MonadIO m, IsActionMap o) => o -> m ActionMap
-- | Adds an action to the actionMap.
--
-- If the action map already contains an action with the same name as
-- action then the old action is dropped from the action
-- map.
--
-- The action map takes its own reference on action.
--
-- Since: 2.32
actionMapAddAction :: (HasCallStack, MonadIO m, IsActionMap a, IsAction b) => a -> b -> m ()
-- | A convenience function for creating multiple SimpleAction
-- instances and adding them to a ActionMap.
--
-- Each action is constructed as per one ActionEntry.
--
--
-- 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);
-- }
--
--
-- Since: 2.32
actionMapAddActionEntries :: (HasCallStack, MonadIO m, IsActionMap a) => a -> [ActionEntry] -> Ptr () -> m ()
-- | Looks up the action with the name actionName in
-- actionMap.
--
-- If no such action exists, returns NULL.
--
-- Since: 2.32
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.
--
-- Since: 2.32
actionMapRemoveAction :: (HasCallStack, MonadIO m, IsActionMap a) => a -> Text -> m ()
-- | Remove actions from a ActionMap. This is meant as the reverse
-- of actionMapAddActionEntries.
--
--
-- 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));
-- }
--
--
-- Since: 2.78
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.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
-- `GtkBuilder` .ui files, splashscreen images,
-- Menu markup XML, CSS files, icons, etc. These are often shipped
-- as files in $datadir/appname, or manually included as literal
-- strings in the code.
--
-- The GResource API and the `glib-compile-resources`
-- 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 preprocess attribute to a comma-separated list
-- of preprocessing options. The only options currently supported are:
--
-- -- <?xml version="1.0" encoding="UTF-8"?> -- <gresources> -- <gresource prefix="/org/gtk/Example"> -- <file>data/splashscreen.png</file> -- <file compressed="true">dialog.ui</file> -- <file preprocess="xml-stripblanks">menumarkup.xml</file> -- <file alias="example.css">data/example.css</file> -- </gresource> -- </gresources> ---- -- This will create a resource bundle with the following files: -- --
-- /org/gtk/Example/data/splashscreen.png -- /org/gtk/Example/dialog.ui -- /org/gtk/Example/menumarkup.xml -- /org/gtk/Example/example.css ---- -- 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 `glib-compile-resources` to compile the XML to -- a binary bundle that you can load with resourceLoad. However, -- it’s more common to use the --generate-source and -- --generate-header arguments to create a source file and -- header to link directly into your application. This will generate -- get_resource(), register_resource() and -- unregister_resource() functions, prefixed by the -- --c-name argument passed to `glib-compile-resources`. -- get_resource() returns the generated GResource -- object. The register and unregister functions register the resource so -- its files can be accessed using resourcesLookupData. -- -- Once a GResource has been created and registered all the data -- in it can be accessed globally in the process by using API calls like -- resourcesOpenStream to stream the data or -- resourcesLookupData to get a direct pointer to the data. You -- can also use URIs like -- resource:///org/gtk/Example/data/splashscreen.png with -- File to access the resource data. -- -- Some higher-level APIs, such as `GtkApplication`, 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 GResource -- on startup or library load time. If you pass -- --manual-register, 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. -- --
-- /org/gtk/libgtk=/home/desrt/gtk-overlay ---- -- The part before the = 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 /org/gtk/libgtk/ui/gtkdialog.ui then -- GResource would check the filesystem path -- /home/desrt/gtk-overlay/ui/gtkdialog.ui. 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 =. The path after the slash 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. -- -- Since: 2.32 module GI.Gio.Structs.Resource -- | Memory-managed wrapper type. newtype Resource Resource :: ManagedPtr Resource -> Resource -- | Returns all the names of children at the specified -- path in the resource. The return result is a -- Nothing terminated list of strings which should be released -- with strfreev. -- -- If path is invalid or does not exist in the -- Resource, ResourceErrorNotFound will be returned. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 resourceEnumerateChildren :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m [Text] -- | Looks for a file at the specified path in the resource -- and if found returns information about it. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 resourceGetInfo :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m (CSize, Word32) -- | Loads a binary resource bundle and creates a Resource -- 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 resourcesRegister. -- -- If filename is empty or the data in it is corrupt, -- ResourceErrorInternal will be returned. If -- filename doesn’t exist, or there is an error in -- reading it, an error from mappedFileNew will be returned. -- -- Since: 2.32 resourceLoad :: (HasCallStack, MonadIO m) => [Char] -> m Resource -- | Looks for a file at the specified path in the resource -- and returns a Bytes 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 GBytes. -- -- For uncompressed resource files this is a pointer directly into the -- resource bundle, which is typically in some readonly data section in -- the program binary. For compressed files we allocate memory on the -- heap and automatically uncompress the data. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 resourceLookupData :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m Bytes -- | Creates a GResource from a reference to the binary resource bundle. -- This will keep a reference to data 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 resourcesRegister. -- -- Note: data 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 data is empty or corrupt, -- ResourceErrorInternal will be returned. -- -- Since: 2.32 resourceNewFromData :: (HasCallStack, MonadIO m) => Bytes -> m Resource -- | Looks for a file at the specified path in the resource -- and returns a InputStream that lets you read the data. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 resourceOpenStream :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m InputStream -- | Atomically increments the reference count of resource -- by one. This function is MT-safe and may be called from any thread. -- -- Since: 2.32 resourceRef :: (HasCallStack, MonadIO m) => Resource -> m Resource -- | Atomically decrements the reference count of resource -- by one. If the reference count drops to 0, all memory allocated by the -- resource is released. This function is MT-safe and may be called from -- any thread. -- -- Since: 2.32 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.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 -- | 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 SeekableIface struct initialized to zero. newZeroSeekableIface :: MonadIO m => m SeekableIface -- | Set the value of the “can_seek” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #canSeek --clearSeekableIfaceCanSeek :: MonadIO m => SeekableIface -> m () -- | Get the value of the “can_seek” field. When -- overloading is enabled, this is equivalent to -- --
-- get seekableIface #canSeek --getSeekableIfaceCanSeek :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceCanSeekFieldCallback) -- | Set the value of the “can_seek” field. When -- overloading is enabled, this is equivalent to -- --
-- set seekableIface [ #canSeek := value ] --setSeekableIfaceCanSeek :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceCanSeekFieldCallback -> m () -- | Set the value of the “can_truncate” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #canTruncate --clearSeekableIfaceCanTruncate :: MonadIO m => SeekableIface -> m () -- | Get the value of the “can_truncate” field. When -- overloading is enabled, this is equivalent to -- --
-- get seekableIface #canTruncate --getSeekableIfaceCanTruncate :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceCanTruncateFieldCallback) -- | Set the value of the “can_truncate” field. When -- overloading is enabled, this is equivalent to -- --
-- set seekableIface [ #canTruncate := value ] --setSeekableIfaceCanTruncate :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceCanTruncateFieldCallback -> m () -- | Get the value of the “g_iface” field. When overloading -- is enabled, this is equivalent to -- --
-- get seekableIface #gIface --getSeekableIfaceGIface :: MonadIO m => SeekableIface -> m TypeInterface -- | Set the value of the “seek” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #seek --clearSeekableIfaceSeek :: MonadIO m => SeekableIface -> m () -- | Get the value of the “seek” field. When overloading is -- enabled, this is equivalent to -- --
-- get seekableIface #seek --getSeekableIfaceSeek :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceSeekFieldCallback) -- | Set the value of the “seek” field. When overloading is -- enabled, this is equivalent to -- --
-- set seekableIface [ #seek := value ] --setSeekableIfaceSeek :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceSeekFieldCallback -> m () -- | Set the value of the “tell” field to Nothing. When -- overloading is enabled, this is equivalent to -- --
-- clear #tell --clearSeekableIfaceTell :: MonadIO m => SeekableIface -> m () -- | Get the value of the “tell” field. When overloading is -- enabled, this is equivalent to -- --
-- get seekableIface #tell --getSeekableIfaceTell :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceTellFieldCallback) -- | Set the value of the “tell” field. When overloading is -- enabled, this is equivalent to -- --
-- set seekableIface [ #tell := value ] --setSeekableIfaceTell :: MonadIO m => SeekableIface -> FunPtr C_SeekableIfaceTellFieldCallback -> m () -- | Set the value of the “truncate_fn” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #truncateFn --clearSeekableIfaceTruncateFn :: MonadIO m => SeekableIface -> m () -- | Get the value of the “truncate_fn” field. When -- overloading is enabled, this is equivalent to -- --
-- get seekableIface #truncateFn --getSeekableIfaceTruncateFn :: MonadIO m => SeekableIface -> m (Maybe SeekableIfaceTruncateFnFieldCallback) -- | Set the value of the “truncate_fn” field. When -- overloading is enabled, this is equivalent to -- --
-- set seekableIface [ #truncateFn := value ] --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 -- | SettingsSchemaKey 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 key. -- -- Note that this is the default value according to the schema. System -- administrator defaults and lockdown are not visible via this API. -- -- Since: 2.40 settingsSchemaKeyGetDefaultValue :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m GVariant -- | Gets the description for key. -- -- If no description has been provided in the schema for -- key, returns Nothing. -- -- 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. -- -- Since: 2.34 settingsSchemaKeyGetDescription :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m (Maybe Text) -- | Gets the name of key. -- -- Since: 2.44 settingsSchemaKeyGetName :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m Text -- | Queries the range of a key. -- -- This function will return a GVariant that fully describes the -- range of values that are valid for key. -- -- The type of GVariant returned is (sv). 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 'type' 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 'enum' 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 'flags' 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 ['x', 'y'] then the valid values -- for the key would be [], ['x'], ['y'], -- ['x', 'y'] and ['y', 'x']. -- -- Finally, if the string is 'range' 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 variantUnref when it is -- no longer needed. -- -- Since: 2.40 settingsSchemaKeyGetRange :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m GVariant -- | Gets the summary for key. -- -- If no summary has been provided in the schema for key, -- returns Nothing. -- -- 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. -- -- Since: 2.34 settingsSchemaKeyGetSummary :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m (Maybe Text) -- | Gets the VariantType of key. -- -- Since: 2.40 settingsSchemaKeyGetValueType :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m VariantType -- | Checks if the given value is within the permitted -- range for key. -- -- It is a programmer error if value is not of the -- correct type — you must check for this first. -- -- Since: 2.40 settingsSchemaKeyRangeCheck :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> GVariant -> m Bool -- | Increase the reference count of key, returning a new -- reference. -- -- Since: 2.40 settingsSchemaKeyRef :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m SettingsSchemaKey -- | Decrease the reference count of key, possibly freeing -- it. -- -- Since: 2.40 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.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 SettingsSchemaSource and GSettingsSchema 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. -- -- SettingsSchemaSource 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: -- --
-- typedef struct
-- {
-- …
-- GSettingsSchemaSource *schema_source;
-- …
-- } Plugin;
--
-- Plugin *
-- initialise_plugin (const gchar *dir)
-- {
-- Plugin *plugin;
--
-- …
--
-- plugin->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->identifier;
--
-- schema = g_settings_schema_source_lookup (plugin->schema_source,
-- schema_id, FALSE);
--
-- if (schema == NULL)
-- {
-- … disable the plugin or abort, etc …
-- }
--
-- return g_settings_new_full (schema, NULL, NULL);
-- }
--
--
-- 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:
--
--
-- {
-- GSettings *settings;
-- gint some_value;
--
-- settings = plugin_get_settings (self, NULL);
-- some_value = g_settings_get_int (settings, "some-value");
-- …
-- }
--
--
-- It's also possible that the plugin system expects the schema source
-- files (ie: .gschema.xml files) instead of a
-- gschemas.compiled file. In that case, the plugin loading
-- system must compile the schemas for itself before attempting to create
-- the settings source.
--
-- Since: 2.32
module GI.Gio.Structs.SettingsSchema
-- | Memory-managed wrapper type.
newtype SettingsSchema
SettingsSchema :: ManagedPtr SettingsSchema -> SettingsSchema
-- | Get the ID of schema.
settingsSchemaGetId :: (HasCallStack, MonadIO m) => SettingsSchema -> m Text
-- | Gets the key named name from schema.
--
-- It is a programmer error to request a key that does not exist. See
-- settingsSchemaListKeys.
--
-- Since: 2.40
settingsSchemaGetKey :: (HasCallStack, MonadIO m) => SettingsSchema -> Text -> m SettingsSchemaKey
-- | Gets the path associated with schema, or
-- Nothing.
--
-- 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 Nothing.
--
-- Since: 2.32
settingsSchemaGetPath :: (HasCallStack, MonadIO m) => SettingsSchema -> m (Maybe Text)
-- | Checks if schema has a key named name.
--
-- Since: 2.40
settingsSchemaHasKey :: (HasCallStack, MonadIO m) => SettingsSchema -> Text -> m Bool
-- | Gets the list of children in schema.
--
-- You should free the return value with strfreev when you are
-- done with it.
--
-- Since: 2.44
settingsSchemaListChildren :: (HasCallStack, MonadIO m) => SettingsSchema -> m [Text]
-- | Introspects the list of keys on schema.
--
-- 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.
--
-- Since: 2.46
settingsSchemaListKeys :: (HasCallStack, MonadIO m) => SettingsSchema -> m [Text]
-- | Increase the reference count of schema, returning a
-- new reference.
--
-- Since: 2.32
settingsSchemaRef :: (HasCallStack, MonadIO m) => SettingsSchema -> m SettingsSchema
-- | Decrease the reference count of schema, possibly
-- freeing it.
--
-- Since: 2.32
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.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 GSettings class provides a convenient API for storing and
-- retrieving application settings.
--
-- Reads and writes can be considered to be non-blocking. Reading
-- settings with GSettings is typically extremely fast: on
-- approximately the same order of magnitude (but slower than) a
-- GHashTable 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 GSettings 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
-- settingsBind 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 GSettings 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 ‘relocatable’, 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
-- (/) 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
-- /org/gtk/settings/file-chooser/ and
-- /ca/desrt/dconf-editor/. Paths should not start with
-- /apps/, /desktop/ or /system/ 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 GVariant, and allows any
-- [typegLib.VariantType] for keys. Key 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.
--
-- 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
-- gettext-domain attribute of the <schemalist>
-- or <schema> elements and the category that is specified
-- in the l10n attribute of the <default>
-- element. The string which is translated includes all text in the
-- <default> element, including any surrounding quotation
-- marks.
--
-- The l10n attribute must be set to messages or
-- time, and sets the
-- <https://www.gnu.org/software/gettext/manual/html_node/Aspects.html#index-locale-categories-1
-- locale category for translation>. The messages category
-- should be used by default; use time for translatable date or
-- time formats. A translation comment can be added as an XML comment
-- immediately above the <default> element — it is
-- recommended to add these comments to aid translators understand the
-- meaning and implications of the default value. An optional translation
-- context attribute can be set on the <default>
-- element to disambiguate multiple defaults which use the same string.
--
-- For example:
--
-- -- <!-- 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 --> -- <default l10n='messages' context='Banned words'>['bad', 'words']</default> ---- -- Translations of default values must remain syntactically valid -- serialized GVariants (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 -- `glib-compile-schemas` utility. The input is a schema -- description in an XML format. -- -- A DTD for the gschema XML format can be found here: gschema.dtd -- -- The `glib-compile-schemas` tool expects schema files to have -- the extension .gschema.xml. -- -- At runtime, schemas are identified by their ID (as specified in the -- id attribute of the <schema> element). The -- convention for schema IDs is to use a dotted name, similar in style to -- a D-Bus bus name, e.g. org.gnome.SessionManager. 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. -- org.gnome.font-rendering. -- -- In addition to GVariant types, keys can have types that have -- enumerated types. These can be described by a <choice>, -- <enum> or <flags> element, as seen in -- the second example below. The underlying type of such a key is string, -- but you can use settingsGetEnum, settingsSetEnum, -- settingsGetFlags, settingsSetFlags access the numeric -- values corresponding to the string value of enum and flags keys. -- -- An example for default value: -- --
-- <schemalist> -- <schema id="org.gtk.Test" path="/org/gtk/Test/" gettext-domain="test"> -- -- <key name="greeting" type="s"> -- <default l10n="messages">"Hello, earthlings"</default> -- <summary>A greeting</summary> -- <description> -- Greeting of the invading martians -- </description> -- </key> -- -- <key name="box" type="(ii)"> -- <default>(20,30)</default> -- </key> -- -- <key name="empty-string" type="s"> -- <default>""</default> -- <summary>Empty strings have to be provided in GVariant form</summary> -- </key> -- -- </schema> -- </schemalist> ---- -- An example for ranges, choices and enumerated types: -- --
-- <schemalist> -- -- <enum id="org.gtk.Test.myenum"> -- <value nick="first" value="1"/> -- <value nick="second" value="2"/> -- </enum> -- -- <flags id="org.gtk.Test.myflags"> -- <value nick="flag1" value="1"/> -- <value nick="flag2" value="2"/> -- <value nick="flag3" value="4"/> -- </flags> -- -- <schema id="org.gtk.Test"> -- -- <key name="key-with-range" type="i"> -- <range min="1" max="100"/> -- <default>10</default> -- </key> -- -- <key name="key-with-choices" type="s"> -- <choices> -- <choice value='Elisabeth'/> -- <choice value='Annabeth'/> -- <choice value='Joe'/> -- </choices> -- <aliases> -- <alias value='Anna' target='Annabeth'/> -- <alias value='Beth' target='Elisabeth'/> -- </aliases> -- <default>'Joe'</default> -- </key> -- -- <key name='enumerated-key' enum='org.gtk.Test.myenum'> -- <default>'first'</default> -- </key> -- -- <key name='flags-key' flags='org.gtk.Test.myflags'> -- <default>["flag1","flag2"]</default> -- </key> -- </schema> -- </schemalist> ---- --
-- [org.gtk.Example] -- key1='string' -- key2=1.5 ---- -- glib-compile-schemas expects schema files to have the -- extension .gschema.override. -- --
-- <schema id="org.foo.MyApp" path="/org/foo/MyApp/"> -- <child name="main" schema="org.foo.MyApp.Window"/> -- </schema> ---- --
-- GLIB_GSETTINGS ---- -- In the appropriate Makefile.am, use the following snippet to -- compile and install the named schema: -- --
-- gsettings_SCHEMAS = org.foo.MyApp.gschema.xml -- EXTRA_DIST = $(gsettings_SCHEMAS) -- -- @GSETTINGS_RULES@ ---- -- No changes are needed to the build system to mark a schema XML file -- for translation. Assuming it sets the gettext-domain -- attribute, a schema may be marked for translation by adding it to -- POTFILES.in, assuming gettext 0.19 is in use (the preferred -- method for translation): -- --
-- data/org.foo.MyApp.gschema.xml ---- -- Alternatively, if intltool 0.50.1 is in use: -- --
-- [type: gettext/gsettings]data/org.foo.MyApp.gschema.xml ---- -- GSettings will use gettext to look up translations for the -- <summary> and <description> elements, -- and also any <default> elements which have a -- l10n attribute set. Translations must not be included in the -- .gschema.xml file by the build system, for example by using -- intltool XML rules with a .gschema.xml.in template. -- -- 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 -- <enum> 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 Makefile.am: -- --
-- gsettings_ENUM_NAMESPACE = org.foo.MyApp -- gsettings_ENUM_FILES = my-app-enums.h my-app-misc.h ---- -- gsettings_ENUM_NAMESPACE specifies the schema namespace for -- the enum files, which are specified in gsettings_ENUM_FILES. -- This will generate a org.foo.MyApp.enums.xml 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 EXTRA_DIST. 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 Settings, for -- instance with toSettings. class (GObject o, IsDescendantOf Settings o) => IsSettings o -- | Cast to Settings, for types for which this is known to be safe. -- For general casts, use castTo. toSettings :: (MonadIO m, IsSettings o) => o -> m Settings -- | Applies any changes that have been made to the settings. This function -- does nothing unless settings is in 'delay-apply' mode; -- see settingsDelay. In the normal case settings are always -- applied immediately. settingsApply :: (HasCallStack, MonadIO m, IsSettings a) => a -> m () -- | Create a binding between the key in the -- settings object and the property -- property of object. -- -- 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 -- g_settings_bind_with_mapping() if you need a custom -- mapping, or map between types that are not supported by the default -- mapping functions. -- -- Unless the flags include -- SettingsBindFlagsNoSensitivity, this function also establishes -- a binding between the writability of key and the -- "sensitive" property of object (if -- object has a boolean property by that name). See -- settingsBindWritable for more details about writable bindings. -- -- Note that the lifecycle of the binding is tied to -- object, 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. -- -- Since: 2.26 settingsBind :: (HasCallStack, MonadIO m, IsSettings a, IsObject b) => a -> Text -> b -> Text -> [SettingsBindFlags] -> m () -- | Version of g_settings_bind_with_mapping() using -- closures instead of callbacks for easier binding in other languages. -- -- Since: 2.82 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 key in the -- settings object and the property -- property of object. The property must -- be boolean; "sensitive" or "visible" 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 inverted argument is True, the binding -- inverts the value as it passes from the setting to the object, i.e. -- property will be set to True if the key is not -- writable. -- -- Note that the lifecycle of the binding is tied to -- object, 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. -- -- Since: 2.26 settingsBindWritable :: (HasCallStack, MonadIO m, IsSettings a, IsObject b) => a -> Text -> b -> Text -> Bool -> m () -- | Creates a Action corresponding to a given Settings 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). -- -- Since: 2.32 settingsCreateAction :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Action -- | Changes the Settings object into 'delay-apply' mode. In this -- mode, changes to settings are not immediately -- propagated to the backend, but kept locally until settingsApply -- is called. -- -- Since: 2.26 settingsDelay :: (HasCallStack, MonadIO m, IsSettings a) => a -> m () -- | Gets the value that is stored at key in -- settings. -- -- A convenience variant of g_settings_get() for -- booleans. -- -- It is a programmer error to give a key that isn't -- specified as having a boolean type in the schema for -- settings. -- -- Since: 2.26 settingsGetBoolean :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Bool -- | Creates a child settings object which has a base path of -- base-path/@name, where base-path is the base path of -- settings. -- -- The schema for the child settings object must have been declared in -- the schema of settings using a <child> -- element. -- -- The created child settings object will inherit the -- Settings:delayApply mode from settings. -- -- Since: 2.26 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 settingsReset were to -- be called on the key. -- -- Note that this may be a different value than returned by -- settingsSchemaKeyGetDefaultValue if the system administrator -- has provided a default value. -- -- Comparing the return values of settingsGetDefaultValue and -- settingsGetValue 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 key that isn't -- contained in the schema for settings. -- -- Since: 2.40 settingsGetDefaultValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m (Maybe GVariant) -- | Gets the value that is stored at key in -- settings. -- -- A convenience variant of g_settings_get() for doubles. -- -- It is a programmer error to give a key that isn't -- specified as having a 'double' type in the schema for -- settings. -- -- Since: 2.26 settingsGetDouble :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Double -- | Gets the value that is stored in settings for -- key 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 key that isn't -- contained in the schema for settings 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. -- -- Since: 2.26 settingsGetEnum :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Int32 -- | Gets the value that is stored in settings for -- key 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 key that isn't -- contained in the schema for settings 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. -- -- Since: 2.26 settingsGetFlags :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Word32 -- | Returns whether the Settings object has any unapplied changes. -- This can only be the case if it is in 'delayed-apply' mode. -- -- Since: 2.26 settingsGetHasUnapplied :: (HasCallStack, MonadIO m, IsSettings a) => a -> m Bool -- | Gets the value that is stored at key in -- settings. -- -- A convenience variant of g_settings_get() for 32-bit -- integers. -- -- It is a programmer error to give a key that isn't -- specified as having a int32 type in the schema for -- settings. -- -- Since: 2.26 settingsGetInt :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Int32 -- | Gets the value that is stored at key in -- settings. -- -- A convenience variant of g_settings_get() for 64-bit -- integers. -- -- It is a programmer error to give a key that isn't -- specified as having a int64 type in the schema for -- settings. -- -- Since: 2.50 settingsGetInt64 :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Int64 -- | Gets the value that is stored at key in -- settings, 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 -- mapping 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 Nothing -- value. If the mapping function still indicates failure at this point -- then the application will be aborted. -- -- The result parameter for the mapping function is -- pointed to a gpointer which is initially set to -- Nothing. The same pointer is given to each invocation of -- mapping. The final value of that -- gpointer is what is returned by this function. -- Nothing 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. -- -- Since: 2.28 -- | Deprecated: (Since version 2.40)Use -- settingsSchemaKeyGetRange instead. settingsGetRange :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m GVariant -- | Gets the value that is stored at key in -- settings. -- -- A convenience variant of g_settings_get() for strings. -- -- It is a programmer error to give a key that isn't -- specified as having a string type in the schema for -- settings. -- -- Since: 2.26 settingsGetString :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Text -- | A convenience variant of g_settings_get() for string -- arrays. -- -- It is a programmer error to give a key that isn't -- specified as having an array of strings type in the schema for -- settings. -- -- Since: 2.26 settingsGetStrv :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m [Text] -- | Gets the value that is stored at key in -- settings. -- -- A convenience variant of g_settings_get() for 32-bit -- unsigned integers. -- -- It is a programmer error to give a key that isn't -- specified as having a uint32 type in the schema for -- settings. -- -- Since: 2.30 settingsGetUint :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Word32 -- | Gets the value that is stored at key in -- settings. -- -- A convenience variant of g_settings_get() for 64-bit -- unsigned integers. -- -- It is a programmer error to give a key that isn't -- specified as having a uint64 type in the schema for -- settings. -- -- Since: 2.50 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 settingsReset this function should always return -- Nothing (assuming something is not wrong with the system -- configuration). -- -- It is possible that settingsGetValue 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 key that isn't -- contained in the schema for settings. -- -- Since: 2.40 settingsGetUserValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m (Maybe GVariant) -- | Gets the value that is stored in settings for -- key. -- -- It is a programmer error to give a key that isn't -- contained in the schema for settings. -- -- Since: 2.26 settingsGetValue :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m GVariant -- | Finds out if a key can be written or not -- -- Since: 2.26 settingsIsWritable :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> m Bool -- | Gets the list of children on settings. -- -- The list is exactly the list of strings for which it is not an error -- to call settingsGetChild. -- -- 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 strfreev when you are -- done with it. settingsListChildren :: (HasCallStack, MonadIO m, IsSettings a) => a -> m [Text] -- | Introspects the list of keys on settings. -- -- 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 strfreev when you are -- done with it. -- | Deprecated: (Since version 2.46)Use settingsSchemaListKeys -- instead. settingsListKeys :: (HasCallStack, MonadIO m, IsSettings a) => a -> m [Text] -- | Deprecated. -- -- Since: 2.28 -- | Deprecated: (Since version 2.40)Use -- settingsSchemaSourceListSchemas instead settingsListRelocatableSchemas :: (HasCallStack, MonadIO m) => m [Text] -- | Deprecated. -- -- Since: 2.26 -- | Deprecated: (Since version 2.40)Use -- settingsSchemaSourceListSchemas instead.If you used -- settingsListSchemas to check for the presence ofa particular -- schema, use settingsSchemaSourceLookup insteadof your whole -- loop. settingsListSchemas :: (HasCallStack, MonadIO m) => m [Text] -- | Creates a new Settings object with the schema specified by -- schemaId. -- -- 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), settingsSchemaSourceLookup can be used to test for -- their existence before loading them. -- -- Signals on the newly created Settings object will be dispatched -- via the thread-default MainContext in effect at the time of the -- call to settingsNew. The new Settings will hold a -- reference on the context. See mainContextPushThreadDefault. -- -- Since: 2.26 settingsNew :: (HasCallStack, MonadIO m) => Text -> m Settings -- | Creates a new Settings 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 Settings object is a pure -- composition of 4 things: a SettingsSchema, a -- SettingsBackend, a path within that backend, and a -- MainContext to which signals are dispatched. -- -- This constructor therefore gives you full control over constructing -- Settings instances. The first 3 parameters are given directly -- as schema, backend and -- path, and the main context is taken from the -- thread-default (as per settingsNew). -- -- If backend is Nothing then the default backend -- is used. -- -- If path is Nothing then the path from the -- schema is used. It is an error if path is -- Nothing and the schema has no path of its own or if -- path is non-Nothing and not equal to the path -- that the schema does have. -- -- Since: 2.32 settingsNewFull :: (HasCallStack, MonadIO m, IsSettingsBackend a) => SettingsSchema -> Maybe a -> Maybe Text -> m Settings -- | Creates a new Settings object with the schema specified by -- schemaId and a given SettingsBackend. -- -- Creating a Settings 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. -- -- Since: 2.26 settingsNewWithBackend :: (HasCallStack, MonadIO m, IsSettingsBackend a) => Text -> a -> m Settings -- | Creates a new Settings object with the schema specified by -- schemaId and a given SettingsBackend and path. -- -- This is a mix of settingsNewWithBackend and -- settingsNewWithPath. -- -- Since: 2.26 settingsNewWithBackendAndPath :: (HasCallStack, MonadIO m, IsSettingsBackend a) => Text -> a -> Text -> m Settings -- | Creates a new Settings object with the relocatable schema -- specified by schemaId 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 path is not a valid path. -- A valid path begins and ends with '/' and does not contain two -- consecutive '/' characters. -- -- Since: 2.26 settingsNewWithPath :: (HasCallStack, MonadIO m) => Text -> Text -> m Settings -- | Checks if the given value is of the correct type and -- within the permitted range for key. -- -- Since: 2.28 -- | Deprecated: (Since version 2.40)Use -- settingsSchemaKeyRangeCheck instead. settingsRangeCheck :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> GVariant -> m Bool -- | Resets key 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 non-applied changes to the settings. This function does -- nothing unless settings is in 'delay-apply' mode; see -- settingsDelay. 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 key in settings to -- value. -- -- A convenience variant of g_settings_set() for -- booleans. -- -- It is a programmer error to give a key that isn't -- specified as having a boolean type in the schema for -- settings. -- -- Since: 2.26 settingsSetBoolean :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Bool -> m Bool -- | Sets key in settings to -- value. -- -- A convenience variant of g_settings_set() for doubles. -- -- It is a programmer error to give a key that isn't -- specified as having a 'double' type in the schema for -- settings. -- -- Since: 2.26 settingsSetDouble :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Double -> m Bool -- | Looks up the enumerated type nick for value and writes -- it to key, within settings. -- -- It is a programmer error to give a key that isn't -- contained in the schema for settings or is not marked -- as an enumerated type, or for value not to be a valid -- value for the named type. -- -- After performing the write, accessing key directly -- with settingsGetString will return the 'nick' associated with -- value. settingsSetEnum :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Int32 -> m Bool -- | Looks up the flags type nicks for the bits specified by -- value, puts them in an array of strings and writes the -- array to key, within settings. -- -- It is a programmer error to give a key that isn't -- contained in the schema for settings or is not marked -- as a flags type, or for value to contain any bits that -- are not value for the named type. -- -- After performing the write, accessing key directly -- with settingsGetStrv will return an array of 'nicks'; one for -- each bit in value. settingsSetFlags :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Word32 -> m Bool -- | Sets key in settings to -- value. -- -- A convenience variant of g_settings_set() for 32-bit -- integers. -- -- It is a programmer error to give a key that isn't -- specified as having a int32 type in the schema for -- settings. -- -- Since: 2.26 settingsSetInt :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Int32 -> m Bool -- | Sets key in settings to -- value. -- -- A convenience variant of g_settings_set() for 64-bit -- integers. -- -- It is a programmer error to give a key that isn't -- specified as having a int64 type in the schema for -- settings. -- -- Since: 2.50 settingsSetInt64 :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Int64 -> m Bool -- | Sets key in settings to -- value. -- -- A convenience variant of g_settings_set() for strings. -- -- It is a programmer error to give a key that isn't -- specified as having a string type in the schema for -- settings. -- -- Since: 2.26 settingsSetString :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Text -> m Bool -- | Sets key in settings to -- value. -- -- A convenience variant of g_settings_set() for string -- arrays. If value is Nothing, then -- key is set to be the empty array. -- -- It is a programmer error to give a key that isn't -- specified as having an array of strings type in the schema for -- settings. -- -- Since: 2.26 settingsSetStrv :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Maybe [Text] -> m Bool -- | Sets key in settings to -- value. -- -- A convenience variant of g_settings_set() for 32-bit -- unsigned integers. -- -- It is a programmer error to give a key that isn't -- specified as having a uint32 type in the schema for -- settings. -- -- Since: 2.30 settingsSetUint :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Word32 -> m Bool -- | Sets key in settings to -- value. -- -- A convenience variant of g_settings_set() for 64-bit -- unsigned integers. -- -- It is a programmer error to give a key that isn't -- specified as having a uint64 type in the schema for -- settings. -- -- Since: 2.50 settingsSetUint64 :: (HasCallStack, MonadIO m, IsSettings a) => a -> Text -> Word64 -> m Bool -- | Sets key in settings to -- value. -- -- It is a programmer error to give a key that isn't -- contained in the schema for settings or for -- value to have the incorrect type, per the schema. -- -- If value is floating then this function consumes the -- reference. -- -- Since: 2.26 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 Settings are handled asynchronously. For this -- reason, it is very unlikely that the changes have it to disk by the -- time g_settings_set() returns. -- -- This call will block until all of the writes have made it to the -- backend. Since the mainloop 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 property on -- object. -- -- Note that bindings are automatically removed when the object is -- finalized, so it is rarely necessary to call this function. -- -- Since: 2.26 settingsUnbind :: (HasCallStack, MonadIO m, IsObject a) => a -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “backend” property. This is rarely needed directly, but it is -- used by new. constructSettingsBackend :: (IsSettings o, MonadIO m, IsSettingsBackend a) => a -> m (GValueConstruct o) -- | Get the value of the “backend” property. When -- overloading is enabled, this is equivalent to -- --
-- get settings #backend --getSettingsBackend :: (MonadIO m, IsSettings o) => o -> m (Maybe SettingsBackend) -- | Get the value of the “delay-apply” property. When -- overloading is enabled, this is equivalent to -- --
-- get settings #delayApply --getSettingsDelayApply :: (MonadIO m, IsSettings o) => o -> m Bool -- | Get the value of the “has-unapplied” property. When -- overloading is enabled, this is equivalent to -- --
-- get settings #hasUnapplied --getSettingsHasUnapplied :: (MonadIO m, IsSettings o) => o -> m Bool -- | Construct a GValueConstruct with valid value for the -- “path” property. This is rarely needed directly, but it is -- used by new. constructSettingsPath :: (IsSettings o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “path” property. When overloading -- is enabled, this is equivalent to -- --
-- get settings #path --getSettingsPath :: (MonadIO m, IsSettings o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “schema” property. This is rarely needed directly, but it is -- used by new. constructSettingsSchema :: (IsSettings o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “schema” property. When -- overloading is enabled, this is equivalent to -- --
-- get settings #schema --getSettingsSchema :: (MonadIO m, IsSettings o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “schema-id” property. This is rarely needed directly, but it -- is used by new. constructSettingsSchemaId :: (IsSettings o, MonadIO m) => Text -> m (GValueConstruct o) -- | Get the value of the “schema-id” property. When -- overloading is enabled, this is equivalent to -- --
-- get settings #schemaId --getSettingsSchemaId :: (MonadIO m, IsSettings o) => o -> m (Maybe Text) -- | Construct a GValueConstruct with valid value for the -- “settings-schema” property. This is rarely needed directly, -- but it is used by new. constructSettingsSettingsSchema :: (IsSettings o, MonadIO m) => SettingsSchema -> m (GValueConstruct o) -- | Get the value of the “settings-schema” property. When -- overloading is enabled, this is equivalent to -- --
-- get settings #settingsSchema --getSettingsSettingsSchema :: (MonadIO m, IsSettings o) => o -> m (Maybe SettingsSchema) -- | The "change-event" signal is 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 "changed" signal. For most -- use cases it is more appropriate to use the "changed" signal. -- -- In the event that the change event applies to one or more specified -- keys, keys will be an array of GQuark -- of length nKeys. In the event that the change event -- applies to the Settings object as a whole (ie: potentially -- every key has been changed) then keys will be -- Nothing and nKeys will be 0. -- -- The default handler for this signal invokes the "changed" 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 changeEvent signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after settings #changeEvent callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSettingsChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsChangeEventCallback) -> m SignalHandlerId -- | Connect a signal handler for the changeEvent signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on settings #changeEvent callback --onSettingsChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsChangeEventCallback) -> m SignalHandlerId -- | The "changed" signal is emitted when a key has potentially changed. -- You should call one of the g_settings_get() calls to -- check the new value. -- -- This signal supports detailed connections. You can connect to the -- detailed signal "changedx" in order to only receive callbacks -- when key "x" changes. -- -- Note that settings only emits this signal if you have -- read key at least once while a signal handler was -- already connected for key. type SettingsChangedCallback = Text -> IO () -- | Connect a signal handler for the changed signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after settings #changed callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “changed::detail” -- 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 -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSettingsChanged :: (IsSettings a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => SettingsChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the changed signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on settings #changed callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to “changed::detail” -- instead. onSettingsChanged :: (IsSettings a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => SettingsChangedCallback) -> m SignalHandlerId -- | The "writable-change-event" signal is 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 "writable-changed" -- signal. For most use cases it is more appropriate to use the -- "writable-changed" signal. -- -- In the event that the writability change applies only to a single key, -- key will be set to the GQuark for that -- key. In the event that the writability change affects the entire -- settings object, key will be 0. -- -- The default handler for this signal invokes the "writable-changed" and -- "changed" 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 writableChangeEvent signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after settings #writableChangeEvent callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSettingsWritableChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsWritableChangeEventCallback) -> m SignalHandlerId -- | Connect a signal handler for the writableChangeEvent signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on settings #writableChangeEvent callback --onSettingsWritableChangeEvent :: (IsSettings a, MonadIO m) => a -> ((?self :: a) => SettingsWritableChangeEventCallback) -> m SignalHandlerId -- | The "writable-changed" signal is emitted when the writability of a key -- has potentially changed. You should call settingsIsWritable in -- order to determine the new status. -- -- This signal supports detailed connections. You can connect to the -- detailed signal "writable-changedx" in order to only receive -- callbacks when the writability of "x" changes. type SettingsWritableChangedCallback = Text -> IO () -- | Connect a signal handler for the writableChanged signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after settings #writableChanged callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to -- “writable-changed::detail” 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 -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterSettingsWritableChanged :: (IsSettings a, MonadIO m) => a -> Maybe Text -> ((?self :: a) => SettingsWritableChangedCallback) -> m SignalHandlerId -- | Connect a signal handler for the writableChanged signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on settings #writableChanged callback ---- -- This signal admits a optional parameter detail. If it's not -- Nothing, we will connect to -- “writable-changed::detail” 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.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. -- -- Since: 2.32 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 Settings 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, Nothing will be returned. -- -- The returned source may actually consist of multiple schema sources -- from different directories, depending on which directories were given -- in XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR. For this -- reason, all lookups performed against the default source should -- probably be done recursively. -- -- Since: 2.32 settingsSchemaSourceGetDefault :: (HasCallStack, MonadIO m) => m (Maybe SettingsSchemaSource) -- | Lists the schemas in a given source. -- -- If recursive is True then include parent -- sources. If False then only include the schemas from one source -- (ie: one directory). You probably want True. -- -- Non-relocatable schemas are those for which you can call -- settingsNew. Relocatable schemas are those for which you must -- use settingsNewWithPath. -- -- Do not call this function from normal programs. This is designed for -- use by database editors, commandline tools, etc. -- -- Since: 2.40 settingsSchemaSourceListSchemas :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> Bool -> m ([Text], [Text]) -- | Looks up a schema with the identifier schemaId in -- source. -- -- This function is not required for normal uses of Settings 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 source and -- recursive is True then the parent sources will -- also be checked. -- -- If the schema isn't found, Nothing is returned. -- -- Since: 2.32 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 Settings but -- it may be useful to authors of plugin management systems. -- -- The directory should contain a file called gschemas.compiled -- as produced by the [glib-compile-schemas][glib-compile-schemas] tool. -- -- If trusted is True then -- gschemas.compiled 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 trusted to True for files installed -- by the system and to False for files in the home directory. -- -- In either case, an empty file or some types of corruption in the file -- will result in FileErrorInval being returned. -- -- If parent is non-Nothing then there are two -- effects. -- -- First, if settingsSchemaSourceLookup is called with the -- recursive flag set to True 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: child or extends) references may be resolved -- from the parent. -- -- For this second reason, except in very unusual situations, the -- parent should probably be given as the default schema -- source, as returned by settingsSchemaSourceGetDefault. -- -- Since: 2.32 settingsSchemaSourceNewFromDirectory :: (HasCallStack, MonadIO m) => [Char] -> Maybe SettingsSchemaSource -> Bool -> m SettingsSchemaSource -- | Increase the reference count of source, returning a -- new reference. -- -- Since: 2.32 settingsSchemaSourceRef :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> m SettingsSchemaSource -- | Decrease the reference count of source, possibly -- freeing it. -- -- Since: 2.32 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.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 xmpp-client SRV record for ‘example.com’, and -- then connect to whatever host was pointed to by that record. -- -- You can use resolverLookupService or -- resolverLookupServiceAsync to find the GSrvTargets for -- a given service. However, if you are simply planning to connect to the -- remote service, you can use NetworkService’s -- SocketConnectable interface and not need to worry about -- GSrvTarget at all. module GI.Gio.Structs.SrvTarget -- | Memory-managed wrapper type. newtype SrvTarget SrvTarget :: ManagedPtr SrvTarget -> SrvTarget -- | Copies target -- -- Since: 2.22 srvTargetCopy :: (HasCallStack, MonadIO m) => SrvTarget -> m SrvTarget -- | Frees target -- -- Since: 2.22 srvTargetFree :: (HasCallStack, MonadIO m) => SrvTarget -> m () -- | Gets target's hostname (in ASCII form; if you are -- going to present this to the user, you should use -- hostnameIsAsciiEncoded to check if it contains encoded Unicode -- segments, and use hostnameToUnicode to convert it if it does.) -- -- Since: 2.22 srvTargetGetHostname :: (HasCallStack, MonadIO m) => SrvTarget -> m Text -- | Gets target's port -- -- Since: 2.22 srvTargetGetPort :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16 -- | Gets target's priority. You should not need to look at -- this; Resolver already sorts the targets according to the -- algorithm in RFC 2782. -- -- Since: 2.22 srvTargetGetPriority :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16 -- | Gets target's weight. You should not need to look at -- this; Resolver already sorts the targets according to the -- algorithm in RFC 2782. -- -- Since: 2.22 srvTargetGetWeight :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16 -- | Creates a new SrvTarget with the given parameters. -- -- You should not need to use this; normally GSrvTargets -- are created by Resolver. -- -- Since: 2.22 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.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 -- | ThreadedResolver is an implementation of Resolver which -- calls the libc lookup functions in threads to allow them to run -- asynchronously. -- -- Since: 2.20 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 -- ThreadedResolver, for instance with toThreadedResolver. class (GObject o, IsDescendantOf ThreadedResolver o) => IsThreadedResolver o -- | Cast to ThreadedResolver, for types for which this is known to -- be safe. For general casts, use castTo. 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.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 resolverGetDefault -- to get the default resolver. -- -- GResolver provides cancellable synchronous and asynchronous -- DNS resolution, for hostnames (resolverLookupByAddress, -- resolverLookupByName and their async variants) and SRV -- (service) records (resolverLookupService). -- -- NetworkAddress and NetworkService provide wrappers -- around GResolver functionality that also implement -- SocketConnectable, making it easy to connect to a remote -- host/service. -- -- The default resolver (see resolverGetDefault) 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 Resolver, for -- instance with toResolver. class (GObject o, IsDescendantOf Resolver o) => IsResolver o -- | Cast to Resolver, for types for which this is known to be safe. -- For general casts, use castTo. toResolver :: (MonadIO m, IsResolver o) => o -> m Resolver -- | Gets the default Resolver. You should unref it when you are -- done with it. Resolver may use its reference count as a hint -- about how many threads it should allocate for concurrent DNS -- resolutions. -- -- Since: 2.22 resolverGetDefault :: (HasCallStack, MonadIO m) => m Resolver -- | Get the timeout applied to all resolver lookups. See -- Resolver:timeout. -- -- Since: 2.78 resolverGetTimeout :: (HasCallStack, MonadIO m, IsResolver a) => a -> m Word32 -- | Synchronously reverse-resolves address to determine -- its associated hostname. -- -- If the DNS resolution fails, error (if -- non-Nothing) will be set to a value from ResolverError. -- -- If cancellable is non-Nothing, it can be used -- to cancel the operation, in which case error (if -- non-Nothing) will be set to IOErrorEnumCancelled. -- -- Since: 2.22 resolverLookupByAddress :: (HasCallStack, MonadIO m, IsResolver a, IsInetAddress b, IsCancellable c) => a -> b -> Maybe c -> m Text -- | Begins asynchronously reverse-resolving address to -- determine its associated hostname, and eventually calls -- callback, which must call -- resolverLookupByAddressFinish to get the final result. -- -- Since: 2.22 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 -- resolverLookupByAddressAsync. -- -- If the DNS resolution failed, error (if -- non-Nothing) will be set to a value from ResolverError. -- If the operation was cancelled, error will be set to -- IOErrorEnumCancelled. -- -- Since: 2.22 resolverLookupByAddressFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m Text -- | Synchronously resolves hostname to determine its -- associated IP address(es). hostname 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 -- inetAddressNewFromString). -- -- On success, resolverLookupByName will return a non-empty -- List of InetAddress, sorted in order of preference and -- guaranteed to not contain duplicates. That is, if using the result to -- connect to hostname, 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. socketListenerAddAddress. -- -- If the DNS resolution fails, error (if -- non-Nothing) will be set to a value from ResolverError -- and Nothing will be returned. -- -- If cancellable is non-Nothing, it can be used -- to cancel the operation, in which case error (if -- non-Nothing) will be set to IOErrorEnumCancelled. -- -- If you are planning to connect to a socket on the resolved IP address, -- it may be easier to create a NetworkAddress and use its -- SocketConnectable interface. -- -- Since: 2.22 resolverLookupByName :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Maybe b -> m [InetAddress] -- | Begins asynchronously resolving hostname to determine -- its associated IP address(es), and eventually calls -- callback, which must call -- resolverLookupByNameFinish to get the result. See -- resolverLookupByName for more details. -- -- Since: 2.22 resolverLookupByNameAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Retrieves the result of a call to resolverLookupByNameAsync. -- -- If the DNS resolution failed, error (if -- non-Nothing) will be set to a value from ResolverError. -- If the operation was cancelled, error will be set to -- IOErrorEnumCancelled. -- -- Since: 2.22 resolverLookupByNameFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [InetAddress] -- | This differs from resolverLookupByName in that you can modify -- the lookup behavior with flags. For example this can -- be used to limit results with ResolverNameLookupFlagsIpv4Only. -- -- Since: 2.60 resolverLookupByNameWithFlags :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> [ResolverNameLookupFlags] -> Maybe b -> m [InetAddress] -- | Begins asynchronously resolving hostname to determine -- its associated IP address(es), and eventually calls -- callback, which must call -- resolverLookupByNameWithFlagsFinish to get the result. See -- resolverLookupByName for more details. -- -- Since: 2.60 resolverLookupByNameWithFlagsAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> [ResolverNameLookupFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Retrieves the result of a call to -- resolverLookupByNameWithFlagsAsync. -- -- If the DNS resolution failed, error (if -- non-Nothing) will be set to a value from ResolverError. -- If the operation was cancelled, error will be set to -- IOErrorEnumCancelled. -- -- Since: 2.60 resolverLookupByNameWithFlagsFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [InetAddress] -- | Synchronously performs a DNS record lookup for the given -- rrname and returns a list of records as -- GVariant tuples. See ResolverRecordType for information -- on what the records contain for each recordType. -- -- If the DNS resolution fails, error (if -- non-Nothing) will be set to a value from ResolverError -- and Nothing will be returned. -- -- If cancellable is non-Nothing, it can be used -- to cancel the operation, in which case error (if -- non-Nothing) will be set to IOErrorEnumCancelled. -- -- Since: 2.34 resolverLookupRecords :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> ResolverRecordType -> Maybe b -> m [GVariant] -- | Begins asynchronously performing a DNS lookup for the given -- rrname, and eventually calls callback, -- which must call resolverLookupRecordsFinish to get the final -- result. See resolverLookupRecords for more details. -- -- Since: 2.34 resolverLookupRecordsAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> ResolverRecordType -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Retrieves the result of a previous call to -- resolverLookupRecordsAsync. Returns a non-empty list of records -- as GVariant tuples. See ResolverRecordType for -- information on what the records contain. -- -- If the DNS resolution failed, error (if -- non-Nothing) will be set to a value from ResolverError. -- If the operation was cancelled, error will be set to -- IOErrorEnumCancelled. -- -- Since: 2.34 resolverLookupRecordsFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [GVariant] -- | Synchronously performs a DNS SRV lookup for the given -- service and protocol in the given -- domain and returns an array of SrvTarget. -- domain may be an ASCII-only or UTF-8 hostname. Note -- also that the service and protocol -- arguments do not include the leading underscore that appears in the -- actual DNS entry. -- -- On success, resolverLookupService will return a non-empty -- List of SrvTarget, 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, error (if -- non-Nothing) will be set to a value from ResolverError -- and Nothing will be returned. -- -- If cancellable is non-Nothing, it can be used -- to cancel the operation, in which case error (if -- non-Nothing) will be set to IOErrorEnumCancelled. -- -- If you are planning to connect to the service, it is usually easier to -- create a NetworkService and use its SocketConnectable -- interface. -- -- Since: 2.22 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 -- service and protocol in the given -- domain, and eventually calls callback, -- which must call resolverLookupServiceFinish to get the final -- result. See resolverLookupService for more details. -- -- Since: 2.22 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 -- resolverLookupServiceAsync. -- -- If the DNS resolution failed, error (if -- non-Nothing) will be set to a value from ResolverError. -- If the operation was cancelled, error will be set to -- IOErrorEnumCancelled. -- -- Since: 2.22 resolverLookupServiceFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [SrvTarget] -- | Sets resolver to be the application's default resolver -- (reffing resolver, and unreffing the previous default -- resolver, if any). Future calls to resolverGetDefault 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 Resolver 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. -- -- Since: 2.22 resolverSetDefault :: (HasCallStack, MonadIO m, IsResolver a) => a -> m () -- | Set the timeout applied to all resolver lookups. See -- Resolver:timeout. -- -- Since: 2.78 resolverSetTimeout :: (HasCallStack, MonadIO m, IsResolver a) => a -> Word32 -> m () -- | Construct a GValueConstruct with valid value for the -- “timeout” property. This is rarely needed directly, but it is -- used by new. constructResolverTimeout :: (IsResolver o, MonadIO m) => Word32 -> m (GValueConstruct o) -- | Get the value of the “timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- get resolver #timeout --getResolverTimeout :: (MonadIO m, IsResolver o) => o -> m Word32 -- | Set the value of the “timeout” property. When -- overloading is enabled, this is equivalent to -- --
-- set resolver [ #timeout := value ] --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 reload signal, to be run after -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after resolver #reload callback ---- -- By default the object invoking the signal is not passed to the -- callback. If you need to access it, you can use the implit -- ?self parameter. Note that this requires activating the -- ImplicitParams GHC extension. afterResolverReload :: (IsResolver a, MonadIO m) => a -> ((?self :: a) => ResolverReloadCallback) -> m SignalHandlerId -- | Connect a signal handler for the reload signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on resolver #reload callback --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.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 -- | StaticResource 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 StaticResource struct initialized to zero. newZeroStaticResource :: MonadIO m => m StaticResource -- | Finalized a GResource initialized by staticResourceInit. -- -- This is normally used by code generated by -- [glib-compile-resources][glib-compile-resources] and is not typically -- used by other code. -- -- Since: 2.32 staticResourceFini :: (HasCallStack, MonadIO m) => StaticResource -> m () -- | Gets the GResource that was registered by a call to -- staticResourceInit. -- -- This is normally used by code generated by -- [glib-compile-resources][glib-compile-resources] and is not typically -- used by other code. -- -- Since: 2.32 staticResourceGetResource :: (HasCallStack, MonadIO m) => StaticResource -> m Resource -- | Initializes a GResource from static data using a GStaticResource. -- -- This is normally used by code generated by -- [glib-compile-resources][glib-compile-resources] and is not typically -- used by other code. -- -- Since: 2.32 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 -- | Defines a Unix mount entry (e.g. /media/cdrom). This -- corresponds roughly to a mtab entry. module GI.Gio.Structs.UnixMountEntry -- | Memory-managed wrapper type. newtype UnixMountEntry UnixMountEntry :: ManagedPtr UnixMountEntry -> UnixMountEntry instance GHC.Classes.Eq GI.Gio.Structs.UnixMountEntry.UnixMountEntry instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.UnixMountEntry.UnixMountEntry instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.UnixMountEntry.UnixMountEntry instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Structs.UnixMountEntry.UnixMountEntry) instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.UnixMountEntry.UnixMountEntry instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.UnixMountEntry.UnixMountEntry -- | Defines a Unix mount point (e.g. /dev). This corresponds -- roughly to a fstab entry. module GI.Gio.Structs.UnixMountPoint -- | Memory-managed wrapper type. newtype UnixMountPoint UnixMountPoint :: ManagedPtr UnixMountPoint -> UnixMountPoint -- | Gets a UnixMountPoint for a given mount path. If -- timeRead is set, it will be filled with a unix -- timestamp for checking if the mount points have changed since with -- unixMountPointsChangedSince. -- -- If more mount points have the same mount path, the last matching mount -- point is returned. -- -- Since: 2.66 unixMountPointAt :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe UnixMountPoint, Word64) -- | Compares two unix mount points. unixMountPointCompare :: (HasCallStack, MonadIO m) => UnixMountPoint -> UnixMountPoint -> m Int32 -- | Makes a copy of mountPoint. -- -- Since: 2.54 unixMountPointCopy :: (HasCallStack, MonadIO m) => UnixMountPoint -> m UnixMountPoint -- | Frees a unix mount point. unixMountPointFree :: (HasCallStack, MonadIO m) => UnixMountPoint -> m () -- | Gets the device path for a unix mount point. unixMountPointGetDevicePath :: (HasCallStack, MonadIO m) => UnixMountPoint -> m [Char] -- | Gets the file system type for the mount point. unixMountPointGetFsType :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text -- | Gets the mount path for a unix mount point. unixMountPointGetMountPath :: (HasCallStack, MonadIO m) => UnixMountPoint -> m [Char] -- | Gets the options for the mount point. -- -- Since: 2.32 unixMountPointGetOptions :: (HasCallStack, MonadIO m) => UnixMountPoint -> m (Maybe Text) -- | Guesses whether a Unix mount point can be ejected. unixMountPointGuessCanEject :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool -- | Guesses the icon of a Unix mount point. unixMountPointGuessIcon :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Icon -- | Guesses the name of a Unix mount point. The result is a translated -- string. unixMountPointGuessName :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text -- | Guesses the symbolic icon of a Unix mount point. -- -- Since: 2.34 unixMountPointGuessSymbolicIcon :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Icon -- | Checks if a unix mount point is a loopback device. unixMountPointIsLoopback :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool -- | Checks if a unix mount point is read only. unixMountPointIsReadonly :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool -- | Checks if a unix mount point is mountable by the user. unixMountPointIsUserMountable :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool instance GHC.Classes.Eq GI.Gio.Structs.UnixMountPoint.UnixMountPoint instance Data.GI.Base.BasicTypes.GBoxed GI.Gio.Structs.UnixMountPoint.UnixMountPoint instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Structs.UnixMountPoint.UnixMountPoint instance Data.GI.Base.GValue.IsGValue (GHC.Maybe.Maybe GI.Gio.Structs.UnixMountPoint.UnixMountPoint) instance Data.GI.Base.BasicTypes.ManagedPtrNewtype GI.Gio.Structs.UnixMountPoint.UnixMountPoint instance Data.GI.Base.BasicTypes.TypedObject GI.Gio.Structs.UnixMountPoint.UnixMountPoint module GI.Gio.Structs module GI.Gio.Functions -- | Asynchronously connects to the message bus specified by -- busType. -- -- When the operation is finished, callback will be -- invoked. You can then call busGetFinish to get the result of -- the operation. -- -- This is an asynchronous failable function. See busGetSync for -- the synchronous version. -- -- Since: 2.26 busGet :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> Maybe a -> Maybe AsyncReadyCallback -> m () -- | Finishes an operation started with busGet. -- -- The returned object is a singleton, that is, shared with other callers -- of busGet and busGetSync for busType. In -- the event that you need a private message bus connection, use -- dbusAddressGetForBusSync and dBusConnectionNewForAddress -- with G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and -- G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags. -- -- Note that the returned DBusConnection object will (usually) -- have the DBusConnection:exitOnClose property set to -- True. -- -- Since: 2.26 busGetFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m DBusConnection -- | Synchronously connects to the message bus specified by -- busType. 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 busType, they will share the -- same object. -- -- This is a synchronous failable function. See busGet and -- busGetFinish for the asynchronous version. -- -- The returned object is a singleton, that is, shared with other callers -- of busGet and busGetSync for busType. In -- the event that you need a private message bus connection, use -- dbusAddressGetForBusSync and dBusConnectionNewForAddress -- with G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and -- G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags. -- -- Note that the returned DBusConnection object will (usually) -- have the DBusConnection:exitOnClose property set to -- True. -- -- Since: 2.26 busGetSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> Maybe a -> m DBusConnection -- | Version of g_bus_own_name() using closures instead of -- callbacks for easier binding in other languages. -- -- Since: 2.26 busOwnName :: (HasCallStack, MonadIO m) => BusType -> Text -> [BusNameOwnerFlags] -> Maybe (GClosure a) -> Maybe (GClosure b) -> Maybe (GClosure c) -> m Word32 -- | Version of g_bus_own_name_on_connection() using -- closures instead of callbacks for easier binding in other languages. -- -- Since: 2.26 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 -- MainContext after this function has returned. You should -- continue to iterate the MainContext until the -- DestroyNotify function passed to -- g_bus_own_name() is called, in order to avoid memory -- leaks through callbacks queued on the MainContext after it’s -- stopped being iterated. -- -- Since: 2.26 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 -- MainContext after this function has returned. You should -- continue to iterate the MainContext until the -- DestroyNotify function passed to -- g_bus_watch_name() is called, in order to avoid memory -- leaks through callbacks queued on the MainContext after it’s -- stopped being iterated. -- -- Since: 2.26 busUnwatchName :: (HasCallStack, MonadIO m) => Word32 -> m () -- | Version of g_bus_watch_name() using closures instead -- of callbacks for easier binding in other languages. -- -- Since: 2.26 busWatchName :: (HasCallStack, MonadIO m) => BusType -> Text -> [BusNameWatcherFlags] -> Maybe (GClosure a) -> Maybe (GClosure b) -> m Word32 -- | Version of g_bus_watch_name_on_connection() using -- closures instead of callbacks for easier binding in other languages. -- -- Since: 2.26 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. -- -- Since: 2.18 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 shared-mime-info specification for more on the generic -- icon name. -- -- Since: 2.34 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 -- contentTypeSetMimeDirs for details. -- -- Since: 2.60 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. -- -- Since: 2.34 contentTypeGetSymbolicIcon :: (HasCallStack, MonadIO m) => Text -> m Icon -- | Guesses the content type based on example data. If the function is -- uncertain, resultUncertain will be set to True. -- Either filename or data may be -- Nothing, 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 root, by -- looking at the files it contains. The result is an array of content -- types, with the best guess coming first. -- -- The types returned all have the form x-content/foo, e.g. -- x-content/audio-cdda (for audio CDs) or x-content/image-dcf (for a -- camera memory card). See the shared-mime-info specification for -- more on x-content types. -- -- This function is useful in the implementation of -- mountGuessContentType. -- -- Since: 2.18 contentTypeGuessForTree :: (HasCallStack, MonadIO m, IsFile a) => a -> m [Text] -- | Determines if type is a subset of -- supertype. contentTypeIsA :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool -- | Determines if type is a subset of -- mimeType. Convenience wrapper around -- contentTypeIsA. -- -- Since: 2.52 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 -- dirs is Nothing, the directories used are the -- default: -- --
-- // Load MIME data from the system -- g_content_type_set_mime_dirs (NULL); -- // Isolate the environment -- g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL); -- -- … -- -- return g_test_run (); ---- -- Since: 2.60 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 -- g_list_free_full (list, g_free). contentTypesGetRegistered :: (HasCallStack, MonadIO m) => m [Text] -- | Escape string so it can appear in a D-Bus address as -- the value part of a key-value pair. -- -- For instance, if string is /run/bus-for-:0, -- this function would return /run/bus-for-%3A0, which could be -- used in a D-Bus address like -- unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0. -- -- Since: 2.36 dbusAddressEscapeValue :: (HasCallStack, MonadIO m) => Text -> m Text -- | Synchronously looks up the D-Bus address for the well-known message -- bus instance specified by busType. This may involve -- using various platform specific mechanisms. -- -- The returned address will be in the D-Bus address format. -- -- Since: 2.26 dbusAddressGetForBusSync :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> Maybe a -> m Text -- | Asynchronously connects to an endpoint specified by -- address and sets up the connection so it is in a state -- to run the client-side of the D-Bus authentication conversation. -- address must be in the D-Bus address format. -- -- When the operation is finished, callback will be -- invoked. You can then call dbusAddressGetStreamFinish to get -- the result of the operation. -- -- This is an asynchronous failable function. See -- dbusAddressGetStreamSync for the synchronous version. -- -- Since: 2.26 dbusAddressGetStream :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Maybe a -> Maybe AsyncReadyCallback -> m () -- | Finishes an operation started with dbusAddressGetStream. -- -- A server is not required to set a GUID, so outGuid may -- be set to Nothing even on success. -- -- Since: 2.26 dbusAddressGetStreamFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (IOStream, Maybe Text) -- | Synchronously connects to an endpoint specified by -- address and sets up the connection so it is in a state -- to run the client-side of the D-Bus authentication conversation. -- address must be in the D-Bus address format. -- -- A server is not required to set a GUID, so outGuid may -- be set to Nothing even on success. -- -- This is a synchronous failable function. See -- dbusAddressGetStream for the asynchronous version. -- -- Since: 2.26 dbusAddressGetStreamSync :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Maybe a -> m (IOStream, Maybe Text) -- | This is a language binding friendly version of -- dbusEscapeObjectPathBytestring. -- -- Since: 2.68 dbusEscapeObjectPath :: (HasCallStack, MonadIO m) => Text -> m Text -- | Escapes bytes for use in a D-Bus object path -- component. bytes 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 g_ascii_isalnum()) with their -- hexadecimal value preceded by an underscore (_). For example: -- foo.bar.baz will become foo_2ebar_2ebaz. -- -- 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 dbusUnescapeObjectPath. -- -- Since: 2.68 dbusEscapeObjectPathBytestring :: (HasCallStack, MonadIO m) => ByteString -> m Text -- | Generate a D-Bus GUID that can be used with e.g. -- dBusConnectionNew. -- -- See the D-Bus specification 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 RFC 4122. -- -- Since: 2.26 dbusGenerateGuid :: (HasCallStack, MonadIO m) => m Text -- | Converts a Value to a GVariant of the type indicated by -- the type parameter. -- -- The conversion is using the following rules: -- --
-- int saved_errno; -- -- ret = read (blah); -- saved_errno = errno; -- -- g_io_error_from_errno (saved_errno); --ioErrorFromErrno :: (HasCallStack, MonadIO m) => Int32 -> m IOErrorEnum -- | Converts FileError error codes into GIO error codes. -- -- Since: 2.74 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. -- iOExtensionPointGetExtensions or -- iOExtensionPointGetExtensionByName. -- -- If you need to guarantee that all types are loaded in all the modules, -- use g_io_modules_load_all_in_directory(). -- -- Since: 2.24 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. -- iOExtensionPointGetExtensions or -- iOExtensionPointGetExtensionByName. -- -- If you need to guarantee that all types are loaded in all the modules, -- use g_io_modules_load_all_in_directory(). -- -- Since: 2.30 ioModulesScanAllInDirectoryWithScope :: (HasCallStack, MonadIO m) => [Char] -> IOModuleScope -> m () -- | Cancels all cancellable I/O jobs. -- -- A job is cancellable if a Cancellable was passed into -- ioSchedulerPushJob. -- | 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. ioSchedulerCancelAllJobs :: (HasCallStack, MonadIO m) => m () -- | Schedules the I/O job to run in another thread. -- -- notify will be called on userData -- after jobFunc has returned, regardless whether the job -- was cancelled or has run to completion. -- -- If cancellable is not Nothing, it can be used -- to cancel the I/O job by calling cancellableCancel or by -- calling ioSchedulerCancelAllJobs. -- | Deprecated: (Since version 2.36)use ThreadPool or -- taskRunInThread ioSchedulerPushJob :: (HasCallStack, MonadIO m, IsCancellable a) => IOSchedulerJobFunc -> Int32 -> Maybe a -> m () -- | Creates a keyfile-backed SettingsBackend. -- -- The filename of the keyfile to use is given by -- filename. -- -- All settings read to or written from the backend must fall under the -- path given in rootPath (which must start and end with -- a slash and not contain two consecutive slashes). -- rootPath may be "/". -- -- If rootGroup is non-Nothing then it specifies -- the name of the keyfile group used for keys that are written directly -- below rootPath. For example, if -- rootPath is "/apps/example/" and -- rootGroup is "toplevel", then settings the key -- "/apps/example/enabled" to a value of True will cause the -- following to appear in the keyfile: -- --
-- [toplevel] -- enabled=true ---- -- If rootGroup is Nothing then it is not -- permitted to store keys directly below the rootPath. -- -- For keys not stored directly below rootPath (ie: in a -- sub-path), the name of the subpath (with the final slash stripped) is -- used as the name of the keyfile group. To continue the example, if -- "/apps/example/profiles/default/font-size" were set to 12 then the -- following would appear in the keyfile: -- --
-- [profiles/default] -- font-size=12 ---- -- The backend will refuse writes (and return writability as being -- False) for keys outside of rootPath and, in the -- event that rootGroup is Nothing, also for keys -- directly under rootPath. 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 '[' or ']' -- characters in your path names or '=' in your key names you may be in -- trouble. -- -- The backend reads default values from a keyfile called -- defaults in the directory specified by the -- GKeyfileSettingsBackend:defaults-dir property, and a -- list of locked keys from a text file with the name locks in -- the same location. keyfileSettingsBackendNew :: (HasCallStack, MonadIO m) => Text -> Text -> Maybe Text -> m SettingsBackend -- | Creates a memory-backed SettingsBackend. -- -- 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. -- -- Since: 2.28 memorySettingsBackendNew :: (HasCallStack, MonadIO m) => m SettingsBackend -- | Initializes the platform networking libraries (eg, on Windows, this -- calls WSAStartup()). 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). -- -- Since: 2.36 networkingInit :: (HasCallStack, MonadIO m) => m () -- | Creates a readonly SettingsBackend. -- -- This backend does not allow changes to settings, so all settings will -- always have their default values. -- -- Since: 2.28 nullSettingsBackendNew :: (HasCallStack, MonadIO m) => m SettingsBackend -- | Utility method for PollableInputStream and -- PollableOutputStream implementations. Creates a new -- Source that expects a callback of type -- PollableSourceFunc. The new source does not actually do -- anything on its own; use sourceAddChildSource to add other -- sources to it to cause it to trigger. -- -- Since: 2.28 pollableSourceNew :: (HasCallStack, MonadIO m, IsObject a) => a -> m Source -- | Utility method for PollableInputStream and -- PollableOutputStream implementations. Creates a new -- Source, as with pollableSourceNew, but also attaching -- childSource (with a dummy callback), and -- cancellable, if they are non-Nothing. -- -- Since: 2.34 pollableSourceNewFull :: (HasCallStack, MonadIO m, IsObject a, IsCancellable b) => a -> Maybe Source -> Maybe b -> m Source -- | Tries to read from stream, as with -- inputStreamRead (if blocking is True) or -- pollableInputStreamReadNonblocking (if blocking -- is False). This can be used to more easily share code between -- blocking and non-blocking implementations of a method. -- -- If blocking is False, then -- stream must be a PollableInputStream for which -- pollableInputStreamCanPoll returns True, or else the -- behavior is undefined. If blocking is True, -- then stream does not need to be a -- PollableInputStream. -- -- Since: 2.34 pollableStreamRead :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m Int64 -- | Tries to write to stream, as with -- outputStreamWrite (if blocking is True) -- or pollableOutputStreamWriteNonblocking (if -- blocking is False). This can be used to more -- easily share code between blocking and non-blocking implementations of -- a method. -- -- If blocking is False, then -- stream must be a PollableOutputStream for which -- pollableOutputStreamCanPoll returns True or else the -- behavior is undefined. If blocking is True, -- then stream does not need to be a -- PollableOutputStream. -- -- Since: 2.34 pollableStreamWrite :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m Int64 -- | Tries to write count bytes to stream, -- as with outputStreamWriteAll, but using -- pollableStreamWrite rather than outputStreamWrite. -- -- On a successful write of count bytes, True is -- returned, and bytesWritten is set to -- count. -- -- If there is an error during the operation (including -- IOErrorEnumWouldBlock in the non-blocking case), False -- is returned and error is set to indicate the error -- status, bytesWritten is updated to contain the number -- of bytes written into the stream before the error occurred. -- -- As with pollableStreamWrite, if blocking is -- False, then stream must be a -- PollableOutputStream for which -- pollableOutputStreamCanPoll returns True or else the -- behavior is undefined. If blocking is True, -- then stream does not need to be a -- PollableOutputStream. -- -- Since: 2.34 pollableStreamWriteAll :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m CSize -- | Returns all the names of children at the specified -- path in the set of globally registered resources. The -- return result is a Nothing terminated list of strings which -- should be released with strfreev. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 resourcesEnumerateChildren :: (HasCallStack, MonadIO m) => Text -> [ResourceLookupFlags] -> m [Text] -- | Looks for a file at the specified path in the set of -- globally registered resources and if found returns information about -- it. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 resourcesGetInfo :: (HasCallStack, MonadIO m) => Text -> [ResourceLookupFlags] -> m (CSize, Word32) -- | Looks for a file at the specified path in the set of -- globally registered resources and returns a Bytes 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 GBytes. -- -- For uncompressed resource files this is a pointer directly into the -- resource bundle, which is typically in some readonly data section in -- the program binary. For compressed files we allocate memory on the -- heap and automatically uncompress the data. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 resourcesLookupData :: (HasCallStack, MonadIO m) => Text -> [ResourceLookupFlags] -> m Bytes -- | Looks for a file at the specified path in the set of -- globally registered resources and returns a InputStream that -- lets you read the data. -- -- lookupFlags controls the behaviour of the lookup. -- -- Since: 2.32 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 resourcesLookupData. -- -- Since: 2.32 resourcesRegister :: (HasCallStack, MonadIO m) => Resource -> m () -- | Unregisters the resource from the process-global set of resources. -- -- Since: 2.32 resourcesUnregister :: (HasCallStack, MonadIO m) => Resource -> m () -- | Reports an error in an idle function. Similar to -- g_simple_async_report_error_in_idle(), but takes a -- GError rather than building a new one. -- | Deprecated: (Since version 2.46)Use taskReportError. simpleAsyncReportGerrorInIdle :: (HasCallStack, MonadIO m, IsObject a) => Maybe a -> Maybe AsyncReadyCallback -> GError -> m () -- | Determines if mountPath is considered an -- implementation of the OS. This is primarily used for hiding mountable -- and mounted volumes that only are used in the OS and has little to no -- relevance to the casual user. unixIsMountPathSystemInternal :: (HasCallStack, MonadIO m) => [Char] -> m Bool -- | Determines if devicePath is considered a block device -- path which is only used in implementation of the OS. This is primarily -- used for hiding mounted volumes that are intended as APIs for programs -- to read, and system administrators at a shell; rather than something -- that should, for example, appear in a GUI. For example, the Linux -- /proc filesystem. -- -- The list of device paths considered ‘system’ ones may change over -- time. -- -- Since: 2.56 unixIsSystemDevicePath :: (HasCallStack, MonadIO m) => Text -> m Bool -- | Determines if fsType is considered a type of file -- system which is only used in implementation of the OS. This is -- primarily used for hiding mounted volumes that are intended as APIs -- for programs to read, and system administrators at a shell; rather -- than something that should, for example, appear in a GUI. For example, -- the Linux /proc filesystem. -- -- The list of file system types considered ‘system’ ones may change over -- time. -- -- Since: 2.56 unixIsSystemFsType :: (HasCallStack, MonadIO m) => Text -> m Bool -- | Gets a UnixMountEntry for a given mount path. If -- timeRead is set, it will be filled with a unix -- timestamp for checking if the mounts have changed since with -- unixMountsChangedSince. -- -- If more mounts have the same mount path, the last matching mount is -- returned. -- -- This will return Nothing if there is no mount point at -- mountPath. unixMountAt :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe UnixMountEntry, Word64) -- | Compares two unix mounts. unixMountCompare :: (HasCallStack, MonadIO m) => UnixMountEntry -> UnixMountEntry -> m Int32 -- | Makes a copy of mountEntry. -- -- Since: 2.54 unixMountCopy :: (HasCallStack, MonadIO m) => UnixMountEntry -> m UnixMountEntry -- | Gets a UnixMountEntry for a given file path. If -- timeRead is set, it will be filled with a unix -- timestamp for checking if the mounts have changed since with -- unixMountsChangedSince. -- -- If more mounts have the same mount path, the last matching mount is -- returned. -- -- This will return Nothing if looking up the mount entry fails, -- if filePath doesn’t exist or there is an I/O error. -- -- Since: 2.52 unixMountFor :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe UnixMountEntry, Word64) -- | Frees a unix mount. unixMountFree :: (HasCallStack, MonadIO m) => UnixMountEntry -> m () -- | Gets the device path for a unix mount. unixMountGetDevicePath :: (HasCallStack, MonadIO m) => UnixMountEntry -> m [Char] -- | Gets the filesystem type for the unix mount. unixMountGetFsType :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Text -- | Gets the mount path for a unix mount. unixMountGetMountPath :: (HasCallStack, MonadIO m) => UnixMountEntry -> m [Char] -- | Gets a comma-separated list of mount options for the unix mount. For -- example, rw,relatime,seclabel,data=ordered. -- -- This is similar to unixMountPointGetOptions, but it takes a -- UnixMountEntry as an argument. -- -- Since: 2.58 unixMountGetOptions :: (HasCallStack, MonadIO m) => UnixMountEntry -> m (Maybe Text) -- | Gets the root of the mount within the filesystem. This is useful e.g. -- for mounts created by bind operation, or btrfs subvolumes. -- -- For example, the root path is equal to "/" for mount created by "mount -- /dev/sda1 /mnt/foo" and "/bar" for "mount --bind /mnt/foo/bar -- /mnt/bar". -- -- Since: 2.60 unixMountGetRootPath :: (HasCallStack, MonadIO m) => UnixMountEntry -> m (Maybe Text) -- | Guesses whether a Unix mount can be ejected. unixMountGuessCanEject :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool -- | Guesses the icon of a Unix mount. unixMountGuessIcon :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Icon -- | Guesses the name of a Unix mount. The result is a translated string. unixMountGuessName :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Text -- | Guesses whether a Unix mount should be displayed in the UI. unixMountGuessShouldDisplay :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool -- | Guesses the symbolic icon of a Unix mount. -- -- Since: 2.34 unixMountGuessSymbolicIcon :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Icon -- | Checks if a unix mount is mounted read only. unixMountIsReadonly :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool -- | Checks if a Unix mount is a system mount. This is the Boolean OR of -- unixIsSystemFsType, unixIsSystemDevicePath and -- unixIsMountPathSystemInternal on mountEntry’s -- properties. -- -- The definition of what a ‘system’ mount entry is may change over time -- as new file system types and device paths are ignored. unixMountIsSystemInternal :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool -- | Checks if the unix mount points have changed since a given unix time. unixMountPointsChangedSince :: (HasCallStack, MonadIO m) => Word64 -> m Bool -- | Gets a List of UnixMountPoint containing the unix mount -- points. If timeRead is set, it will be filled with the -- mount timestamp, allowing for checking if the mounts have changed with -- unixMountPointsChangedSince. unixMountPointsGet :: (HasCallStack, MonadIO m) => m ([UnixMountPoint], Word64) -- | Checks if the unix mounts have changed since a given unix time. unixMountsChangedSince :: (HasCallStack, MonadIO m) => Word64 -> m Bool -- | Gets a List of UnixMountEntry containing the unix -- mounts. If timeRead is set, it will be filled with the -- mount timestamp, allowing for checking if the mounts have changed with -- unixMountsChangedSince. unixMountsGet :: (HasCallStack, MonadIO m) => m ([UnixMountEntry], Word64) module GI.Gio