-- 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.21 module GI.Gio.Constants -- | Extension point for volume monitor functionality. See [Extending -- GIO][extending-gio]. -- | The string used to obtain a UUID with volumeGetIdentifier. -- | The string used to obtain a Unix device path with -- volumeGetIdentifier. -- | The string used to obtain a NFS mount with volumeGetIdentifier. -- | The string used to obtain a filesystem label with -- volumeGetIdentifier. -- | The string used to obtain a Hal UDI with volumeGetIdentifier. -- | Deprecated: (Since version 2.58)Do not use, HAL is deprecated. -- | 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. -- | Extension point for Vfs functionality. See [Extending -- GIO][extending-gio]. -- | The purpose used to verify the server certificate in a TLS connection. -- This is the most common purpose in use. Used by TLS clients. -- | The purpose used to verify the client certificate in a TLS connection. -- Used by TLS servers. -- | Extension point for TLS functionality via TlsBackend. See -- [Extending GIO][extending-gio]. -- | Extension point for SettingsBackend functionality. -- | Extension point for proxy resolving functionality. See [Extending -- GIO][extending-gio]. -- | Extension point for proxy functionality. See [Extending -- GIO][extending-gio]. -- -- Since: 2.26 -- | Extension point for network status monitoring functionality. See -- [Extending GIO][extending-gio]. -- -- Since: 2.30 -- | No description available in the introspection data. -- | The name of the link that associates a menu item with a submenu. -- -- See also menuItemSetLink. -- -- Since: 2.32 -- | 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 -- | 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 -- | The menu item attribute which holds the label of the item. -- -- Since: 2.32 -- | 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 -- | The menu item attribute that holds the namespace for all action names -- in menus that are linked from this item. -- -- Since: 2.36 -- | 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 -- | 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. -- | A key in the "unix" namespace for getting the device ID for the file -- (if it is a special file). See lstat() documentation. -- This attribute is only available for UNIX file systems. Corresponding -- FileAttributeType is FileAttributeTypeUint32. -- | A key in the "unix" namespace for getting the number of hard links for -- a file. See lstat() documentation. This attribute is -- only available for UNIX file systems. Corresponding -- FileAttributeType is FileAttributeTypeUint32. -- | 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 -- lstat() documentation. This attribute is only -- available for UNIX file systems. Corresponding -- FileAttributeType is FileAttributeTypeUint32. -- | 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. -- | 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. -- | 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. -- | 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. -- | 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. -- | 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. -- | A key in the "trash" namespace. When requested against items in -- trash:///, will return the original path to the file before -- it was trashed. Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- -- Since: 2.24 -- | A key in the "trash" namespace. When requested against -- trash:/// returns the number of (toplevel) items in the trash -- folder. Corresponding FileAttributeType is -- FileAttributeTypeUint32. -- | A key in the "trash" namespace. When requested against items in -- trash:///, will return the date and time when the file was -- trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss. -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- -- Since: 2.24 -- | 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. -- | 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. -- | 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. -- | 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 corresponds to the NTFS ctime. -- | 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. -- | 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. -- | 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. -- | 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. -- | A key in the "thumbnail" namespace for getting the path to the -- thumbnail image. Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- | 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 -- | A key in the "thumbnail" namespace for checking if thumbnailing -- failed. This attribute is True if thumbnailing failed. -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- | A key in the "standard" namespace for storing file types. -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. The value for this key should contain -- a FileType. -- | 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. -- | A key in the "standard" namespace for getting the symlink target, if -- the file is a symlink. Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- | 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 -- | 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. -- | A key in the "standard" namespace for getting the file's size (in -- bytes). Corresponding FileAttributeType is -- FileAttributeTypeUint64. -- | 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. Use -- FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the -- name in a user interface. Corresponding FileAttributeType is -- FileAttributeTypeByteString. -- | 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 -- | A key in the "standard" namespace for checking if a file is virtual. -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- | 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. Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- | A key in the "standard" namespace for checking if a file is hidden. -- Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- | A key in the "standard" namespace for checking if a file is a backup -- file. Corresponding FileAttributeType is -- FileAttributeTypeBoolean. -- | 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. -- | 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. -- | 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. -- | A key in the "standard" namespace for getting the display name of the -- file. A display name is guaranteed to be in UTF8 and can thus be -- displayed in the UI. Corresponding FileAttributeType is -- FileAttributeTypeString. -- | 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 furter -- 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. -- | 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. -- | 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. -- | 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 -- | 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. -- | 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 -- | 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 -- | A key in the "owner" namespace for getting the real name of the user -- that owns the file. Corresponding FileAttributeType is -- FileAttributeTypeString. -- | A key in the "owner" namespace for getting the user name of the file's -- owner. Corresponding FileAttributeType is -- FileAttributeTypeString. -- | A key in the "owner" namespace for getting the file owner's group. -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- | A key in the "mountable" namespace for getting the unix device file. -- Corresponding FileAttributeType is -- FileAttributeTypeString. -- -- Since: 2.22 -- | A key in the "mountable" namespace for getting the unix device. -- Corresponding FileAttributeType is -- FileAttributeTypeUint32. -- | A key in the "mountable" namespace for getting the -- DriveStartStopType. Corresponding FileAttributeType is -- FileAttributeTypeUint32. -- -- Since: 2.22 -- | 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 -- | A key in the "mountable" namespace for getting the HAL UDI for the -- mountable file. Corresponding FileAttributeType is -- FileAttributeTypeString. -- | A key in the "mountable" namespace for checking if a file (of type -- G_FILE_TYPE_MOUNTABLE) is unmountable. Corresponding -- FileAttributeType is FileAttributeTypeBoolean. -- | 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 -- | 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 -- | 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 -- | 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 -- | A key in the "mountable" namespace for checking if a file (of type -- G_FILE_TYPE_MOUNTABLE) is mountable. Corresponding -- FileAttributeType is FileAttributeTypeBoolean. -- | A key in the "mountable" namespace for checking if a file (of type -- G_FILE_TYPE_MOUNTABLE) can be ejected. Corresponding -- FileAttributeType is FileAttributeTypeBoolean. -- | 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). -- | 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. -- | A key in the "gvfs" namespace that gets the name of the current GVFS -- backend in use. Corresponding FileAttributeType is -- FileAttributeTypeString. -- | 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. -- | A key in the "filesystem" namespace for getting the number of bytes of -- used on the file system. Corresponding FileAttributeType is -- FileAttributeTypeUint64. -- -- Since: 2.32 -- | A key in the "filesystem" namespace for getting the file system's -- type. Corresponding FileAttributeType is -- FileAttributeTypeString. -- | A key in the "filesystem" namespace for getting the total size (in -- bytes) of the file system, used in fileQueryFilesystemInfo. -- Corresponding FileAttributeType is -- FileAttributeTypeUint64. -- | 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. -- | 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. -- | A key in the "filesystem" namespace for getting the number of bytes of -- free space left on the file system. Corresponding -- FileAttributeType is FileAttributeTypeUint64. -- | A key in the "etag" namespace for getting the value of the file's -- entity tag. Corresponding FileAttributeType is -- FileAttributeTypeString. -- | 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 -- | 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. -- | 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 -- | 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. -- | 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. -- | 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. -- | 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. -- | 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. -- | 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. -- | 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. -- | The string used to obtain a Unix device path with -- driveGetIdentifier. -- -- Since: 2.58 -- | Extension point for default handler to URI association. See [Extending -- GIO][extending-gio]. 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. CredentialsTypeNetbsdUnpcbid :: 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 <quote>SECURITY UNLOCK DEVICE</quote> 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 uninitalized 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. 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
-- G_IO_ERROR_FAILED.
--
-- 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
-- | 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
-- | 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.
--
-- 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 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
-- | lookup DNS SRV records for a domain
ResolverRecordTypeSrv :: ResolverRecordType
-- | lookup DNS MX records for a domain
ResolverRecordTypeMx :: ResolverRecordType
-- | lookup DNS TXT records for a name
ResolverRecordTypeTxt :: ResolverRecordType
-- | lookup DNS SOA records for a zone
ResolverRecordTypeSoa :: ResolverRecordType
-- | lookup 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
-- | 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
-- | 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
-- | When to allow rehandshaking. See
-- tlsConnectionSetRehandshakeMode.
--
-- Since: 2.28
-- | Deprecated: (Since version 2.60.)Changing the rehandshake mode is
-- no longer required for compatibility. Also, rehandshaking has been
-- removed from the TLS protocol in TLS 1.3.
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 GHC.Classes.Eq GI.Gio.Enums.BusType
instance GHC.Show.Show GI.Gio.Enums.BusType
instance GHC.Classes.Eq GI.Gio.Enums.ConverterResult
instance GHC.Show.Show GI.Gio.Enums.ConverterResult
instance GHC.Classes.Eq GI.Gio.Enums.CredentialsType
instance GHC.Show.Show GI.Gio.Enums.CredentialsType
instance GHC.Classes.Eq GI.Gio.Enums.DBusError
instance GHC.Show.Show GI.Gio.Enums.DBusError
instance GHC.Classes.Eq GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Show.Show GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Classes.Eq GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Show.Show GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Classes.Eq GI.Gio.Enums.DBusMessageType
instance GHC.Show.Show GI.Gio.Enums.DBusMessageType
instance GHC.Classes.Eq GI.Gio.Enums.DataStreamByteOrder
instance GHC.Show.Show GI.Gio.Enums.DataStreamByteOrder
instance GHC.Classes.Eq GI.Gio.Enums.DataStreamNewlineType
instance GHC.Show.Show GI.Gio.Enums.DataStreamNewlineType
instance GHC.Classes.Eq GI.Gio.Enums.DriveStartStopType
instance GHC.Show.Show GI.Gio.Enums.DriveStartStopType
instance GHC.Classes.Eq GI.Gio.Enums.EmblemOrigin
instance GHC.Show.Show GI.Gio.Enums.EmblemOrigin
instance GHC.Classes.Eq GI.Gio.Enums.FileAttributeStatus
instance GHC.Show.Show GI.Gio.Enums.FileAttributeStatus
instance GHC.Classes.Eq GI.Gio.Enums.FileAttributeType
instance GHC.Show.Show GI.Gio.Enums.FileAttributeType
instance GHC.Classes.Eq GI.Gio.Enums.FileMonitorEvent
instance GHC.Show.Show GI.Gio.Enums.FileMonitorEvent
instance GHC.Classes.Eq GI.Gio.Enums.FileType
instance GHC.Show.Show GI.Gio.Enums.FileType
instance GHC.Classes.Eq GI.Gio.Enums.FilesystemPreviewType
instance GHC.Show.Show GI.Gio.Enums.FilesystemPreviewType
instance GHC.Classes.Eq GI.Gio.Enums.IOErrorEnum
instance GHC.Show.Show GI.Gio.Enums.IOErrorEnum
instance GHC.Classes.Eq GI.Gio.Enums.IOModuleScopeFlags
instance GHC.Show.Show GI.Gio.Enums.IOModuleScopeFlags
instance GHC.Classes.Eq GI.Gio.Enums.MountOperationResult
instance GHC.Show.Show GI.Gio.Enums.MountOperationResult
instance GHC.Classes.Eq GI.Gio.Enums.NetworkConnectivity
instance GHC.Show.Show GI.Gio.Enums.NetworkConnectivity
instance GHC.Classes.Eq GI.Gio.Enums.NotificationPriority
instance GHC.Show.Show GI.Gio.Enums.NotificationPriority
instance GHC.Classes.Eq GI.Gio.Enums.PasswordSave
instance GHC.Show.Show GI.Gio.Enums.PasswordSave
instance GHC.Classes.Eq GI.Gio.Enums.PollableReturn
instance GHC.Show.Show GI.Gio.Enums.PollableReturn
instance GHC.Classes.Eq GI.Gio.Enums.ResolverError
instance GHC.Show.Show GI.Gio.Enums.ResolverError
instance GHC.Classes.Eq GI.Gio.Enums.ResolverRecordType
instance GHC.Show.Show GI.Gio.Enums.ResolverRecordType
instance GHC.Classes.Eq GI.Gio.Enums.ResourceError
instance GHC.Show.Show GI.Gio.Enums.ResourceError
instance GHC.Classes.Eq GI.Gio.Enums.SocketClientEvent
instance GHC.Show.Show GI.Gio.Enums.SocketClientEvent
instance GHC.Classes.Eq GI.Gio.Enums.SocketFamily
instance GHC.Show.Show GI.Gio.Enums.SocketFamily
instance GHC.Classes.Eq GI.Gio.Enums.SocketListenerEvent
instance GHC.Show.Show GI.Gio.Enums.SocketListenerEvent
instance GHC.Classes.Eq GI.Gio.Enums.SocketProtocol
instance GHC.Show.Show GI.Gio.Enums.SocketProtocol
instance GHC.Classes.Eq GI.Gio.Enums.SocketType
instance GHC.Show.Show GI.Gio.Enums.SocketType
instance GHC.Classes.Eq GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Show.Show GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Classes.Eq GI.Gio.Enums.TlsCertificateRequestFlags
instance GHC.Show.Show GI.Gio.Enums.TlsCertificateRequestFlags
instance GHC.Classes.Eq GI.Gio.Enums.TlsDatabaseLookupFlags
instance GHC.Show.Show GI.Gio.Enums.TlsDatabaseLookupFlags
instance GHC.Classes.Eq GI.Gio.Enums.TlsError
instance GHC.Show.Show GI.Gio.Enums.TlsError
instance GHC.Classes.Eq GI.Gio.Enums.TlsInteractionResult
instance GHC.Show.Show GI.Gio.Enums.TlsInteractionResult
instance GHC.Classes.Eq GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Show.Show GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Classes.Eq GI.Gio.Enums.UnixSocketAddressType
instance GHC.Show.Show GI.Gio.Enums.UnixSocketAddressType
instance GHC.Classes.Eq GI.Gio.Enums.ZlibCompressorFormat
instance GHC.Show.Show GI.Gio.Enums.ZlibCompressorFormat
instance GHC.Enum.Enum GI.Gio.Enums.BusType
instance GHC.Classes.Ord GI.Gio.Enums.BusType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.BusType
instance GHC.Enum.Enum GI.Gio.Enums.ConverterResult
instance GHC.Classes.Ord GI.Gio.Enums.ConverterResult
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ConverterResult
instance GHC.Enum.Enum GI.Gio.Enums.CredentialsType
instance GHC.Classes.Ord GI.Gio.Enums.CredentialsType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.CredentialsType
instance GHC.Enum.Enum GI.Gio.Enums.DBusError
instance GHC.Classes.Ord GI.Gio.Enums.DBusError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.DBusError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusError
instance GHC.Enum.Enum GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Classes.Ord GI.Gio.Enums.DBusMessageByteOrder
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusMessageByteOrder
instance GHC.Enum.Enum GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Classes.Ord GI.Gio.Enums.DBusMessageHeaderField
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusMessageHeaderField
instance GHC.Enum.Enum GI.Gio.Enums.DBusMessageType
instance GHC.Classes.Ord GI.Gio.Enums.DBusMessageType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DBusMessageType
instance GHC.Enum.Enum GI.Gio.Enums.DataStreamByteOrder
instance GHC.Classes.Ord GI.Gio.Enums.DataStreamByteOrder
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DataStreamByteOrder
instance GHC.Enum.Enum GI.Gio.Enums.DataStreamNewlineType
instance GHC.Classes.Ord GI.Gio.Enums.DataStreamNewlineType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DataStreamNewlineType
instance GHC.Enum.Enum GI.Gio.Enums.DriveStartStopType
instance GHC.Classes.Ord GI.Gio.Enums.DriveStartStopType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.DriveStartStopType
instance GHC.Enum.Enum GI.Gio.Enums.EmblemOrigin
instance GHC.Classes.Ord GI.Gio.Enums.EmblemOrigin
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.EmblemOrigin
instance GHC.Enum.Enum GI.Gio.Enums.FileAttributeStatus
instance GHC.Classes.Ord GI.Gio.Enums.FileAttributeStatus
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileAttributeStatus
instance GHC.Enum.Enum GI.Gio.Enums.FileAttributeType
instance GHC.Classes.Ord GI.Gio.Enums.FileAttributeType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileAttributeType
instance GHC.Enum.Enum GI.Gio.Enums.FileMonitorEvent
instance GHC.Classes.Ord GI.Gio.Enums.FileMonitorEvent
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileMonitorEvent
instance GHC.Enum.Enum GI.Gio.Enums.FileType
instance GHC.Classes.Ord GI.Gio.Enums.FileType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FileType
instance GHC.Enum.Enum GI.Gio.Enums.FilesystemPreviewType
instance GHC.Classes.Ord GI.Gio.Enums.FilesystemPreviewType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.FilesystemPreviewType
instance GHC.Enum.Enum GI.Gio.Enums.IOErrorEnum
instance GHC.Classes.Ord GI.Gio.Enums.IOErrorEnum
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.IOErrorEnum
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.IOErrorEnum
instance GHC.Enum.Enum GI.Gio.Enums.IOModuleScopeFlags
instance GHC.Classes.Ord GI.Gio.Enums.IOModuleScopeFlags
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.IOModuleScopeFlags
instance GHC.Enum.Enum GI.Gio.Enums.MountOperationResult
instance GHC.Classes.Ord GI.Gio.Enums.MountOperationResult
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.MountOperationResult
instance GHC.Enum.Enum GI.Gio.Enums.NetworkConnectivity
instance GHC.Classes.Ord GI.Gio.Enums.NetworkConnectivity
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.NetworkConnectivity
instance GHC.Enum.Enum GI.Gio.Enums.NotificationPriority
instance GHC.Classes.Ord GI.Gio.Enums.NotificationPriority
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.NotificationPriority
instance GHC.Enum.Enum GI.Gio.Enums.PasswordSave
instance GHC.Classes.Ord GI.Gio.Enums.PasswordSave
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.PasswordSave
instance GHC.Enum.Enum GI.Gio.Enums.PollableReturn
instance GHC.Classes.Ord GI.Gio.Enums.PollableReturn
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.PollableReturn
instance GHC.Enum.Enum GI.Gio.Enums.ResolverError
instance GHC.Classes.Ord GI.Gio.Enums.ResolverError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.ResolverError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ResolverError
instance GHC.Enum.Enum GI.Gio.Enums.ResolverRecordType
instance GHC.Classes.Ord GI.Gio.Enums.ResolverRecordType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ResolverRecordType
instance GHC.Enum.Enum GI.Gio.Enums.ResourceError
instance GHC.Classes.Ord GI.Gio.Enums.ResourceError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.ResourceError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ResourceError
instance GHC.Enum.Enum GI.Gio.Enums.SocketClientEvent
instance GHC.Classes.Ord GI.Gio.Enums.SocketClientEvent
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketClientEvent
instance GHC.Enum.Enum GI.Gio.Enums.SocketFamily
instance GHC.Classes.Ord GI.Gio.Enums.SocketFamily
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketFamily
instance GHC.Enum.Enum GI.Gio.Enums.SocketListenerEvent
instance GHC.Classes.Ord GI.Gio.Enums.SocketListenerEvent
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketListenerEvent
instance GHC.Enum.Enum GI.Gio.Enums.SocketProtocol
instance GHC.Classes.Ord GI.Gio.Enums.SocketProtocol
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketProtocol
instance GHC.Enum.Enum GI.Gio.Enums.SocketType
instance GHC.Classes.Ord GI.Gio.Enums.SocketType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.SocketType
instance GHC.Enum.Enum GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Classes.Ord GI.Gio.Enums.TlsAuthenticationMode
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsAuthenticationMode
instance GHC.Enum.Enum GI.Gio.Enums.TlsCertificateRequestFlags
instance GHC.Classes.Ord GI.Gio.Enums.TlsCertificateRequestFlags
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsCertificateRequestFlags
instance GHC.Enum.Enum GI.Gio.Enums.TlsDatabaseLookupFlags
instance GHC.Classes.Ord GI.Gio.Enums.TlsDatabaseLookupFlags
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsDatabaseLookupFlags
instance GHC.Enum.Enum GI.Gio.Enums.TlsError
instance GHC.Classes.Ord GI.Gio.Enums.TlsError
instance Data.GI.Base.GError.GErrorClass GI.Gio.Enums.TlsError
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsError
instance GHC.Enum.Enum GI.Gio.Enums.TlsInteractionResult
instance GHC.Classes.Ord GI.Gio.Enums.TlsInteractionResult
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsInteractionResult
instance GHC.Enum.Enum GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Classes.Ord GI.Gio.Enums.TlsRehandshakeMode
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.TlsRehandshakeMode
instance GHC.Enum.Enum GI.Gio.Enums.UnixSocketAddressType
instance GHC.Classes.Ord GI.Gio.Enums.UnixSocketAddressType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.UnixSocketAddressType
instance GHC.Enum.Enum GI.Gio.Enums.ZlibCompressorFormat
instance GHC.Classes.Ord GI.Gio.Enums.ZlibCompressorFormat
instance Data.GI.Base.BasicTypes.BoxedEnum 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
ApplicationFlagsFlagsNone :: 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::command-line
-- 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
-- G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, 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
-- | 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::g-properties-changed signal. When
-- the value is received the
-- DBusProxy::g-properties-changed 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
-- | 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::new-connection signals will run
-- in separated dedicated threads (see signal for details).
DBusServerFlagsRunInThread :: DBusServerFlags
-- | Allow the anonymous authentication method.
DBusServerFlagsAuthenticationAllowAnonymous :: 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
-- | 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. Since 2.20
FileCreateFlagsReplaceDestination :: FileCreateFlags
-- | Catch-all for unknown values
AnotherFileCreateFlags :: Int -> FileCreateFlags
-- | Flags that can be used with
-- g_file_measure_disk_usage().
--
-- 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.
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 G_SETTINGS_BIND_GET, 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
-- | 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 set which validation steps to perform (eg, with
-- tlsClientConnectionSetValidationFlags), or to describe why a
-- particular certificate was rejected (eg, in
-- TlsConnection::accept-certificate).
--
-- Since: 2.28
data 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
-- 'GI.Gio.Objects.TlsConnection.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
-- | Catch-all for unknown values
AnotherTlsPasswordFlags :: Int -> TlsPasswordFlags
instance GHC.Classes.Eq GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Show.Show GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Classes.Eq GI.Gio.Flags.ApplicationFlags
instance GHC.Show.Show GI.Gio.Flags.ApplicationFlags
instance GHC.Classes.Eq GI.Gio.Flags.AskPasswordFlags
instance GHC.Show.Show GI.Gio.Flags.AskPasswordFlags
instance GHC.Classes.Eq GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Show.Show GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Classes.Eq GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Show.Show GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Classes.Eq GI.Gio.Flags.ConverterFlags
instance GHC.Show.Show GI.Gio.Flags.ConverterFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusCallFlags
instance GHC.Show.Show GI.Gio.Flags.DBusCallFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Show.Show GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusConnectionFlags
instance GHC.Show.Show GI.Gio.Flags.DBusConnectionFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Show.Show GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusMessageFlags
instance GHC.Show.Show GI.Gio.Flags.DBusMessageFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Show.Show GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Show.Show GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusProxyFlags
instance GHC.Show.Show GI.Gio.Flags.DBusProxyFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Show.Show GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusServerFlags
instance GHC.Show.Show GI.Gio.Flags.DBusServerFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusSignalFlags
instance GHC.Show.Show GI.Gio.Flags.DBusSignalFlags
instance GHC.Classes.Eq GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Show.Show GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Classes.Eq GI.Gio.Flags.DriveStartFlags
instance GHC.Show.Show GI.Gio.Flags.DriveStartFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Show.Show GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileCopyFlags
instance GHC.Show.Show GI.Gio.Flags.FileCopyFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileCreateFlags
instance GHC.Show.Show GI.Gio.Flags.FileCreateFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileMeasureFlags
instance GHC.Show.Show GI.Gio.Flags.FileMeasureFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileMonitorFlags
instance GHC.Show.Show GI.Gio.Flags.FileMonitorFlags
instance GHC.Classes.Eq GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Show.Show GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Classes.Eq GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Show.Show GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Classes.Eq GI.Gio.Flags.MountMountFlags
instance GHC.Show.Show GI.Gio.Flags.MountMountFlags
instance GHC.Classes.Eq GI.Gio.Flags.MountUnmountFlags
instance GHC.Show.Show GI.Gio.Flags.MountUnmountFlags
instance GHC.Classes.Eq GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Show.Show GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Classes.Eq GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Show.Show GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Classes.Eq GI.Gio.Flags.ResourceFlags
instance GHC.Show.Show GI.Gio.Flags.ResourceFlags
instance GHC.Classes.Eq GI.Gio.Flags.ResourceLookupFlags
instance GHC.Show.Show GI.Gio.Flags.ResourceLookupFlags
instance GHC.Classes.Eq GI.Gio.Flags.SettingsBindFlags
instance GHC.Show.Show GI.Gio.Flags.SettingsBindFlags
instance GHC.Classes.Eq GI.Gio.Flags.SocketMsgFlags
instance GHC.Show.Show GI.Gio.Flags.SocketMsgFlags
instance GHC.Classes.Eq GI.Gio.Flags.SubprocessFlags
instance GHC.Show.Show GI.Gio.Flags.SubprocessFlags
instance GHC.Classes.Eq GI.Gio.Flags.TestDBusFlags
instance GHC.Show.Show GI.Gio.Flags.TestDBusFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsCertificateFlags
instance GHC.Show.Show GI.Gio.Flags.TlsCertificateFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Show.Show GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Classes.Eq GI.Gio.Flags.TlsPasswordFlags
instance GHC.Show.Show GI.Gio.Flags.TlsPasswordFlags
instance GHC.Enum.Enum GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Classes.Ord GI.Gio.Flags.AppInfoCreateFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.AppInfoCreateFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.AppInfoCreateFlags
instance GHC.Enum.Enum GI.Gio.Flags.ApplicationFlags
instance GHC.Classes.Ord GI.Gio.Flags.ApplicationFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ApplicationFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ApplicationFlags
instance GHC.Enum.Enum GI.Gio.Flags.AskPasswordFlags
instance GHC.Classes.Ord GI.Gio.Flags.AskPasswordFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.AskPasswordFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.AskPasswordFlags
instance GHC.Enum.Enum GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Classes.Ord GI.Gio.Flags.BusNameOwnerFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.BusNameOwnerFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.BusNameOwnerFlags
instance GHC.Enum.Enum GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Classes.Ord GI.Gio.Flags.BusNameWatcherFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.BusNameWatcherFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.BusNameWatcherFlags
instance GHC.Enum.Enum GI.Gio.Flags.ConverterFlags
instance GHC.Classes.Ord GI.Gio.Flags.ConverterFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ConverterFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ConverterFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusCallFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusCallFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusCallFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusCallFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusCapabilityFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusCapabilityFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusCapabilityFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusConnectionFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusConnectionFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusConnectionFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusConnectionFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusInterfaceSkeletonFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusMessageFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusMessageFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusMessageFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusMessageFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusObjectManagerClientFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusObjectManagerClientFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusObjectManagerClientFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusPropertyInfoFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusPropertyInfoFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusPropertyInfoFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusProxyFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusProxyFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusProxyFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusProxyFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusSendMessageFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusSendMessageFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusSendMessageFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusServerFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusServerFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusServerFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusServerFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusSignalFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusSignalFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusSignalFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusSignalFlags
instance GHC.Enum.Enum GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Classes.Ord GI.Gio.Flags.DBusSubtreeFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DBusSubtreeFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DBusSubtreeFlags
instance GHC.Enum.Enum GI.Gio.Flags.DriveStartFlags
instance GHC.Classes.Ord GI.Gio.Flags.DriveStartFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.DriveStartFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.DriveStartFlags
instance GHC.Enum.Enum GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileAttributeInfoFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileAttributeInfoFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileAttributeInfoFlags
instance GHC.Enum.Enum GI.Gio.Flags.FileCopyFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileCopyFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileCopyFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileCopyFlags
instance GHC.Enum.Enum GI.Gio.Flags.FileCreateFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileCreateFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileCreateFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileCreateFlags
instance GHC.Enum.Enum GI.Gio.Flags.FileMeasureFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileMeasureFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileMeasureFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileMeasureFlags
instance GHC.Enum.Enum GI.Gio.Flags.FileMonitorFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileMonitorFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileMonitorFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileMonitorFlags
instance GHC.Enum.Enum GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Classes.Ord GI.Gio.Flags.FileQueryInfoFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.FileQueryInfoFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.FileQueryInfoFlags
instance GHC.Enum.Enum GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Classes.Ord GI.Gio.Flags.IOStreamSpliceFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.IOStreamSpliceFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.IOStreamSpliceFlags
instance GHC.Enum.Enum GI.Gio.Flags.MountMountFlags
instance GHC.Classes.Ord GI.Gio.Flags.MountMountFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.MountMountFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.MountMountFlags
instance GHC.Enum.Enum GI.Gio.Flags.MountUnmountFlags
instance GHC.Classes.Ord GI.Gio.Flags.MountUnmountFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.MountUnmountFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.MountUnmountFlags
instance GHC.Enum.Enum GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Classes.Ord GI.Gio.Flags.OutputStreamSpliceFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.OutputStreamSpliceFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.OutputStreamSpliceFlags
instance GHC.Enum.Enum GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Classes.Ord GI.Gio.Flags.ResolverNameLookupFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ResolverNameLookupFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ResolverNameLookupFlags
instance GHC.Enum.Enum GI.Gio.Flags.ResourceFlags
instance GHC.Classes.Ord GI.Gio.Flags.ResourceFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ResourceFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ResourceFlags
instance GHC.Enum.Enum GI.Gio.Flags.ResourceLookupFlags
instance GHC.Classes.Ord GI.Gio.Flags.ResourceLookupFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.ResourceLookupFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.ResourceLookupFlags
instance GHC.Enum.Enum GI.Gio.Flags.SettingsBindFlags
instance GHC.Classes.Ord GI.Gio.Flags.SettingsBindFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.SettingsBindFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.SettingsBindFlags
instance GHC.Enum.Enum GI.Gio.Flags.SocketMsgFlags
instance GHC.Classes.Ord GI.Gio.Flags.SocketMsgFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.SocketMsgFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.SocketMsgFlags
instance GHC.Enum.Enum GI.Gio.Flags.SubprocessFlags
instance GHC.Classes.Ord GI.Gio.Flags.SubprocessFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.SubprocessFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.SubprocessFlags
instance GHC.Enum.Enum GI.Gio.Flags.TestDBusFlags
instance GHC.Classes.Ord GI.Gio.Flags.TestDBusFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TestDBusFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TestDBusFlags
instance GHC.Enum.Enum GI.Gio.Flags.TlsCertificateFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsCertificateFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsCertificateFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsCertificateFlags
instance GHC.Enum.Enum GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsDatabaseVerifyFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsDatabaseVerifyFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsDatabaseVerifyFlags
instance GHC.Enum.Enum GI.Gio.Flags.TlsPasswordFlags
instance GHC.Classes.Ord GI.Gio.Flags.TlsPasswordFlags
instance Data.GI.Base.BasicTypes.BoxedFlags GI.Gio.Flags.TlsPasswordFlags
instance Data.GI.Base.BasicTypes.IsGFlag GI.Gio.Flags.TlsPasswordFlags
-- | Action 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
-- Nothing). 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 GVariant.
-- 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.
--
-- Action 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 Action is to put it
-- inside of a SimpleActionGroup.
module GI.Gio.Interfaces.Action
-- | Memory-managed wrapper type.
newtype Action
Action :: ManagedPtr Action -> Action
-- | A convenience alias for Nothing :: Maybe Action.
noAction :: Maybe 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 Nothing then parameter must
-- also be Nothing.
--
-- If the parameter GVariant 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 GVariant 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
-- GVariant given to that function must be of the type returned by
-- this function.
--
-- In the case that this function returns Nothing, you must not
-- give any GVariant, but Nothing 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 Nothing 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-Nothing) should be freed with
-- variantUnref when it is no longer required.
--
-- Since: 2.28
actionGetState :: (HasCallStack, MonadIO m, IsAction a) => a -> m GVariant
-- | Requests a hint about the valid range of values for the state of
-- action.
--
-- If Nothing is returned it either means that the action is not
-- stateful or that there is no hint about the valid range of values for
-- the state of the action.
--
-- If a GVariant array is returned then each item in the array is
-- a possible value for the state. If a GVariant pair (ie:
-- two-tuple) is returned then the tuple specifies the inclusive lower
-- and upper bound of valid values for the state.
--
-- 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-Nothing) 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
-- VariantType of the state. This is the type of the initial value
-- given as the state. All calls to actionChangeState must give a
-- GVariant of this type and actionGetState will return a
-- GVariant of the same type.
--
-- If the action is not stateful (e.g. created with
-- simpleActionNew) then this function will return Nothing.
-- In that case, actionGetState will return Nothing 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-utf8
-- actionName. actionName must not be
-- Nothing.
--
-- 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 '.'.
--
-- Since: 2.38
actionParseDetailedName :: (HasCallStack, MonadIO m) => Text -> m (Text, 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 (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.BasicTypes.GObject GI.Gio.Interfaces.Action.Action instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Action.Action -- | ActionGroup 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 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 GVariant 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 GVariant. -- 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 ActionGroup 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() call. -- -- Signals are emitted on the action group in response to state changes -- on individual actions. -- -- Implementations of ActionGroup 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 -- | A convenience alias for Nothing :: Maybe -- ActionGroup. noActionGroup :: Maybe 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::action-added signal on -- actionGroup. -- -- This function should only be called by ActionGroup -- implementations. -- -- Since: 2.28 actionGroupActionAdded :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m () -- | Emits the ActionGroup::action-enabled-changed -- signal on actionGroup. -- -- This function should only be called by ActionGroup -- implementations. -- -- Since: 2.28 actionGroupActionEnabledChanged :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> Bool -> m () -- | Emits the ActionGroup::action-removed signal on -- actionGroup. -- -- This function should only be called by ActionGroup -- implementations. -- -- Since: 2.28 actionGroupActionRemoved :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m () -- | Emits the ActionGroup::action-state-changed -- signal on actionGroup. -- -- This function should only be called by 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 -- Nothing. See actionGroupGetActionParameterType. -- -- 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 -- GVariant given to that function must be of the type returned by -- this function. -- -- In the case that this function returns Nothing, you must not -- give any GVariant, but Nothing 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 Nothing 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-Nothing) 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 Nothing is returned it either means that the action is not -- stateful or that there is no hint about the valid range of values for -- the state of the action. -- -- If a GVariant array is returned then each item in the array is -- a possible value for the state. If a GVariant pair (ie: -- two-tuple) is returned then the tuple specifies the inclusive lower -- and upper bound of valid values for the state. -- -- 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-Nothing) 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 -- VariantType of the state. All calls to -- actionGroupChangeActionState must give a GVariant of -- this type and actionGroupGetActionState will return a -- GVariant of the same type. -- -- If the action is not stateful then this function will return -- Nothing. In that case, actionGroupGetActionState will -- return Nothing 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 -- 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-Nothing 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 " /@actionName@/: the name of the action in /@actionGroup@/ " -> IO () -- | Type for the callback on the (unwrapped) C side. type C_ActionGroupActionAddedCallback = Ptr () -> CString -> Ptr () -> IO () -- | Connect a signal handler for the “action-added” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after actionGroup #actionAdded callback --afterActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionAddedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ActionGroupActionAdded :: MonadIO m => ActionGroupActionAddedCallback -> m (GClosure C_ActionGroupActionAddedCallback) -- | Generate a function pointer callable from C code, from a -- C_ActionGroupActionAddedCallback. mk_ActionGroupActionAddedCallback :: C_ActionGroupActionAddedCallback -> IO (FunPtr C_ActionGroupActionAddedCallback) -- | A convenience synonym for Nothing :: Maybe -- ActionGroupActionAddedCallback. noActionGroupActionAddedCallback :: Maybe ActionGroupActionAddedCallback -- | Connect a signal handler for the “action-added” signal, to be -- run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on actionGroup #actionAdded callback --onActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionAddedCallback -> m SignalHandlerId -- | Wrap a ActionGroupActionAddedCallback into a -- C_ActionGroupActionAddedCallback. wrap_ActionGroupActionAddedCallback :: ActionGroupActionAddedCallback -> C_ActionGroupActionAddedCallback -- | Signals that the enabled status of the named action has changed. -- -- Since: 2.28 type ActionGroupActionEnabledChangedCallback = Text " /@actionName@/: the name of the action in /@actionGroup@/ " -> Bool " /@enabled@/: whether the action is enabled or not " -> IO () -- | Type for the callback on the (unwrapped) C side. type C_ActionGroupActionEnabledChangedCallback = Ptr () -> CString -> CInt -> Ptr () -> IO () -- | Connect a signal handler for the “action-enabled-changed” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after actionGroup #actionEnabledChanged callback --afterActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionEnabledChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ActionGroupActionEnabledChanged :: MonadIO m => ActionGroupActionEnabledChangedCallback -> m (GClosure C_ActionGroupActionEnabledChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_ActionGroupActionEnabledChangedCallback. mk_ActionGroupActionEnabledChangedCallback :: C_ActionGroupActionEnabledChangedCallback -> IO (FunPtr C_ActionGroupActionEnabledChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- ActionGroupActionEnabledChangedCallback. noActionGroupActionEnabledChangedCallback :: Maybe ActionGroupActionEnabledChangedCallback -- | Connect a signal handler for the “action-enabled-changed” -- signal, to be run before the default handler. When overloading -- is enabled, this is equivalent to -- --
-- on actionGroup #actionEnabledChanged callback --onActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionEnabledChangedCallback -> m SignalHandlerId -- | Wrap a ActionGroupActionEnabledChangedCallback into a -- C_ActionGroupActionEnabledChangedCallback. wrap_ActionGroupActionEnabledChangedCallback :: ActionGroupActionEnabledChangedCallback -> C_ActionGroupActionEnabledChangedCallback -- | 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 " /@actionName@/: the name of the action in /@actionGroup@/ " -> IO () -- | Type for the callback on the (unwrapped) C side. type C_ActionGroupActionRemovedCallback = Ptr () -> CString -> Ptr () -> IO () -- | Connect a signal handler for the “action-removed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after actionGroup #actionRemoved callback --afterActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionRemovedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ActionGroupActionRemoved :: MonadIO m => ActionGroupActionRemovedCallback -> m (GClosure C_ActionGroupActionRemovedCallback) -- | Generate a function pointer callable from C code, from a -- C_ActionGroupActionRemovedCallback. mk_ActionGroupActionRemovedCallback :: C_ActionGroupActionRemovedCallback -> IO (FunPtr C_ActionGroupActionRemovedCallback) -- | A convenience synonym for Nothing :: Maybe -- ActionGroupActionRemovedCallback. noActionGroupActionRemovedCallback :: Maybe ActionGroupActionRemovedCallback -- | Connect a signal handler for the “action-removed” signal, to -- be run before the default handler. When overloading is enabled, -- this is equivalent to -- --
-- on actionGroup #actionRemoved callback --onActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionRemovedCallback -> m SignalHandlerId -- | Wrap a ActionGroupActionRemovedCallback into a -- C_ActionGroupActionRemovedCallback. wrap_ActionGroupActionRemovedCallback :: ActionGroupActionRemovedCallback -> C_ActionGroupActionRemovedCallback -- | Signals that the state of the named action has changed. -- -- Since: 2.28 type ActionGroupActionStateChangedCallback = Text " /@actionName@/: the name of the action in /@actionGroup@/ " -> GVariant " /@value@/: the new value of the state " -> IO () -- | Type for the callback on the (unwrapped) C side. type C_ActionGroupActionStateChangedCallback = Ptr () -> CString -> Ptr GVariant -> Ptr () -> IO () -- | Connect a signal handler for the “action-state-changed” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after actionGroup #actionStateChanged callback --afterActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionStateChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ActionGroupActionStateChanged :: MonadIO m => ActionGroupActionStateChangedCallback -> m (GClosure C_ActionGroupActionStateChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_ActionGroupActionStateChangedCallback. mk_ActionGroupActionStateChangedCallback :: C_ActionGroupActionStateChangedCallback -> IO (FunPtr C_ActionGroupActionStateChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- ActionGroupActionStateChangedCallback. noActionGroupActionStateChangedCallback :: Maybe ActionGroupActionStateChangedCallback -- | Connect a signal handler for the “action-state-changed” -- signal, to be run before the default handler. When overloading -- is enabled, this is equivalent to -- --
-- on actionGroup #actionStateChanged callback --onActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionStateChangedCallback -> m SignalHandlerId -- | Wrap a ActionGroupActionStateChangedCallback into a -- C_ActionGroupActionStateChangedCallback. wrap_ActionGroupActionStateChangedCallback :: ActionGroupActionStateChangedCallback -> C_ActionGroupActionStateChangedCallback 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.BasicTypes.GObject GI.Gio.Interfaces.ActionGroup.ActionGroup instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.ActionGroup.ActionGroup -- | Provides a base class for implementing asynchronous function results. -- -- Asynchronous operations are broken up into two separate operations -- which are chained together by a AsyncReadyCallback. To begin an -- asynchronous operation, provide a AsyncReadyCallback 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][g-main-context-push-thread-default] from -- where the operation was initiated. It will be passed a -- AsyncResult 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 -- AsyncResult 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 AsyncResult) 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 -- AsyncReadyCallback returns. You can pass Nothing for the -- AsyncReadyCallback if you don't need to take any action at all -- after the operation completes. Applications may also take a reference -- to the AsyncResult 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 IOErrorEnumCancelled error.
--
-- # {io-priority}
--
-- Many I/O-related asynchronous operations have a priority parameter,
-- which is used in certain cases to determine the order in which
-- operations are executed. They are not used to determine system-wide
-- I/O scheduling. Priorities are integers, with lower numbers indicating
-- higher priority. It is recommended to choose priorities between
-- PRIORITY_LOW and PRIORITY_HIGH, with
-- PRIORITY_DEFAULT as a default.
module GI.Gio.Interfaces.AsyncResult
-- | Memory-managed wrapper type.
newtype AsyncResult
AsyncResult :: ManagedPtr AsyncResult -> AsyncResult
-- | A convenience alias for Nothing :: Maybe
-- AsyncResult.
noAsyncResult :: Maybe AsyncResult
-- | Type class for types which can be safely cast to AsyncResult,
-- for instance with toAsyncResult.
class (GObject o, IsDescendantOf AsyncResult o) => IsAsyncResult o
-- | Cast to AsyncResult, for types for which this is known to be
-- safe. For general casts, use castTo.
toAsyncResult :: (MonadIO m, IsAsyncResult o) => o -> m AsyncResult
-- | Gets the source object from a AsyncResult.
asyncResultGetSourceObject :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (Maybe Object)
-- | Gets the user data from a AsyncResult.
asyncResultGetUserData :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (Ptr ())
-- | Checks if res has the given sourceTag
-- (generally a function pointer indicating the function
-- res was created by).
--
-- Since: 2.34
asyncResultIsTagged :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> Ptr () -> m Bool
-- | If res is a SimpleAsyncResult, this is
-- equivalent to simpleAsyncResultPropagateError. Otherwise it
-- returns False.
--
-- This can be used for legacy error handling in async
-- *_finish() wrapper functions that traditionally
-- handled SimpleAsyncResult error returns themselves rather than
-- calling into the virtual method. This should not be used in new code;
-- AsyncResult errors that are set by virtual methods should also
-- be extracted by virtual methods, to enable subclasses to chain up
-- correctly.
--
-- Since: 2.34
asyncResultLegacyPropagateError :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.AsyncResult.AsyncResult o) => GI.Gio.Interfaces.AsyncResult.IsAsyncResult o
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.AsyncResult.AsyncResult
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.AsyncResult.AsyncResult
-- | Converter is implemented by objects that convert binary data in
-- various ways. The conversion can be stateful and may fail at any
-- place.
--
-- Some example conversions are: character set conversion, compression,
-- decompression and regular expression replace.
--
-- Since: 2.24
module GI.Gio.Interfaces.Converter
-- | Memory-managed wrapper type.
newtype Converter
Converter :: ManagedPtr Converter -> Converter
-- | A convenience alias for Nothing :: Maybe
-- Converter.
noConverter :: Maybe Converter
-- | Type class for types which can be safely cast to Converter, for
-- instance with toConverter.
class (GObject o, IsDescendantOf Converter o) => IsConverter o
-- | Cast to Converter, for types for which this is known to be
-- safe. For general casts, use castTo.
toConverter :: (MonadIO m, IsConverter o) => o -> m Converter
-- | This is the main operation used when converting data. It is to be
-- called multiple times in a loop, and each time it will do some work,
-- i.e. producing some output (in outbuf) or consuming
-- some input (from inbuf) or both. If its not possible
-- to do any work an error is returned.
--
-- Note that a single call may not consume all input (or any input at
-- all). Also a call may produce output even if given no input, due to
-- state stored in the converter producing output.
--
-- If any data was either produced or consumed, and then an error
-- happens, then only the successful conversion is reported and the error
-- is returned on the next call.
--
-- A full conversion loop involves calling this method repeatedly, each
-- time giving it new input and space output space. When there is no more
-- input data after the data in inbuf, the flag
-- ConverterFlagsInputAtEnd must be set. The loop will be (unless
-- some error happens) returning ConverterResultConverted each
-- time until all data is consumed and all output is produced, then
-- ConverterResultFinished is returned instead. Note, that
-- ConverterResultFinished may be returned even if
-- ConverterFlagsInputAtEnd is not set, for instance in a
-- decompression converter where the end of data is detectable from the
-- data (and there might even be other data after the end of the
-- compressed data).
--
-- When some data has successfully been converted
-- bytesRead and is set to the number of bytes read from
-- inbuf, and bytesWritten is set to
-- indicate how many bytes was written to outbuf. If
-- there are more data to output or consume (i.e. unless the
-- ConverterFlagsInputAtEnd is specified) then
-- ConverterResultConverted is returned, and if no more data is to
-- be output then ConverterResultFinished is returned.
--
-- On error ConverterResultError is returned and
-- error is set accordingly. Some errors need special
-- handling:
--
-- IOErrorEnumNoSpace is returned if there is not enough space to
-- write the resulting converted data, the application should call the
-- function again with a larger outbuf to continue.
--
-- IOErrorEnumPartialInput is returned if there is not enough
-- input to fully determine what the conversion should produce, and the
-- ConverterFlagsInputAtEnd flag is not set. This happens for
-- example with an incomplete multibyte sequence when converting text, or
-- when a regexp matches up to the end of the input (and may match
-- further input). It may also happen when inbufSize is
-- zero and there is no more data to produce.
--
-- When this happens the application should read more input and then call
-- the function again. If further input shows that there is no more data
-- call the function again with the same data but with the
-- ConverterFlagsInputAtEnd flag set. This may cause the
-- conversion to finish as e.g. in the regexp match case (or, to fail
-- again with IOErrorEnumPartialInput in e.g. a charset conversion
-- where the input is actually partial).
--
-- After converterConvert has returned
-- ConverterResultFinished the converter object is in an invalid
-- state where its not allowed to call converterConvert anymore.
-- At this time you can only free the object or call
-- converterReset to reset it to the initial state.
--
-- If the flag ConverterFlagsFlush is set then conversion is
-- modified to try to write out all internal state to the output. The
-- application has to call the function multiple times with the flag set,
-- and when the available input has been consumed and all internal state
-- has been produced then ConverterResultFlushed (or
-- ConverterResultFinished if really at the end) is returned
-- instead of ConverterResultConverted. This is somewhat similar
-- to what happens at the end of the input stream, but done in the middle
-- of the data.
--
-- This has different meanings for different conversions. For instance in
-- a compression converter it would mean that we flush all the
-- compression state into output such that if you uncompress the
-- compressed data you get back all the input data. Doing this may make
-- the final file larger due to padding though. Another example is a
-- regexp conversion, where if you at the end of the flushed data have a
-- match, but there is also a potential longer match. In the non-flushed
-- case we would ask for more input, but when flushing we treat this as
-- the end of input and do the match.
--
-- Flushing is not always possible (like if a charset converter flushes
-- at a partial multibyte sequence). Converters are supposed to try to
-- produce as much output as possible and then return an error (typically
-- IOErrorEnumPartialInput).
--
-- Since: 2.24
converterConvert :: (HasCallStack, MonadIO m, IsConverter a) => a -> Maybe ByteString -> Maybe ByteString -> [ConverterFlags] -> m (ConverterResult, Word64, Word64)
-- | Resets all internal state in the converter, making it behave as if it
-- was just created. If the converter has any internal state that would
-- produce output then that output is lost.
--
-- Since: 2.24
converterReset :: (HasCallStack, MonadIO m, IsConverter a) => a -> m ()
instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.Converter.Converter o) => GI.Gio.Interfaces.Converter.IsConverter o
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Converter.Converter
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Converter.Converter
-- | The DBusObject 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
-- | A convenience alias for Nothing :: Maybe
-- DBusObject.
noDBusObject :: Maybe 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 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
-- | Type for the callback on the (unwrapped) C side.
type C_DBusObjectInterfaceAddedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO ()
-- | Emitted when interface is added to
-- object.
--
-- Since: 2.30
type DBusObjectInterfaceAddedCallback = DBusInterface " /@interface@/: The 'GI.Gio.Interfaces.DBusInterface.DBusInterface' that was added. " -> IO ()
-- | Connect a signal handler for the “interface-added” signal, to
-- be run after the default handler. When overloading is enabled,
-- this is equivalent to
--
-- -- after dBusObject #interfaceAdded callback --afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectInterfaceAdded :: MonadIO m => DBusObjectInterfaceAddedCallback -> m (GClosure C_DBusObjectInterfaceAddedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectInterfaceAddedCallback. mk_DBusObjectInterfaceAddedCallback :: C_DBusObjectInterfaceAddedCallback -> IO (FunPtr C_DBusObjectInterfaceAddedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectInterfaceAddedCallback. noDBusObjectInterfaceAddedCallback :: Maybe DBusObjectInterfaceAddedCallback -- | Connect a signal handler for the “interface-added” 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 -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId -- | Wrap a DBusObjectInterfaceAddedCallback into a -- C_DBusObjectInterfaceAddedCallback. wrap_DBusObjectInterfaceAddedCallback :: DBusObjectInterfaceAddedCallback -> C_DBusObjectInterfaceAddedCallback -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectInterfaceRemovedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO () -- | Emitted when interface is removed from -- object. -- -- Since: 2.30 type DBusObjectInterfaceRemovedCallback = DBusInterface " /@interface@/: The 'GI.Gio.Interfaces.DBusInterface.DBusInterface' that was removed. " -> IO () -- | Connect a signal handler for the “interface-removed” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after dBusObject #interfaceRemoved callback --afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectInterfaceRemoved :: MonadIO m => DBusObjectInterfaceRemovedCallback -> m (GClosure C_DBusObjectInterfaceRemovedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectInterfaceRemovedCallback. mk_DBusObjectInterfaceRemovedCallback :: C_DBusObjectInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectInterfaceRemovedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectInterfaceRemovedCallback. noDBusObjectInterfaceRemovedCallback :: Maybe DBusObjectInterfaceRemovedCallback -- | Connect a signal handler for the “interface-removed” 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 -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId -- | Wrap a DBusObjectInterfaceRemovedCallback into a -- C_DBusObjectInterfaceRemovedCallback. wrap_DBusObjectInterfaceRemovedCallback :: DBusObjectInterfaceRemovedCallback -> C_DBusObjectInterfaceRemovedCallback 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.BasicTypes.GObject GI.Gio.Interfaces.DBusObject.DBusObject instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DBusObject.DBusObject -- | The DBusObjectManager 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 -- | A convenience alias for Nothing :: Maybe -- DBusObjectManager. noDBusObjectManager :: Maybe 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 DBusInterface -- | Gets the DBusObjectProxy at objectPath, if any. -- -- Since: 2.30 dBusObjectManagerGetObject :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> m 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] -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectManagerInterfaceAddedCallback = Ptr () -> Ptr DBusObject -> Ptr DBusInterface -> Ptr () -> IO () -- | 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 " /@object@/: The 'GI.Gio.Interfaces.DBusObject.DBusObject' on which an interface was added. " -> DBusInterface " /@interface@/: The 'GI.Gio.Interfaces.DBusInterface.DBusInterface' that was added. " -> IO () -- | Connect a signal handler for the “interface-added” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObjectManager #interfaceAdded callback --afterDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerInterfaceAddedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectManagerInterfaceAdded :: MonadIO m => DBusObjectManagerInterfaceAddedCallback -> m (GClosure C_DBusObjectManagerInterfaceAddedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectManagerInterfaceAddedCallback. mk_DBusObjectManagerInterfaceAddedCallback :: C_DBusObjectManagerInterfaceAddedCallback -> IO (FunPtr C_DBusObjectManagerInterfaceAddedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectManagerInterfaceAddedCallback. noDBusObjectManagerInterfaceAddedCallback :: Maybe DBusObjectManagerInterfaceAddedCallback -- | Connect a signal handler for the “interface-added” 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 -> DBusObjectManagerInterfaceAddedCallback -> m SignalHandlerId -- | Wrap a DBusObjectManagerInterfaceAddedCallback into a -- C_DBusObjectManagerInterfaceAddedCallback. wrap_DBusObjectManagerInterfaceAddedCallback :: DBusObjectManagerInterfaceAddedCallback -> C_DBusObjectManagerInterfaceAddedCallback -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectManagerInterfaceRemovedCallback = Ptr () -> Ptr DBusObject -> Ptr DBusInterface -> Ptr () -> IO () -- | 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 " /@object@/: The 'GI.Gio.Interfaces.DBusObject.DBusObject' on which an interface was removed. " -> DBusInterface " /@interface@/: The 'GI.Gio.Interfaces.DBusInterface.DBusInterface' that was removed. " -> IO () -- | Connect a signal handler for the “interface-removed” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after dBusObjectManager #interfaceRemoved callback --afterDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerInterfaceRemovedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectManagerInterfaceRemoved :: MonadIO m => DBusObjectManagerInterfaceRemovedCallback -> m (GClosure C_DBusObjectManagerInterfaceRemovedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectManagerInterfaceRemovedCallback. mk_DBusObjectManagerInterfaceRemovedCallback :: C_DBusObjectManagerInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectManagerInterfaceRemovedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectManagerInterfaceRemovedCallback. noDBusObjectManagerInterfaceRemovedCallback :: Maybe DBusObjectManagerInterfaceRemovedCallback -- | Connect a signal handler for the “interface-removed” 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 -> DBusObjectManagerInterfaceRemovedCallback -> m SignalHandlerId -- | Wrap a DBusObjectManagerInterfaceRemovedCallback into a -- C_DBusObjectManagerInterfaceRemovedCallback. wrap_DBusObjectManagerInterfaceRemovedCallback :: DBusObjectManagerInterfaceRemovedCallback -> C_DBusObjectManagerInterfaceRemovedCallback -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectManagerObjectAddedCallback = Ptr () -> Ptr DBusObject -> Ptr () -> IO () -- | Emitted when object is added to -- manager. -- -- Since: 2.30 type DBusObjectManagerObjectAddedCallback = DBusObject " /@object@/: The 'GI.Gio.Interfaces.DBusObject.DBusObject' that was added. " -> IO () -- | Connect a signal handler for the “object-added” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObjectManager #objectAdded callback --afterDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerObjectAddedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectManagerObjectAdded :: MonadIO m => DBusObjectManagerObjectAddedCallback -> m (GClosure C_DBusObjectManagerObjectAddedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectManagerObjectAddedCallback. mk_DBusObjectManagerObjectAddedCallback :: C_DBusObjectManagerObjectAddedCallback -> IO (FunPtr C_DBusObjectManagerObjectAddedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectManagerObjectAddedCallback. noDBusObjectManagerObjectAddedCallback :: Maybe DBusObjectManagerObjectAddedCallback -- | Connect a signal handler for the “object-added” 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 -> DBusObjectManagerObjectAddedCallback -> m SignalHandlerId -- | Wrap a DBusObjectManagerObjectAddedCallback into a -- C_DBusObjectManagerObjectAddedCallback. wrap_DBusObjectManagerObjectAddedCallback :: DBusObjectManagerObjectAddedCallback -> C_DBusObjectManagerObjectAddedCallback -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectManagerObjectRemovedCallback = Ptr () -> Ptr DBusObject -> Ptr () -> IO () -- | Emitted when object is removed from -- manager. -- -- Since: 2.30 type DBusObjectManagerObjectRemovedCallback = DBusObject " /@object@/: The 'GI.Gio.Interfaces.DBusObject.DBusObject' that was removed. " -> IO () -- | Connect a signal handler for the “object-removed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusObjectManager #objectRemoved callback --afterDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerObjectRemovedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectManagerObjectRemoved :: MonadIO m => DBusObjectManagerObjectRemovedCallback -> m (GClosure C_DBusObjectManagerObjectRemovedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectManagerObjectRemovedCallback. mk_DBusObjectManagerObjectRemovedCallback :: C_DBusObjectManagerObjectRemovedCallback -> IO (FunPtr C_DBusObjectManagerObjectRemovedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectManagerObjectRemovedCallback. noDBusObjectManagerObjectRemovedCallback :: Maybe DBusObjectManagerObjectRemovedCallback -- | Connect a signal handler for the “object-removed” 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 -> DBusObjectManagerObjectRemovedCallback -> m SignalHandlerId -- | Wrap a DBusObjectManagerObjectRemovedCallback into a -- C_DBusObjectManagerObjectRemovedCallback. wrap_DBusObjectManagerObjectRemovedCallback :: DBusObjectManagerObjectRemovedCallback -> C_DBusObjectManagerObjectRemovedCallback 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.BasicTypes.GObject GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager -- | DesktopAppInfoLookup is an opaque data structure and can only -- be accessed using the following functions. module GI.Gio.Interfaces.DesktopAppInfoLookup -- | Memory-managed wrapper type. newtype DesktopAppInfoLookup DesktopAppInfoLookup :: ManagedPtr DesktopAppInfoLookup -> DesktopAppInfoLookup -- | A convenience alias for Nothing :: Maybe -- DesktopAppInfoLookup. noDesktopAppInfoLookup :: Maybe 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 GDesktopAppInfoLookup implementation. -- -- The GDesktopAppInfoLookup 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: The DesktopAppInfoLookup interface is deprecated -- and unused by gio. desktopAppInfoLookupGetDefaultForUriScheme :: (HasCallStack, MonadIO m, IsDesktopAppInfoLookup a) => a -> Text -> m AppInfo 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.BasicTypes.GObject GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup -- | FileDescriptorBased is implemented by streams (implementations -- of InputStream or OutputStream) that are based on file -- descriptors. -- -- Note that <gio/gfiledescriptorbased.h> belongs to the -- UNIX-specific GIO interfaces, thus you have to use the -- gio-unix-2.0.pc pkg-config file when using it. -- -- Since: 2.24 module GI.Gio.Interfaces.FileDescriptorBased -- | Memory-managed wrapper type. newtype FileDescriptorBased FileDescriptorBased :: ManagedPtr FileDescriptorBased -> FileDescriptorBased -- | A convenience alias for Nothing :: Maybe -- FileDescriptorBased. noFileDescriptorBased :: Maybe FileDescriptorBased -- | Type class for types which can be safely cast to -- FileDescriptorBased, for instance with -- toFileDescriptorBased. class (GObject o, IsDescendantOf FileDescriptorBased o) => IsFileDescriptorBased o -- | Cast to FileDescriptorBased, for types for which this is known -- to be safe. For general casts, use castTo. toFileDescriptorBased :: (MonadIO m, IsFileDescriptorBased o) => o -> m FileDescriptorBased -- | Gets the underlying file descriptor. -- -- Since: 2.24 fileDescriptorBasedGetFd :: (HasCallStack, MonadIO m, IsFileDescriptorBased a) => a -> m Int32 instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased o) => GI.Gio.Interfaces.FileDescriptorBased.IsFileDescriptorBased o instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased -- | Icon is a very minimal interface for icons. It provides -- functions for checking the equality of two icons, hashing of icons and -- serializing an icon to and from strings. -- -- Icon does not provide the actual pixmap for the icon as this is -- out of GIO's scope, however implementations of Icon may contain -- the name of an icon (see ThemedIcon), or the path to an icon -- (see LoadableIcon). -- -- To obtain a hash of a Icon, see iconHash. -- -- To check if two GIcons are equal, see -- iconEqual. -- -- For serializing a Icon, use iconSerialize and -- iconDeserialize. -- -- If you want to consume Icon (for example, in a toolkit) you -- must be prepared to handle at least the three following cases: -- LoadableIcon, ThemedIcon and EmblemedIcon. It may -- also make sense to have fast-paths for other cases (like handling -- GdkPixbuf directly, for example) but all compliant -- Icon implementations outside of GIO must implement -- LoadableIcon. -- -- If your application or library provides one or more Icon -- implementations you need to ensure that your new implementation also -- implements LoadableIcon. Additionally, you must provide an -- implementation of iconSerialize that gives a result that is -- understood by iconDeserialize, yielding one of the built-in -- icon types. module GI.Gio.Interfaces.Icon -- | Memory-managed wrapper type. newtype Icon Icon :: ManagedPtr Icon -> Icon -- | A convenience alias for Nothing :: Maybe Icon. noIcon :: Maybe Icon -- | Type class for types which can be safely cast to Icon, for -- instance with toIcon. class (GObject o, IsDescendantOf Icon o) => IsIcon o -- | Cast to Icon, for types for which this is known to be safe. For -- general casts, use castTo. toIcon :: (MonadIO m, IsIcon o) => o -> m Icon -- | Deserializes a Icon previously serialized using -- iconSerialize. -- -- Since: 2.38 iconDeserialize :: (HasCallStack, MonadIO m) => GVariant -> m Icon -- | Checks if two icons are equal. iconEqual :: (HasCallStack, MonadIO m, IsIcon a, IsIcon b) => a -> Maybe b -> m Bool -- | Gets a hash for an icon. iconHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32 -- | Generate a Icon instance from str. This -- function can fail if str is not valid - see -- iconToString for discussion. -- -- If your application or library provides one or more Icon -- implementations you need to ensure that each GType is -- registered with the type system prior to calling -- iconNewForString. -- -- Since: 2.20 iconNewForString :: (HasCallStack, MonadIO m) => Text -> m Icon -- | Serializes a Icon into a GVariant. An equivalent -- Icon can be retrieved back by calling iconDeserialize on -- the returned value. As serialization will avoid using raw icon data -- when possible, it only makes sense to transfer the GVariant -- between processes on the same machine, (as opposed to over the -- network), and within the same file system namespace. -- -- Since: 2.38 iconSerialize :: (HasCallStack, MonadIO m, IsIcon a) => a -> m GVariant -- | Generates a textual representation of icon that can be -- used for serialization such as when passing icon to a -- different process or saving it to persistent storage. Use -- iconNewForString to get icon back from the -- returned string. -- -- The encoding of the returned string is proprietary to Icon -- except in the following two cases -- --
-- after listModel #itemsChanged callback --afterListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ListModelItemsChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ListModelItemsChanged :: MonadIO m => ListModelItemsChangedCallback -> m (GClosure C_ListModelItemsChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_ListModelItemsChangedCallback. mk_ListModelItemsChangedCallback :: C_ListModelItemsChangedCallback -> IO (FunPtr C_ListModelItemsChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- ListModelItemsChangedCallback. noListModelItemsChangedCallback :: Maybe ListModelItemsChangedCallback -- | Connect a signal handler for the “items-changed” 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 -> ListModelItemsChangedCallback -> m SignalHandlerId -- | Wrap a ListModelItemsChangedCallback into a -- C_ListModelItemsChangedCallback. wrap_ListModelItemsChangedCallback :: ListModelItemsChangedCallback -> C_ListModelItemsChangedCallback 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.GObject GI.Gio.Interfaces.ListModel.ListModel instance Data.GI.Base.Overloading.HasParentTypes 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 RemoteActionGroup. This -- provides a mechanism to send platform data for action invocations over -- D-Bus. -- -- Additionally, dBusConnectionExportActionGroup will check if the -- exported ActionGroup implements RemoteActionGroup 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 -- | A convenience alias for Nothing :: Maybe -- RemoteActionGroup. noRemoteActionGroup :: Maybe 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 (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.GObject GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup -- | DtlsClientConnection 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 -- | A convenience alias for Nothing :: Maybe -- DtlsClientConnection. noDtlsClientConnection :: Maybe 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 -- -- Since: 2.48 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. -- -- Since: 2.48 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, IsSocketConnectable a) => a -> IO (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 => [TlsCertificateFlags] -> IO (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 (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.BasicTypes.GObject GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection -- | AppInfoMonitor is a very simple object used for monitoring the -- app info database for changes (ie: newly installed or removed -- applications). -- -- Call appInfoMonitorGet to get a AppInfoMonitor and -- connect to the "changed" signal. -- -- In the usual case, applications should try to make note of the change -- (doing things like invalidating caches) but not act on it. In -- particular, applications should avoid making calls to AppInfo -- APIs in response to the change signal, deferring these until the time -- that the data is actually required. The exception to this case is when -- application information is actually being displayed on the screen (eg: -- during a search or when the list of all applications is shown). The -- reason for this is that changes to the list of installed applications -- often come in groups (like during system updates) and rescanning the -- list on every change is pointless and expensive. -- -- Since: 2.40 module GI.Gio.Objects.AppInfoMonitor -- | Memory-managed wrapper type. newtype AppInfoMonitor AppInfoMonitor :: ManagedPtr AppInfoMonitor -> AppInfoMonitor -- | Type class for types which can be safely cast to -- AppInfoMonitor, for instance with toAppInfoMonitor. class (GObject o, IsDescendantOf AppInfoMonitor o) => IsAppInfoMonitor o -- | Cast to AppInfoMonitor, for types for which this is known to be -- safe. For general casts, use castTo. toAppInfoMonitor :: (MonadIO m, IsAppInfoMonitor o) => o -> m AppInfoMonitor -- | A convenience alias for Nothing :: Maybe -- AppInfoMonitor. noAppInfoMonitor :: Maybe AppInfoMonitor -- | Gets the AppInfoMonitor for the current thread-default main -- context. -- -- The AppInfoMonitor will emit a "changed" signal in the -- thread-default main context whenever the list of installed -- applications (as reported by appInfoGetAll) may have changed. -- -- You must only call objectUnref on the return value from under -- the same main context as you created it. -- -- Since: 2.40 appInfoMonitorGet :: (HasCallStack, MonadIO m) => m AppInfoMonitor -- | Signal emitted when the app info database for changes (ie: newly -- installed or removed applications). type AppInfoMonitorChangedCallback = IO () -- | Type for the callback on the (unwrapped) C side. type C_AppInfoMonitorChangedCallback = Ptr () -> Ptr () -> 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 appInfoMonitor #changed callback --afterAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> AppInfoMonitorChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_AppInfoMonitorChanged :: MonadIO m => AppInfoMonitorChangedCallback -> m (GClosure C_AppInfoMonitorChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_AppInfoMonitorChangedCallback. mk_AppInfoMonitorChangedCallback :: C_AppInfoMonitorChangedCallback -> IO (FunPtr C_AppInfoMonitorChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- AppInfoMonitorChangedCallback. noAppInfoMonitorChangedCallback :: Maybe AppInfoMonitorChangedCallback -- | 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 -> AppInfoMonitorChangedCallback -> m SignalHandlerId -- | Wrap a AppInfoMonitorChangedCallback into a -- C_AppInfoMonitorChangedCallback. wrap_AppInfoMonitorChangedCallback :: AppInfoMonitorChangedCallback -> C_AppInfoMonitorChangedCallback 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.BasicTypes.GObject GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor -- | 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 -- | A convenience alias for Nothing :: Maybe -- AppLaunchContext. noAppLaunchContext :: Maybe 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 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 Nothing-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 -- DESKTOP_STARTUP_ID for the launched operation, if supported. -- -- Startup notification IDs are defined in the FreeDesktop.Org Startup -- Notifications standard. appLaunchContextGetStartupNotifyId :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b, IsFile c) => a -> b -> [c] -> m 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 ::launch-failed signal is emitted when a AppInfo launch -- fails. The startup notification id is provided, so that the launcher -- can cancel the startup notification. -- -- Since: 2.36 type AppLaunchContextLaunchFailedCallback = Text " /@startupNotifyId@/: the startup notification id for the failed launch " -> IO () -- | Type for the callback on the (unwrapped) C side. type C_AppLaunchContextLaunchFailedCallback = Ptr () -> CString -> Ptr () -> IO () -- | Connect a signal handler for the “launch-failed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after appLaunchContext #launchFailed callback --afterAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_AppLaunchContextLaunchFailed :: MonadIO m => AppLaunchContextLaunchFailedCallback -> m (GClosure C_AppLaunchContextLaunchFailedCallback) -- | Generate a function pointer callable from C code, from a -- C_AppLaunchContextLaunchFailedCallback. mk_AppLaunchContextLaunchFailedCallback :: C_AppLaunchContextLaunchFailedCallback -> IO (FunPtr C_AppLaunchContextLaunchFailedCallback) -- | A convenience synonym for Nothing :: Maybe -- AppLaunchContextLaunchFailedCallback. noAppLaunchContextLaunchFailedCallback :: Maybe AppLaunchContextLaunchFailedCallback -- | Connect a signal handler for the “launch-failed” 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 -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId -- | Wrap a AppLaunchContextLaunchFailedCallback into a -- C_AppLaunchContextLaunchFailedCallback. wrap_AppLaunchContextLaunchFailedCallback :: AppLaunchContextLaunchFailedCallback -> C_AppLaunchContextLaunchFailedCallback -- | The ::launched signal is emitted when a AppInfo is successfully -- launched. 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.36 type AppLaunchContextLaunchedCallback = AppInfo " /@info@/: the 'GI.Gio.Interfaces.AppInfo.AppInfo' that was just launched " -> GVariant " /@platformData@/: additional platform-specific data for this launch " -> IO () -- | Type for the callback on the (unwrapped) C side. type C_AppLaunchContextLaunchedCallback = Ptr () -> Ptr AppInfo -> Ptr GVariant -> Ptr () -> 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 --afterAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_AppLaunchContextLaunched :: MonadIO m => AppLaunchContextLaunchedCallback -> m (GClosure C_AppLaunchContextLaunchedCallback) -- | Generate a function pointer callable from C code, from a -- C_AppLaunchContextLaunchedCallback. mk_AppLaunchContextLaunchedCallback :: C_AppLaunchContextLaunchedCallback -> IO (FunPtr C_AppLaunchContextLaunchedCallback) -- | A convenience synonym for Nothing :: Maybe -- AppLaunchContextLaunchedCallback. noAppLaunchContextLaunchedCallback :: Maybe AppLaunchContextLaunchedCallback -- | 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 -> AppLaunchContextLaunchedCallback -> m SignalHandlerId -- | Wrap a AppLaunchContextLaunchedCallback into a -- C_AppLaunchContextLaunchedCallback. wrap_AppLaunchContextLaunchedCallback :: AppLaunchContextLaunchedCallback -> C_AppLaunchContextLaunchedCallback 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.BasicTypes.GObject GI.Gio.Objects.AppLaunchContext.AppLaunchContext instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.AppLaunchContext.AppLaunchContext -- | BytesIcon 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 -- | A convenience alias for Nothing :: Maybe -- BytesIcon. noBytesIcon :: Maybe 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. -- -- 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 => Bytes -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.BytesIcon.BytesIcon instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.BytesIcon.BytesIcon -- | Seekable is implemented by streams (implementations of -- InputStream or OutputStream) that support seeking. -- -- Seekable streams largely fall into two categories: resizable and -- fixed-size. -- -- Seekable 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. -- -- Seekable 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 -- | A convenience alias for Nothing :: Maybe -- Seekable. noSeekable :: Maybe 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 previouly 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 (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.GObject GI.Gio.Interfaces.Seekable.Seekable instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Seekable.Seekable -- | Initable 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 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. -- -- 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 -- g_initable_new() directly, or indirectly via a -- foo_thing_new() wrapper. This will call -- initableInit under the cover, returning Nothing 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 implemention -- 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 -- | A convenience alias for Nothing :: Maybe -- Initable. noInitable :: Maybe 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 (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.GObject GI.Gio.Interfaces.Initable.Initable instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Initable.Initable -- | 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 -- | A convenience alias for Nothing :: Maybe -- Cancellable. noCancellable :: Maybe 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) => 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) => 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) => 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) => a -> m Int32 -- | Checks if a cancellable job has been cancelled. cancellableIsCancelled :: (HasCallStack, MonadIO m, IsCancellable a) => 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) => 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) => 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) => 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) => 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) => a -> m () -- | If the cancellable is cancelled, sets the error to -- notify that the operation was cancelled. cancellableSetErrorIfCancelled :: (HasCallStack, MonadIO m, IsCancellable a) => a -> m () -- | Type for the callback on the (unwrapped) C side. type C_CancellableCancelledCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterCancellableCancelled :: (IsCancellable a, MonadIO m) => a -> CancellableCancelledCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_CancellableCancelled :: MonadIO m => CancellableCancelledCallback -> m (GClosure C_CancellableCancelledCallback) -- | Generate a function pointer callable from C code, from a -- C_CancellableCancelledCallback. mk_CancellableCancelledCallback :: C_CancellableCancelledCallback -> IO (FunPtr C_CancellableCancelledCallback) -- | A convenience synonym for Nothing :: Maybe -- CancellableCancelledCallback. noCancellableCancelledCallback :: Maybe CancellableCancelledCallback -- | 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 -> CancellableCancelledCallback -> m SignalHandlerId -- | Wrap a CancellableCancelledCallback into a -- C_CancellableCancelledCallback. wrap_CancellableCancelledCallback :: CancellableCancelledCallback -> C_CancellableCancelledCallback 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.BasicTypes.GObject GI.Gio.Objects.Cancellable.Cancellable instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Cancellable.Cancellable -- | CharsetConverter is an implementation of Converter based -- on GIConv. 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 -- | A convenience alias for Nothing :: Maybe -- CharsetConverter. noCharsetConverter :: Maybe 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:use-fallback -- 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:use-fallback -- 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 => Text -> IO (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 => Text -> IO (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 => Bool -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.CharsetConverter.CharsetConverter instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.CharsetConverter.CharsetConverter -- | The Credentials type is a reference-counted wrapper for native -- credentials. This information 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 -- CredentialsTypeLinuxUcred. -- -- On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential -- type is a struct cmsgcred. This corresponds to -- CredentialsTypeFreebsdCmsgcred. -- -- On NetBSD, the native credential type is a struct unpcbid. This -- corresponds to CredentialsTypeNetbsdUnpcbid. -- -- On OpenBSD, the native credential type is a struct sockpeercred. This -- corresponds to CredentialsTypeOpenbsdSockpeercred. -- -- On Solaris (including OpenSolaris and its derivatives), the native -- credential type is a ucred_t. This corresponds to -- CredentialsTypeSolarisUcred. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- Credentials. noCredentials :: Maybe 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 an 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 (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.BasicTypes.GObject GI.Gio.Objects.Credentials.Credentials instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Credentials.Credentials -- | DBusActionGroup is an implementation of the ActionGroup -- interface that 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 -- | A convenience alias for Nothing :: Maybe -- DBusActionGroup. noDBusActionGroup :: Maybe 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 (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.BasicTypes.GObject GI.Gio.Objects.DBusActionGroup.DBusActionGroup instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusActionGroup.DBusActionGroup -- | A DBusObjectProxy is an object used to represent a remote -- object with one or more D-Bus interfaces. Normally, you don't -- instantiate a DBusObjectProxy 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 -- | A convenience alias for Nothing :: Maybe -- DBusObjectProxy. noDBusObjectProxy :: Maybe 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, IsDBusConnection a) => a -> IO (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 => Text -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy -- | DBusObjectManagerServer 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 DBusObjectManagerServer 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 -- | A convenience alias for Nothing :: Maybe -- DBusObjectManagerServer. noDBusObjectManagerServer :: Maybe 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:g-object-path 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 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, IsDBusConnection a) => a -> IO (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 => Text -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer -- | A DBusObjectSkeleton 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 -- | A convenience alias for Nothing :: Maybe -- DBusObjectSkeleton. noDBusObjectSkeleton :: Maybe 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 => Text -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectSkeletonAuthorizeMethodCallback = Ptr () -> Ptr DBusInterfaceSkeleton -> Ptr DBusMethodInvocation -> Ptr () -> IO CInt -- | Emitted when a method is invoked by a remote caller and used to -- determine if the method call is authorized. -- -- This signal is like -- 'GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton'\'s -- DBusInterfaceSkeleton::g-authorize-method -- signal, except that it is for the enclosing object. -- -- The default class handler just returns True. -- -- Since: 2.30 type DBusObjectSkeletonAuthorizeMethodCallback = DBusInterfaceSkeleton " /@interface@/: The 'GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton' that /@invocation@/ is for. " -> DBusMethodInvocation " /@invocation@/: A 'GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation'. " -> IO Bool " __Returns:__ 'True' if the call is authorized, 'False' otherwise. " -- | Connect a signal handler for the “authorize-method” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after dBusObjectSkeleton #authorizeMethod callback --afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectSkeletonAuthorizeMethod :: MonadIO m => DBusObjectSkeletonAuthorizeMethodCallback -> m (GClosure C_DBusObjectSkeletonAuthorizeMethodCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectSkeletonAuthorizeMethodCallback. mk_DBusObjectSkeletonAuthorizeMethodCallback :: C_DBusObjectSkeletonAuthorizeMethodCallback -> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectSkeletonAuthorizeMethodCallback. noDBusObjectSkeletonAuthorizeMethodCallback :: Maybe DBusObjectSkeletonAuthorizeMethodCallback -- | Connect a signal handler for the “authorize-method” 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 -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId -- | Wrap a DBusObjectSkeletonAuthorizeMethodCallback into a -- C_DBusObjectSkeletonAuthorizeMethodCallback. wrap_DBusObjectSkeletonAuthorizeMethodCallback :: DBusObjectSkeletonAuthorizeMethodCallback -> C_DBusObjectSkeletonAuthorizeMethodCallback 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.BasicTypes.GObject GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton -- | DBusServer 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 -- g_bus_own_name(). -- -- An example of peer-to-peer communication with G-DBus can be found in -- gdbus-example-peer.c. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- DBusServer. noDBusServer :: Maybe DBusServer -- | Gets a D-Bus address string that can be used by clients to -- connect to server. -- -- 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. -- -- 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. -- -- Connect to the DBusServer::new-connection -- 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. See -- g_dbus_server_new() for the 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 => Text -> IO (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, IsDBusAuthObserver a) => a -> IO (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 => [DBusServerFlags] -> IO (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 => Text -> IO (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 -- | Type for the callback on the (unwrapped) C side. type C_DBusServerNewConnectionCallback = Ptr () -> Ptr DBusConnection -> Ptr () -> IO CInt -- | 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 " /@connection@/: A 'GI.Gio.Objects.DBusConnection.DBusConnection' for the new connection. " -> IO Bool " __Returns:__ 'True' to claim /@connection@/, 'False' to let other handlers run. " -- | Connect a signal handler for the “new-connection” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after dBusServer #newConnection callback --afterDBusServerNewConnection :: (IsDBusServer a, MonadIO m) => a -> DBusServerNewConnectionCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusServerNewConnection :: MonadIO m => DBusServerNewConnectionCallback -> m (GClosure C_DBusServerNewConnectionCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusServerNewConnectionCallback. mk_DBusServerNewConnectionCallback :: C_DBusServerNewConnectionCallback -> IO (FunPtr C_DBusServerNewConnectionCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusServerNewConnectionCallback. noDBusServerNewConnectionCallback :: Maybe DBusServerNewConnectionCallback -- | Connect a signal handler for the “new-connection” 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 -> DBusServerNewConnectionCallback -> m SignalHandlerId -- | Wrap a DBusServerNewConnectionCallback into a -- C_DBusServerNewConnectionCallback. wrap_DBusServerNewConnectionCallback :: DBusServerNewConnectionCallback -> C_DBusServerNewConnectionCallback 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.BasicTypes.GObject GI.Gio.Objects.DBusServer.DBusServer instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusServer.DBusServer -- | DesktopAppInfo 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 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 -- | A convenience alias for Nothing :: Maybe -- DesktopAppInfo. noDesktopAppInfo :: Maybe DesktopAppInfo -- | Gets the user-visible display name of the "additional application -- action" 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 Text -- | When info was created from a known filename, return -- it. In some situations such as the DesktopAppInfo returned from -- desktopAppInfoNewFromKeyfile, this function will return -- Nothing. -- -- Since: 2.24 desktopAppInfoGetFilename :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m [Char] -- | Gets the generic name from the destkop file. desktopAppInfoGetGenericName :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m 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 -- 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 -- Nothing, 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 Nothing 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 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 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.0 desktopAppInfoGetStringList :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m ([Text], Word64) -- | 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-Nothing, 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 () -- | 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. 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 desktop -- entry fields. -- -- 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 => Text -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo -- | Emblem 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 -- | A convenience alias for Nothing :: Maybe Emblem. noEmblem :: Maybe 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, IsObject a) => a -> IO (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 => EmblemOrigin -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.Emblem.Emblem instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Emblem.Emblem -- | EmblemedIcon 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 EmblemedIcon 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 -- | A convenience alias for Nothing :: Maybe -- EmblemedIcon. noEmblemedIcon :: Maybe 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, IsIcon a) => a -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.EmblemedIcon.EmblemedIcon instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.EmblemedIcon.EmblemedIcon -- | FileIcon specifies an icon by pointing to an image file to be -- used as icon. 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 -- | A convenience alias for Nothing :: Maybe -- FileIcon. noFileIcon :: Maybe 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, IsFile a) => a -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.FileIcon.FileIcon instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileIcon.FileIcon -- | Monitors a file or directory for changes. -- -- To obtain a FileMonitor 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][g-main-context-push-thread-default] 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 -- | A convenience alias for Nothing :: Maybe -- FileMonitor. noFileMonitor :: Maybe 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 => Int32 -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_FileMonitorChangedCallback = Ptr () -> Ptr File -> Ptr File -> CUInt -> Ptr () -> IO () -- | 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 -- G_FILE_MONITOR_EVENT_MOVED, 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 " /@file@/: a 'GI.Gio.Interfaces.File.File'. " -> Maybe File " /@otherFile@/: a 'GI.Gio.Interfaces.File.File' or @/NULL/@. " -> FileMonitorEvent " /@eventType@/: a 'GI.Gio.Enums.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 --afterFileMonitorChanged :: (IsFileMonitor a, MonadIO m) => a -> FileMonitorChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_FileMonitorChanged :: MonadIO m => FileMonitorChangedCallback -> m (GClosure C_FileMonitorChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_FileMonitorChangedCallback. mk_FileMonitorChangedCallback :: C_FileMonitorChangedCallback -> IO (FunPtr C_FileMonitorChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- FileMonitorChangedCallback. noFileMonitorChangedCallback :: Maybe FileMonitorChangedCallback -- | 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 -> FileMonitorChangedCallback -> m SignalHandlerId -- | Wrap a FileMonitorChangedCallback into a -- C_FileMonitorChangedCallback. wrap_FileMonitorChangedCallback :: FileMonitorChangedCallback -> C_FileMonitorChangedCallback 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.BasicTypes.GObject GI.Gio.Objects.FileMonitor.FileMonitor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileMonitor.FileMonitor -- | 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 -- | A convenience alias for Nothing :: Maybe -- FilenameCompleter. noFilenameCompleter :: Maybe FilenameCompleter -- | Obtains a completion for initialText from -- completer. filenameCompleterGetCompletionSuffix :: (HasCallStack, MonadIO m, IsFilenameCompleter a) => a -> Text -> m 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 () -- | Type for the callback on the (unwrapped) C side. type C_FilenameCompleterGotCompletionDataCallback = Ptr () -> Ptr () -> IO () -- | Emitted when the file name completion information comes available. type FilenameCompleterGotCompletionDataCallback = IO () -- | Connect a signal handler for the “got-completion-data” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after filenameCompleter #gotCompletionData callback --afterFilenameCompleterGotCompletionData :: (IsFilenameCompleter a, MonadIO m) => a -> FilenameCompleterGotCompletionDataCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_FilenameCompleterGotCompletionData :: MonadIO m => FilenameCompleterGotCompletionDataCallback -> m (GClosure C_FilenameCompleterGotCompletionDataCallback) -- | Generate a function pointer callable from C code, from a -- C_FilenameCompleterGotCompletionDataCallback. mk_FilenameCompleterGotCompletionDataCallback :: C_FilenameCompleterGotCompletionDataCallback -> IO (FunPtr C_FilenameCompleterGotCompletionDataCallback) -- | A convenience synonym for Nothing :: Maybe -- FilenameCompleterGotCompletionDataCallback. noFilenameCompleterGotCompletionDataCallback :: Maybe FilenameCompleterGotCompletionDataCallback -- | Connect a signal handler for the “got-completion-data” -- 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 -> FilenameCompleterGotCompletionDataCallback -> m SignalHandlerId -- | Wrap a FilenameCompleterGotCompletionDataCallback into a -- C_FilenameCompleterGotCompletionDataCallback. wrap_FilenameCompleterGotCompletionDataCallback :: FilenameCompleterGotCompletionDataCallback -> C_FilenameCompleterGotCompletionDataCallback 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.BasicTypes.GObject GI.Gio.Objects.FilenameCompleter.FilenameCompleter instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FilenameCompleter.FilenameCompleter -- | The DBusAuthObserver type provides a mechanism for -- participating in how a DBusServer (or a DBusConnection) -- authenticates remote peers. Simply instantiate a -- DBusAuthObserver and connect to the signals you are interested -- in. Note that new signals may be added in the future -- -- # {auth-observer} -- -- For example, if you only want to allow D-Bus connections from -- processes owned by the same uid as the server, you would use a signal -- handler like the following: -- --
-- 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
-- | A convenience alias for Nothing :: Maybe
-- DBusAuthObserver.
noDBusAuthObserver :: Maybe DBusAuthObserver
-- | Emits the DBusAuthObserver::allow-mechanism
-- signal on observer.
--
-- Since: 2.34
dBusAuthObserverAllowMechanism :: (HasCallStack, MonadIO m, IsDBusAuthObserver a) => a -> Text -> m Bool
-- | Emits the
-- DBusAuthObserver::authorize-authenticated-peer
-- 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
-- | Type for the callback on the (unwrapped) C side.
type C_DBusAuthObserverAllowMechanismCallback = Ptr () -> CString -> Ptr () -> IO CInt
-- | Emitted to check if mechanism is allowed to be used.
--
-- Since: 2.34
type DBusAuthObserverAllowMechanismCallback = Text " /@mechanism@/: The name of the mechanism, e.g. @DBUS_COOKIE_SHA1@. " -> IO Bool " __Returns:__ 'True' if /@mechanism@/ can be used to authenticate the other peer, 'False' if not. "
-- | Connect a signal handler for the “allow-mechanism” signal, to
-- be run after the default handler. When overloading is enabled,
-- this is equivalent to
--
-- -- after dBusAuthObserver #allowMechanism callback --afterDBusAuthObserverAllowMechanism :: (IsDBusAuthObserver a, MonadIO m) => a -> DBusAuthObserverAllowMechanismCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusAuthObserverAllowMechanism :: MonadIO m => DBusAuthObserverAllowMechanismCallback -> m (GClosure C_DBusAuthObserverAllowMechanismCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusAuthObserverAllowMechanismCallback. mk_DBusAuthObserverAllowMechanismCallback :: C_DBusAuthObserverAllowMechanismCallback -> IO (FunPtr C_DBusAuthObserverAllowMechanismCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusAuthObserverAllowMechanismCallback. noDBusAuthObserverAllowMechanismCallback :: Maybe DBusAuthObserverAllowMechanismCallback -- | Connect a signal handler for the “allow-mechanism” 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 -> DBusAuthObserverAllowMechanismCallback -> m SignalHandlerId -- | Wrap a DBusAuthObserverAllowMechanismCallback into a -- C_DBusAuthObserverAllowMechanismCallback. wrap_DBusAuthObserverAllowMechanismCallback :: DBusAuthObserverAllowMechanismCallback -> C_DBusAuthObserverAllowMechanismCallback -- | Type for the callback on the (unwrapped) C side. type C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback = Ptr () -> Ptr IOStream -> Ptr Credentials -> Ptr () -> IO CInt -- | Emitted to check if a peer that is successfully authenticated is -- authorized. -- -- Since: 2.26 type DBusAuthObserverAuthorizeAuthenticatedPeerCallback = IOStream " /@stream@/: A 'GI.Gio.Objects.IOStream.IOStream' for the 'GI.Gio.Objects.DBusConnection.DBusConnection'. " -> Maybe Credentials " /@credentials@/: Credentials received from the peer or 'Nothing'. " -> IO Bool " __Returns:__ 'True' if the peer is authorized, 'False' if not. " -- | Connect a signal handler for the -- “authorize-authenticated-peer” signal, to be run after the -- default handler. When overloading is enabled, this is -- equivalent to -- --
-- after dBusAuthObserver #authorizeAuthenticatedPeer callback --afterDBusAuthObserverAuthorizeAuthenticatedPeer :: (IsDBusAuthObserver a, MonadIO m) => a -> DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusAuthObserverAuthorizeAuthenticatedPeer :: MonadIO m => DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> m (GClosure C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback. mk_DBusAuthObserverAuthorizeAuthenticatedPeerCallback :: C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> IO (FunPtr C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusAuthObserverAuthorizeAuthenticatedPeerCallback. noDBusAuthObserverAuthorizeAuthenticatedPeerCallback :: Maybe DBusAuthObserverAuthorizeAuthenticatedPeerCallback -- | Connect a signal handler for the -- “authorize-authenticated-peer” 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 -> DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> m SignalHandlerId -- | Wrap a DBusAuthObserverAuthorizeAuthenticatedPeerCallback into -- a C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback. wrap_DBusAuthObserverAuthorizeAuthenticatedPeerCallback :: DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback 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.BasicTypes.GObject GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver -- | InetAddress represents an IPv4 or IPv6 internet address. Use -- resolverLookupByName or resolverLookupByNameAsync to -- look up the InetAddress for a hostname. Use -- resolverLookupByAddress or resolverLookupByAddressAsync -- to look up the hostname for a InetAddress. -- -- To actually connect to a remote host, you will need a -- InetSocketAddress (which includes a InetAddress 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 -- | A convenience alias for Nothing :: Maybe -- InetAddress. noInetAddress :: Maybe 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 Word64 -- | 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 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 => Ptr () -> IO (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 => SocketFamily -> IO (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 (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.GObject GI.Gio.Objects.InetAddress.InetAddress instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InetAddress.InetAddress -- | InetAddressMask 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. Eg, "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 -- | A convenience alias for Nothing :: Maybe -- InetAddressMask. noInetAddressMask :: Maybe 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, IsInetAddress a) => a -> IO (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 => Word32 -> IO (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 (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.GObject GI.Gio.Objects.InetAddressMask.InetAddressMask instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InetAddressMask.InetAddressMask -- | 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 -- | A convenience alias for Nothing :: Maybe -- FilterInputStream. noFilterInputStream :: Maybe 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, IsInputStream a) => a -> IO (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 => Bool -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.FilterInputStream.FilterInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FilterInputStream.FilterInputStream -- | Converter input stream implements InputStream and allows -- conversion of data of various types during reading. -- -- As of GLib 2.34, ConverterInputStream 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 -- | A convenience alias for Nothing :: Maybe -- ConverterInputStream. noConverterInputStream :: Maybe 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, IsConverter a) => a -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.ConverterInputStream.ConverterInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ConverterInputStream.ConverterInputStream -- | ApplicationCommandLine represents a command-line invocation of -- an application. It is created by Application and emitted in the -- Application::command-line 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. The -- lifecycle of the originally-invoked process is tied to the lifecycle -- of this object (ie: the process exits when the last reference is -- dropped). -- -- The main use for ApplicationCommandLine (and the -- Application::command-line 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::command-line 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 comandline 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;
--
-- 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::command-line 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::command-line handler returns.
-- Instead, we keep a reference to the ApplicationCommandLine
-- 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
-- | A convenience alias for Nothing :: Maybe
-- ApplicationCommandLine.
noApplicationCommandLine :: Maybe 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
-- | 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 there were passed to
-- g_application_command_line().
--
-- If you did not override local_command_line() then
-- these are the same options that were parsed according to the
-- GOptionEntrys added to the application with
-- applicationAddMainOptionEntries and possibly modified from your
-- GApplication::handle-local-options handler.
--
-- If no options were sent then an empty dictionary is returned so that
-- you don't need to check for Nothing.
--
-- 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.
--
-- 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 DBus 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 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 Text
-- | Sets the exit status that will be used when the invoking process
-- exits.
--
-- The return value of the
-- Application::command-line 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.
--
-- 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 => GVariant -> IO (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 => GVariant -> IO (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 => GVariant -> IO (GValueConstruct o) 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.BasicTypes.GObject GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine -- | PollableInputStream is implemented by -- GInputStreams 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. -- -- Since: 2.28 module GI.Gio.Interfaces.PollableInputStream -- | Memory-managed wrapper type. newtype PollableInputStream PollableInputStream :: ManagedPtr PollableInputStream -> PollableInputStream -- | A convenience alias for Nothing :: Maybe -- PollableInputStream. noPollableInputStream :: Maybe 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. -- -- 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. -- -- 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. pollableInputStreamReadNonblocking :: (HasCallStack, MonadIO m, IsPollableInputStream a, IsCancellable b) => a -> Maybe ByteString -> Maybe b -> m Int64 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.GObject GI.Gio.Interfaces.PollableInputStream.PollableInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.PollableInputStream.PollableInputStream -- | ListStore 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 -- | A convenience alias for Nothing :: Maybe -- ListStore. noListStore :: Maybe ListStore -- | Appends item to store. -- item must be of type -- ListStore:item-type. -- -- 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 () -- | Inserts item into store at -- position. item must be of type -- ListStore:item-type or derived from it. -- position must be smaller than the length of the list, -- or equal to it to append. -- -- This function takes a ref on item. -- -- 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:item-type. -- Nothing is not permitted. -- -- This function is more efficient than listStoreInsert and -- listStoreRemove, because it only emits -- ListModel::items-changed 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 => GType -> IO (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 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.GObject GI.Gio.Objects.ListStore.ListStore instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ListStore.ListStore -- | MemoryInputStream is a class for using arbitrary memory chunks -- as input for GIO streaming input operations. -- -- As of GLib 2.34, MemoryInputStream 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 -- | A convenience alias for Nothing :: Maybe -- MemoryInputStream. noMemoryInputStream :: Maybe 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 (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.GObject GI.Gio.Objects.MemoryInputStream.MemoryInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MemoryInputStream.MemoryInputStream -- | 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 -- | A convenience alias for Nothing :: Maybe -- MenuAttributeIter. noMenuAttributeIter :: Maybe 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 (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.GObject GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MenuAttributeIter.MenuAttributeIter -- | 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 -- | A convenience alias for Nothing :: Maybe -- MenuLinkIter. noMenuLinkIter :: Maybe 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 (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.GObject GI.Gio.Objects.MenuLinkIter.MenuLinkIter instance Data.GI.Base.Overloading.HasParentTypes 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 -- | A convenience alias for Nothing :: Maybe -- MenuItem. noMenuItem :: Maybe 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 GVariant -- | Queries the named link on menuItem. -- -- Since: 2.34 menuItemGetLink :: (HasCallStack, MonadIO m, IsMenuItem a) => a -> Text -> m 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 encorporated into this visual indication. This allows for labeled -- subsections of a menu. -- -- As a simple example, consider a typical "Edit" menu from a simple -- program. It probably contains an "Undo" and "Redo" item, followed by a -- separator, followed by "Cut", "Copy" and "Paste". -- -- This would be accomplished by creating three 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: > -- >id='edit-menu' > section > -- label='Undo'/ > label='Redo'/ > /section -- > section > label='Cut'/ > label='Copy'/ -- > 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). > -- >id='edit-menu' > item > name='section' -- > label='Undo'/ > label='Redo'/ > /link -- > /item > item > name='section' > -- label='Cut'/ > label='Copy'/ > -- 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 (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.GObject GI.Gio.Objects.MenuItem.MenuItem instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MenuItem.MenuItem -- | Menu is a simple implementation of MenuModel. You -- populate a Menu 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 -- | A convenience alias for Nothing :: Maybe Menu. noMenu :: Maybe 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 (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.GObject GI.Gio.Objects.Menu.Menu instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Menu.Menu -- | DBusMenuModel 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 -- | A convenience alias for Nothing :: Maybe -- DBusMenuModel. noDBusMenuModel :: Maybe 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 (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.BasicTypes.GObject GI.Gio.Objects.DBusMenuModel.DBusMenuModel instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusMenuModel.DBusMenuModel -- | MenuModel 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 MenuModel is hierarchical: -- sections and submenus are again represented by -- GMenuModels. Menus themselves do not define their own -- roles. Rather, the role of a particular MenuModel 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: -- -- # {menu-example} -- -- -- There are 8 "menus" visible in the screenshot: one menubar, two -- submenus and 5 sections: -- --
-- after menuModel #itemsChanged callback --afterMenuModelItemsChanged :: (IsMenuModel a, MonadIO m) => a -> MenuModelItemsChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MenuModelItemsChanged :: MonadIO m => MenuModelItemsChangedCallback -> m (GClosure C_MenuModelItemsChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_MenuModelItemsChangedCallback. mk_MenuModelItemsChangedCallback :: C_MenuModelItemsChangedCallback -> IO (FunPtr C_MenuModelItemsChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- MenuModelItemsChangedCallback. noMenuModelItemsChangedCallback :: Maybe MenuModelItemsChangedCallback -- | Connect a signal handler for the “items-changed” 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 -> MenuModelItemsChangedCallback -> m SignalHandlerId -- | Wrap a MenuModelItemsChangedCallback into a -- C_MenuModelItemsChangedCallback. wrap_MenuModelItemsChangedCallback :: MenuModelItemsChangedCallback -> C_MenuModelItemsChangedCallback 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.GObject GI.Gio.Objects.MenuModel.MenuModel instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MenuModel.MenuModel -- | MountOperation 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 MountOperation 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 -- Nothing can be passed, see each method taking a -- MountOperation for details. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- MountOperation. noMountOperation :: Maybe 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 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 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 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 -> 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 -> 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 -> 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 => Bool -> IO (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 => Int32 -> IO (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 () -- | Construct a GValueConstruct with valid value for the -- “domain” property. This is rarely needed directly, but it is -- used by new. constructMountOperationDomain :: IsMountOperation o => Text -> IO (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 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 => Bool -> IO (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 => Bool -> IO (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 () -- | Construct a GValueConstruct with valid value for the -- “password” property. This is rarely needed directly, but it -- is used by new. constructMountOperationPassword :: IsMountOperation o => Text -> IO (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 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 => PasswordSave -> IO (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 => Word32 -> IO (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 () -- | Construct a GValueConstruct with valid value for the -- “username” property. This is rarely needed directly, but it -- is used by new. constructMountOperationUsername :: IsMountOperation o => Text -> IO (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 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 () -- | Type for the callback on the (unwrapped) C side. type C_MountOperationAbortedCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> MountOperationAbortedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountOperationAborted :: MonadIO m => MountOperationAbortedCallback -> m (GClosure C_MountOperationAbortedCallback) -- | Generate a function pointer callable from C code, from a -- C_MountOperationAbortedCallback. mk_MountOperationAbortedCallback :: C_MountOperationAbortedCallback -> IO (FunPtr C_MountOperationAbortedCallback) -- | A convenience synonym for Nothing :: Maybe -- MountOperationAbortedCallback. noMountOperationAbortedCallback :: Maybe MountOperationAbortedCallback -- | 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 -> MountOperationAbortedCallback -> m SignalHandlerId -- | Wrap a MountOperationAbortedCallback into a -- C_MountOperationAbortedCallback. wrap_MountOperationAbortedCallback :: MountOperationAbortedCallback -> C_MountOperationAbortedCallback -- | Type for the callback on the (unwrapped) C side. type C_MountOperationAskPasswordCallback = Ptr () -> CString -> CString -> CString -> CUInt -> Ptr () -> IO () -- | 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 " /@message@/: string containing a message to display to the user. " -> Text " /@defaultUser@/: string containing the default user name. " -> Text " /@defaultDomain@/: string containing the default domain. " -> [AskPasswordFlags] " /@flags@/: a set of 'GI.Gio.Flags.AskPasswordFlags'. " -> IO () -- | Connect a signal handler for the “ask-password” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after mountOperation #askPassword callback --afterMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskPasswordCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountOperationAskPassword :: MonadIO m => MountOperationAskPasswordCallback -> m (GClosure C_MountOperationAskPasswordCallback) -- | Generate a function pointer callable from C code, from a -- C_MountOperationAskPasswordCallback. mk_MountOperationAskPasswordCallback :: C_MountOperationAskPasswordCallback -> IO (FunPtr C_MountOperationAskPasswordCallback) -- | A convenience synonym for Nothing :: Maybe -- MountOperationAskPasswordCallback. noMountOperationAskPasswordCallback :: Maybe MountOperationAskPasswordCallback -- | Connect a signal handler for the “ask-password” 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 -> MountOperationAskPasswordCallback -> m SignalHandlerId -- | Wrap a MountOperationAskPasswordCallback into a -- C_MountOperationAskPasswordCallback. wrap_MountOperationAskPasswordCallback :: MountOperationAskPasswordCallback -> C_MountOperationAskPasswordCallback -- | Type for the callback on the (unwrapped) C side. type C_MountOperationAskQuestionCallback = Ptr () -> CString -> Ptr CString -> Ptr () -> IO () -- | 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 " /@message@/: string containing a message to display to the user. " -> [Text] " /@choices@/: an array of strings for each possible choice. " -> IO () -- | Connect a signal handler for the “ask-question” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after mountOperation #askQuestion callback --afterMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskQuestionCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountOperationAskQuestion :: MonadIO m => MountOperationAskQuestionCallback -> m (GClosure C_MountOperationAskQuestionCallback) -- | Generate a function pointer callable from C code, from a -- C_MountOperationAskQuestionCallback. mk_MountOperationAskQuestionCallback :: C_MountOperationAskQuestionCallback -> IO (FunPtr C_MountOperationAskQuestionCallback) -- | A convenience synonym for Nothing :: Maybe -- MountOperationAskQuestionCallback. noMountOperationAskQuestionCallback :: Maybe MountOperationAskQuestionCallback -- | Connect a signal handler for the “ask-question” 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 -> MountOperationAskQuestionCallback -> m SignalHandlerId -- | Wrap a MountOperationAskQuestionCallback into a -- C_MountOperationAskQuestionCallback. wrap_MountOperationAskQuestionCallback :: MountOperationAskQuestionCallback -> C_MountOperationAskQuestionCallback -- | Type for the callback on the (unwrapped) C side. type C_MountOperationReplyCallback = Ptr () -> CUInt -> Ptr () -> IO () -- | Emitted when the user has replied to the mount operation. type MountOperationReplyCallback = MountOperationResult " /@result@/: a 'GI.Gio.Enums.MountOperationResult' indicating how the request was handled " -> 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 --afterMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> MountOperationReplyCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountOperationReply :: MonadIO m => MountOperationReplyCallback -> m (GClosure C_MountOperationReplyCallback) -- | Generate a function pointer callable from C code, from a -- C_MountOperationReplyCallback. mk_MountOperationReplyCallback :: C_MountOperationReplyCallback -> IO (FunPtr C_MountOperationReplyCallback) -- | A convenience synonym for Nothing :: Maybe -- MountOperationReplyCallback. noMountOperationReplyCallback :: Maybe MountOperationReplyCallback -- | 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 -> MountOperationReplyCallback -> m SignalHandlerId -- | Wrap a MountOperationReplyCallback into a -- C_MountOperationReplyCallback. wrap_MountOperationReplyCallback :: MountOperationReplyCallback -> C_MountOperationReplyCallback -- | Type for the callback on the (unwrapped) C side. type C_MountOperationShowProcessesCallback = Ptr () -> CString -> Ptr (GArray Int32) -> Ptr CString -> Ptr () -> IO () -- | 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 " /@message@/: string containing a message to display to the user. " -> [Int32] " /@processes@/: an array of @/GPid/@ for processes blocking the operation. " -> [Text] " /@choices@/: an array of strings for each possible choice. " -> IO () -- | Connect a signal handler for the “show-processes” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after mountOperation #showProcesses callback --afterMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowProcessesCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountOperationShowProcesses :: MonadIO m => MountOperationShowProcessesCallback -> m (GClosure C_MountOperationShowProcessesCallback) -- | Generate a function pointer callable from C code, from a -- C_MountOperationShowProcessesCallback. mk_MountOperationShowProcessesCallback :: C_MountOperationShowProcessesCallback -> IO (FunPtr C_MountOperationShowProcessesCallback) -- | A convenience synonym for Nothing :: Maybe -- MountOperationShowProcessesCallback. noMountOperationShowProcessesCallback :: Maybe MountOperationShowProcessesCallback -- | Connect a signal handler for the “show-processes” 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 -> MountOperationShowProcessesCallback -> m SignalHandlerId -- | Wrap a MountOperationShowProcessesCallback into a -- C_MountOperationShowProcessesCallback. wrap_MountOperationShowProcessesCallback :: MountOperationShowProcessesCallback -> C_MountOperationShowProcessesCallback -- | Type for the callback on the (unwrapped) C side. type C_MountOperationShowUnmountProgressCallback = Ptr () -> CString -> Int64 -> Int64 -> Ptr () -> IO () -- | 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 " /@message@/: string containing a mesage to display to the user " -> Int64 " /@timeLeft@/: the estimated time left before the operation completes, in microseconds, or -1 " -> Int64 " /@bytesLeft@/: the amount of bytes to be written before the operation completes (or -1 if such amount is not known), or zero if the operation is completed " -> IO () -- | Connect a signal handler for the “show-unmount-progress” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after mountOperation #showUnmountProgress callback --afterMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowUnmountProgressCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountOperationShowUnmountProgress :: MonadIO m => MountOperationShowUnmountProgressCallback -> m (GClosure C_MountOperationShowUnmountProgressCallback) -- | Generate a function pointer callable from C code, from a -- C_MountOperationShowUnmountProgressCallback. mk_MountOperationShowUnmountProgressCallback :: C_MountOperationShowUnmountProgressCallback -> IO (FunPtr C_MountOperationShowUnmountProgressCallback) -- | A convenience synonym for Nothing :: Maybe -- MountOperationShowUnmountProgressCallback. noMountOperationShowUnmountProgressCallback :: Maybe MountOperationShowUnmountProgressCallback -- | Connect a signal handler for the “show-unmount-progress” -- 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 -> MountOperationShowUnmountProgressCallback -> m SignalHandlerId -- | Wrap a MountOperationShowUnmountProgressCallback into a -- C_MountOperationShowUnmountProgressCallback. wrap_MountOperationShowUnmountProgressCallback :: MountOperationShowUnmountProgressCallback -> C_MountOperationShowUnmountProgressCallback 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.GObject GI.Gio.Objects.MountOperation.MountOperation instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MountOperation.MountOperation -- | NetworkAddress 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. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- NetworkAddress. noNetworkAddress :: Maybe 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 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 GNetworkAddresses 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 => Text -> IO (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 => Word32 -> IO (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 => Text -> IO (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 Text 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.GObject GI.Gio.Objects.NetworkAddress.NetworkAddress instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.NetworkAddress.NetworkAddress -- | Like NetworkAddress does with hostnames, NetworkService -- 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 -- | A convenience alias for Nothing :: Maybe -- NetworkService. noNetworkService :: Maybe 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 -- | Get's 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 => Text -> IO (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 => Text -> IO (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 => Text -> IO (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 => Text -> IO (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 (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.GObject GI.Gio.Objects.NetworkService.NetworkService instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.NetworkService.NetworkService -- | A Application 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 the always the current -- instance. On Linux, the D-Bus session bus is used for communication. -- -- The use of Application 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 Application 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 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 -- applicationGetIsRemote 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 -- GMenuModels. -- -- 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, IsActionGroup a) => a -> IO (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 => Text -> IO (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 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 => [ApplicationFlags] -> IO (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 => Word32 -> IO (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 => Text -> IO (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 () -- | The ::activate signal is emitted on the primary instance when an -- activation occurs. See applicationActivate. type ApplicationActivateCallback = IO () -- | Type for the callback on the (unwrapped) C side. type C_ApplicationActivateCallback = Ptr () -> Ptr () -> 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 --afterApplicationActivate :: (IsApplication a, MonadIO m) => a -> ApplicationActivateCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ApplicationActivate :: MonadIO m => ApplicationActivateCallback -> m (GClosure C_ApplicationActivateCallback) -- | Generate a function pointer callable from C code, from a -- C_ApplicationActivateCallback. mk_ApplicationActivateCallback :: C_ApplicationActivateCallback -> IO (FunPtr C_ApplicationActivateCallback) -- | A convenience synonym for Nothing :: Maybe -- ApplicationActivateCallback. noApplicationActivateCallback :: Maybe ApplicationActivateCallback -- | 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 -> ApplicationActivateCallback -> m SignalHandlerId -- | Wrap a ApplicationActivateCallback into a -- C_ApplicationActivateCallback. wrap_ApplicationActivateCallback :: ApplicationActivateCallback -> C_ApplicationActivateCallback -- | The ::command-line 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 " /@commandLine@/: a 'GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine' representing the passed commandline " -> IO Int32 " __Returns:__ An integer that is set as the exit status for the calling process. See 'GI.Gio.Objects.ApplicationCommandLine.applicationCommandLineSetExitStatus'. " -- | Type for the callback on the (unwrapped) C side. type C_ApplicationCommandLineCallback = Ptr () -> Ptr ApplicationCommandLine -> Ptr () -> IO Int32 -- | Connect a signal handler for the “command-line” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after application #commandLine callback --afterApplicationCommandLine :: (IsApplication a, MonadIO m) => a -> ApplicationCommandLineCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ApplicationCommandLine :: MonadIO m => ApplicationCommandLineCallback -> m (GClosure C_ApplicationCommandLineCallback) -- | Generate a function pointer callable from C code, from a -- C_ApplicationCommandLineCallback. mk_ApplicationCommandLineCallback :: C_ApplicationCommandLineCallback -> IO (FunPtr C_ApplicationCommandLineCallback) -- | A convenience synonym for Nothing :: Maybe -- ApplicationCommandLineCallback. noApplicationCommandLineCallback :: Maybe ApplicationCommandLineCallback -- | Connect a signal handler for the “command-line” 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 -> ApplicationCommandLineCallback -> m SignalHandlerId -- | Wrap a ApplicationCommandLineCallback into a -- C_ApplicationCommandLineCallback. wrap_ApplicationCommandLineCallback :: ApplicationCommandLineCallback -> C_ApplicationCommandLineCallback -- | The ::handle-local-options 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 " /@options@/: the options dictionary " -> IO Int32 " __Returns:__ an exit code. If you have handled your options and want to exit the process, return a non-negative option, 0 for success, and a positive value for failure. To continue, return -1 to let the default option processing continue. " -- | Type for the callback on the (unwrapped) C side. type C_ApplicationHandleLocalOptionsCallback = Ptr () -> Ptr VariantDict -> Ptr () -> IO Int32 -- | Connect a signal handler for the “handle-local-options” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after application #handleLocalOptions callback --afterApplicationHandleLocalOptions :: (IsApplication a, MonadIO m) => a -> ApplicationHandleLocalOptionsCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ApplicationHandleLocalOptions :: MonadIO m => ApplicationHandleLocalOptionsCallback -> m (GClosure C_ApplicationHandleLocalOptionsCallback) -- | Generate a function pointer callable from C code, from a -- C_ApplicationHandleLocalOptionsCallback. mk_ApplicationHandleLocalOptionsCallback :: C_ApplicationHandleLocalOptionsCallback -> IO (FunPtr C_ApplicationHandleLocalOptionsCallback) -- | A convenience synonym for Nothing :: Maybe -- ApplicationHandleLocalOptionsCallback. noApplicationHandleLocalOptionsCallback :: Maybe ApplicationHandleLocalOptionsCallback -- | Connect a signal handler for the “handle-local-options” -- 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 -> ApplicationHandleLocalOptionsCallback -> m SignalHandlerId -- | Wrap a ApplicationHandleLocalOptionsCallback into a -- C_ApplicationHandleLocalOptionsCallback. wrap_ApplicationHandleLocalOptionsCallback :: ApplicationHandleLocalOptionsCallback -> C_ApplicationHandleLocalOptionsCallback -- | The ::name-lost signal is emitted only on the registered primary -- instance when a new instance has taken over. This can only happen if -- the application is using the ApplicationFlagsAllowReplacement -- flag. -- -- The default handler for this signal calls applicationQuit. -- -- Since: 2.60 type ApplicationNameLostCallback = IO Bool " __Returns:__ 'True' if the signal has been handled " -- | Type for the callback on the (unwrapped) C side. type C_ApplicationNameLostCallback = Ptr () -> Ptr () -> IO CInt -- | Connect a signal handler for the “name-lost” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after application #nameLost callback --afterApplicationNameLost :: (IsApplication a, MonadIO m) => a -> ApplicationNameLostCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ApplicationNameLost :: MonadIO m => ApplicationNameLostCallback -> m (GClosure C_ApplicationNameLostCallback) -- | Generate a function pointer callable from C code, from a -- C_ApplicationNameLostCallback. mk_ApplicationNameLostCallback :: C_ApplicationNameLostCallback -> IO (FunPtr C_ApplicationNameLostCallback) -- | A convenience synonym for Nothing :: Maybe -- ApplicationNameLostCallback. noApplicationNameLostCallback :: Maybe ApplicationNameLostCallback -- | Connect a signal handler for the “name-lost” 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 -> ApplicationNameLostCallback -> m SignalHandlerId -- | Wrap a ApplicationNameLostCallback into a -- C_ApplicationNameLostCallback. wrap_ApplicationNameLostCallback :: ApplicationNameLostCallback -> C_ApplicationNameLostCallback -- | The ::open signal is emitted on the primary instance when there are -- files to open. See applicationOpen for more information. type ApplicationOpenCallback = [File] " /@files@/: an array of @/GFiles/@ " -> Text " /@hint@/: a hint provided by the calling instance " -> IO () -- | Type for the callback on the (unwrapped) C side. type C_ApplicationOpenCallback = Ptr () -> Ptr (Ptr File) -> Int32 -> CString -> Ptr () -> 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 --afterApplicationOpen :: (IsApplication a, MonadIO m) => a -> ApplicationOpenCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ApplicationOpen :: MonadIO m => ApplicationOpenCallback -> m (GClosure C_ApplicationOpenCallback) -- | Generate a function pointer callable from C code, from a -- C_ApplicationOpenCallback. mk_ApplicationOpenCallback :: C_ApplicationOpenCallback -> IO (FunPtr C_ApplicationOpenCallback) -- | A convenience synonym for Nothing :: Maybe -- ApplicationOpenCallback. noApplicationOpenCallback :: Maybe ApplicationOpenCallback -- | 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 -> ApplicationOpenCallback -> m SignalHandlerId -- | Wrap a ApplicationOpenCallback into a -- C_ApplicationOpenCallback. wrap_ApplicationOpenCallback :: ApplicationOpenCallback -> C_ApplicationOpenCallback -- | The ::shutdown signal is emitted only on the registered primary -- instance immediately after the main loop terminates. type ApplicationShutdownCallback = IO () -- | Type for the callback on the (unwrapped) C side. type C_ApplicationShutdownCallback = Ptr () -> Ptr () -> 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 --afterApplicationShutdown :: (IsApplication a, MonadIO m) => a -> ApplicationShutdownCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ApplicationShutdown :: MonadIO m => ApplicationShutdownCallback -> m (GClosure C_ApplicationShutdownCallback) -- | Generate a function pointer callable from C code, from a -- C_ApplicationShutdownCallback. mk_ApplicationShutdownCallback :: C_ApplicationShutdownCallback -> IO (FunPtr C_ApplicationShutdownCallback) -- | A convenience synonym for Nothing :: Maybe -- ApplicationShutdownCallback. noApplicationShutdownCallback :: Maybe ApplicationShutdownCallback -- | 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 -> ApplicationShutdownCallback -> m SignalHandlerId -- | Wrap a ApplicationShutdownCallback into a -- C_ApplicationShutdownCallback. wrap_ApplicationShutdownCallback :: ApplicationShutdownCallback -> C_ApplicationShutdownCallback -- | The ::startup signal is emitted on the primary instance immediately -- after registration. See applicationRegister. type ApplicationStartupCallback = IO () -- | Type for the callback on the (unwrapped) C side. type C_ApplicationStartupCallback = Ptr () -> Ptr () -> 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 --afterApplicationStartup :: (IsApplication a, MonadIO m) => a -> ApplicationStartupCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ApplicationStartup :: MonadIO m => ApplicationStartupCallback -> m (GClosure C_ApplicationStartupCallback) -- | Generate a function pointer callable from C code, from a -- C_ApplicationStartupCallback. mk_ApplicationStartupCallback :: C_ApplicationStartupCallback -> IO (FunPtr C_ApplicationStartupCallback) -- | A convenience synonym for Nothing :: Maybe -- ApplicationStartupCallback. noApplicationStartupCallback :: Maybe ApplicationStartupCallback -- | 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 -> ApplicationStartupCallback -> m SignalHandlerId -- | Wrap a ApplicationStartupCallback into a -- C_ApplicationStartupCallback. wrap_ApplicationStartupCallback :: ApplicationStartupCallback -> C_ApplicationStartupCallback 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.BasicTypes.GObject GI.Gio.Objects.Application.Application instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Application.Application -- | Notification 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 Notification and other similar APIs -- is that, if supported by the desktop environment, notifications sent -- with Notification 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 Notification should be able to -- be started as a D-Bus service, using Application. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- Notification. noNotification :: Maybe 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 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. -- -- 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 of notificationSetPriority. notificationSetUrgent :: (HasCallStack, MonadIO m, IsNotification a) => a -> Bool -> m () 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.GObject GI.Gio.Objects.Notification.Notification instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Notification.Notification -- | MemoryOutputStream is a class for using arbitrary memory chunks -- as output for GIO streaming output operations. -- -- As of GLib 2.34, MemoryOutputStream 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 -- | A convenience alias for Nothing :: Maybe -- MemoryOutputStream. noMemoryOutputStream :: Maybe 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 Word64 -- | 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 Word64 -- | 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 => Ptr () -> IO (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 => CULong -> IO (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 (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.GObject GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream -- | 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 -- | A convenience alias for Nothing :: Maybe -- FilterOutputStream. noFilterOutputStream :: Maybe 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, IsOutputStream a) => a -> IO (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 => Bool -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.FilterOutputStream.FilterOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FilterOutputStream.FilterOutputStream -- | 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 -- | A convenience alias for Nothing :: Maybe -- DataOutputStream. noDataOutputStream :: Maybe 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 => DataStreamByteOrder -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.DataOutputStream.DataOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DataOutputStream.DataOutputStream -- | Converter output stream implements OutputStream and allows -- conversion of data of various types during reading. -- -- As of GLib 2.34, ConverterOutputStream 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 -- | A convenience alias for Nothing :: Maybe -- ConverterOutputStream. noConverterOutputStream :: Maybe 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, IsConverter a) => a -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream -- | Buffered output stream implements FilterOutputStream and -- provides for buffered writes. -- -- By default, -- 'GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream'\'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 -- | A convenience alias for Nothing :: Maybe -- BufferedOutputStream. noBufferedOutputStream :: Maybe 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 Word64 -- | 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 -> Word64 -> 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 -> Word64 -> 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 => Bool -> IO (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 => Word32 -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream -- | A PropertyAction 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 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 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 GVariant 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). PropertyAction 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 combobox -- 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 -- | A convenience alias for Nothing :: Maybe -- PropertyAction. noPropertyAction :: Maybe 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 => Bool -> IO (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 => Text -> IO (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, IsObject a) => a -> IO (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 => Text -> IO (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 (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.GObject GI.Gio.Objects.PropertyAction.PropertyAction instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.PropertyAction.PropertyAction -- | The SettingsBackend 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 SettingsBackend interface and then make it implement the -- extension point 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 SettingsBackend functions accept or return a -- Tree. These trees always have strings as keys and -- GVariant as values. -- g_settings_backend_create_tree() is a convenience -- function to create suitable trees. -- -- The SettingsBackend 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 -- | A convenience alias for Nothing :: Maybe -- SettingsBackend. noSettingsBackend :: Maybe 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 (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.GObject GI.Gio.Objects.SettingsBackend.SettingsBackend instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SettingsBackend.SettingsBackend -- | A SimpleAction 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. -- -- See also GtkAction. 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 -- | A convenience alias for Nothing :: Maybe -- SimpleAction. noSimpleAction :: Maybe 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 => Bool -> IO (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 => Text -> IO (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 => VariantType -> IO (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 => GVariant -> IO (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) -- | Type for the callback on the (unwrapped) C side. type C_SimpleActionActivateCallback = Ptr () -> Ptr GVariant -> Ptr () -> IO () -- | 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::change-state signal. For stateful -- actions where the state type is equal to the parameter type, the -- default is to forward them directly to -- SimpleAction::change-state. This should allow -- almost all users of SimpleAction to connect only one handler or -- the other. -- -- Since: 2.28 type SimpleActionActivateCallback = Maybe GVariant " /@parameter@/: the parameter to the activation, or 'Nothing' if it has no parameter " -> 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 --afterSimpleActionActivate :: (IsSimpleAction a, MonadIO m) => a -> SimpleActionActivateCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SimpleActionActivate :: MonadIO m => SimpleActionActivateCallback -> m (GClosure C_SimpleActionActivateCallback) -- | Generate a function pointer callable from C code, from a -- C_SimpleActionActivateCallback. mk_SimpleActionActivateCallback :: C_SimpleActionActivateCallback -> IO (FunPtr C_SimpleActionActivateCallback) -- | A convenience synonym for Nothing :: Maybe -- SimpleActionActivateCallback. noSimpleActionActivateCallback :: Maybe SimpleActionActivateCallback -- | 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 -> SimpleActionActivateCallback -> m SignalHandlerId -- | Wrap a SimpleActionActivateCallback into a -- C_SimpleActionActivateCallback. wrap_SimpleActionActivateCallback :: SimpleActionActivateCallback -> C_SimpleActionActivateCallback -- | Type for the callback on the (unwrapped) C side. type C_SimpleActionChangeStateCallback = Ptr () -> Ptr GVariant -> Ptr () -> IO () -- | 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 " /@value@/: the requested value for the state " -> IO ()
-- | Connect a signal handler for the “change-state” signal, to be
-- run after the default handler. When overloading is enabled,
-- this is equivalent to
--
-- -- after simpleAction #changeState callback --afterSimpleActionChangeState :: (IsSimpleAction a, MonadIO m) => a -> SimpleActionChangeStateCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SimpleActionChangeState :: MonadIO m => SimpleActionChangeStateCallback -> m (GClosure C_SimpleActionChangeStateCallback) -- | Generate a function pointer callable from C code, from a -- C_SimpleActionChangeStateCallback. mk_SimpleActionChangeStateCallback :: C_SimpleActionChangeStateCallback -> IO (FunPtr C_SimpleActionChangeStateCallback) -- | A convenience synonym for Nothing :: Maybe -- SimpleActionChangeStateCallback. noSimpleActionChangeStateCallback :: Maybe SimpleActionChangeStateCallback -- | Connect a signal handler for the “change-state” 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 -> SimpleActionChangeStateCallback -> m SignalHandlerId -- | Wrap a SimpleActionChangeStateCallback into a -- C_SimpleActionChangeStateCallback. wrap_SimpleActionChangeStateCallback :: SimpleActionChangeStateCallback -> C_SimpleActionChangeStateCallback 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.GObject GI.Gio.Objects.SimpleAction.SimpleAction instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleAction.SimpleAction -- | 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 unixInputStreamNew or -- g_win32_input_stream_new(), 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 -- | A convenience alias for Nothing :: Maybe -- SimpleIOStream. noSimpleIOStream :: Maybe 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, IsInputStream a) => a -> IO (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, IsOutputStream a) => a -> IO (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 (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.GObject GI.Gio.Objects.SimpleIOStream.SimpleIOStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleIOStream.SimpleIOStream -- | SimplePermission 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 request or release 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 -- | A convenience alias for Nothing :: Maybe -- SimplePermission. noSimplePermission :: Maybe 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 (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.GObject GI.Gio.Objects.SimplePermission.SimplePermission instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimplePermission.SimplePermission -- | SimpleProxyResolver 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. -- -- SimpleProxyResolver 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 -- | A convenience alias for Nothing :: Maybe -- SimpleProxyResolver. noSimpleProxyResolver :: Maybe SimpleProxyResolver -- | Creates a new SimpleProxyResolver. See -- SimpleProxyResolver:default-proxy and -- SimpleProxyResolver:ignore-hosts 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:ignore-hosts 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 -> Text -> m () -- | Sets the list of ignored hosts. -- -- See SimpleProxyResolver:ignore-hosts 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:ignore-hosts) will be -- proxied via proxy. -- -- As with SimpleProxyResolver:default-proxy, 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 () -- | 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 => Text -> IO (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 () -- | Set the value of the “ignore-hosts” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #ignoreHosts --clearSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> 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 => [Text] -> IO (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 (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.GObject GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver -- | Support for proxied InetSocketAddress. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- ProxyAddress. noProxyAddress :: Maybe 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 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 Text -- | Gets proxy's username. -- -- Since: 2.26 proxyAddressGetUsername :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m 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:destination-protocol 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 => Text -> IO (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 => Word32 -> IO (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 => Text -> IO (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 => Text -> IO (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 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 => Text -> IO (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 => Text -> IO (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 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 => Text -> IO (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 Text 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.GObject GI.Gio.Objects.ProxyAddress.ProxyAddress instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ProxyAddress.ProxyAddress -- | An IPv4 or IPv6 socket address; that is, the combination of a -- InetAddress and a port number. 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 -- | A convenience alias for Nothing :: Maybe -- InetSocketAddress. noInetSocketAddress :: Maybe 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 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, IsInetAddress a) => a -> IO (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 => Word32 -> IO (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 => Word32 -> IO (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 => Word32 -> IO (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 (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.GObject GI.Gio.Objects.InetSocketAddress.InetSocketAddress instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InetSocketAddress.InetSocketAddress -- | SocketAddress is the equivalent of struct sockaddr 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 -- | A convenience alias for Nothing :: Maybe -- SocketAddress. noSocketAddress :: Maybe 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 () -> Word64 -> 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 () -> Word64 -> 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 (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.GObject GI.Gio.Objects.SocketAddress.SocketAddress instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketAddress.SocketAddress -- | ProxyAddressEnumerator is a wrapper around -- SocketAddressEnumerator which takes the SocketAddress -- instances returned by the SocketAddressEnumerator and wraps -- them in ProxyAddress instances, using the given -- ProxyAddressEnumerator:proxy-resolver. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- ProxyAddressEnumerator. noProxyAddressEnumerator :: Maybe 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, IsSocketConnectable a) => a -> IO (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 => Word32 -> IO (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, IsProxyResolver a) => a -> IO (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 => Text -> IO (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 (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.GObject GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator -- | Objects that describe one or more potential socket endpoints implement -- SocketConnectable. 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
-- | A convenience alias for Nothing :: Maybe
-- SocketConnectable.
noSocketConnectable :: Maybe 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
-- GProxyAddresses for 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 (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.GObject GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.SocketConnectable.SocketConnectable
-- | A SocketControlMessage 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 GType typesystem 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
-- | A convenience alias for Nothing :: Maybe
-- SocketControlMessage.
noSocketControlMessage :: Maybe 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 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 Word64
-- | 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 (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.GObject GI.Gio.Objects.SocketControlMessage.SocketControlMessage
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketControlMessage.SocketControlMessage
-- | A SocketService 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 SocketService 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
-- SocketService. The first is to create the service using
-- socketServiceNew and to connect to the
-- SocketService::incoming signal. The second is
-- to subclass SocketService 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][g-main-context-push-thread-default-context] 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
-- | A convenience alias for Nothing :: Maybe
-- SocketService.
noSocketService :: Maybe 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 => Bool -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_SocketServiceIncomingCallback = Ptr () -> Ptr SocketConnection -> Ptr Object -> Ptr () -> IO CInt -- | 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 " /@connection@/: a new 'GI.Gio.Objects.SocketConnection.SocketConnection' object " -> Maybe Object " /@sourceObject@/: the source_object passed to 'GI.Gio.Objects.SocketListener.socketListenerAddAddress' " -> IO Bool " __Returns:__ 'True' to stop other handlers from being called " -- | 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 --afterSocketServiceIncoming :: (IsSocketService a, MonadIO m) => a -> SocketServiceIncomingCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SocketServiceIncoming :: MonadIO m => SocketServiceIncomingCallback -> m (GClosure C_SocketServiceIncomingCallback) -- | Generate a function pointer callable from C code, from a -- C_SocketServiceIncomingCallback. mk_SocketServiceIncomingCallback :: C_SocketServiceIncomingCallback -> IO (FunPtr C_SocketServiceIncomingCallback) -- | A convenience synonym for Nothing :: Maybe -- SocketServiceIncomingCallback. noSocketServiceIncomingCallback :: Maybe SocketServiceIncomingCallback -- | 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 -> SocketServiceIncomingCallback -> m SignalHandlerId -- | Wrap a SocketServiceIncomingCallback into a -- C_SocketServiceIncomingCallback. wrap_SocketServiceIncomingCallback :: SocketServiceIncomingCallback -> C_SocketServiceIncomingCallback 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.GObject GI.Gio.Objects.SocketService.SocketService instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketService.SocketService -- | 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 -- | A convenience alias for Nothing :: Maybe -- SubprocessLauncher. noSubprocessLauncher :: Maybe SubprocessLauncher -- | 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 [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 -> Text -> 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 fd; it will be closed in -- the parent when self is freed. -- -- By default, all file descriptors from the parent will be closed. This -- function allows you to create (for example) a custom -- pipe() or socketpair() before -- launching the process, and choose the target descriptor in the child. -- -- An example use case is GNUPG, which has a command line argument -- --passphrase-fd providing a file descriptor number where it expects -- the passphrase to be written. 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 => [SubprocessFlags] -> IO (GValueConstruct o) 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.GObject GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SubprocessLauncher.SubprocessLauncher -- | 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 -- | A convenience alias for Nothing :: Maybe -- TcpConnection. noTcpConnection :: Maybe 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 => Bool -> IO (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 (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.GObject GI.Gio.Objects.TcpConnection.TcpConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TcpConnection.TcpConnection -- | A TcpWrapperConnection 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 -- | A convenience alias for Nothing :: Maybe -- TcpWrapperConnection. noTcpWrapperConnection :: Maybe TcpWrapperConnection -- | Get's 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, IsIOStream a) => a -> IO (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 (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.GObject GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TcpWrapperConnection.TcpWrapperConnection -- | A helper class for testing code which uses D-Bus without touching the -- user's session bus. -- -- Note that TestDBus modifies the user’s environment, calling -- setenv(). This is not thread-safe, so all -- TestDBus calls should be completed before threads are spawned, -- or should have appropriate locking to ensure no access conflicts to -- environment variables shared between TestDBus and other -- threads. -- --
-- get testDBus #flags --getTestDBusFlags :: (MonadIO m, IsTestDBus o) => o -> m [TestDBusFlags] 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.GObject GI.Gio.Objects.TestDBus.TestDBus instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TestDBus.TestDBus -- | ThemedIcon is an implementation of Icon that supports -- icon themes. ThemedIcon contains a list of all of the icons -- present in an icon theme, so that icons can be looked up quickly. -- ThemedIcon does not provide actual pixmaps for icons, just the -- icon names. Ideally something like -- gtk_icon_theme_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 -- | A convenience alias for Nothing :: Maybe -- ThemedIcon. noThemedIcon :: Maybe 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 => Text -> IO (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 => [Text] -> IO (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 => Bool -> IO (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 (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.GObject GI.Gio.Objects.ThemedIcon.ThemedIcon instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ThemedIcon.ThemedIcon -- | A ThreadedSocketService is a simple subclass of -- SocketService that handles incoming connections by creating a -- worker thread and dispatching the connection to it by emitting the -- ThreadedSocketService::run signal in the new -- thread. -- -- The signal handler may perform blocking IO 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 -- | A convenience alias for Nothing :: Maybe -- ThreadedSocketService. noThreadedSocketService :: Maybe 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 => Int32 -> IO (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 -- | Type for the callback on the (unwrapped) C side. type C_ThreadedSocketServiceRunCallback = Ptr () -> Ptr SocketConnection -> Ptr Object -> Ptr () -> IO CInt -- | 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 " /@connection@/: a new 'GI.Gio.Objects.SocketConnection.SocketConnection' object. " -> Object " /@sourceObject@/: the source_object passed to 'GI.Gio.Objects.SocketListener.socketListenerAddAddress'. " -> IO Bool " __Returns:__ 'True' to stop further signal handlers from being called " -- | 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 --afterThreadedSocketServiceRun :: (IsThreadedSocketService a, MonadIO m) => a -> ThreadedSocketServiceRunCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ThreadedSocketServiceRun :: MonadIO m => ThreadedSocketServiceRunCallback -> m (GClosure C_ThreadedSocketServiceRunCallback) -- | Generate a function pointer callable from C code, from a -- C_ThreadedSocketServiceRunCallback. mk_ThreadedSocketServiceRunCallback :: C_ThreadedSocketServiceRunCallback -> IO (FunPtr C_ThreadedSocketServiceRunCallback) -- | A convenience synonym for Nothing :: Maybe -- ThreadedSocketServiceRunCallback. noThreadedSocketServiceRunCallback :: Maybe ThreadedSocketServiceRunCallback -- | 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 -> ThreadedSocketServiceRunCallback -> m SignalHandlerId -- | Wrap a ThreadedSocketServiceRunCallback into a -- C_ThreadedSocketServiceRunCallback. wrap_ThreadedSocketServiceRunCallback :: ThreadedSocketServiceRunCallback -> C_ThreadedSocketServiceRunCallback 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.GObject GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ThreadedSocketService.ThreadedSocketService -- | DtlsServerConnection 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 -- | A convenience alias for Nothing :: Maybe -- DtlsServerConnection. noDtlsServerConnection :: Maybe 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 => TlsAuthenticationMode -> IO (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 (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.BasicTypes.GObject GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection -- | 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 -- | A convenience alias for Nothing :: Maybe -- TlsCertificate. noTlsCertificate :: Maybe TlsCertificate -- | Gets the TlsCertificate representing cert's -- issuer, if known -- -- Since: 2.28 tlsCertificateGetIssuer :: (HasCallStack, MonadIO m, IsTlsCertificate a) => a -> m TlsCertificate -- | 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:private-key, or -- TlsCertificate:private-key-pem 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 PEM-encoded data in -- file. The returned certificate will be the first -- certificate found in file. As of GLib 2.44, if -- file contains more certificates it will try to load a -- certificate chain. All certificates will be verified in the order -- found (top-level certificate should be the last one in the file) and -- the 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 file cannot be read or parsed, the function will -- return Nothing and set error. Otherwise, this -- behaves like tlsCertificateNewFromPem. -- -- Since: 2.28 tlsCertificateNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> 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:private-key-pem property for -- information about supported formats.) -- -- The returned certificate will be the first certificate found in -- data. As of GLib 2.44, if data -- contains more certificates it will try to load a certificate chain. -- All certificates will be verified in the order found (top-level -- certificate should be the last one in the file) and the -- 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 -- | 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 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. -- -- (All other TlsCertificateFlags values will always be set or -- unset as appropriate.) -- -- 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 => ByteString -> IO (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 => Text -> IO (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, IsTlsCertificate a) => a -> IO (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 TlsCertificate -- | 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 => ByteString -> IO (GValueConstruct o) -- | 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 => Text -> IO (GValueConstruct o) 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.GObject GI.Gio.Objects.TlsCertificate.TlsCertificate instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsCertificate.TlsCertificate -- | TlsServerConnection 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 -- | A convenience alias for Nothing :: Maybe -- TlsServerConnection. noTlsServerConnection :: Maybe 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:base-io-stream 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 => TlsAuthenticationMode -> IO (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 (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.GObject GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection -- | TlsClientConnection 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 -- | A convenience alias for Nothing :: Maybe -- TlsClientConnection. noTlsClientConnection :: Maybe 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 -- | Copies session state from one connection to another. This is not -- normally needed, but may be used when the same session needs to be -- used between different endpoints as is required by some protocols such -- as FTP over TLS. source should have already completed -- a handshake, and conn should not have completed a -- handshake. -- -- 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 SocketConnectable -- | Gets whether conn will force the lowest-supported TLS -- protocol version rather than attempt to negotiate the highest -- mutually- supported version of TLS; see -- tlsClientConnectionSetUseSsl3. -- -- Since: 2.28 -- | Deprecated: (Since version 2.56)SSL 3.0 is insecure, and this -- function does notactually indicate whether it is enabled. tlsClientConnectionGetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m Bool -- | Gets conn's validation flags -- -- Since: 2.28 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:base-io-stream 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 2.42.1, if useSsl3 is True, this forces -- conn to use the lowest-supported TLS protocol version -- rather than trying to properly negotiate the highest -- mutually-supported protocol version with the peer. Be aware that SSL -- 3.0 is generally disabled by the TlsBackend, so the -- lowest-supported protocol version is probably not SSL 3.0. -- -- Since 2.58, this may additionally cause an RFC 7507 fallback SCSV to -- be sent to the server, causing modern TLS servers to immediately -- terminate the connection. You should generally only use this function -- if you need to connect to broken servers that exhibit TLS protocol -- version intolerance, and when an initial attempt to connect to a -- server normally has already failed. -- -- Since: 2.28 -- | Deprecated: (Since version 2.56)SSL 3.0 is insecure, and this -- function does notgenerally enable or disable it, despite its name. 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. -- -- Since: 2.28 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, IsSocketConnectable a) => a -> IO (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 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 => Bool -> IO (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 => [TlsCertificateFlags] -> IO (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 (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.GObject GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection -- | TlsFileDatabase 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 -- | A convenience alias for Nothing :: Maybe -- TlsFileDatabase. noTlsFileDatabase :: Maybe 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 => Text -> IO (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 (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.GObject GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase -- | TLS (Transport Layer Security, aka SSL) and DTLS backend. -- -- Since: 2.28 module GI.Gio.Interfaces.TlsBackend -- | Memory-managed wrapper type. newtype TlsBackend TlsBackend :: ManagedPtr TlsBackend -> TlsBackend -- | A convenience alias for Nothing :: Maybe -- TlsBackend. noTlsBackend :: Maybe 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 (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.GObject GI.Gio.Interfaces.TlsBackend.TlsBackend instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.TlsBackend.TlsBackend -- | Holds a password used in TLS. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- TlsPassword. noTlsPassword :: Maybe 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 => Text -> IO (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 => [TlsPasswordFlags] -> IO (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 => Text -> IO (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 (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.GObject GI.Gio.Objects.TlsPassword.TlsPassword instance Data.GI.Base.Overloading.HasParentTypes 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 SocketFamilyUnix 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: 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 -- | A convenience alias for Nothing :: Maybe -- UnixCredentialsMessage. noUnixCredentialsMessage :: Maybe 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, IsCredentials a) => a -> IO (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 (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.GObject GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusMessage. noDBusMessage :: Maybe 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. -- -- Since: 2.26 dBusMessageGetArg0 :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text -- | Gets the body of a message. -- -- Since: 2.26 dBusMessageGetBody :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m 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 Text -- | Convenience getter for the DBusMessageHeaderFieldErrorName -- header field. -- -- Since: 2.26 dBusMessageGetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m 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 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 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 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 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. -- -- 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. -- -- Since: 2.26 dBusMessageGetUnixFdList :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m 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 -> Text -> m () -- | Convenience setter for the DBusMessageHeaderFieldErrorName -- header field. -- -- Since: 2.26 dBusMessageSetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => 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 -> Text -> m () -- | Convenience setter for the DBusMessageHeaderFieldMember header -- field. -- -- Since: 2.26 dBusMessageSetMember :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> 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 -> 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 -> 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 -> 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. -- -- 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 (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.BasicTypes.GObject GI.Gio.Objects.DBusMessage.DBusMessage instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusMessage.DBusMessage -- | A UnixFDList contains a list of file descriptors. It owns the -- file descriptors that it contains, closing them when finalized. -- -- It may be wrapped in a UnixFDMessage and sent over a -- Socket in the G_SOCKET_ADDRESS_UNIX family by -- using socketSendMessage and received using -- socketReceiveMessage. -- -- Note that <gio/gunixfdlist.h> belongs to the -- UNIX-specific GIO interfaces, thus you have to use the -- gio-unix-2.0.pc pkg-config file when using it. 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 -- | A convenience alias for Nothing :: Maybe -- UnixFDList. noUnixFDList :: Maybe 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 (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.GObject GI.Gio.Objects.UnixFDList.UnixFDList instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixFDList.UnixFDList -- | This SocketControlMessage contains a UnixFDList. It may -- be sent using socketSendMessage and received using -- socketReceiveMessage over UNIX sockets (ie: sockets in the -- G_SOCKET_ADDRESS_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 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 -- | A convenience alias for Nothing :: Maybe -- UnixFDMessage. noUnixFDMessage :: Maybe 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, IsUnixFDList a) => a -> IO (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 (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.GObject GI.Gio.Objects.UnixFDMessage.UnixFDMessage instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixFDMessage.UnixFDMessage -- | UnixInputStream 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 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 -- | A convenience alias for Nothing :: Maybe -- UnixInputStream. noUnixInputStream :: Maybe 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 => Bool -> IO (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 => Int32 -> IO (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 (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.GObject GI.Gio.Objects.UnixInputStream.UnixInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixInputStream.UnixInputStream -- | 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 -- | A convenience alias for Nothing :: Maybe -- UnixMountMonitor. noUnixMountMonitor :: Maybe 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 () -- | Type for the callback on the (unwrapped) C side. type C_UnixMountMonitorMountpointsChangedCallback = Ptr () -> Ptr () -> IO () -- | Emitted when the unix mount points have changed. type UnixMountMonitorMountpointsChangedCallback = IO () -- | Connect a signal handler for the “mountpoints-changed” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after unixMountMonitor #mountpointsChanged callback --afterUnixMountMonitorMountpointsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_UnixMountMonitorMountpointsChanged :: MonadIO m => UnixMountMonitorMountpointsChangedCallback -> m (GClosure C_UnixMountMonitorMountpointsChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_UnixMountMonitorMountpointsChangedCallback. mk_UnixMountMonitorMountpointsChangedCallback :: C_UnixMountMonitorMountpointsChangedCallback -> IO (FunPtr C_UnixMountMonitorMountpointsChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- UnixMountMonitorMountpointsChangedCallback. noUnixMountMonitorMountpointsChangedCallback :: Maybe UnixMountMonitorMountpointsChangedCallback -- | Connect a signal handler for the “mountpoints-changed” -- 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 -> UnixMountMonitorMountpointsChangedCallback -> m SignalHandlerId -- | Wrap a UnixMountMonitorMountpointsChangedCallback into a -- C_UnixMountMonitorMountpointsChangedCallback. wrap_UnixMountMonitorMountpointsChangedCallback :: UnixMountMonitorMountpointsChangedCallback -> C_UnixMountMonitorMountpointsChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_UnixMountMonitorMountsChangedCallback = Ptr () -> Ptr () -> IO () -- | Emitted when the unix mounts have changed. type UnixMountMonitorMountsChangedCallback = IO () -- | Connect a signal handler for the “mounts-changed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after unixMountMonitor #mountsChanged callback --afterUnixMountMonitorMountsChanged :: (IsUnixMountMonitor a, MonadIO m) => a -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_UnixMountMonitorMountsChanged :: MonadIO m => UnixMountMonitorMountsChangedCallback -> m (GClosure C_UnixMountMonitorMountsChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_UnixMountMonitorMountsChangedCallback. mk_UnixMountMonitorMountsChangedCallback :: C_UnixMountMonitorMountsChangedCallback -> IO (FunPtr C_UnixMountMonitorMountsChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- UnixMountMonitorMountsChangedCallback. noUnixMountMonitorMountsChangedCallback :: Maybe UnixMountMonitorMountsChangedCallback -- | Connect a signal handler for the “mounts-changed” 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 -> UnixMountMonitorMountsChangedCallback -> m SignalHandlerId -- | Wrap a UnixMountMonitorMountsChangedCallback into a -- C_UnixMountMonitorMountsChangedCallback. wrap_UnixMountMonitorMountsChangedCallback :: UnixMountMonitorMountsChangedCallback -> C_UnixMountMonitorMountsChangedCallback 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.GObject GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixMountMonitor.UnixMountMonitor -- | UnixOutputStream 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 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 -- | A convenience alias for Nothing :: Maybe -- UnixOutputStream. noUnixOutputStream :: Maybe 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 => Bool -> IO (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 => Int32 -> IO (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 (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.GObject GI.Gio.Objects.UnixOutputStream.UnixOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixOutputStream.UnixOutputStream -- | Support for UNIX-domain (also known as local) sockets. -- -- 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 IOErrorEnumNotSupported errors. You can use -- unixSocketAddressAbstractNamesSupported to see if abstract -- names are supported. -- -- Note that <gio/gunixsocketaddress.h> belongs to the -- UNIX-specific GIO interfaces, thus you have to use the -- gio-unix-2.0.pc pkg-config file when using it. 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 -- | A convenience alias for Nothing :: Maybe -- UnixSocketAddress. noUnixSocketAddress :: Maybe 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 Word64 -- | 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 => Bool -> IO (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 => UnixSocketAddressType -> IO (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 => Text -> IO (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 => ByteString -> IO (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 (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.GObject GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress -- | 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 -- | A convenience alias for Nothing :: Maybe -- NativeVolumeMonitor. noNativeVolumeMonitor :: Maybe 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.GObject GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.NativeVolumeMonitor.NativeVolumeMonitor -- | VolumeMonitor 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. -- -- VolumeMonitor is not [thread-default-context -- aware][g-main-context-push-thread-default], and so should not be used -- other than from the main thread, with no thread-default-context -- active. -- -- In order to receive updates about volumes and mounts monitored through -- GVFS, a main loop must be running. 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 -- | A convenience alias for Nothing :: Maybe -- VolumeMonitor. noVolumeMonitor :: Maybe 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 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 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] -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorDriveChangedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () -- | Emitted when a drive changes. type VolumeMonitorDriveChangedCallback = Drive " /@drive@/: the drive that changed " -> IO () -- | Connect a signal handler for the “drive-changed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #driveChanged callback --afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorDriveChanged :: MonadIO m => VolumeMonitorDriveChangedCallback -> m (GClosure C_VolumeMonitorDriveChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorDriveChangedCallback. mk_VolumeMonitorDriveChangedCallback :: C_VolumeMonitorDriveChangedCallback -> IO (FunPtr C_VolumeMonitorDriveChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorDriveChangedCallback. noVolumeMonitorDriveChangedCallback :: Maybe VolumeMonitorDriveChangedCallback -- | Connect a signal handler for the “drive-changed” 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 -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorDriveChangedCallback into a -- C_VolumeMonitorDriveChangedCallback. wrap_VolumeMonitorDriveChangedCallback :: VolumeMonitorDriveChangedCallback -> C_VolumeMonitorDriveChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorDriveConnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () -- | Emitted when a drive is connected to the system. type VolumeMonitorDriveConnectedCallback = Drive " /@drive@/: a 'GI.Gio.Interfaces.Drive.Drive' that was connected. " -> IO () -- | Connect a signal handler for the “drive-connected” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #driveConnected callback --afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorDriveConnected :: MonadIO m => VolumeMonitorDriveConnectedCallback -> m (GClosure C_VolumeMonitorDriveConnectedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorDriveConnectedCallback. mk_VolumeMonitorDriveConnectedCallback :: C_VolumeMonitorDriveConnectedCallback -> IO (FunPtr C_VolumeMonitorDriveConnectedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorDriveConnectedCallback. noVolumeMonitorDriveConnectedCallback :: Maybe VolumeMonitorDriveConnectedCallback -- | Connect a signal handler for the “drive-connected” 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 -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorDriveConnectedCallback into a -- C_VolumeMonitorDriveConnectedCallback. wrap_VolumeMonitorDriveConnectedCallback :: VolumeMonitorDriveConnectedCallback -> C_VolumeMonitorDriveConnectedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorDriveDisconnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () -- | Emitted when a drive is disconnected from the system. type VolumeMonitorDriveDisconnectedCallback = Drive " /@drive@/: a 'GI.Gio.Interfaces.Drive.Drive' that was disconnected. " -> IO () -- | Connect a signal handler for the “drive-disconnected” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after volumeMonitor #driveDisconnected callback --afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorDriveDisconnected :: MonadIO m => VolumeMonitorDriveDisconnectedCallback -> m (GClosure C_VolumeMonitorDriveDisconnectedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorDriveDisconnectedCallback. mk_VolumeMonitorDriveDisconnectedCallback :: C_VolumeMonitorDriveDisconnectedCallback -> IO (FunPtr C_VolumeMonitorDriveDisconnectedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorDriveDisconnectedCallback. noVolumeMonitorDriveDisconnectedCallback :: Maybe VolumeMonitorDriveDisconnectedCallback -- | Connect a signal handler for the “drive-disconnected” 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 -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorDriveDisconnectedCallback into a -- C_VolumeMonitorDriveDisconnectedCallback. wrap_VolumeMonitorDriveDisconnectedCallback :: VolumeMonitorDriveDisconnectedCallback -> C_VolumeMonitorDriveDisconnectedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorDriveEjectButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () -- | Emitted when the eject button is pressed on drive. -- -- Since: 2.18 type VolumeMonitorDriveEjectButtonCallback = Drive " /@drive@/: the drive where the eject button was pressed " -> IO () -- | Connect a signal handler for the “drive-eject-button” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after volumeMonitor #driveEjectButton callback --afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorDriveEjectButton :: MonadIO m => VolumeMonitorDriveEjectButtonCallback -> m (GClosure C_VolumeMonitorDriveEjectButtonCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorDriveEjectButtonCallback. mk_VolumeMonitorDriveEjectButtonCallback :: C_VolumeMonitorDriveEjectButtonCallback -> IO (FunPtr C_VolumeMonitorDriveEjectButtonCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorDriveEjectButtonCallback. noVolumeMonitorDriveEjectButtonCallback :: Maybe VolumeMonitorDriveEjectButtonCallback -- | Connect a signal handler for the “drive-eject-button” 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 -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorDriveEjectButtonCallback into a -- C_VolumeMonitorDriveEjectButtonCallback. wrap_VolumeMonitorDriveEjectButtonCallback :: VolumeMonitorDriveEjectButtonCallback -> C_VolumeMonitorDriveEjectButtonCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorDriveStopButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO () -- | Emitted when the stop button is pressed on drive. -- -- Since: 2.22 type VolumeMonitorDriveStopButtonCallback = Drive " /@drive@/: the drive where the stop button was pressed " -> IO () -- | Connect a signal handler for the “drive-stop-button” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after volumeMonitor #driveStopButton callback --afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorDriveStopButton :: MonadIO m => VolumeMonitorDriveStopButtonCallback -> m (GClosure C_VolumeMonitorDriveStopButtonCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorDriveStopButtonCallback. mk_VolumeMonitorDriveStopButtonCallback :: C_VolumeMonitorDriveStopButtonCallback -> IO (FunPtr C_VolumeMonitorDriveStopButtonCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorDriveStopButtonCallback. noVolumeMonitorDriveStopButtonCallback :: Maybe VolumeMonitorDriveStopButtonCallback -- | Connect a signal handler for the “drive-stop-button” 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 -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorDriveStopButtonCallback into a -- C_VolumeMonitorDriveStopButtonCallback. wrap_VolumeMonitorDriveStopButtonCallback :: VolumeMonitorDriveStopButtonCallback -> C_VolumeMonitorDriveStopButtonCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorMountAddedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () -- | Emitted when a mount is added. type VolumeMonitorMountAddedCallback = Mount " /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that was added. " -> IO () -- | Connect a signal handler for the “mount-added” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #mountAdded callback --afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorMountAdded :: MonadIO m => VolumeMonitorMountAddedCallback -> m (GClosure C_VolumeMonitorMountAddedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorMountAddedCallback. mk_VolumeMonitorMountAddedCallback :: C_VolumeMonitorMountAddedCallback -> IO (FunPtr C_VolumeMonitorMountAddedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorMountAddedCallback. noVolumeMonitorMountAddedCallback :: Maybe VolumeMonitorMountAddedCallback -- | Connect a signal handler for the “mount-added” 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 -> VolumeMonitorMountAddedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorMountAddedCallback into a -- C_VolumeMonitorMountAddedCallback. wrap_VolumeMonitorMountAddedCallback :: VolumeMonitorMountAddedCallback -> C_VolumeMonitorMountAddedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorMountChangedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () -- | Emitted when a mount changes. type VolumeMonitorMountChangedCallback = Mount " /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that changed. " -> IO () -- | Connect a signal handler for the “mount-changed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #mountChanged callback --afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorMountChanged :: MonadIO m => VolumeMonitorMountChangedCallback -> m (GClosure C_VolumeMonitorMountChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorMountChangedCallback. mk_VolumeMonitorMountChangedCallback :: C_VolumeMonitorMountChangedCallback -> IO (FunPtr C_VolumeMonitorMountChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorMountChangedCallback. noVolumeMonitorMountChangedCallback :: Maybe VolumeMonitorMountChangedCallback -- | Connect a signal handler for the “mount-changed” 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 -> VolumeMonitorMountChangedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorMountChangedCallback into a -- C_VolumeMonitorMountChangedCallback. wrap_VolumeMonitorMountChangedCallback :: VolumeMonitorMountChangedCallback -> C_VolumeMonitorMountChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorMountPreUnmountCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () -- | 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 " /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that is being unmounted. " -> IO () -- | Connect a signal handler for the “mount-pre-unmount” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after volumeMonitor #mountPreUnmount callback --afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorMountPreUnmount :: MonadIO m => VolumeMonitorMountPreUnmountCallback -> m (GClosure C_VolumeMonitorMountPreUnmountCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorMountPreUnmountCallback. mk_VolumeMonitorMountPreUnmountCallback :: C_VolumeMonitorMountPreUnmountCallback -> IO (FunPtr C_VolumeMonitorMountPreUnmountCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorMountPreUnmountCallback. noVolumeMonitorMountPreUnmountCallback :: Maybe VolumeMonitorMountPreUnmountCallback -- | Connect a signal handler for the “mount-pre-unmount” 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 -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorMountPreUnmountCallback into a -- C_VolumeMonitorMountPreUnmountCallback. wrap_VolumeMonitorMountPreUnmountCallback :: VolumeMonitorMountPreUnmountCallback -> C_VolumeMonitorMountPreUnmountCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorMountRemovedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO () -- | Emitted when a mount is removed. type VolumeMonitorMountRemovedCallback = Mount " /@mount@/: a 'GI.Gio.Interfaces.Mount.Mount' that was removed. " -> IO () -- | Connect a signal handler for the “mount-removed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #mountRemoved callback --afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorMountRemoved :: MonadIO m => VolumeMonitorMountRemovedCallback -> m (GClosure C_VolumeMonitorMountRemovedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorMountRemovedCallback. mk_VolumeMonitorMountRemovedCallback :: C_VolumeMonitorMountRemovedCallback -> IO (FunPtr C_VolumeMonitorMountRemovedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorMountRemovedCallback. noVolumeMonitorMountRemovedCallback :: Maybe VolumeMonitorMountRemovedCallback -- | Connect a signal handler for the “mount-removed” 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 -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorMountRemovedCallback into a -- C_VolumeMonitorMountRemovedCallback. wrap_VolumeMonitorMountRemovedCallback :: VolumeMonitorMountRemovedCallback -> C_VolumeMonitorMountRemovedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorVolumeAddedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO () -- | Emitted when a mountable volume is added to the system. type VolumeMonitorVolumeAddedCallback = Volume " /@volume@/: a 'GI.Gio.Interfaces.Volume.Volume' that was added. " -> IO () -- | Connect a signal handler for the “volume-added” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #volumeAdded callback --afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorVolumeAdded :: MonadIO m => VolumeMonitorVolumeAddedCallback -> m (GClosure C_VolumeMonitorVolumeAddedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorVolumeAddedCallback. mk_VolumeMonitorVolumeAddedCallback :: C_VolumeMonitorVolumeAddedCallback -> IO (FunPtr C_VolumeMonitorVolumeAddedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorVolumeAddedCallback. noVolumeMonitorVolumeAddedCallback :: Maybe VolumeMonitorVolumeAddedCallback -- | Connect a signal handler for the “volume-added” 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 -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorVolumeAddedCallback into a -- C_VolumeMonitorVolumeAddedCallback. wrap_VolumeMonitorVolumeAddedCallback :: VolumeMonitorVolumeAddedCallback -> C_VolumeMonitorVolumeAddedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorVolumeChangedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO () -- | Emitted when mountable volume is changed. type VolumeMonitorVolumeChangedCallback = Volume " /@volume@/: a 'GI.Gio.Interfaces.Volume.Volume' that changed. " -> IO () -- | Connect a signal handler for the “volume-changed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #volumeChanged callback --afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorVolumeChanged :: MonadIO m => VolumeMonitorVolumeChangedCallback -> m (GClosure C_VolumeMonitorVolumeChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorVolumeChangedCallback. mk_VolumeMonitorVolumeChangedCallback :: C_VolumeMonitorVolumeChangedCallback -> IO (FunPtr C_VolumeMonitorVolumeChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorVolumeChangedCallback. noVolumeMonitorVolumeChangedCallback :: Maybe VolumeMonitorVolumeChangedCallback -- | Connect a signal handler for the “volume-changed” 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 -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorVolumeChangedCallback into a -- C_VolumeMonitorVolumeChangedCallback. wrap_VolumeMonitorVolumeChangedCallback :: VolumeMonitorVolumeChangedCallback -> C_VolumeMonitorVolumeChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeMonitorVolumeRemovedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO () -- | Emitted when a mountable volume is removed from the system. type VolumeMonitorVolumeRemovedCallback = Volume " /@volume@/: a 'GI.Gio.Interfaces.Volume.Volume' that was removed. " -> IO () -- | Connect a signal handler for the “volume-removed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after volumeMonitor #volumeRemoved callback --afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeMonitorVolumeRemoved :: MonadIO m => VolumeMonitorVolumeRemovedCallback -> m (GClosure C_VolumeMonitorVolumeRemovedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeMonitorVolumeRemovedCallback. mk_VolumeMonitorVolumeRemovedCallback :: C_VolumeMonitorVolumeRemovedCallback -> IO (FunPtr C_VolumeMonitorVolumeRemovedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeMonitorVolumeRemovedCallback. noVolumeMonitorVolumeRemovedCallback :: Maybe VolumeMonitorVolumeRemovedCallback -- | Connect a signal handler for the “volume-removed” 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 -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId -- | Wrap a VolumeMonitorVolumeRemovedCallback into a -- C_VolumeMonitorVolumeRemovedCallback. wrap_VolumeMonitorVolumeRemovedCallback :: VolumeMonitorVolumeRemovedCallback -> C_VolumeMonitorVolumeRemovedCallback 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.GObject GI.Gio.Objects.VolumeMonitor.VolumeMonitor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.VolumeMonitor.VolumeMonitor -- | Zlib decompression 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 -- | A convenience alias for Nothing :: Maybe -- ZlibCompressor. noZlibCompressor :: Maybe ZlibCompressor -- | Returns the ZlibCompressor:file-info property. -- -- Since: 2.26 zlibCompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> m 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, IsFileInfo a) => a -> IO (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 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 => ZlibCompressorFormat -> IO (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 => Int32 -> IO (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 (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.GObject GI.Gio.Objects.ZlibCompressor.ZlibCompressor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ZlibCompressor.ZlibCompressor -- | Zlib decompression module GI.Gio.Objects.ZlibDecompressor -- | Memory-managed wrapper type. newtype ZlibDecompressor ZlibDecompressor :: ManagedPtr ZlibDecompressor -> ZlibDecompressor -- | Type class for types which can be safely cast to -- ZlibDecompressor, for instance with toZlibDecompressor. class (GObject o, IsDescendantOf ZlibDecompressor o) => IsZlibDecompressor o -- | Cast to ZlibDecompressor, for types for which this is known to -- be safe. For general casts, use castTo. toZlibDecompressor :: (MonadIO m, IsZlibDecompressor o) => o -> m ZlibDecompressor -- | A convenience alias for Nothing :: Maybe -- ZlibDecompressor. noZlibDecompressor :: Maybe ZlibDecompressor -- | Retrieves the FileInfo constructed from the GZIP header data of -- compressed data processed by compressor, or -- Nothing if decompressor's -- ZlibDecompressor:format property is not -- ZlibCompressorFormatGzip, or the header data was not fully -- processed yet, or it not present in the data stream at all. -- -- Since: 2.26 zlibDecompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibDecompressor a) => a -> m FileInfo -- | Creates a new ZlibDecompressor. -- -- Since: 2.24 zlibDecompressorNew :: (HasCallStack, MonadIO m) => ZlibCompressorFormat -> m ZlibDecompressor -- | Get the value of the “file-info” property. When -- overloading is enabled, this is equivalent to -- --
-- get zlibDecompressor #fileInfo --getZlibDecompressorFileInfo :: (MonadIO m, IsZlibDecompressor o) => o -> m 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 => ZlibCompressorFormat -> IO (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 (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.GObject GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor -- | SimpleActionGroup 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 alias for Nothing :: Maybe -- SimpleActionGroup. noSimpleActionGroup :: Maybe 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 (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.GObject GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup -- | 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 -- | A convenience alias for Nothing :: Maybe -- ActionMap. noActionMap :: Maybe 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 Nothing.
--
-- Since: 2.32
actionMapLookupAction :: (HasCallStack, MonadIO m, IsActionMap a) => a -> Text -> m 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 ()
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.BasicTypes.GObject GI.Gio.Interfaces.ActionMap.ActionMap
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.ActionMap.ActionMap
-- | 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
-- | A convenience alias for Nothing :: Maybe
-- DBusAnnotationInfo.
noDBusAnnotationInfo :: Maybe 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 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusAnnotationInfo.DBusAnnotationInfo tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusArgInfo. noDBusArgInfo :: Maybe 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.DBusArgInfo.DBusArgInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusArgInfo.DBusArgInfo tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusErrorEntry. noDBusErrorEntry :: Maybe 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.WrappedPtr GI.Gio.Structs.DBusErrorEntry.DBusErrorEntry instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusErrorEntry.DBusErrorEntry tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusInterfaceSkeleton. noDBusInterfaceSkeleton :: Maybe 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 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 Text -- | Gets all D-Bus properties for interface_. -- -- Since: 2.30 dBusInterfaceSkeletonGetProperties :: (HasCallStack, MonadIO m, IsDBusInterfaceSkeleton a) => a -> m GVariant -- | 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 => [DBusInterfaceSkeletonFlags] -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_DBusInterfaceSkeletonGAuthorizeMethodCallback = Ptr () -> Ptr DBusMethodInvocation -> Ptr () -> IO CInt -- | 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::authorize-method -- 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:g-flags 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 " /@invocation@/: A 'GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation'. " -> IO Bool " __Returns:__ 'True' if the call is authorized, 'False' otherwise. " -- | Connect a signal handler for the “g-authorize-method” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after dBusInterfaceSkeleton #gAuthorizeMethod callback --afterDBusInterfaceSkeletonGAuthorizeMethod :: (IsDBusInterfaceSkeleton a, MonadIO m) => a -> DBusInterfaceSkeletonGAuthorizeMethodCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusInterfaceSkeletonGAuthorizeMethod :: MonadIO m => DBusInterfaceSkeletonGAuthorizeMethodCallback -> m (GClosure C_DBusInterfaceSkeletonGAuthorizeMethodCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusInterfaceSkeletonGAuthorizeMethodCallback. mk_DBusInterfaceSkeletonGAuthorizeMethodCallback :: C_DBusInterfaceSkeletonGAuthorizeMethodCallback -> IO (FunPtr C_DBusInterfaceSkeletonGAuthorizeMethodCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusInterfaceSkeletonGAuthorizeMethodCallback. noDBusInterfaceSkeletonGAuthorizeMethodCallback :: Maybe DBusInterfaceSkeletonGAuthorizeMethodCallback -- | Connect a signal handler for the “g-authorize-method” 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 -> DBusInterfaceSkeletonGAuthorizeMethodCallback -> m SignalHandlerId -- | Wrap a DBusInterfaceSkeletonGAuthorizeMethodCallback into a -- C_DBusInterfaceSkeletonGAuthorizeMethodCallback. wrap_DBusInterfaceSkeletonGAuthorizeMethodCallback :: DBusInterfaceSkeletonGAuthorizeMethodCallback -> C_DBusInterfaceSkeletonGAuthorizeMethodCallback 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.BasicTypes.GObject GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton -- | The DBusInterface 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 -- | A convenience alias for Nothing :: Maybe -- DBusInterface. noDBusInterface :: Maybe 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 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 (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.BasicTypes.GObject GI.Gio.Interfaces.DBusInterface.DBusInterface instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DBusInterface.DBusInterface -- | Information about a method on an 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 -- | A convenience alias for Nothing :: Maybe -- DBusMethodInfo. noDBusMethodInfo :: Maybe 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusMethodInfo.DBusMethodInfo tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusNodeInfo. noDBusNodeInfo :: Maybe 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 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusNodeInfo.DBusNodeInfo tag -- | Instances of the DBusMethodInvocation 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 DBusMethodInvocation object is to -- receive it as an argument to the handle_method_call() -- function in a DBusInterfaceVTable that was passed to -- g_dbus_connection_register_object(). -- -- 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 -- | A convenience alias for Nothing :: Maybe -- DBusMethodInvocation. noDBusMethodInvocation :: Maybe 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 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 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 (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.BasicTypes.GObject GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusMethodInvocation.DBusMethodInvocation
-- | 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
-- | A convenience alias for Nothing :: Maybe
-- DBusPropertyInfo.
noDBusPropertyInfo :: Maybe 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusPropertyInfo.DBusPropertyInfo tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusInterfaceInfo. noDBusInterfaceInfo :: Maybe 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 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 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 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusSignalInfo. noDBusSignalInfo :: Maybe 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusSignalInfo.DBusSignalInfo tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- FileAttributeInfo. noFileAttributeInfo :: Maybe 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.WrappedPtr GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- FileAttributeInfoList. noFileAttributeInfoList :: Maybe 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList tag -- | Functionality for manipulating basic metadata for files. -- FileInfo implements methods for getting information that all -- files should contain, and allows for manipulation of extended -- attributes. -- -- See [GFileAttribute][gio-GFileAttribute] for more information on how -- GIO handles file attributes. -- -- To obtain a FileInfo for a File, use -- fileQueryInfo (or its async variant). To obtain a -- FileInfo 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 FileInfo 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. -- -- FileAttributeMatcher allows for searching through a -- FileInfo 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 -- | A convenience alias for Nothing :: Maybe -- FileInfo. noFileInfo :: Maybe 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 value of a attribute, formated as a string. This escapes -- things as needed to make the string valid utf8. fileInfoGetAttributeAsString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m 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 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 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 an 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 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 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 [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. fileInfoGetContentType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text -- | Returns the DateTime representing the deletion date of the -- file, as available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the -- G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, -- Nothing is returned. -- -- Since: 2.36 fileInfoGetDeletionDate :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m DateTime -- | Gets a display name for a file. fileInfoGetDisplayName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text -- | Gets the edit name for a file. fileInfoGetEditName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text -- | Gets the [entity tag][gfile-etag] for a given FileInfo. See -- FILE_ATTRIBUTE_ETAG_VALUE. fileInfoGetEtag :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m 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. fileInfoGetFileType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m FileType -- | Gets the icon for a file. fileInfoGetIcon :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Icon -- | Checks if a file is a backup file. fileInfoGetIsBackup :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool -- | Checks if a file is hidden. fileInfoGetIsHidden :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool -- | Checks if a file is a symlink. fileInfoGetIsSymlink :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool -- | Gets the modification time of the current info and -- sets it in result. fileInfoGetModificationTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m TimeVal -- | Gets the name for a file. fileInfoGetName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m [Char] -- | Gets the file's 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. fileInfoGetSortOrder :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Int32 -- | Gets the symbolic icon for a file. -- -- Since: 2.34 fileInfoGetSymbolicIcon :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Icon -- | Gets the symlink target for a given FileInfo. fileInfoGetSymlinkTarget :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text -- | 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 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. 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 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 attribute in the file -- info to the given time value. 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 -> Text -> m () -- | Unsets a mask set by fileInfoSetAttributeMask, if one is set. fileInfoUnsetAttributeMask :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m () 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.BasicTypes.GObject GI.Gio.Objects.FileInfo.FileInfo instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileInfo.FileInfo -- | Determines if a string matches a file attribute. module GI.Gio.Structs.FileAttributeMatcher -- | Memory-managed wrapper type. newtype FileAttributeMatcher FileAttributeMatcher :: ManagedPtr FileAttributeMatcher -> FileAttributeMatcher -- | A convenience alias for Nothing :: Maybe -- FileAttributeMatcher. noFileAttributeMatcher :: Maybe 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 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 a 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 attribute string should be formatted with specific -- keys separated from namespaces with a double colon. Several -- "namespace::key" strings may be concatenated with a single comma (e.g. -- "standard::type,standard::is-hidden"). The wildcard "*" may be used to -- match all keys and namespaces, or "namespace::*" will match all keys -- in a given namespace. -- --
-- 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 “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.WrappedPtr GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- DBusInterfaceVTable. noDBusInterfaceVTable :: Maybe 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.WrappedPtr GI.Gio.Structs.DBusInterfaceVTable.DBusInterfaceVTable instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.DBusInterfaceVTable.DBusInterfaceVTable tag -- | 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 Nothing. 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 -- | A convenience alias for Nothing :: Maybe -- ActionEntry. noActionEntry :: Maybe 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.WrappedPtr GI.Gio.Structs.ActionEntry.ActionEntry instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.ActionEntry.ActionEntry tag -- | 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 -- | A convenience alias for Nothing :: Maybe Vfs. noVfs :: Maybe 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 (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.GObject GI.Gio.Objects.Vfs.Vfs instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Vfs.Vfs -- | 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. -- -- Note that <gio/gunixconnection.h> belongs to the -- UNIX-specific GIO interfaces, thus you have to use the -- gio-unix-2.0.pc pkg-config file when using it. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- UnixConnection. noUnixConnection :: Maybe 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. -- -- Other ways to exchange credentials with a foreign peer includes the -- UnixCredentialsMessage type and socketGetCredentials -- function. -- -- Since: 2.26 unixConnectionReceiveCredentials :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> m Credentials -- | Asynchronously receive credentials. -- -- For more details, see unixConnectionReceiveCredentials which is -- the synchronous version of this call. -- -- When the operation is finished, callback will be -- called. You can then call -- unixConnectionReceiveCredentialsFinish to get the result of the -- operation. -- -- Since: 2.32 unixConnectionReceiveCredentialsAsync :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous receive credentials operation started with -- unixConnectionReceiveCredentialsAsync. -- -- Since: 2.32 unixConnectionReceiveCredentialsFinish :: (HasCallStack, MonadIO m, IsUnixConnection a, IsAsyncResult b) => a -> b -> m Credentials -- | Receives a file descriptor from the sending end of the connection. The -- sending end has to call unixConnectionSendFd for this to work. -- -- As well as reading the fd this also reads a single byte from the -- stream, as this is required for fd passing to work on some -- implementations. -- -- Since: 2.22 unixConnectionReceiveFd :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> m Int32 -- | Passes the credentials of the current user the receiving side of the -- connection. The receiving end has to call -- unixConnectionReceiveCredentials (or similar) to accept the -- credentials. -- -- As well as sending the credentials this also writes a single NUL byte -- to the stream, as this is required for credentials passing to work on -- some implementations. -- -- Other ways to exchange credentials with a foreign peer includes the -- UnixCredentialsMessage type and socketGetCredentials -- function. -- -- Since: 2.26 unixConnectionSendCredentials :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> m () -- | Asynchronously send credentials. -- -- For more details, see unixConnectionSendCredentials which is -- the synchronous version of this call. -- -- When the operation is finished, callback will be -- called. You can then call unixConnectionSendCredentialsFinish -- to get the result of the operation. -- -- Since: 2.32 unixConnectionSendCredentialsAsync :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous send credentials operation started with -- unixConnectionSendCredentialsAsync. -- -- Since: 2.32 unixConnectionSendCredentialsFinish :: (HasCallStack, MonadIO m, IsUnixConnection a, IsAsyncResult b) => a -> b -> m () -- | Passes a file descriptor to the receiving side of the connection. The -- receiving end has to call unixConnectionReceiveFd to accept the -- file descriptor. -- -- As well as sending the fd this also writes a single byte to the -- stream, as this is required for fd passing to work on some -- implementations. -- -- Since: 2.22 unixConnectionSendFd :: (HasCallStack, MonadIO m, IsUnixConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> m () instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.UnixConnection.UnixConnection o) => GI.Gio.Objects.UnixConnection.IsUnixConnection o instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixConnection.UnixConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.UnixConnection.UnixConnection -- | TlsInteraction provides a mechanism for the TLS connection and -- database code to interact with the user. It can be used to ask the -- user for passwords. -- -- To use a TlsInteraction with a TLS connection use -- tlsConnectionSetInteraction. -- -- Callers should instantiate a derived class that implements the various -- interaction methods to show the required dialogs. -- -- Callers should use the 'invoke' functions like -- tlsInteractionInvokeAskPassword to run interaction methods. -- These functions make sure that the interaction is invoked in the main -- loop and not in the current thread, if the current thread is not -- running the main loop. -- -- Derived classes can choose to implement whichever interactions methods -- they'd like to support by overriding those virtual methods in their -- class initialization function. Any interactions not implemented will -- return TlsInteractionResultUnhandled. If a derived class -- implements an async method, it must also implement the corresponding -- finish method. -- -- Since: 2.30 module GI.Gio.Objects.TlsInteraction -- | Memory-managed wrapper type. newtype TlsInteraction TlsInteraction :: ManagedPtr TlsInteraction -> TlsInteraction -- | Type class for types which can be safely cast to -- TlsInteraction, for instance with toTlsInteraction. class (GObject o, IsDescendantOf TlsInteraction o) => IsTlsInteraction o -- | Cast to TlsInteraction, for types for which this is known to be -- safe. For general casts, use castTo. toTlsInteraction :: (MonadIO m, IsTlsInteraction o) => o -> m TlsInteraction -- | A convenience alias for Nothing :: Maybe -- TlsInteraction. noTlsInteraction :: Maybe TlsInteraction -- | Run synchronous interaction to ask the user for a password. In -- general, tlsInteractionInvokeAskPassword should be used instead -- of this function. -- -- Derived subclasses usually implement a password prompt, although they -- may also choose to provide a password from elsewhere. The -- password value will be filled in and then -- callback will be called. Alternatively the user may -- abort this password request, which will usually abort the TLS -- connection. -- -- If the interaction is cancelled by the cancellation object, or by the -- user then TlsInteractionResultFailed will be returned with an -- error that contains a IOErrorEnumCancelled error code. Certain -- implementations may not support immediate cancellation. -- -- Since: 2.30 tlsInteractionAskPassword :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsPassword b, IsCancellable c) => a -> b -> Maybe c -> m TlsInteractionResult -- | Run asynchronous interaction to ask the user for a password. In -- general, tlsInteractionInvokeAskPassword should be used instead -- of this function. -- -- Derived subclasses usually implement a password prompt, although they -- may also choose to provide a password from elsewhere. The -- password value will be filled in and then -- callback will be called. Alternatively the user may -- abort this password request, which will usually abort the TLS -- connection. -- -- If the interaction is cancelled by the cancellation object, or by the -- user then TlsInteractionResultFailed will be returned with an -- error that contains a IOErrorEnumCancelled error code. Certain -- implementations may not support immediate cancellation. -- -- Certain implementations may not support immediate cancellation. -- -- Since: 2.30 tlsInteractionAskPasswordAsync :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsPassword b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Complete an ask password user interaction request. This should be once -- the tlsInteractionAskPasswordAsync completion callback is -- called. -- -- If TlsInteractionResultHandled is returned, then the -- TlsPassword passed to tlsInteractionAskPassword will -- have its password filled in. -- -- If the interaction is cancelled by the cancellation object, or by the -- user then TlsInteractionResultFailed will be returned with an -- error that contains a IOErrorEnumCancelled error code. -- -- Since: 2.30 tlsInteractionAskPasswordFinish :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsAsyncResult b) => a -> b -> m TlsInteractionResult -- | Invoke the interaction to ask the user for a password. It invokes this -- interaction in the main loop, specifically the MainContext -- returned by mainContextGetThreadDefault when the interaction is -- created. This is called by called by TlsConnection or -- TlsDatabase to ask the user for a password. -- -- Derived subclasses usually implement a password prompt, although they -- may also choose to provide a password from elsewhere. The -- password value will be filled in and then -- callback will be called. Alternatively the user may -- abort this password request, which will usually abort the TLS -- connection. -- -- The implementation can either be a synchronous (eg: modal dialog) or -- an asynchronous one (eg: modeless dialog). This function will take -- care of calling which ever one correctly. -- -- If the interaction is cancelled by the cancellation object, or by the -- user then TlsInteractionResultFailed will be returned with an -- error that contains a IOErrorEnumCancelled error code. Certain -- implementations may not support immediate cancellation. -- -- Since: 2.30 tlsInteractionInvokeAskPassword :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsPassword b, IsCancellable c) => a -> b -> Maybe c -> m TlsInteractionResult -- | Invoke the interaction to ask the user to choose a certificate to use -- with the connection. It invokes this interaction in the main loop, -- specifically the MainContext returned by -- mainContextGetThreadDefault when the interaction is created. -- This is called by called by TlsConnection when the peer -- requests a certificate during the handshake. -- -- Derived subclasses usually implement a certificate selector, although -- they may also choose to provide a certificate from elsewhere. -- Alternatively the user may abort this certificate request, which may -- or may not abort the TLS connection. -- -- The implementation can either be a synchronous (eg: modal dialog) or -- an asynchronous one (eg: modeless dialog). This function will take -- care of calling which ever one correctly. -- -- If the interaction is cancelled by the cancellation object, or by the -- user then TlsInteractionResultFailed will be returned with an -- error that contains a IOErrorEnumCancelled error code. Certain -- implementations may not support immediate cancellation. -- -- Since: 2.40 tlsInteractionInvokeRequestCertificate :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsConnection b, IsCancellable c) => a -> b -> TlsCertificateRequestFlags -> Maybe c -> m TlsInteractionResult -- | Run synchronous interaction to ask the user to choose a certificate to -- use with the connection. In general, -- tlsInteractionInvokeRequestCertificate should be used instead -- of this function. -- -- Derived subclasses usually implement a certificate selector, although -- they may also choose to provide a certificate from elsewhere. -- Alternatively the user may abort this certificate request, which will -- usually abort the TLS connection. -- -- If TlsInteractionResultHandled is returned, then the -- TlsConnection passed to tlsInteractionRequestCertificate -- will have had its TlsConnection:certificate -- filled in. -- -- If the interaction is cancelled by the cancellation object, or by the -- user then TlsInteractionResultFailed will be returned with an -- error that contains a IOErrorEnumCancelled error code. Certain -- implementations may not support immediate cancellation. -- -- Since: 2.40 tlsInteractionRequestCertificate :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsConnection b, IsCancellable c) => a -> b -> TlsCertificateRequestFlags -> Maybe c -> m TlsInteractionResult -- | Run asynchronous interaction to ask the user for a certificate to use -- with the connection. In general, -- tlsInteractionInvokeRequestCertificate should be used instead -- of this function. -- -- Derived subclasses usually implement a certificate selector, although -- they may also choose to provide a certificate from elsewhere. -- callback will be called when the operation completes. -- Alternatively the user may abort this certificate request, which will -- usually abort the TLS connection. -- -- Since: 2.40 tlsInteractionRequestCertificateAsync :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsTlsConnection b, IsCancellable c) => a -> b -> TlsCertificateRequestFlags -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Complete an request certificate user interaction request. This should -- be once the tlsInteractionRequestCertificateAsync completion -- callback is called. -- -- If TlsInteractionResultHandled is returned, then the -- TlsConnection passed to -- tlsInteractionRequestCertificateAsync will have had its -- TlsConnection:certificate filled in. -- -- If the interaction is cancelled by the cancellation object, or by the -- user then TlsInteractionResultFailed will be returned with an -- error that contains a IOErrorEnumCancelled error code. -- -- Since: 2.40 tlsInteractionRequestCertificateFinish :: (HasCallStack, MonadIO m, IsTlsInteraction a, IsAsyncResult b) => a -> b -> m TlsInteractionResult instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TlsInteraction.TlsInteraction o) => GI.Gio.Objects.TlsInteraction.IsTlsInteraction o instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TlsInteraction.TlsInteraction instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsInteraction.TlsInteraction -- | TlsDatabase is used to lookup certificates and other -- information from a certificate or key store. It is an abstract base -- class which TLS library specific subtypes override. -- -- A TlsDatabase may be accessed from multiple threads by the TLS -- backend. All implementations are required to be fully thread-safe. -- -- Most common client applications will not directly interact with -- TlsDatabase. It is used internally by TlsConnection. -- -- Since: 2.30 module GI.Gio.Objects.TlsDatabase -- | Memory-managed wrapper type. newtype TlsDatabase TlsDatabase :: ManagedPtr TlsDatabase -> TlsDatabase -- | Type class for types which can be safely cast to TlsDatabase, -- for instance with toTlsDatabase. class (GObject o, IsDescendantOf TlsDatabase o) => IsTlsDatabase o -- | Cast to TlsDatabase, for types for which this is known to be -- safe. For general casts, use castTo. toTlsDatabase :: (MonadIO m, IsTlsDatabase o) => o -> m TlsDatabase -- | A convenience alias for Nothing :: Maybe -- TlsDatabase. noTlsDatabase :: Maybe TlsDatabase -- | Create a handle string for the certificate. The database will only be -- able to create a handle for certificates that originate from the -- database. In cases where the database cannot create a handle for a -- certificate, Nothing will be returned. -- -- This handle should be stable across various instances of the -- application, and between applications. If a certificate is modified in -- the database, then it is not guaranteed that this handle will continue -- to point to it. -- -- Since: 2.30 tlsDatabaseCreateCertificateHandle :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b) => a -> b -> m (Maybe Text) -- | Lookup a certificate by its handle. -- -- The handle should have been created by calling -- tlsDatabaseCreateCertificateHandle on a TlsDatabase -- object of the same TLS backend. The handle is designed to remain valid -- across instantiations of the database. -- -- If the handle is no longer valid, or does not point to a certificate -- in this database, then Nothing will be returned. -- -- This function can block, use -- tlsDatabaseLookupCertificateForHandleAsync to perform the -- lookup operation asynchronously. -- -- Since: 2.30 tlsDatabaseLookupCertificateForHandle :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> Text -> Maybe b -> TlsDatabaseLookupFlags -> Maybe c -> m (Maybe TlsCertificate) -- | Asynchronously lookup a certificate by its handle in the database. See -- tlsDatabaseLookupCertificateForHandle for more information. -- -- Since: 2.30 tlsDatabaseLookupCertificateForHandleAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> Text -> Maybe b -> TlsDatabaseLookupFlags -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous lookup of a certificate by its handle. See -- g_tls_database_lookup_certificate_by_handle() for more -- information. -- -- If the handle is no longer valid, or does not point to a certificate -- in this database, then Nothing will be returned. -- -- Since: 2.30 tlsDatabaseLookupCertificateForHandleFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m TlsCertificate -- | Lookup the issuer of certificate in the database. -- -- The TlsCertificate:issuer property of -- certificate is not modified, and the two certificates -- are not hooked into a chain. -- -- This function can block, use -- tlsDatabaseLookupCertificateIssuerAsync to perform the lookup -- operation asynchronously. -- -- Since: 2.30 tlsDatabaseLookupCertificateIssuer :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsTlsInteraction c, IsCancellable d) => a -> b -> Maybe c -> TlsDatabaseLookupFlags -> Maybe d -> m TlsCertificate -- | Asynchronously lookup the issuer of certificate in the -- database. See tlsDatabaseLookupCertificateIssuer for more -- information. -- -- Since: 2.30 tlsDatabaseLookupCertificateIssuerAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsTlsInteraction c, IsCancellable d) => a -> b -> Maybe c -> TlsDatabaseLookupFlags -> Maybe d -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous lookup issuer operation. See -- tlsDatabaseLookupCertificateIssuer for more information. -- -- Since: 2.30 tlsDatabaseLookupCertificateIssuerFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m TlsCertificate -- | Lookup certificates issued by this issuer in the database. -- -- This function can block, use -- tlsDatabaseLookupCertificatesIssuedByAsync to perform the -- lookup operation asynchronously. -- -- Since: 2.30 tlsDatabaseLookupCertificatesIssuedBy :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> ByteString -> Maybe b -> TlsDatabaseLookupFlags -> Maybe c -> m [TlsCertificate] -- | Asynchronously lookup certificates issued by this issuer in the -- database. See tlsDatabaseLookupCertificatesIssuedBy for more -- information. -- -- The database may choose to hold a reference to the issuer byte array -- for the duration of of this asynchronous operation. The byte array -- should not be modified during this time. -- -- Since: 2.30 tlsDatabaseLookupCertificatesIssuedByAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsInteraction b, IsCancellable c) => a -> ByteString -> Maybe b -> TlsDatabaseLookupFlags -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous lookup of certificates. See -- tlsDatabaseLookupCertificatesIssuedBy for more information. -- -- Since: 2.30 tlsDatabaseLookupCertificatesIssuedByFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m [TlsCertificate] -- | Determines the validity of a certificate chain after looking up and -- adding any missing certificates to the chain. -- -- chain is a chain of TlsCertificate objects each -- pointing to the next certificate in the chain by its -- TlsCertificate:issuer property. The chain may -- initially consist of one or more certificates. After the verification -- process is complete, chain may be modified by adding -- missing certificates, or removing extra certificates. If a certificate -- anchor was found, then it is added to the chain. -- -- purpose describes the purpose (or usage) for which the -- certificate is being used. Typically purpose will be -- set to TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER which means -- that the certificate is being used to authenticate a server (and we -- are acting as the client). -- -- The identity is used to check for pinned certificates -- (trust exceptions) in the database. These will override the normal -- verification process on a host by host basis. -- -- Currently there are no flags, and -- TlsDatabaseVerifyFlagsNone should be used. -- -- If chain is found to be valid, then the return value -- will be 0. If chain is found to be invalid, then the -- return value will indicate the problems found. If the function is -- unable to determine whether chain is valid or not (eg, -- because cancellable is triggered before it completes) -- then the return value will be TlsCertificateFlagsGenericError -- and error will be set accordingly. -- error is not set when chain is -- successfully analyzed but found to be invalid. -- -- This function can block, use tlsDatabaseVerifyChainAsync to -- perform the verification operation asynchronously. -- -- Since: 2.30 tlsDatabaseVerifyChain :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsSocketConnectable c, IsTlsInteraction d, IsCancellable e) => a -> b -> Text -> Maybe c -> Maybe d -> [TlsDatabaseVerifyFlags] -> Maybe e -> m [TlsCertificateFlags] -- | Asynchronously determines the validity of a certificate chain after -- looking up and adding any missing certificates to the chain. See -- tlsDatabaseVerifyChain for more information. -- -- Since: 2.30 tlsDatabaseVerifyChainAsync :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsTlsCertificate b, IsSocketConnectable c, IsTlsInteraction d, IsCancellable e) => a -> b -> Text -> Maybe c -> Maybe d -> [TlsDatabaseVerifyFlags] -> Maybe e -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous verify chain operation. See -- tlsDatabaseVerifyChain for more information. -- -- If chain is found to be valid, then the return value -- will be 0. If chain is found to be invalid, then the -- return value will indicate the problems found. If the function is -- unable to determine whether chain is valid or not (eg, -- because cancellable is triggered before it completes) -- then the return value will be TlsCertificateFlagsGenericError -- and error will be set accordingly. -- error is not set when chain is -- successfully analyzed but found to be invalid. -- -- Since: 2.30 tlsDatabaseVerifyChainFinish :: (HasCallStack, MonadIO m, IsTlsDatabase a, IsAsyncResult b) => a -> b -> m [TlsCertificateFlags] instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Gio.Objects.TlsDatabase.TlsDatabase o) => GI.Gio.Objects.TlsDatabase.IsTlsDatabase o instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.TlsDatabase.TlsDatabase instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsDatabase.TlsDatabase -- | TlsConnection is the base TLS connection class type, which -- wraps a IOStream and provides TLS encryption on top of it. Its -- subclasses, TlsClientConnection and TlsServerConnection, -- implement client-side and server-side TLS, respectively. -- -- For DTLS (Datagram TLS) support, see DtlsConnection. -- -- Since: 2.28 module GI.Gio.Objects.TlsConnection -- | Memory-managed wrapper type. newtype TlsConnection TlsConnection :: ManagedPtr TlsConnection -> TlsConnection -- | Type class for types which can be safely cast to TlsConnection, -- for instance with toTlsConnection. class (GObject o, IsDescendantOf TlsConnection o) => IsTlsConnection o -- | Cast to TlsConnection, for types for which this is known to be -- safe. For general casts, use castTo. toTlsConnection :: (MonadIO m, IsTlsConnection o) => o -> m TlsConnection -- | A convenience alias for Nothing :: Maybe -- TlsConnection. noTlsConnection :: Maybe TlsConnection -- | Used by TlsConnection implementations to emit the -- TlsConnection::accept-certificate signal. -- -- Since: 2.28 tlsConnectionEmitAcceptCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) => a -> b -> [TlsCertificateFlags] -> m Bool -- | Gets conn's certificate, as set by -- tlsConnectionSetCertificate. -- -- Since: 2.28 tlsConnectionGetCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m TlsCertificate -- | Gets the certificate database that conn uses to verify -- peer certificates. See tlsConnectionSetDatabase. -- -- Since: 2.30 tlsConnectionGetDatabase :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m 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.30 tlsConnectionGetInteraction :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m 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 tlsConnectionSetAdvertisedProtocols. -- -- Since: 2.60 tlsConnectionGetNegotiatedProtocol :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m (Maybe Text) -- | Gets conn's peer's certificate after the handshake has -- completed. (It is not set during the emission of -- TlsConnection::accept-certificate.) -- -- Since: 2.28 tlsConnectionGetPeerCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m TlsCertificate -- | Gets the errors associated with validating conn's -- peer's certificate, after the handshake has completed. (It is not set -- during the emission of -- TlsConnection::accept-certificate.) -- -- Since: 2.28 tlsConnectionGetPeerCertificateErrors :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m [TlsCertificateFlags] -- | Gets conn rehandshaking mode. See -- tlsConnectionSetRehandshakeMode for details. -- -- Since: 2.28 -- | Deprecated: (Since version 2.60.)Changing the rehandshake mode is -- no longer required for compatibility. Also, rehandshaking has been -- removed from the TLS protocol in TLS 1.3. tlsConnectionGetRehandshakeMode :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m TlsRehandshakeMode -- | Tests whether or not conn expects a proper TLS close -- notification when the connection is closed. See -- tlsConnectionSetRequireCloseNotify for details. -- -- Since: 2.28 tlsConnectionGetRequireCloseNotify :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> m Bool -- | Gets whether conn uses the system certificate database -- to verify peer certificates. See -- tlsConnectionSetUseSystemCertdb. -- | Deprecated: (Since version 2.30)Use tlsConnectionGetDatabase -- instead tlsConnectionGetUseSystemCertdb :: (HasCallStack, MonadIO m, IsTlsConnection 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 -- (or after sending a "STARTTLS"-type command) and may need to -- rehandshake later if the server requests it, TlsConnection will -- handle this for you automatically when you try to send or receive data -- on the connection. However, you can call tlsConnectionHandshake -- manually if you want to know for sure whether the initial handshake -- succeeded or failed (as opposed to just immediately trying to write to -- conn's output stream, in which case if it fails, it -- may not be possible to tell if it failed before or after completing -- the handshake). -- -- 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. -- -- If TLS 1.2 or older is in use, you may call -- tlsConnectionHandshake after the initial handshake to -- rehandshake; however, this usage is deprecated because rehandshaking -- is no longer part of the TLS protocol in TLS 1.3. Accordingly, the -- behavior of calling this function after the initial handshake is now -- undefined, except it is guaranteed to be reasonable and nondestructive -- so as to preserve compatibility with code written for older versions -- of GLib. -- -- TlsConnection::accept_certificate may be -- emitted during the handshake. -- -- Since: 2.28 tlsConnectionHandshake :: (HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) => a -> Maybe b -> m () -- | Asynchronously performs a TLS handshake on conn. See -- tlsConnectionHandshake for more information. -- -- Since: 2.28 tlsConnectionHandshakeAsync :: (HasCallStack, MonadIO m, IsTlsConnection a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finish an asynchronous TLS handshake operation. See -- tlsConnectionHandshake for more information. -- -- Since: 2.28 tlsConnectionHandshakeFinish :: (HasCallStack, MonadIO m, IsTlsConnection a, IsAsyncResult b) => a -> b -> m () -- | Sets the list of application-layer protocols to advertise that the -- caller is willing to speak on this connection. The Application-Layer -- Protocol Negotiation (ALPN) extension will be used to negotiate a -- compatible protocol with the peer; use -- tlsConnectionGetNegotiatedProtocol 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 tlsConnectionSetAdvertisedProtocols :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> Maybe [Text] -> m () -- | This sets the certificate that conn will present to -- its peer during the TLS handshake. For a TlsServerConnection, -- it is mandatory to set this, and that will normally be done at -- construct time. -- -- For a TlsClientConnection, 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 -- tlsClientConnectionGetAcceptedCas 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 tlsClientConnectionGetAcceptedCas will return -- non-Nothing.) -- -- Since: 2.28 tlsConnectionSetCertificate :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsCertificate b) => a -> b -> m () -- | Sets the certificate database that is used to verify peer -- certificates. This is set to the default database by default. See -- tlsBackendGetDefaultDatabase. If set to Nothing, then -- peer certificate validation will always set the -- TlsCertificateFlagsUnknownCa error (meaning -- TlsConnection::accept-certificate will always -- be emitted on client-side connections, unless that bit is not set in -- TlsClientConnection:validation-flags). -- -- Since: 2.30 tlsConnectionSetDatabase :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsDatabase b) => a -> 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.30 tlsConnectionSetInteraction :: (HasCallStack, MonadIO m, IsTlsConnection a, IsTlsInteraction b) => a -> Maybe b -> m () -- | Sets how conn behaves with respect to rehandshaking -- requests, when TLS 1.2 or older is in use. -- -- TlsRehandshakeModeNever means that it will never agree to -- rehandshake after the initial handshake is complete. (For a client, -- this means it will refuse rehandshake requests from the server, and -- for a server, this means it will close the connection with an error if -- the client attempts to rehandshake.) -- -- TlsRehandshakeModeSafely means that the connection will allow a -- rehandshake only if the other end of the connection supports the TLS -- renegotiation_info extension. This is the default behavior, -- but means that rehandshaking will not work against older -- implementations that do not support that extension. -- -- TlsRehandshakeModeUnsafely means that the connection will allow -- rehandshaking even without the renegotiation_info extension. -- On the server side in particular, this is not recommended, since it -- leaves the server open to certain attacks. However, this mode is -- necessary if you need to allow renegotiation with older client -- software. -- -- Since: 2.28 -- | Deprecated: (Since version 2.60.)Changing the rehandshake mode is -- no longer required for compatibility. Also, rehandshaking has been -- removed from the TLS protocol in TLS 1.3. tlsConnectionSetRehandshakeMode :: (HasCallStack, MonadIO m, IsTlsConnection 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 -- sometimes omitted. (TLS 1.1 explicitly allows this; in TLS 1.0 it is -- technically an error, but often done anyway.) You can use -- tlsConnectionSetRequireCloseNotify 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 -- SocketConnection, 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 iOStreamClose itself on -- conn, this will send a close notification regardless -- of the setting of this property. If you explicitly want to do an -- unclean close, you can close conn's -- TlsConnection:base-io-stream rather than -- closing conn itself, but note that this may only be -- done when no other operations are pending on conn or -- the base I/O stream. -- -- Since: 2.28 tlsConnectionSetRequireCloseNotify :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> Bool -> m () -- | Sets whether conn uses the system certificate database -- to verify peer certificates. This is True by default. If set to -- False, then peer certificate validation will always set the -- TlsCertificateFlagsUnknownCa error (meaning -- TlsConnection::accept-certificate will always -- be emitted on client-side connections, unless that bit is not set in -- TlsClientConnection:validation-flags). -- | Deprecated: (Since version 2.30)Use tlsConnectionSetDatabase -- instead tlsConnectionSetUseSystemCertdb :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> Bool -> m () -- | Set the value of the “advertised-protocols” property to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- 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 => [Text] -> IO (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, IsIOStream a) => a -> IO (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, IsTlsCertificate a) => a -> IO (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 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 () -- | Construct a GValueConstruct with valid value for the -- “database” property. This is rarely needed directly, but it -- is used by new. constructTlsConnectionDatabase :: (IsTlsConnection o, IsTlsDatabase a) => a -> IO (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 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, IsTlsInteraction a) => a -> IO (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 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 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] -- | 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 => TlsRehandshakeMode -> IO (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 => Bool -> IO (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 => Bool -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_TlsConnectionAcceptCertificateCallback = Ptr () -> Ptr TlsCertificate -> CUInt -> Ptr () -> IO CInt -- | 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. -- -- 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 " /@peerCert@/: the peer\'s 'GI.Gio.Objects.TlsCertificate.TlsCertificate' " -> [TlsCertificateFlags] " /@errors@/: the problems with /@peerCert@/. " -> IO Bool " __Returns:__ 'True' to accept /@peerCert@/ (which will also immediately end the signal emission). 'False' to allow the signal emission to continue, which will cause the handshake to fail if no one else overrides it. " -- | Connect a signal handler for the “accept-certificate” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after tlsConnection #acceptCertificate callback --afterTlsConnectionAcceptCertificate :: (IsTlsConnection a, MonadIO m) => a -> TlsConnectionAcceptCertificateCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_TlsConnectionAcceptCertificate :: MonadIO m => TlsConnectionAcceptCertificateCallback -> m (GClosure C_TlsConnectionAcceptCertificateCallback) -- | Generate a function pointer callable from C code, from a -- C_TlsConnectionAcceptCertificateCallback. mk_TlsConnectionAcceptCertificateCallback :: C_TlsConnectionAcceptCertificateCallback -> IO (FunPtr C_TlsConnectionAcceptCertificateCallback) -- | A convenience synonym for Nothing :: Maybe -- TlsConnectionAcceptCertificateCallback. noTlsConnectionAcceptCertificateCallback :: Maybe TlsConnectionAcceptCertificateCallback -- | Connect a signal handler for the “accept-certificate” 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 -> TlsConnectionAcceptCertificateCallback -> m SignalHandlerId -- | Wrap a TlsConnectionAcceptCertificateCallback into a -- C_TlsConnectionAcceptCertificateCallback. wrap_TlsConnectionAcceptCertificateCallback :: TlsConnectionAcceptCertificateCallback -> C_TlsConnectionAcceptCertificateCallback 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.GObject GI.Gio.Objects.TlsConnection.TlsConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.TlsConnection.TlsConnection -- | A Task 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 (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.GObject GI.Gio.Objects.Task.Task instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Task.Task -- | Subprocess 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 Subprocess 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. -- -- Subprocess 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 Subprocess API (unless -- SubprocessFlagsInheritFds was specified). -- -- Subprocess 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, Subprocess 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. -- -- Subprocess 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 -- g_subprocess_new(). 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 Subprocess will involve calling -- g_subprocess_new(), 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). -- -- 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 -- | A convenience alias for Nothing :: Maybe -- Subprocess. noSubprocess :: Maybe 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. subprocessGetIdentifier :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m 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 spawnCheckExitStatus. -- -- 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. -- -- Since: 2.40 subprocessGetStderrPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m 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. -- -- Since: 2.40 subprocessGetStdinPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m OutputStream -- | Gets the InputStream from which to read the stdout output of -- subprocess. -- -- The process must have been created with -- SubprocessFlagsStdoutPipe. -- -- Since: 2.40 subprocessGetStdoutPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m 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 spawnCheckExitStatus. -- -- Since: 2.40 subprocessWaitCheck :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe b -> m () -- | Combines subprocessWaitAsync with spawnCheckExitStatus. -- -- 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 => [Text] -> IO (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 => [SubprocessFlags] -> IO (GValueConstruct o) 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.GObject GI.Gio.Objects.Subprocess.Subprocess instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Subprocess.Subprocess -- | A SocketListener 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 SocketListener will not -- cause socketListenerClose to be called implicitly, as some -- references to the SocketListener may be held internally. -- -- If you want to implement a network server, also look at -- SocketService and ThreadedSocketService which are -- subclasses of SocketListener 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 -- | A convenience alias for Nothing :: Maybe -- SocketListener. noSocketListener :: Maybe 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 socketListenerAcceptSocket 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. -- -- 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 => Int32 -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_SocketListenerEventCallback = Ptr () -> CUInt -> Ptr Socket -> Ptr () -> IO () -- | 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 " /@event@/: the event that is occurring " -> Socket " /@socket@/: the 'GI.Gio.Objects.Socket.Socket' the event is occurring on " -> 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 --afterSocketListenerEvent :: (IsSocketListener a, MonadIO m) => a -> SocketListenerEventCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SocketListenerEvent :: MonadIO m => SocketListenerEventCallback -> m (GClosure C_SocketListenerEventCallback) -- | Generate a function pointer callable from C code, from a -- C_SocketListenerEventCallback. mk_SocketListenerEventCallback :: C_SocketListenerEventCallback -> IO (FunPtr C_SocketListenerEventCallback) -- | A convenience synonym for Nothing :: Maybe -- SocketListenerEventCallback. noSocketListenerEventCallback :: Maybe SocketListenerEventCallback -- | 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 -> SocketListenerEventCallback -> m SignalHandlerId -- | Wrap a SocketListenerEventCallback into a -- C_SocketListenerEventCallback. wrap_SocketListenerEventCallback :: SocketListenerEventCallback -> C_SocketListenerEventCallback 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.GObject GI.Gio.Objects.SocketListener.SocketListener instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketListener.SocketListener -- | SocketConnection 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 SocketConnection 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 3rd parties to register -- custom socket connection types for specific combination of socket -- family/type/protocol using socketConnectionFactoryRegisterType. -- -- To close a SocketConnection, 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 -- | A convenience alias for Nothing :: Maybe -- SocketConnection. noSocketConnection :: Maybe 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. -- -- 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, IsSocket a) => a -> IO (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 (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.GObject GI.Gio.Objects.SocketConnection.SocketConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketConnection.SocketConnection -- | SocketClient is a lightweight high-level utility class for -- connecting to a network host using a connection oriented socket type. -- -- You create a SocketClient 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 SocketClient 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 -- | A convenience alias for Nothing :: Maybe -- SocketClient. noSocketClient :: Maybe 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. -- -- 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. -- (SocketClient 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 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. -- -- Since: 2.28 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 0 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:enable-proxy, -- 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::accept-certificate 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. -- -- Since: 2.28 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 => Bool -> IO (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 => SocketFamily -> IO (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, IsSocketAddress a) => a -> IO (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 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 => SocketProtocol -> IO (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, IsProxyResolver a) => a -> IO (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 => Word32 -> IO (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 => Bool -> IO (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 => [TlsCertificateFlags] -> IO (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 => SocketType -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_SocketClientEventCallback = Ptr () -> CUInt -> Ptr SocketConnectable -> Ptr IOStream -> Ptr () -> IO () -- | 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 --afterSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> SocketClientEventCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SocketClientEvent :: MonadIO m => SocketClientEventCallback -> m (GClosure C_SocketClientEventCallback) -- | Generate a function pointer callable from C code, from a -- C_SocketClientEventCallback. mk_SocketClientEventCallback :: C_SocketClientEventCallback -> IO (FunPtr C_SocketClientEventCallback) -- | A convenience synonym for Nothing :: Maybe -- SocketClientEventCallback. noSocketClientEventCallback :: Maybe SocketClientEventCallback -- | 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 -> SocketClientEventCallback -> m SignalHandlerId -- | Wrap a SocketClientEventCallback into a -- C_SocketClientEventCallback. wrap_SocketClientEventCallback :: SocketClientEventCallback -> C_SocketClientEventCallback 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.GObject GI.Gio.Objects.SocketClient.SocketClient instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketClient.SocketClient -- | SocketAddressEnumerator is an enumerator type for -- SocketAddress instances. It is returned by enumeration -- functions such as socketConnectableEnumerate, which returns a -- SocketAddressEnumerator to list all the -- GSocketAddresses 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 SocketAddressEnumerator can only be enumerated once. Once -- socketAddressEnumeratorNext has returned Nothing (and no -- error), further enumeration with that SocketAddressEnumerator -- 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 -- | A convenience alias for Nothing :: Maybe -- SocketAddressEnumerator. noSocketAddressEnumerator :: Maybe 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 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 SocketAddress 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.GObject GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator -- | As of GLib 2.46, SimpleAsyncResult is deprecated in favor of -- Task, which provides a simpler API. -- -- SimpleAsyncResult implements AsyncResult. -- -- GSimpleAsyncResult handles GAsyncReadyCallbacks, 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 'GI.Gio.Interfaces.AsyncResult.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 SimpleAsyncResult, call -- simpleAsyncResultNew. If the result needs to be created for a -- GError, use simpleAsyncResultNewFromError or -- g_simple_async_result_new_take_error(). If a -- GError is not available (e.g. the asynchronous operation's -- doesn't take a GError argument), but the result still needs to -- be created for an error condition, use -- g_simple_async_result_new_error() (or -- g_simple_async_result_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 -- SimpleAsyncResult 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, -- MainLoop, or it can use GThreads. -- 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][g-main-context-push-thread-default] where the -- SimpleAsyncResult was created. -- g_simple_async_result_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, -- g_simple_async_result_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, -- g_simple_async_result_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
-- | A convenience alias for Nothing :: Maybe
-- SimpleAsyncResult.
noSimpleAsyncResult :: Maybe 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 (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.GObject GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
-- | A Permission 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 Permission might represent the ability for the
-- user to write to a Settings object. This Permission
-- 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
-- | A convenience alias for Nothing :: Maybe
-- Permission.
noPermission :: Maybe 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 (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.GObject GI.Gio.Objects.Permission.Permission instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Permission.Permission -- | InputStream 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 -- | A convenience alias for Nothing :: Maybe -- InputStream. noInputStream :: Maybe 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 -- | 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 Word64 -- | 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 () -- | 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 Word64 -- | 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 () -- | 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 -> Word64 -> 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 -> Word64 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes an asynchronous stream read-into-Bytes 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 -> Word64 -> 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 -> Word64 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes a stream skip operation. inputStreamSkipFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Int64 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.GObject GI.Gio.Objects.InputStream.InputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.InputStream.InputStream -- | 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 IOStream 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 IOStream object owns the input and the output streams, not -- the other way around, so keeping the substreams alive will not keep -- the IOStream object alive. If the IOStream object is -- freed it will be closed, thus closing the substreams, so even if the -- substreams stay alive they will always return IOErrorEnumClosed -- 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 -- IOStream 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 IOStream 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 IOStream operation -- while there is a IOStream, InputStream or -- OutputStream operation in progress, and an application can’t -- start any InputStream or OutputStream operation while -- there is a IOStream operation in progress. -- -- This is a product of individual stream operations being associated -- with a given MainContext (the thread-default context at the -- time the operation was started), rather than entire streams being -- associated with a single MainContext. -- -- 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 -- | A convenience alias for Nothing :: Maybe -- IOStream. noIOStream :: Maybe 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 () -- | Asyncronously splice the output stream of stream1 to -- the input stream of stream2, and splice the output -- stream of stream2 to the input stream of -- stream1. -- -- 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 (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.GObject GI.Gio.Objects.IOStream.IOStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.IOStream.IOStream -- | 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 -- | A convenience alias for Nothing :: Maybe -- FileOutputStream. noFileOutputStream :: Maybe 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 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 (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.BasicTypes.GObject GI.Gio.Objects.FileOutputStream.FileOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileOutputStream.FileOutputStream -- | 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 seekableCanSeek. To position a file input -- stream, use seekableSeek. 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 -- | A convenience alias for Nothing :: Maybe -- FileInputStream. noFileInputStream :: Maybe 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 (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.BasicTypes.GObject GI.Gio.Objects.FileInputStream.FileInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileInputStream.FileInputStream -- | GFileIOStream provides io streams that both read and write to the same -- file handle. -- -- GFileIOStream implements Seekable, which allows the io 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 io stream, use seekableTell. -- -- To find out if a file io stream supports seeking, use -- seekableCanSeek. To position a file io stream, use -- seekableSeek. To find out if a file io stream supports -- truncating, use seekableCanTruncate. To truncate a file io -- stream, use seekableTruncate. -- -- The default implementation of all the FileIOStream 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 -- | A convenience alias for Nothing :: Maybe -- FileIOStream. noFileIOStream :: Maybe 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 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 (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.BasicTypes.GObject GI.Gio.Objects.FileIOStream.FileIOStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileIOStream.FileIOStream -- | FileEnumerator allows you to operate on a set of -- GFiles, returning a FileInfo structure for each -- file enumerated (e.g. fileEnumerateChildren will return a -- FileEnumerator for each of the children within a directory). -- -- To get the next file's information from a FileEnumerator, use -- fileEnumeratorNextFile or its asynchronous version, -- fileEnumeratorNextFilesAsync. Note that the asynchronous -- version will return a list of GFileInfos, 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 FileEnumerator, use fileEnumeratorClose, or -- its asynchronous version, fileEnumeratorCloseAsync. Once a -- FileEnumerator 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 -- | A convenience alias for Nothing :: Maybe -- FileEnumerator. noFileEnumerator :: Maybe 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. -- -- 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.
--
-- The callback can be called with less than numFiles
-- files in case of error or at the end of the enumerator. In case of a
-- partial error the callback will be called with any succeeding items
-- and no error, and on the next request the error will be reported. If a
-- request is cancelled the callback will be called with
-- IOErrorEnumCancelled.
--
-- 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, IsFile a) => a -> IO (GValueConstruct o)
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.BasicTypes.GObject GI.Gio.Objects.FileEnumerator.FileEnumerator
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.FileEnumerator.FileEnumerator
-- | 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
-- | A convenience alias for Nothing :: Maybe
-- DataInputStream.
noDataInputStream :: Maybe 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, Word64)
-- | 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, Word64)
-- | Finish an asynchronous call started by
-- dataInputStreamReadLineAsync.
--
-- Since: 2.30
dataInputStreamReadLineFinishUtf8 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Maybe Text, Word64)
-- | 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, Word64)
-- | 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 more consistent behaviour regarding the stop
-- character.
dataInputStreamReadUntil :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Maybe b -> m (Text, Word64)
-- | 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, which has 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, which has more
-- consistent behaviour regarding the stop character.
dataInputStreamReadUntilFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, Word64)
-- | 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, Word64)
-- | 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, Word64)
-- | 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 => DataStreamByteOrder -> IO (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 => DataStreamNewlineType -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.DataInputStream.DataInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DataInputStream.DataInputStream -- | DBusProxy is a base class used for proxies to access a D-Bus -- interface on a remote object. A DBusProxy can be constructed -- for both well-known and unique names. -- -- By default, DBusProxy 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 -- 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:g-name-owner. 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 -- DBusProxyFlagsDoNotAutoStart is set). -- -- The generic DBusProxy::g-properties-changed and -- DBusProxy::g-signal signals are not very -- convenient to work with. Therefore, the recommended way of working -- with proxies is to subclass DBusProxy, and have more natural -- properties and signals in your derived class. This -- [example][gdbus-example-gdbus-codegen] shows how this can easily be -- done using the [gdbus-codegen][gdbus-codegen] tool. -- -- A DBusProxy instance can be used from multiple threads but note -- that all signals (e.g. DBusProxy::g-signal, -- DBusProxy::g-properties-changed and -- Object::notify) are emitted in the -- [thread-default main context][g-main-context-push-thread-default] 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 -- | A convenience alias for Nothing :: Maybe -- DBusProxy. noDBusProxy :: Maybe 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:g-interface-info) 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:g-interface-info) 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:g-interface-info) 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:g-default-timeout 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:g-interface-info 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.
--
-- Since: 2.26
dBusProxyGetName :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m 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:g-name-owner 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::g-properties-changed 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::g-signal 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::g-signal 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:g-interface-info) 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:g-default-timeout 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:g-interface-info 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 => BusType -> IO (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, IsDBusConnection a) => a -> IO (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 => Int32 -> IO (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 => [DBusProxyFlags] -> IO (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 => DBusInterfaceInfo -> IO (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 => Text -> IO (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 => Text -> IO (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 => Text -> IO (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) -- | Type for the callback on the (unwrapped) C side. type C_DBusProxyGPropertiesChangedCallback = Ptr () -> Ptr GVariant -> Ptr CString -> Ptr () -> IO () -- | 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 " /@changedProperties@/: A 'GVariant' containing the properties that changed (type: @a{sv}@) " -> [Text] " /@invalidatedProperties@/: A 'Nothing' terminated array of properties that was invalidated " -> IO () -- | Connect a signal handler for the “g-properties-changed” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after dBusProxy #gPropertiesChanged callback --afterDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> DBusProxyGPropertiesChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusProxyGPropertiesChanged :: MonadIO m => DBusProxyGPropertiesChangedCallback -> m (GClosure C_DBusProxyGPropertiesChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusProxyGPropertiesChangedCallback. mk_DBusProxyGPropertiesChangedCallback :: C_DBusProxyGPropertiesChangedCallback -> IO (FunPtr C_DBusProxyGPropertiesChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusProxyGPropertiesChangedCallback. noDBusProxyGPropertiesChangedCallback :: Maybe DBusProxyGPropertiesChangedCallback -- | Connect a signal handler for the “g-properties-changed” -- 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 -> DBusProxyGPropertiesChangedCallback -> m SignalHandlerId -- | Wrap a DBusProxyGPropertiesChangedCallback into a -- C_DBusProxyGPropertiesChangedCallback. wrap_DBusProxyGPropertiesChangedCallback :: DBusProxyGPropertiesChangedCallback -> C_DBusProxyGPropertiesChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_DBusProxyGSignalCallback = Ptr () -> CString -> CString -> Ptr GVariant -> Ptr () -> IO () -- | Emitted when a signal from the remote object and interface that -- proxy is for, has been received. -- -- Since: 2.26 type DBusProxyGSignalCallback = Maybe Text " /@senderName@/: The sender of the signal or 'Nothing' if the connection is not a bus connection. " -> Text " /@signalName@/: The name of the signal. " -> GVariant " /@parameters@/: A 'GVariant' tuple with parameters for the signal. " -> IO () -- | Connect a signal handler for the “g-signal” signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after dBusProxy #gSignal callback --afterDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> DBusProxyGSignalCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusProxyGSignal :: MonadIO m => DBusProxyGSignalCallback -> m (GClosure C_DBusProxyGSignalCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusProxyGSignalCallback. mk_DBusProxyGSignalCallback :: C_DBusProxyGSignalCallback -> IO (FunPtr C_DBusProxyGSignalCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusProxyGSignalCallback. noDBusProxyGSignalCallback :: Maybe DBusProxyGSignalCallback -- | Connect a signal handler for the “g-signal” signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on dBusProxy #gSignal callback --onDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> DBusProxyGSignalCallback -> m SignalHandlerId -- | Wrap a DBusProxyGSignalCallback into a -- C_DBusProxyGSignalCallback. wrap_DBusProxyGSignalCallback :: DBusProxyGSignalCallback -> C_DBusProxyGSignalCallback 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.BasicTypes.GObject GI.Gio.Objects.DBusProxy.DBusProxy instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusProxy.DBusProxy -- | DBusObjectManagerClient 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::object-added and -- DBusObjectManager::object-removed signals and -- inspect the DBusObjectProxy objects returned by -- dBusObjectManagerGetObjects. -- -- If the name for a DBusObjectManagerClient 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 DBusObjectManagerClientFlagsDoNotAutoStart -- 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, -- DBusObjectManagerClient object construction still succeeds but -- there will be no object proxies (e.g. -- dBusObjectManagerGetObjects returns the empty list) and the -- DBusObjectManagerClient:name-owner property is -- Nothing. -- -- The owner of the requested name can come and go (for example consider -- a system service being restarted) – DBusObjectManagerClient -- handles this case too; simply connect to the -- Object::notify signal to watch for changes on -- the DBusObjectManagerClient:name-owner -- property. When the name owner vanishes, the behavior is that -- DBusObjectManagerClient:name-owner is set to -- Nothing (this includes emission of the -- Object::notify signal) and then -- DBusObjectManager::object-removed signals are -- synthesized for all currently existing object proxies. Since -- DBusObjectManagerClient:name-owner is -- Nothing 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::object-added signals are -- synthesized while -- DBusObjectManagerClient:name-owner is still -- Nothing. Only when all object proxies have been added, the -- DBusObjectManagerClient:name-owner is set to -- the new name owner (this includes emission of the -- Object::notify signal). Furthermore, you are -- guaranteed that -- DBusObjectManagerClient:name-owner will -- alternate between a name owner (e.g. :1.42) and -- Nothing even in the case where the name of interest is -- atomically replaced -- -- Ultimately, DBusObjectManagerClient 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::interface-added, -- DBusObject::interface-removed, -- DBusProxy::g-properties-changed and -- DBusProxy::g-signal signals are also emitted on -- the DBusObjectManagerClient instance managing these objects. -- The signals emitted are -- DBusObjectManager::interface-added, -- DBusObjectManager::interface-removed, -- DBusObjectManagerClient::interface-proxy-properties-changed -- and -- DBusObjectManagerClient::interface-proxy-signal. -- -- Note that all callbacks and signals are emitted in the [thread-default -- main context][g-main-context-push-thread-default] that the -- DBusObjectManagerClient object was constructed in. -- Additionally, the DBusObjectProxy and DBusProxy objects -- originating from the DBusObjectManagerClient 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 -- | A convenience alias for Nothing :: Maybe -- DBusObjectManagerClient. noDBusObjectManagerClient :: Maybe 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:name-owner -- 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 => BusType -> IO (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, IsDBusConnection a) => a -> IO (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 => [DBusObjectManagerClientFlags] -> IO (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 => Ptr () -> IO (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 => Ptr () -> IO (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 => Ptr () -> IO (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 => Text -> IO (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 => Text -> IO (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) -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback = Ptr () -> Ptr DBusObjectProxy -> Ptr DBusProxy -> Ptr GVariant -> Ptr CString -> Ptr () -> IO () -- | 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 " /@objectProxy@/: The 'GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy' on which an interface has properties that are changing. " -> DBusProxy " /@interfaceProxy@/: The 'GI.Gio.Objects.DBusProxy.DBusProxy' that has properties that are changing. " -> GVariant " /@changedProperties@/: A 'GVariant' containing the properties that changed (type: @a{sv}@). " -> [Text] " /@invalidatedProperties@/: A 'Nothing' terminated array of properties that were invalidated. " -> IO () -- | Connect a signal handler for the -- “interface-proxy-properties-changed” signal, to be run after -- the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after dBusObjectManagerClient #interfaceProxyPropertiesChanged callback --afterDBusObjectManagerClientInterfaceProxyPropertiesChanged :: (IsDBusObjectManagerClient a, MonadIO m) => a -> DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectManagerClientInterfaceProxyPropertiesChanged :: MonadIO m => DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> m (GClosure C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback. mk_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback :: C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> IO (FunPtr C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback. noDBusObjectManagerClientInterfaceProxyPropertiesChangedCallback :: Maybe DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -- | Connect a signal handler for the -- “interface-proxy-properties-changed” 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 -> DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> m SignalHandlerId -- | Wrap a -- DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -- into a -- C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback. wrap_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback :: DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_DBusObjectManagerClientInterfaceProxySignalCallback = Ptr () -> Ptr DBusObjectProxy -> Ptr DBusProxy -> CString -> CString -> Ptr GVariant -> Ptr () -> IO () -- | 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 " /@objectProxy@/: The 'GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy' on which an interface is emitting a D-Bus signal. " -> DBusProxy " /@interfaceProxy@/: The 'GI.Gio.Objects.DBusProxy.DBusProxy' that is emitting a D-Bus signal. " -> Text " /@senderName@/: The sender of the signal or NULL if the connection is not a bus connection. " -> Text " /@signalName@/: The signal name. " -> GVariant " /@parameters@/: A 'GVariant' tuple with parameters for the signal. " -> IO () -- | Connect a signal handler for the “interface-proxy-signal” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after dBusObjectManagerClient #interfaceProxySignal callback --afterDBusObjectManagerClientInterfaceProxySignal :: (IsDBusObjectManagerClient a, MonadIO m) => a -> DBusObjectManagerClientInterfaceProxySignalCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusObjectManagerClientInterfaceProxySignal :: MonadIO m => DBusObjectManagerClientInterfaceProxySignalCallback -> m (GClosure C_DBusObjectManagerClientInterfaceProxySignalCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusObjectManagerClientInterfaceProxySignalCallback. mk_DBusObjectManagerClientInterfaceProxySignalCallback :: C_DBusObjectManagerClientInterfaceProxySignalCallback -> IO (FunPtr C_DBusObjectManagerClientInterfaceProxySignalCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusObjectManagerClientInterfaceProxySignalCallback. noDBusObjectManagerClientInterfaceProxySignalCallback :: Maybe DBusObjectManagerClientInterfaceProxySignalCallback -- | Connect a signal handler for the “interface-proxy-signal” -- 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 -> DBusObjectManagerClientInterfaceProxySignalCallback -> m SignalHandlerId -- | Wrap a DBusObjectManagerClientInterfaceProxySignalCallback into -- a C_DBusObjectManagerClientInterfaceProxySignalCallback. wrap_DBusObjectManagerClientInterfaceProxySignalCallback :: DBusObjectManagerClientInterfaceProxySignalCallback -> C_DBusObjectManagerClientInterfaceProxySignalCallback 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.BasicTypes.GObject GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient -- | The DBusConnection type is used for D-Bus connections to remote -- peers such as a message buses. It is a low-level API that offers a lot -- of flexibility. For instance, it lets you establish a connection over -- any transport that can by represented as an 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 -- g_bus_own_name(), g_bus_watch_name() -- 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, -- 'GI.Gio.Objects.DBusConnection.DBusConnection'\'s methods may be -- called from any thread. This is so that busGet and -- busGetSync can safely return the same DBusConnection -- when called from any thread. -- -- Most of the ways to obtain a DBusConnection 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 g_initable_new() -- or g_async_initable_new_async(), which also initialize -- the connection. -- -- If you construct an uninitialized DBusConnection, such as via -- g_object_new(), you must initialize it via -- initableInit or asyncInitableInitAsync before using its -- methods or properties. Calling methods or accessing properties on a -- DBusConnection 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 -- DBusConnection is to free it with objectUnref. -- -- # {gdbus-server} -- -- Here is an example for a D-Bus server: gdbus-example-server.c -- -- # {gdbus-subtree-server} -- -- Here is an example for exporting a subtree: -- gdbus-example-subtree.c -- -- # {gdbus-unix-fd-client} -- -- Here is an example for passing UNIX file descriptors: -- gdbus-unix-fd-client.c -- -- # {gdbus-export} -- -- Here is an example for exporting a Object: -- gdbus-example-export.c -- -- Since: 2.26 module GI.Gio.Objects.DBusConnection -- | Memory-managed wrapper type. newtype DBusConnection DBusConnection :: ManagedPtr DBusConnection -> DBusConnection -- | Type class for types which can be safely cast to -- DBusConnection, for instance with toDBusConnection. class (GObject o, IsDescendantOf DBusConnection o) => IsDBusConnection o -- | Cast to DBusConnection, for types for which this is known to be -- safe. For general casts, use castTo. toDBusConnection :: (MonadIO m, IsDBusConnection o) => o -> m DBusConnection -- | A convenience alias for Nothing :: Maybe -- DBusConnection. noDBusConnection :: Maybe DBusConnection -- | Adds a message filter. Filters are handlers that are run on all -- incoming and outgoing messages, prior to standard dispatch. Filters -- are run in the order that they were added. The same handler can be -- added as a filter more than once, in which case it will be run more -- than once. Filters added during a filter callback won't be run on the -- message being processed. Filter functions are allowed to modify and -- even drop messages. -- -- Note that filters are run in a dedicated message handling thread so -- they can't block and, generally, can't do anything but signal a worker -- thread. Also note that filters are rarely needed - use API such as -- dBusConnectionSendMessageWithReply, -- dBusConnectionSignalSubscribe or dBusConnectionCall -- instead. -- -- If a filter consumes an incoming message the message is not dispatched -- anywhere else - not even the standard dispatch machinery (that API -- such as dBusConnectionSignalSubscribe and -- dBusConnectionSendMessageWithReply relies on) will see the -- message. Similarly, if a filter consumes an outgoing message, the -- message will not be sent to the other peer. -- -- If 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 filter is removed, and may be called after -- connection has been destroyed.) -- -- Since: 2.26 dBusConnectionAddFilter :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> DBusMessageFilterFunction -> m Word32 -- | Asynchronously 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. Unless -- it’s G_VARIANT_TYPE_UNIT, the -- replyType will be a tuple containing one or more -- values. -- -- If the parameters GVariant is floating, it is -- consumed. This allows convenient 'inline' use of -- g_variant_new(), e.g.: -- --
-- g_dbus_connection_call (connection,
-- "org.freedesktop.StringThings",
-- "/org/freedesktop/StringThings",
-- "org.freedesktop.StringThings",
-- "TwoStrings",
-- g_variant_new ("(ss)",
-- "Thing One",
-- "Thing Two"),
-- NULL,
-- G_DBUS_CALL_FLAGS_NONE,
-- -1,
-- NULL,
-- (GAsyncReadyCallback) two_strings_done,
-- NULL);
--
--
-- 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.
--
-- 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.
--
-- 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.
--
-- 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:exit-on-close).
--
-- 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).
--
-- 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:exit-on-close 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 a 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 or
-- DBusConnectionFlagsAuthenticationAllowAnonymous flags.
--
-- When the operation is finished, callback will be
-- invoked. You can then call dBusConnectionNewFinish to get the
-- result of the operation.
--
-- If observer is not Nothing it may be used to
-- control the authentication process.
--
-- This is a 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 or
-- DBusConnectionFlagsAuthenticationAllowAnonymous 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
-- G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES
-- flag is set the introspection function is used to
-- check if the node supports the requested method. If so, the
-- dispatch function is used to determine where to
-- dispatch the call. The collected 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
-- G_IO_ERROR_EXISTS.
--
-- 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.
--
-- 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.
--
-- 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.
--
-- 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:exit-on-close for more details.
--
-- Note that this function should be used with care. Most modern UNIX
-- desktops tie the notion of a user session the session bus, and expect
-- all of a users 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 with a whenever the signal is received. Note
-- that callback will be invoked in the [thread-default
-- main context][g-main-context-push-thread-default] of the thread you
-- are calling this method from.
--
-- If connection is not a message bus connection,
-- sender must be 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.)
--
-- 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.
--
-- 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 => Text -> IO (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, IsDBusAuthObserver a) => a -> IO (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 => Bool -> IO (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 => [DBusConnectionFlags] -> IO (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 => Text -> IO (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, IsIOStream a) => a -> IO (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) -- | Type for the callback on the (unwrapped) C side. type C_DBusConnectionClosedCallback = Ptr () -> CInt -> Ptr GError -> Ptr () -> IO () -- | Emitted when the connection is closed. -- -- The cause of this event can be -- --
-- after dBusConnection #closed callback --afterDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> DBusConnectionClosedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DBusConnectionClosed :: MonadIO m => DBusConnectionClosedCallback -> m (GClosure C_DBusConnectionClosedCallback) -- | Generate a function pointer callable from C code, from a -- C_DBusConnectionClosedCallback. mk_DBusConnectionClosedCallback :: C_DBusConnectionClosedCallback -> IO (FunPtr C_DBusConnectionClosedCallback) -- | A convenience synonym for Nothing :: Maybe -- DBusConnectionClosedCallback. noDBusConnectionClosedCallback :: Maybe DBusConnectionClosedCallback -- | 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 -> DBusConnectionClosedCallback -> m SignalHandlerId -- | Wrap a DBusConnectionClosedCallback into a -- C_DBusConnectionClosedCallback. wrap_DBusConnectionClosedCallback :: DBusConnectionClosedCallback -> C_DBusConnectionClosedCallback 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.BasicTypes.GObject GI.Gio.Objects.DBusConnection.DBusConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.DBusConnection.DBusConnection -- | Buffered input stream implements FilterInputStream and provides -- for buffered reads. -- -- By default, -- 'GI.Gio.Objects.BufferedInputStream.BufferedInputStream'\'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 -- | A convenience alias for Nothing :: Maybe -- BufferedInputStream. noBufferedInputStream :: Maybe 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 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. -- -- 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 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. -- -- 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 Word64 -- | Gets the size of the input buffer. bufferedInputStreamGetBufferSize :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> m Word64 -- | 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 -> Word64 -> m BufferedInputStream -- | Peeks in the buffer, copying data of size count into -- buffer, offset offset bytes. bufferedInputStreamPeek :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> ByteString -> Word64 -> m Word64 -- | 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 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. 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 -> Word64 -> 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 => Word32 -> IO (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 (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.BasicTypes.GObject GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.BufferedInputStream.BufferedInputStream -- | The Volume interface represents user-visible objects that can -- be mounted. Note, when porting from GnomeVFS, Volume is the -- moral equivalent of GnomeVFSDrive. -- -- Mounting a Volume instance is an asynchronous operation. For -- more information about asynchronous operations, see AsyncResult -- and Task. To mount a Volume, first call -- volumeMount with (at least) the Volume instance, -- optionally a MountOperation object and a -- AsyncReadyCallback. -- -- Typically, one will only want to pass Nothing 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 Volume instance and the -- AsyncResult data to see if the operation was completed -- successfully. If an error is present when -- volumeMountFinish is called, then it will be filled with any -- error information. -- -- # {volume-identifier} -- -- It is sometimes necessary to directly access the underlying operating -- system object behind a volume (e.g. for passing a volume to an -- application via the commandline). For this purpose, GIO allows to -- obtain an 'identifier' for the volume. There can be different kinds of -- identifiers, such as Hal UDIs, filesystem labels, traditional Unix -- devices (e.g. /dev/sda2), UUIDs. GIO uses predefined strings -- as names for the different kinds of identifiers: -- VOLUME_IDENTIFIER_KIND_UUID, -- VOLUME_IDENTIFIER_KIND_LABEL, etc. Use -- volumeGetIdentifier to obtain an identifier for a volume. -- -- Note that VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available -- when the gvfs hal volume monitor is in use. Other volume monitors will -- generally be able to provide the -- VOLUME_IDENTIFIER_KIND_UNIX_DEVICE identifier, which can be -- used to obtain a hal device by means of -- libhal_manager_find_device_string_match(). module GI.Gio.Interfaces.Volume -- | Memory-managed wrapper type. newtype Volume Volume :: ManagedPtr Volume -> Volume -- | A convenience alias for Nothing :: Maybe Volume. noVolume :: Maybe Volume -- | Type class for types which can be safely cast to Volume, for -- instance with toVolume. class (GObject o, IsDescendantOf Volume o) => IsVolume o -- | Cast to Volume, for types for which this is known to be safe. -- For general casts, use castTo. toVolume :: (MonadIO m, IsVolume o) => o -> m Volume -- | Checks if a volume can be ejected. volumeCanEject :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Bool -- | Checks if a volume can be mounted. volumeCanMount :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Bool -- | Ejects a volume. This is an asynchronous operation, and is finished by -- calling volumeEjectFinish with the volume and -- AsyncResult returned in the callback. -- | Deprecated: (Since version 2.22)Use volumeEjectWithOperation -- instead. volumeEject :: (HasCallStack, MonadIO m, IsVolume a, IsCancellable b) => a -> [MountUnmountFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m () -- | Finishes ejecting a volume. If any errors occurred during the -- operation, error will be set to contain the errors and -- False will be returned. -- | Deprecated: (Since version 2.22)Use -- volumeEjectWithOperationFinish instead. volumeEjectFinish :: (HasCallStack, MonadIO m, IsVolume a, IsAsyncResult b) => a -> b -> m () -- | Ejects a volume. This is an asynchronous operation, and is finished by -- calling volumeEjectWithOperationFinish with the -- volume and AsyncResult data returned in the -- callback. -- -- Since: 2.22 volumeEjectWithOperation :: (HasCallStack, MonadIO m, IsVolume a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m () -- | Finishes ejecting a volume. If any errors occurred during the -- operation, error will be set to contain the errors and -- False will be returned. -- -- Since: 2.22 volumeEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsVolume a, IsAsyncResult b) => a -> b -> m () -- | Gets the kinds of [identifiers][volume-identifier] that -- volume has. Use volumeGetIdentifier to obtain -- the identifiers themselves. volumeEnumerateIdentifiers :: (HasCallStack, MonadIO m, IsVolume a) => a -> m [Text] -- | Gets the activation root for a Volume if it is known ahead of -- mount time. Returns Nothing otherwise. If not Nothing -- and if volume is mounted, then the result of -- mountGetRoot on the Mount object obtained from -- volumeGetMount will always either be equal or a prefix of what -- this function returns. In other words, in code -- --
-- GMount *mount; -- GFile *mount_root -- GFile *volume_activation_root; -- -- 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][volume-identifier] 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 -- | Type for the callback on the (unwrapped) C side. type C_VolumeChangedCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterVolumeChanged :: (IsVolume a, MonadIO m) => a -> VolumeChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeChanged :: MonadIO m => VolumeChangedCallback -> m (GClosure C_VolumeChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeChangedCallback. mk_VolumeChangedCallback :: C_VolumeChangedCallback -> IO (FunPtr C_VolumeChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeChangedCallback. noVolumeChangedCallback :: Maybe VolumeChangedCallback -- | 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 -> VolumeChangedCallback -> m SignalHandlerId -- | Wrap a VolumeChangedCallback into a -- C_VolumeChangedCallback. wrap_VolumeChangedCallback :: VolumeChangedCallback -> C_VolumeChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_VolumeRemovedCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterVolumeRemoved :: (IsVolume a, MonadIO m) => a -> VolumeRemovedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_VolumeRemoved :: MonadIO m => VolumeRemovedCallback -> m (GClosure C_VolumeRemovedCallback) -- | Generate a function pointer callable from C code, from a -- C_VolumeRemovedCallback. mk_VolumeRemovedCallback :: C_VolumeRemovedCallback -> IO (FunPtr C_VolumeRemovedCallback) -- | A convenience synonym for Nothing :: Maybe -- VolumeRemovedCallback. noVolumeRemovedCallback :: Maybe VolumeRemovedCallback -- | 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 -> VolumeRemovedCallback -> m SignalHandlerId -- | Wrap a VolumeRemovedCallback into a -- C_VolumeRemovedCallback. wrap_VolumeRemovedCallback :: VolumeRemovedCallback -> C_VolumeRemovedCallback 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.GObject GI.Gio.Interfaces.Volume.Volume instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Volume.Volume -- | ProxyResolver provides synchronous and asynchronous network -- proxy resolution. ProxyResolver is used within -- SocketClient through the method -- socketConnectableProxyEnumerate. -- -- Implementations of ProxyResolver 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 -- | A convenience alias for Nothing :: Maybe -- ProxyResolver. noProxyResolver :: Maybe 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 (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.GObject GI.Gio.Interfaces.ProxyResolver.ProxyResolver instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.ProxyResolver.ProxyResolver -- | A Proxy 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 -- | A convenience alias for Nothing :: Maybe Proxy. noProxy :: Maybe 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 -- | Lookup "gio-proxy" extension point for a proxy implementation that -- supports specified protocol. -- -- Since: 2.26 proxyGetDefaultForProtocol :: (HasCallStack, MonadIO m) => Text -> m 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 (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.GObject GI.Gio.Interfaces.Proxy.Proxy instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Proxy.Proxy -- | NetworkMonitor 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 -- | A convenience alias for Nothing :: Maybe -- NetworkMonitor. noNetworkMonitor :: Maybe 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:network-available 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:network-available is -- False, then the connectivity state will be -- NetworkConnectivityLocal. -- -- If NetworkMonitor:network-available 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:network-available for more -- details. -- -- Since: 2.32 networkMonitorGetNetworkAvailable :: (HasCallStack, MonadIO m, IsNetworkMonitor a) => a -> m Bool -- | Checks if the network is metered. See -- NetworkMonitor:network-metered 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 -- | Type for the callback on the (unwrapped) C side. type C_NetworkMonitorNetworkChangedCallback = Ptr () -> CInt -> Ptr () -> IO () -- | Emitted when the network configuration changes. -- -- Since: 2.32 type NetworkMonitorNetworkChangedCallback = Bool " /@networkAvailable@/: the current value of 'GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor':@/network-available/@ " -> IO () -- | Connect a signal handler for the “network-changed” signal, to -- be run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after networkMonitor #networkChanged callback --afterNetworkMonitorNetworkChanged :: (IsNetworkMonitor a, MonadIO m) => a -> NetworkMonitorNetworkChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_NetworkMonitorNetworkChanged :: MonadIO m => NetworkMonitorNetworkChangedCallback -> m (GClosure C_NetworkMonitorNetworkChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_NetworkMonitorNetworkChangedCallback. mk_NetworkMonitorNetworkChangedCallback :: C_NetworkMonitorNetworkChangedCallback -> IO (FunPtr C_NetworkMonitorNetworkChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- NetworkMonitorNetworkChangedCallback. noNetworkMonitorNetworkChangedCallback :: Maybe NetworkMonitorNetworkChangedCallback -- | Connect a signal handler for the “network-changed” 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 -> NetworkMonitorNetworkChangedCallback -> m SignalHandlerId -- | Wrap a NetworkMonitorNetworkChangedCallback into a -- C_NetworkMonitorNetworkChangedCallback. wrap_NetworkMonitorNetworkChangedCallback :: NetworkMonitorNetworkChangedCallback -> C_NetworkMonitorNetworkChangedCallback 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.GObject GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.NetworkMonitor.NetworkMonitor -- | The Mount interface represents user-visible mounts. Note, when -- porting from GnomeVFS, Mount is the moral equivalent of -- GnomeVFSVolume. -- -- Mount 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. -- Might or might not be related to a volume object. -- -- Unmounting a Mount instance is an asynchronous operation. For -- more information about asynchronous operations, see AsyncResult -- and Task. To unmount a Mount instance, first call -- mountUnmountWithOperation with (at least) the Mount -- instance and a 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 Mount 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. module GI.Gio.Interfaces.Mount -- | Memory-managed wrapper type. newtype Mount Mount :: ManagedPtr Mount -> Mount -- | A convenience alias for Nothing :: Maybe Mount. noMount :: Maybe 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 an 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 () -- | Type for the callback on the (unwrapped) C side. type C_MountChangedCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterMountChanged :: (IsMount a, MonadIO m) => a -> MountChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountChanged :: MonadIO m => MountChangedCallback -> m (GClosure C_MountChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_MountChangedCallback. mk_MountChangedCallback :: C_MountChangedCallback -> IO (FunPtr C_MountChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- MountChangedCallback. noMountChangedCallback :: Maybe MountChangedCallback -- | 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 -> MountChangedCallback -> m SignalHandlerId -- | Wrap a MountChangedCallback into a -- C_MountChangedCallback. wrap_MountChangedCallback :: MountChangedCallback -> C_MountChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_MountPreUnmountCallback = Ptr () -> Ptr () -> IO () -- | 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 “pre-unmount” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after mount #preUnmount callback --afterMountPreUnmount :: (IsMount a, MonadIO m) => a -> MountPreUnmountCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountPreUnmount :: MonadIO m => MountPreUnmountCallback -> m (GClosure C_MountPreUnmountCallback) -- | Generate a function pointer callable from C code, from a -- C_MountPreUnmountCallback. mk_MountPreUnmountCallback :: C_MountPreUnmountCallback -> IO (FunPtr C_MountPreUnmountCallback) -- | A convenience synonym for Nothing :: Maybe -- MountPreUnmountCallback. noMountPreUnmountCallback :: Maybe MountPreUnmountCallback -- | Connect a signal handler for the “pre-unmount” 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 -> MountPreUnmountCallback -> m SignalHandlerId -- | Wrap a MountPreUnmountCallback into a -- C_MountPreUnmountCallback. wrap_MountPreUnmountCallback :: MountPreUnmountCallback -> C_MountPreUnmountCallback -- | Type for the callback on the (unwrapped) C side. type C_MountUnmountedCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterMountUnmounted :: (IsMount a, MonadIO m) => a -> MountUnmountedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_MountUnmounted :: MonadIO m => MountUnmountedCallback -> m (GClosure C_MountUnmountedCallback) -- | Generate a function pointer callable from C code, from a -- C_MountUnmountedCallback. mk_MountUnmountedCallback :: C_MountUnmountedCallback -> IO (FunPtr C_MountUnmountedCallback) -- | A convenience synonym for Nothing :: Maybe -- MountUnmountedCallback. noMountUnmountedCallback :: Maybe MountUnmountedCallback -- | 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 -> MountUnmountedCallback -> m SignalHandlerId -- | Wrap a MountUnmountedCallback into a -- C_MountUnmountedCallback. wrap_MountUnmountedCallback :: MountUnmountedCallback -> C_MountUnmountedCallback 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.GObject GI.Gio.Interfaces.Mount.Mount instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Mount.Mount -- | 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 -- | A convenience alias for Nothing :: Maybe -- LoadableIcon. noLoadableIcon :: Maybe 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 (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.GObject GI.Gio.Interfaces.LoadableIcon.LoadableIcon instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.LoadableIcon.LoadableIcon -- | File 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 File 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 File, you can use: -- --
-- 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 => [Text] -> IO (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, IsDatagramBased a) => a -> IO (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, IsTlsCertificate a) => a -> IO (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 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 () -- | Construct a GValueConstruct with valid value for the -- “database” property. This is rarely needed directly, but it -- is used by new. constructDtlsConnectionDatabase :: (IsDtlsConnection o, IsTlsDatabase a) => a -> IO (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 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, IsTlsInteraction a) => a -> IO (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 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 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] -- | 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 => TlsRehandshakeMode -> IO (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 => Bool -> IO (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 () -- | Type for the callback on the (unwrapped) C side. type C_DtlsConnectionAcceptCertificateCallback = Ptr () -> Ptr TlsCertificate -> CUInt -> Ptr () -> IO CInt -- | 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. -- -- 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 " /@peerCert@/: the peer\'s 'GI.Gio.Objects.TlsCertificate.TlsCertificate' " -> [TlsCertificateFlags] " /@errors@/: the problems with /@peerCert@/. " -> IO Bool " __Returns:__ 'True' to accept /@peerCert@/ (which will also immediately end the signal emission). 'False' to allow the signal emission to continue, which will cause the handshake to fail if no one else overrides it. " -- | Connect a signal handler for the “accept-certificate” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after dtlsConnection #acceptCertificate callback --afterDtlsConnectionAcceptCertificate :: (IsDtlsConnection a, MonadIO m) => a -> DtlsConnectionAcceptCertificateCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DtlsConnectionAcceptCertificate :: MonadIO m => DtlsConnectionAcceptCertificateCallback -> m (GClosure C_DtlsConnectionAcceptCertificateCallback) -- | Generate a function pointer callable from C code, from a -- C_DtlsConnectionAcceptCertificateCallback. mk_DtlsConnectionAcceptCertificateCallback :: C_DtlsConnectionAcceptCertificateCallback -> IO (FunPtr C_DtlsConnectionAcceptCertificateCallback) -- | A convenience synonym for Nothing :: Maybe -- DtlsConnectionAcceptCertificateCallback. noDtlsConnectionAcceptCertificateCallback :: Maybe DtlsConnectionAcceptCertificateCallback -- | Connect a signal handler for the “accept-certificate” 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 -> DtlsConnectionAcceptCertificateCallback -> m SignalHandlerId -- | Wrap a DtlsConnectionAcceptCertificateCallback into a -- C_DtlsConnectionAcceptCertificateCallback. wrap_DtlsConnectionAcceptCertificateCallback :: DtlsConnectionAcceptCertificateCallback -> C_DtlsConnectionAcceptCertificateCallback 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.BasicTypes.GObject GI.Gio.Interfaces.DtlsConnection.DtlsConnection instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DtlsConnection.DtlsConnection -- | Drive - this represent a piece of hardware connected to the -- machine. It's generally only created for removable hardware or -- hardware with removable media. -- -- Drive is a container class for Volume objects that stem -- from the same piece of media. As such, Drive 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 Drive 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 potententially expensive and may spin -- up the drive creating noise. -- -- Drive 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 Drive 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 -- Drive in that API. module GI.Gio.Interfaces.Drive -- | Memory-managed wrapper type. newtype Drive Drive :: ManagedPtr Drive -> Drive -- | A convenience alias for Nothing :: Maybe Drive. noDrive :: Maybe 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 capabable 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 () -- | Type for the callback on the (unwrapped) C side. type C_DriveChangedCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterDriveChanged :: (IsDrive a, MonadIO m) => a -> DriveChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DriveChanged :: MonadIO m => DriveChangedCallback -> m (GClosure C_DriveChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_DriveChangedCallback. mk_DriveChangedCallback :: C_DriveChangedCallback -> IO (FunPtr C_DriveChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- DriveChangedCallback. noDriveChangedCallback :: Maybe DriveChangedCallback -- | 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 -> DriveChangedCallback -> m SignalHandlerId -- | Wrap a DriveChangedCallback into a -- C_DriveChangedCallback. wrap_DriveChangedCallback :: DriveChangedCallback -> C_DriveChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_DriveDisconnectedCallback = Ptr () -> Ptr () -> IO () -- | 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 --afterDriveDisconnected :: (IsDrive a, MonadIO m) => a -> DriveDisconnectedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DriveDisconnected :: MonadIO m => DriveDisconnectedCallback -> m (GClosure C_DriveDisconnectedCallback) -- | Generate a function pointer callable from C code, from a -- C_DriveDisconnectedCallback. mk_DriveDisconnectedCallback :: C_DriveDisconnectedCallback -> IO (FunPtr C_DriveDisconnectedCallback) -- | A convenience synonym for Nothing :: Maybe -- DriveDisconnectedCallback. noDriveDisconnectedCallback :: Maybe DriveDisconnectedCallback -- | 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 -> DriveDisconnectedCallback -> m SignalHandlerId -- | Wrap a DriveDisconnectedCallback into a -- C_DriveDisconnectedCallback. wrap_DriveDisconnectedCallback :: DriveDisconnectedCallback -> C_DriveDisconnectedCallback -- | Type for the callback on the (unwrapped) C side. type C_DriveEjectButtonCallback = Ptr () -> Ptr () -> IO () -- | Emitted when the physical eject button (if any) of a drive has been -- pressed. type DriveEjectButtonCallback = IO () -- | Connect a signal handler for the “eject-button” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after drive #ejectButton callback --afterDriveEjectButton :: (IsDrive a, MonadIO m) => a -> DriveEjectButtonCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DriveEjectButton :: MonadIO m => DriveEjectButtonCallback -> m (GClosure C_DriveEjectButtonCallback) -- | Generate a function pointer callable from C code, from a -- C_DriveEjectButtonCallback. mk_DriveEjectButtonCallback :: C_DriveEjectButtonCallback -> IO (FunPtr C_DriveEjectButtonCallback) -- | A convenience synonym for Nothing :: Maybe -- DriveEjectButtonCallback. noDriveEjectButtonCallback :: Maybe DriveEjectButtonCallback -- | Connect a signal handler for the “eject-button” 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 -> DriveEjectButtonCallback -> m SignalHandlerId -- | Wrap a DriveEjectButtonCallback into a -- C_DriveEjectButtonCallback. wrap_DriveEjectButtonCallback :: DriveEjectButtonCallback -> C_DriveEjectButtonCallback -- | Type for the callback on the (unwrapped) C side. type C_DriveStopButtonCallback = Ptr () -> Ptr () -> IO () -- | 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 “stop-button” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after drive #stopButton callback --afterDriveStopButton :: (IsDrive a, MonadIO m) => a -> DriveStopButtonCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_DriveStopButton :: MonadIO m => DriveStopButtonCallback -> m (GClosure C_DriveStopButtonCallback) -- | Generate a function pointer callable from C code, from a -- C_DriveStopButtonCallback. mk_DriveStopButtonCallback :: C_DriveStopButtonCallback -> IO (FunPtr C_DriveStopButtonCallback) -- | A convenience synonym for Nothing :: Maybe -- DriveStopButtonCallback. noDriveStopButtonCallback :: Maybe DriveStopButtonCallback -- | Connect a signal handler for the “stop-button” 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 -> DriveStopButtonCallback -> m SignalHandlerId -- | Wrap a DriveStopButtonCallback into a -- C_DriveStopButtonCallback. wrap_DriveStopButtonCallback :: DriveStopButtonCallback -> C_DriveStopButtonCallback 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.BasicTypes.GObject GI.Gio.Interfaces.Drive.Drive instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.Drive.Drive -- | 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 Initable. -- -- A class may implement both the Initable and -- AsyncInitable 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 -- g_async_initable_new_async() directly, or indirectly -- via a foo_thing_new_async() wrapper. This will call -- asyncInitableInitAsync under the cover, calling back with -- Nothing 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);
--
-- 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
-- | A convenience alias for Nothing :: Maybe
-- AsyncInitable.
noAsyncInitable :: Maybe 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 (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.BasicTypes.GObject GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.AsyncInitable.AsyncInitable
-- | AppInfo and AppLaunchContext 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 an
-- desktop-file based application with Exec key totem %U and a
-- single URI, sftp://foo/file.avi, then
-- /home/user/.gvfs/sftp on foo/file.avi will be passed. This
-- will only work if a set of suitable GIO extensions (such as gvfs 2.26
-- 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 Vfs 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
-- | A convenience alias for Nothing :: Maybe AppInfo.
noAppInfo :: Maybe 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
-- GAppInfos 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 GAppInfos are equal.
--
-- Note that the check <emphasis>may not</emphasis> 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 GAppInfos for a given content type,
-- including the recommended and fallback GAppInfos. 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 [Char]
-- | Gets the default AppInfo for a given content type.
appInfoGetDefaultForType :: (HasCallStack, MonadIO m) => Text -> Bool -> 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 ':', e.g. "http", "ftp" or "sip".
appInfoGetDefaultForUriScheme :: (HasCallStack, MonadIO m) => Text -> m AppInfo
-- | Gets a human-readable description of an installed application.
appInfoGetDescription :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m 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.
appInfoGetExecutable :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m [Char]
-- | Gets a list of fallback GAppInfos for a given content
-- type, i.e. those applications which claim to support the given content
-- type by MIME type subclassing and not directly.
--
-- Since: 2.28
appInfoGetFallbackForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]
-- | Gets the icon for the application.
appInfoGetIcon :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m 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 Nothing, depending on how the
-- appinfo has been constructed.
appInfoGetId :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Text
-- | Gets the installed name of the application.
appInfoGetName :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Text
-- | Gets a list of recommended GAppInfos for a given
-- content type, i.e. those applications which claim to support the given
-- content type exactly, and not by MIME type subclassing. Note that the
-- first application of the list is the last used one, i.e. the last one
-- for which 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 Nothing. 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 Nothing
-- 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 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 appInfoLaunchDefaultForUri 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.
--
-- To launch the application without arguments pass a Nothing
-- 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 (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.BasicTypes.GObject GI.Gio.Interfaces.AppInfo.AppInfo
instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.AppInfo.AppInfo
-- | Opaque class for defining and scheduling IO jobs.
module GI.Gio.Structs.IOSchedulerJob
-- | Memory-managed wrapper type.
newtype IOSchedulerJob
IOSchedulerJob :: ManagedPtr IOSchedulerJob -> IOSchedulerJob
-- | A convenience alias for Nothing :: Maybe
-- IOSchedulerJob.
noIOSchedulerJob :: Maybe 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: 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: Use g_main_context_invoke().
iOSchedulerJobSendToMainloopAsync :: (HasCallStack, MonadIO m) => IOSchedulerJob -> SourceFunc -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr 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
-- | A convenience alias for Nothing :: Maybe
-- IOStreamAdapter.
noIOStreamAdapter :: Maybe IOStreamAdapter
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter
-- | 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
-- | A convenience alias for Nothing :: Maybe
-- InputMessage.
noInputMessage :: Maybe 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 Word64 -- | Set the value of the “bytes_received” field. When -- overloading is enabled, this is equivalent to -- --
-- set inputMessage [ #bytesReceived := value ] --setInputMessageBytesReceived :: MonadIO m => InputMessage -> Word64 -> 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.WrappedPtr GI.Gio.Structs.InputMessage.InputMessage instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.InputMessage.InputMessage tag -- | 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 -- | A convenience alias for Nothing :: Maybe -- InputVector. noInputVector :: Maybe 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 Word64 -- | Set the value of the “size” field. When overloading is -- enabled, this is equivalent to -- --
-- set inputVector [ #size := value ] --setInputVectorSize :: MonadIO m => InputVector -> Word64 -> m () instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.InputVector.InputVector instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.InputVector.InputVector tag -- | An socket address of some unknown native type. module GI.Gio.Structs.NativeSocketAddress -- | Memory-managed wrapper type. newtype NativeSocketAddress NativeSocketAddress :: ManagedPtr NativeSocketAddress -> NativeSocketAddress -- | A convenience alias for Nothing :: Maybe -- NativeSocketAddress. noNativeSocketAddress :: Maybe NativeSocketAddress instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress -- | A DatagramBased 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. -- -- DatagramBased 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, Socket -- 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 DatagramBased 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 IOErrorEnumWouldBlock 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 IOErrorEnumTimedOut 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 IOErrorEnumWouldBlock 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 IOErrorEnumWouldBlock. -- -- As with Socket, 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 -- DatagramBased API. For connectionless socket types the -- target/source address is specified or received in each I/O operation. -- -- Like most other APIs in GLib, DatagramBased is not inherently -- thread safe. To use a DatagramBased 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 -- | A convenience alias for Nothing :: Maybe -- DatagramBased. noDatagramBased :: Maybe 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 (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.BasicTypes.GObject GI.Gio.Interfaces.DatagramBased.DatagramBased instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.DatagramBased.DatagramBased -- | 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 -- | A convenience alias for Nothing :: Maybe -- OutputMessage. noOutputMessage :: Maybe 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.WrappedPtr GI.Gio.Structs.OutputMessage.OutputMessage instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.OutputMessage.OutputMessage tag -- | A Socket 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. -- -- Socket 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 Socket is -- useful. -- -- Socket implements the Initable interface, so if it is -- manually constructed by e.g. 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 Nothing. -- -- 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 IOErrorEnumWouldBlock error. To know when a -- call would successfully run you can call socketConditionCheck, -- or socketConditionWait. You can also use -- g_socket_create_source() and attach it to a -- 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 IOErrorEnumWouldBlock 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 IOErrorEnumWouldBlock. -- -- 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 Socket causes the signal -- SIGPIPE to be ignored for the remainder of the -- program. If you are writing a command-line utility that uses -- Socket, 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, Socket is not inherently thread -- safe. To use a Socket concurrently from multiple threads, you -- must implement your own locking. -- -- 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 -- | A convenience alias for Nothing :: Maybe Socket. noSocket :: Maybe 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. -- -- Other ways to obtain credentials from a foreign peer includes the -- UnixCredentialsMessage type and -- unixConnectionSendCredentials / -- unixConnectionReceiveCredentials functions. -- -- Since: 2.26 socketGetCredentials :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Credentials -- | Gets the socket family of the socket. -- -- Since: 2.22 socketGetFamily :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketFamily -- | Returns the underlying OS socket object. On unix this is a socket file -- descriptor, and on Windows this is a Winsock2 SOCKET handle. This may -- be useful for doing platform specific or otherwise unusual operations -- on the socket. -- -- Since: 2.22 socketGetFd :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int32 -- | Gets the keepalive mode of the socket. For details on this, see -- socketSetKeepalive. -- -- Since: 2.22 socketGetKeepalive :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool -- | Gets the listen backlog setting of the socket. For details on this, -- see socketSetListenBacklog. -- -- Since: 2.22 socketGetListenBacklog :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int32 -- | Try to get the local address of a bound socket. This is only useful if -- the socket has been bound to a local address, either explicitly or -- implicitly when connecting. -- -- Since: 2.22 socketGetLocalAddress :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketAddress -- | Gets the multicast loopback setting on socket; if -- True (the default), outgoing multicast packets will be looped -- back to multicast listeners on the same host. -- -- Since: 2.32 socketGetMulticastLoopback :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool -- | Gets the multicast time-to-live setting on socket; see -- socketSetMulticastTtl for more details. -- -- Since: 2.32 socketGetMulticastTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32 -- | Gets the value of an integer-valued option on socket, -- as with getsockopt(). (If you need to fetch a -- non-integer-valued option, you will need to call -- getsockopt() directly.) -- -- The [<gio/gnetworking.h>][gio-gnetworking.h] header pulls in -- system headers that will define most of the standard/portable socket -- options. For unusual socket protocols or platform-dependent options, -- you may need to include additional headers. -- -- Note that even for socket options that are a single byte in size, -- value is still a pointer to a gint -- variable, not a guchar; socketGetOption will -- handle the conversion internally. -- -- Since: 2.36 socketGetOption :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> Int32 -> m Int32 -- | Gets the socket protocol id the socket was created with. In case the -- protocol is unknown, -1 is returned. -- -- Since: 2.22 socketGetProtocol :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketProtocol -- | Try to get the remote address of a connected socket. This is only -- useful for connection oriented sockets that have been connected. -- -- Since: 2.22 socketGetRemoteAddress :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketAddress -- | Gets the socket type of the socket. -- -- Since: 2.22 socketGetSocketType :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketType -- | Gets the timeout setting of the socket. For details on this, see -- socketSetTimeout. -- -- Since: 2.26 socketGetTimeout :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32 -- | Gets the unicast time-to-live setting on socket; see -- socketSetTtl for more details. -- -- Since: 2.32 socketGetTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32 -- | Checks whether a socket is closed. -- -- Since: 2.22 socketIsClosed :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool -- | Check whether the socket is connected. This is only useful for -- connection-oriented sockets. -- -- If using socketShutdown, this function will return True -- until the socket has been shut down for reading and writing. If you do -- a non-blocking connect, this function will not return True -- until after you call socketCheckConnectResult. -- -- Since: 2.22 socketIsConnected :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool -- | Registers socket to receive multicast messages sent to -- group. socket must be a -- SocketTypeDatagram socket, and must have been bound to an -- appropriate interface and port with socketBind. -- -- If iface is Nothing, the system will -- automatically pick an interface to bind to based on -- group. -- -- If sourceSpecific is True, source-specific -- multicast as defined in RFC 4604 is used. Note that on older platforms -- this may fail with a IOErrorEnumNotSupported error. -- -- To bind to a given source-specific multicast address, use -- socketJoinMulticastGroupSsm instead. -- -- Since: 2.32 socketJoinMulticastGroup :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b) => a -> b -> Bool -> Maybe Text -> m () -- | Registers socket to receive multicast messages sent to -- group. socket must be a -- SocketTypeDatagram socket, and must have been bound to an -- appropriate interface and port with socketBind. -- -- If iface is Nothing, the system will -- automatically pick an interface to bind to based on -- group. -- -- If sourceSpecific is not Nothing, use -- source-specific multicast as defined in RFC 4604. Note that on older -- platforms this may fail with a IOErrorEnumNotSupported error. -- -- Note that this function can be called multiple times for the same -- group with different sourceSpecific in -- order to receive multicast packets from more than one source. -- -- Since: 2.56 socketJoinMulticastGroupSsm :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b, IsInetAddress c) => a -> b -> Maybe c -> Maybe Text -> m () -- | Removes socket from the multicast group defined by -- group, iface, and -- sourceSpecific (which must all have the same values -- they had when you joined the group). -- -- socket remains bound to its address and port, and can -- still receive unicast messages after calling this. -- -- To unbind to a given source-specific multicast address, use -- socketLeaveMulticastGroupSsm instead. -- -- Since: 2.32 socketLeaveMulticastGroup :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b) => a -> b -> Bool -> Maybe Text -> m () -- | Removes socket from the multicast group defined by -- group, iface, and -- sourceSpecific (which must all have the same values -- they had when you joined the group). -- -- socket remains bound to its address and port, and can -- still receive unicast messages after calling this. -- -- Since: 2.56 socketLeaveMulticastGroupSsm :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b, IsInetAddress c) => a -> b -> Maybe c -> Maybe Text -> m () -- | Marks the socket as a server socket, i.e. a socket that is used to -- accept incoming requests using socketAccept. -- -- Before calling this the socket must be bound to a local address using -- socketBind. -- -- To set the maximum amount of outstanding clients, use -- socketSetListenBacklog. -- -- Since: 2.22 socketListen :: (HasCallStack, MonadIO m, IsSocket a) => a -> m () -- | Creates a new Socket with the defined family, type and -- protocol. If protocol is 0 -- (SocketProtocolDefault) the default protocol type for the -- family and type is used. -- -- The protocol is a family and type specific int that -- specifies what kind of protocol to use. SocketProtocol lists -- several common ones. Many families only support one protocol, and use -- 0 for this, others support several and using 0 means to use the -- default protocol for the family and type. -- -- The protocol id is passed directly to the operating system, so you can -- use protocols not listed in SocketProtocol if you know the -- protocol number used for it. -- -- Since: 2.22 socketNew :: (HasCallStack, MonadIO m) => SocketFamily -> SocketType -> SocketProtocol -> m Socket -- | Creates a new Socket from a native file descriptor or winsock -- SOCKET handle. -- -- This reads all the settings from the file descriptor so that all -- properties should work. Note that the file descriptor will be set to -- non-blocking mode, independent on the blocking mode of the -- Socket. -- -- On success, the returned Socket takes ownership of -- fd. On failure, the caller must close -- fd themselves. -- -- Since GLib 2.46, it is no longer a fatal error to call this on a -- non-socket descriptor. Instead, a GError will be set with code -- IOErrorEnumFailed -- -- Since: 2.22 socketNewFromFd :: (HasCallStack, MonadIO m) => Int32 -> m Socket -- | Receive data (up to size bytes) from a socket. This is -- mainly used by connection-oriented sockets; it is identical to -- socketReceiveFrom with address set to -- Nothing. -- -- For SocketTypeDatagram and SocketTypeSeqpacket sockets, -- socketReceive will always read either 0 or 1 complete messages -- from the socket. If the received message is too large to fit in -- buffer, then the data beyond size -- bytes will be discarded, without any explicit indication that this has -- occurred. -- -- For SocketTypeStream sockets, socketReceive can return -- any number of bytes, up to size. If more than -- size bytes have been received, the additional data -- will be returned in future calls to socketReceive. -- -- If the socket is in blocking mode the call will block until there is -- some data to receive, the connection is closed, or there is an error. -- If there is no data available and the socket is in non-blocking mode, -- a IOErrorEnumWouldBlock error will be returned. To be notified -- when data is available, wait for the IOConditionIn condition. -- -- On error -1 is returned and error is set accordingly. -- -- Since: 2.22 socketReceive :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe b -> m Int64 -- | Receive data (up to size bytes) from a socket. -- -- If address is non-Nothing then -- address will be set equal to the source address of the -- received packet. address is owned by the caller. -- -- See socketReceive for additional information. -- -- Since: 2.22 socketReceiveFrom :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe b -> m (Int64, SocketAddress) -- | Receive data from a socket. For receiving multiple messages, see -- socketReceiveMessages; for easier use, see socketReceive -- and socketReceiveFrom. -- -- If address is non-Nothing then -- address will be set equal to the source address of the -- received packet. address is owned by the caller. -- -- vector must point to an array of InputVector -- structs and numVectors must be the length of this -- array. These structs describe the buffers that received data will be -- scattered into. If numVectors is -1, then -- vectors is assumed to be terminated by a -- InputVector with a Nothing buffer pointer. -- -- As a special case, if numVectors is 0 (in which case, -- vectors may of course be Nothing), then a -- single byte is received and discarded. This is to facilitate the -- common practice of sending a single '\0' byte for the purposes of -- transferring ancillary data. -- -- messages, if non-Nothing, will be set to point -- to a newly-allocated array of SocketControlMessage instances or -- Nothing if no such messages was received. These correspond to -- the control messages received from the kernel, one -- SocketControlMessage per message from the kernel. This array is -- Nothing-terminated and must be freed by the caller using -- free after calling objectUnref on each element. If -- messages is Nothing, any control messages -- received will be discarded. -- -- numMessages, if non-Nothing, will be set to the -- number of control messages received. -- -- If both messages and numMessages are -- non-Nothing, then numMessages gives the number -- of SocketControlMessage instances in messages -- (ie: not including the Nothing terminator). -- -- flags is an in/out parameter. 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 (and -- socketReceiveMessage may pass system-specific flags out). Flags -- passed in to the parameter affect the receive operation; flags -- returned out of it are relevant to the specific returned message. -- -- As with socketReceive, data may be discarded if -- socket is SocketTypeDatagram or -- SocketTypeSeqpacket and you do not provide enough buffer space -- to read a complete message. You can pass SocketMsgFlagsPeek in -- flags to peek at the current message without removing -- it from the receive queue, but there is no portable way to find out -- the length of the message other than by reading it into a -- sufficiently-large buffer. -- -- If the socket is in blocking mode the call will block until there is -- some data to receive, the connection is closed, or there is an error. -- If there is no data available and the socket is in non-blocking mode, -- a IOErrorEnumWouldBlock error will be returned. To be notified -- when data is available, wait for the IOConditionIn condition. -- -- On error -1 is returned and error is set accordingly. -- -- Since: 2.22 socketReceiveMessage :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [InputVector] -> Int32 -> Maybe b -> m (Int64, Maybe SocketAddress, Maybe [SocketControlMessage], Int32) -- | Receive multiple data messages from socket in one go. -- This is the most complicated and fully-featured version of this call. -- For easier use, see socketReceive, socketReceiveFrom, -- and socketReceiveMessage. -- -- 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. Using multiple -- GInputVectors is more memory-efficient than manually -- copying data out of a single buffer to multiple sources, and more -- system-call-efficient than making multiple calls to -- socketReceive, such as in scenarios where a lot of data packets -- need to be received (e.g. high-bandwidth video streaming over -- RTP/UDP). -- -- 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 Socket:blocking is True the call will -- block until numMessages have been received, or the end -- of the stream is reached. -- -- If Socket:blocking is False the call -- will return up to numMessages without blocking, or -- IOErrorEnumWouldBlock if no messages are queued in the -- operating system to be received. -- -- In blocking mode, if Socket:timeout is positive -- and is reached before any messages are received, -- IOErrorEnumTimedOut is returned, otherwise up to -- numMessages are returned. (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 socketReceiveMessages even if -- you were previously notified of a IOConditionIn condition. -- -- If the remote peer closes the connection, any messages queued in the -- operating system will be returned, and subsequent calls to -- socketReceiveMessages will return 0 (with no error set). -- -- 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. -- -- Since: 2.48 socketReceiveMessages :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [InputMessage] -> Int32 -> Maybe b -> m Int32 -- | This behaves exactly the same as socketReceive, except that the -- choice of blocking or non-blocking behavior is determined by the -- blocking argument rather than by -- socket's properties. -- -- Since: 2.26 socketReceiveWithBlocking :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m Int64 -- | Tries to send size bytes from buffer -- on the socket. This is mainly used by connection-oriented sockets; it -- is identical to socketSendTo with address set -- to Nothing. -- -- If the socket is in blocking mode the call will block until there is -- space for the data in the socket queue. If there is no space available -- and the socket is in non-blocking mode a IOErrorEnumWouldBlock -- error will be returned. To be notified when space is available, wait -- for the IOConditionOut condition. Note though that you may -- still receive IOErrorEnumWouldBlock from socketSend 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.) -- -- On error -1 is returned and error is set accordingly. -- -- Since: 2.22 socketSend :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe b -> m Int64 -- | Send data to address on socket. For -- sending multiple messages see socketSendMessages; for easier -- use, see socketSend and socketSendTo. -- -- If address is Nothing then the message is sent -- to the default receiver (set by socketConnect). -- -- vectors must point to an array of OutputVector -- structs and numVectors must be the length of this -- array. (If numVectors is -1, then -- vectors is assumed to be terminated by a -- OutputVector with a Nothing buffer pointer.) The -- OutputVector structs describe the buffers that the sent data -- will be gathered from. Using multiple GOutputVectors -- is more memory-efficient than manually copying data from multiple -- sources into a single buffer, and more network-efficient than making -- multiple calls to socketSend. -- -- messages, if non-Nothing, is taken to point to -- an array of numMessages SocketControlMessage -- instances. These correspond to the control messages to be sent on the -- socket. If numMessages is -1 then -- messages is treated as a Nothing-terminated -- array. -- -- 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. -- -- If the socket is in blocking mode the call will block until there is -- space for the data in the socket queue. If there is no space available -- and the socket is in non-blocking mode a IOErrorEnumWouldBlock -- error will be returned. To be notified when space is available, wait -- for the IOConditionOut condition. Note though that you may -- still receive IOErrorEnumWouldBlock from socketSend 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.) -- -- On error -1 is returned and error is set accordingly. -- -- Since: 2.22 socketSendMessage :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe b -> [OutputVector] -> Maybe [SocketControlMessage] -> Int32 -> Maybe c -> m Int64 -- | This behaves exactly the same as socketSendMessage, except that -- the choice of timeout behavior is determined by the -- timeoutUs argument rather than by -- socket's properties. -- -- On error PollableReturnFailed is returned and -- error is set accordingly, or if the socket is -- currently not writable PollableReturnWouldBlock is returned. -- bytesWritten will contain 0 in both cases. -- -- Since: 2.60 socketSendMessageWithTimeout :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe b -> [OutputVector] -> Maybe [SocketControlMessage] -> Int32 -> Int64 -> Maybe c -> m (PollableReturn, Word64) -- | Send multiple data messages from socket in one go. -- This is the most complicated and fully-featured version of this call. -- For easier use, see socketSend, socketSendTo, and -- socketSendMessage. -- -- 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. Using multiple -- GOutputVectors is more memory-efficient than manually -- copying data from multiple sources into a single buffer, and more -- network-efficient than making multiple calls to socketSend. -- Sending multiple messages in one go avoids the overhead of making a -- lot of syscalls in scenarios where a lot of data packets need to be -- sent (e.g. high-bandwidth video streaming over RTP/UDP), or where the -- same data needs to be sent to multiple recipients. -- -- flags modify how the message is sent. The commonly -- available arguments for this are available in the -- 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. -- -- If the socket is in blocking mode the call will block until there is -- space for all the data in the socket queue. If there is no space -- available and the socket is in non-blocking mode a -- IOErrorEnumWouldBlock error will be returned if no data was -- written at all, otherwise the number of messages sent will be -- returned. To be notified when space is available, wait for the -- IOConditionOut condition. Note though that you may still -- receive IOErrorEnumWouldBlock from socketSend 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.) -- -- 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. -- -- Since: 2.44 socketSendMessages :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [OutputMessage] -> Int32 -> Maybe b -> m Int32 -- | Tries to send size bytes from buffer -- to address. If address is -- Nothing then the message is sent to the default receiver (set -- by socketConnect). -- -- See socketSend for additional information. -- -- Since: 2.22 socketSendTo :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe b -> ByteString -> Maybe c -> m Int64 -- | This behaves exactly the same as socketSend, except that the -- choice of blocking or non-blocking behavior is determined by the -- blocking argument rather than by -- socket's properties. -- -- Since: 2.26 socketSendWithBlocking :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Bool -> Maybe b -> m Int64 -- | Sets the blocking mode of the socket. In blocking mode all operations -- (which don’t take an explicit blocking parameter) block until they -- succeed or there is an error. In non-blocking mode all functions -- return results immediately or with a IOErrorEnumWouldBlock -- error. -- -- All sockets are created in blocking mode. However, note that the -- platform level socket is always non-blocking, and blocking mode is a -- GSocket level feature. -- -- Since: 2.22 socketSetBlocking :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m () -- | Sets whether socket should allow sending to broadcast -- addresses. This is False by default. -- -- Since: 2.32 socketSetBroadcast :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m () -- | Sets or unsets the SO_KEEPALIVE flag on the underlying -- socket. When this flag is set on a socket, the system will attempt to -- verify that the remote socket endpoint is still present if a -- sufficiently long period of time passes with no data being exchanged. -- If the system is unable to verify the presence of the remote endpoint, -- it will automatically close the connection. -- -- This option is only functional on certain kinds of sockets. (Notably, -- SocketProtocolTcp sockets.) -- -- The exact time between pings is system- and protocol-dependent, but -- will normally be at least two hours. Most commonly, you would set this -- flag on a server socket if you want to allow clients to remain idle -- for long periods of time, but also want to ensure that connections are -- eventually garbage-collected if clients crash or become unreachable. -- -- Since: 2.22 socketSetKeepalive :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m () -- | Sets the maximum number of outstanding connections allowed when -- listening on this socket. If more clients than this are connecting to -- the socket and the application is not handling them on time then the -- new connections will be refused. -- -- Note that this must be called before socketListen and has no -- effect if called after that. -- -- Since: 2.22 socketSetListenBacklog :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> m () -- | Sets whether outgoing multicast packets will be received by sockets -- listening on that multicast address on the same host. This is -- True by default. -- -- Since: 2.32 socketSetMulticastLoopback :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m () -- | Sets the time-to-live for outgoing multicast datagrams on -- socket. By default, this is 1, meaning that multicast -- packets will not leave the local network. -- -- Since: 2.32 socketSetMulticastTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m () -- | Sets the value of an integer-valued option on socket, -- as with setsockopt(). (If you need to set a -- non-integer-valued option, you will need to call -- setsockopt() directly.) -- -- The [<gio/gnetworking.h>][gio-gnetworking.h] header pulls in -- system headers that will define most of the standard/portable socket -- options. For unusual socket protocols or platform-dependent options, -- you may need to include additional headers. -- -- Since: 2.36 socketSetOption :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> Int32 -> Int32 -> m () -- | Sets the time in seconds after which I/O operations on -- socket will time out if they have not yet completed. -- -- On a blocking socket, this means that any blocking Socket -- operation will time out after timeout seconds of -- inactivity, returning IOErrorEnumTimedOut. -- -- On a non-blocking socket, calls to socketConditionWait will -- also fail with IOErrorEnumTimedOut after the given time. -- Sources created with g_socket_create_source() will -- trigger after timeout seconds of inactivity, with the -- requested condition set, at which point calling socketReceive, -- socketSend, socketCheckConnectResult, etc, will fail -- with IOErrorEnumTimedOut. -- -- If timeout is 0 (the default), operations will never -- time out on their own. -- -- Note that if an I/O operation is interrupted by a signal, this may -- cause the timeout to be reset. -- -- Since: 2.26 socketSetTimeout :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m () -- | Sets the time-to-live for outgoing unicast packets on -- socket. By default the platform-specific default value -- is used. -- -- Since: 2.32 socketSetTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m () -- | Shut down part or all of a full-duplex connection. -- -- If shutdownRead is True then the receiving side -- of the connection is shut down, and further reading is disallowed. -- -- If shutdownWrite is True then the sending side -- of the connection is shut down, and further writing is disallowed. -- -- It is allowed for both shutdownRead and -- shutdownWrite to be True. -- -- One example where it is useful to shut down only one side of a -- connection is graceful disconnect for TCP connections where you close -- the sending side, then wait for the other side to close the -- connection, thus ensuring that the other side saw all sent data. -- -- Since: 2.22 socketShutdown :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> Bool -> m () -- | Checks if a socket is capable of speaking IPv4. -- -- IPv4 sockets are capable of speaking IPv4. On some operating systems -- and under some combinations of circumstances IPv6 sockets are also -- capable of speaking IPv4. See RFC 3493 section 3.7 for more -- information. -- -- No other types of sockets are currently considered as being capable of -- speaking IPv4. -- -- Since: 2.22 socketSpeaksIpv4 :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool -- | Construct a GValueConstruct with valid value for the -- “blocking” property. This is rarely needed directly, but it -- is used by new. constructSocketBlocking :: IsSocket o => Bool -> IO (GValueConstruct o) -- | Get the value of the “blocking” property. When -- overloading is enabled, this is equivalent to -- --
-- 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 => Bool -> IO (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 => SocketFamily -> IO (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 => Int32 -> IO (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 => Bool -> IO (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 => Int32 -> IO (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 => Bool -> IO (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 => Word32 -> IO (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 => SocketProtocol -> IO (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 => Word32 -> IO (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 => Word32 -> IO (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 => SocketType -> IO (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 (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.GObject GI.Gio.Objects.Socket.Socket instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Socket.Socket -- | OutputStream 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. 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 -- | A convenience alias for Nothing :: Maybe -- OutputStream. noOutputStream :: Maybe 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 Word64 -- | 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 Word64 -- | 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-Bytes 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 Word64 -- | 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 Word64 -- | 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 Word64 -- | 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 Word64 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.GObject GI.Gio.Objects.OutputStream.OutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.OutputStream.OutputStream -- | PollableOutputStream is implemented by -- GOutputStreams 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. -- -- Since: 2.28 module GI.Gio.Interfaces.PollableOutputStream -- | Memory-managed wrapper type. newtype PollableOutputStream PollableOutputStream :: ManagedPtr PollableOutputStream -> PollableOutputStream -- | A convenience alias for Nothing :: Maybe -- PollableOutputStream. noPollableOutputStream :: Maybe 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. -- -- 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. -- -- 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. 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. -- -- Since: 2.60 pollableOutputStreamWritevNonblocking :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> [OutputVector] -> Maybe b -> m (PollableReturn, Word64) 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.GObject GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream module GI.Gio.Interfaces -- | 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 -- | A convenience alias for Nothing :: Maybe -- OutputVector. noOutputVector :: Maybe 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 Word64 -- | Set the value of the “size” field. When overloading is -- enabled, this is equivalent to -- --
-- set outputVector [ #size := value ] --setOutputVectorSize :: MonadIO m => OutputVector -> Word64 -> m () instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.OutputVector.OutputVector instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.OutputVector.OutputVector tag -- | 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, GMenu -- 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 Resource API and the -- [glib-compile-resources][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 its 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-stripblanks which will use the xmllint command to strip -- ignorable whitespace from the XML file. For this to work, the -- XMLLINT environment variable must be set to the full path to -- the xmllint executable, or xmllint must be in the PATH; -- otherwise the preprocessing step is skipped. -- -- to-pixdata which will use the gdk-pixbuf-pixdata command to -- convert images to the GdkPixdata format, which allows you to create -- pixbufs directly using the data inside the resource file, rather than -- an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata program -- must be in the PATH, or the GDK_PIXBUF_PIXDATA environment -- variable must be set to the full path to the gdk-pixbuf-pixdata -- executable; otherwise the resource compiler will abort. -- -- Resource files will be exported in the GResource namespace using the -- combination of the given prefix and the filename from the -- file element. The alias attribute can be used to -- alter the filename to expose them at a different location in the -- resource namespace. Typically, this is used to include files from a -- different source directory without exposing the source directory in -- the resource namespace, as in the example below. -- -- Resource bundles are created by the -- [glib-compile-resources][glib-compile-resources] program which takes -- an XML file that describes the bundle, and a set of files that the XML -- references. These are combined into a binary resource bundle. -- -- An example resource description: > >version="1.0" -- encoding="UTF-8"? >gresources > -- prefix="/org/gtk/Example" > -- filedatasplashscreen.png<file> > -- compressed="true"dialog.ui/file > -- preprocess="xml-stripblanks"menumarkup.xml/file > -- alias="example.css"dataexample.css<file> > -- /gresource >/gresources -- -- This will create a resource bundle with the following files: > -- >orggtkExampledata/splashscreen.png -- >orggtkExampledialog.ui -- >orggtkExamplemenumarkup.xml -- >orggtkExampleexample.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][glib-compile-resources] to -- compile the XML to a binary bundle that you can load with -- resourceLoad. However, its 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][glib-compile-resources]. -- get_resource() returns the generated Resource object. -- The register and unregister functions register the resource so its -- files can be accessed using resourcesLookupData. -- -- Once a Resource 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 Resource 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. -- -- When debugging a program or testing a change to an installed version, -- it is often useful to be able to replace resources in the program or -- library, without recompiling, for debugging or quick hacking and -- testing purposes. Since GLib 2.50, it is possible to use the -- G_RESOURCE_OVERLAYS environment variable to selectively -- overlay resources with replacements from the filesystem. It is a -- SEARCHPATH_SEPARATOR-separated list of substitutions to perform -- during resource lookups. -- -- A substitution has the form -- --
-- /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 -- | A convenience alias for Nothing :: Maybe -- Resource. noResource :: Maybe 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 (Word64, 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.Resource.Resource -- | The Settings class provides a convenient API for storing and -- retrieving application settings. -- -- Reads and writes can be considered to be non-blocking. Reading -- settings with Settings is typically extremely fast: on -- approximately the same order of magnitude (but slower than) a -- HashTable 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 Settings 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][gsettings-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 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 -- --> > 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][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][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 -- [example][schema-enumerated]. 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 > -- id="org.gtk.Test" path="/org/gtk/Test/" gettext-domain="test" -- > > name="greeting" type="s" > -- l10n="messages""Hello, earthlings"/default > -- summaryA greeting/summary > description > -- Greeting of the invading martians > /description > -- /key > > name="box" type="(ii)" > -- default(20,30)/default > /key > > -- name="empty-string" type="s" > -- default""/default > summaryEmpty strings have -- to be provided in GVariant form/summary > /key > -- > /schema >/schemalist -- -- An example for ranges, choices and enumerated types: > -- >schemalist > > id="org.gtk.Test.myenum" > -- nick="first" value="1"/ > nick="second" value="2"/ -- > /enum > > id="org.gtk.Test.myflags" > -- nick="flag1" value="1"/ > nick="flag2" value="2"/ -- > nick="flag3" value="4"/ > /flags > > -- id="org.gtk.Test" > > name="key-with-range" -- type="i" > min="1" max="100"/ > -- default10/default > /key > > -- name="key-with-choices" type="s" > choices > -- value='Elisabeth'/ > value='Annabeth'/ > -- value='Joe'/ > /choices > aliases > -- value='Anna' target='Annabeth'/ > value='Beth' -- target='Elisabeth'/ > /aliases > -- defaultJoe/default > /key > > -- name='enumerated-key' enum='org.gtk.Test.myenum' > -- defaultfirst/default > /key > > -- name='flags-key' flags='org.gtk.Test.myflags' > -- default["flag1","flag2"]/default > /key > -- /schema >/schemalist -- --
-- 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 => Text -> IO (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 => Text -> IO (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 => Text -> IO (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 => SettingsSchema -> IO (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) -- | Type for the callback on the (unwrapped) C side. type C_SettingsChangeEventCallback = Ptr () -> Ptr Word32 -> Int32 -> Ptr () -> IO CInt -- | 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] " /@keys@/: an array of @/GQuarks/@ for the changed keys, or 'Nothing' " -> IO Bool " __Returns:__ 'True' to stop other handlers from being invoked for the event. FALSE to propagate the event further. " -- | Connect a signal handler for the “change-event” signal, to be -- run after the default handler. When overloading is enabled, -- this is equivalent to -- --
-- after settings #changeEvent callback --afterSettingsChangeEvent :: (IsSettings a, MonadIO m) => a -> SettingsChangeEventCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SettingsChangeEvent :: MonadIO m => SettingsChangeEventCallback -> m (GClosure C_SettingsChangeEventCallback) -- | Generate a function pointer callable from C code, from a -- C_SettingsChangeEventCallback. mk_SettingsChangeEventCallback :: C_SettingsChangeEventCallback -> IO (FunPtr C_SettingsChangeEventCallback) -- | A convenience synonym for Nothing :: Maybe -- SettingsChangeEventCallback. noSettingsChangeEventCallback :: Maybe SettingsChangeEventCallback -- | Connect a signal handler for the “change-event” 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 -> SettingsChangeEventCallback -> m SignalHandlerId -- | Wrap a SettingsChangeEventCallback into a -- C_SettingsChangeEventCallback. wrap_SettingsChangeEventCallback :: SettingsChangeEventCallback -> C_SettingsChangeEventCallback -- | Type for the callback on the (unwrapped) C side. type C_SettingsChangedCallback = Ptr () -> CString -> Ptr () -> IO () -- | 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 "changed::x" 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 " /@key@/: the name of the key that changed " -> 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 --afterSettingsChanged :: (IsSettings a, MonadIO m) => a -> SettingsChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SettingsChanged :: MonadIO m => SettingsChangedCallback -> m (GClosure C_SettingsChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_SettingsChangedCallback. mk_SettingsChangedCallback :: C_SettingsChangedCallback -> IO (FunPtr C_SettingsChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- SettingsChangedCallback. noSettingsChangedCallback :: Maybe SettingsChangedCallback -- | 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 --onSettingsChanged :: (IsSettings a, MonadIO m) => a -> SettingsChangedCallback -> m SignalHandlerId -- | Wrap a SettingsChangedCallback into a -- C_SettingsChangedCallback. wrap_SettingsChangedCallback :: SettingsChangedCallback -> C_SettingsChangedCallback -- | Type for the callback on the (unwrapped) C side. type C_SettingsWritableChangeEventCallback = Ptr () -> Word32 -> Ptr () -> IO CInt -- | 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 " /@key@/: the quark of the key, or 0 " -> IO Bool " __Returns:__ 'True' to stop other handlers from being invoked for the event. FALSE to propagate the event further. " -- | Connect a signal handler for the “writable-change-event” -- signal, to be run after the default handler. When overloading -- is enabled, this is equivalent to -- --
-- after settings #writableChangeEvent callback --afterSettingsWritableChangeEvent :: (IsSettings a, MonadIO m) => a -> SettingsWritableChangeEventCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SettingsWritableChangeEvent :: MonadIO m => SettingsWritableChangeEventCallback -> m (GClosure C_SettingsWritableChangeEventCallback) -- | Generate a function pointer callable from C code, from a -- C_SettingsWritableChangeEventCallback. mk_SettingsWritableChangeEventCallback :: C_SettingsWritableChangeEventCallback -> IO (FunPtr C_SettingsWritableChangeEventCallback) -- | A convenience synonym for Nothing :: Maybe -- SettingsWritableChangeEventCallback. noSettingsWritableChangeEventCallback :: Maybe SettingsWritableChangeEventCallback -- | Connect a signal handler for the “writable-change-event” -- 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 -> SettingsWritableChangeEventCallback -> m SignalHandlerId -- | Wrap a SettingsWritableChangeEventCallback into a -- C_SettingsWritableChangeEventCallback. wrap_SettingsWritableChangeEventCallback :: SettingsWritableChangeEventCallback -> C_SettingsWritableChangeEventCallback -- | Type for the callback on the (unwrapped) C side. type C_SettingsWritableChangedCallback = Ptr () -> CString -> Ptr () -> IO () -- | 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-changed::x" in order to only receive -- callbacks when the writability of "x" changes. type SettingsWritableChangedCallback = Text " /@key@/: the key " -> IO () -- | Connect a signal handler for the “writable-changed” signal, -- to be run after the default handler. When overloading is -- enabled, this is equivalent to -- --
-- after settings #writableChanged callback --afterSettingsWritableChanged :: (IsSettings a, MonadIO m) => a -> SettingsWritableChangedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_SettingsWritableChanged :: MonadIO m => SettingsWritableChangedCallback -> m (GClosure C_SettingsWritableChangedCallback) -- | Generate a function pointer callable from C code, from a -- C_SettingsWritableChangedCallback. mk_SettingsWritableChangedCallback :: C_SettingsWritableChangedCallback -> IO (FunPtr C_SettingsWritableChangedCallback) -- | A convenience synonym for Nothing :: Maybe -- SettingsWritableChangedCallback. noSettingsWritableChangedCallback :: Maybe SettingsWritableChangedCallback -- | Connect a signal handler for the “writable-changed” signal, -- to be run before the default handler. When overloading is -- enabled, this is equivalent to -- --
-- on settings #writableChanged callback --onSettingsWritableChanged :: (IsSettings a, MonadIO m) => a -> SettingsWritableChangedCallback -> m SignalHandlerId -- | Wrap a SettingsWritableChangedCallback into a -- C_SettingsWritableChangedCallback. wrap_SettingsWritableChangedCallback :: SettingsWritableChangedCallback -> C_SettingsWritableChangedCallback 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.GObject GI.Gio.Objects.Settings.Settings instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Settings.Settings -- | The SettingsSchemaSource and SettingsSchema 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
-- | A convenience alias for Nothing :: Maybe
-- SettingsSchema.
noSettingsSchema :: Maybe 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
-- threfore 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 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SettingsSchema.SettingsSchema
-- | 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
-- | A convenience alias for Nothing :: Maybe
-- SettingsSchemaKey.
noSettingsSchemaKey :: Maybe 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 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 Text
-- | Gets the VariantType of key.
--
-- Since: 2.40
settingsSchemaKeyGetValueType :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m VariantType
-- | Checks if the given value is of the correct type and
-- 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey
-- | 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
-- | A convenience alias for Nothing :: Maybe
-- SettingsSchemaSource.
noSettingsSchemaSource :: Maybe 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource
-- | Resolver 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 Resolver functionality that also implement
-- SocketConnectable, making it easy to connect to a remote
-- host/service.
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
-- | A convenience alias for Nothing :: Maybe
-- Resolver.
noResolver :: Maybe 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
-- | 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
-- G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY.
--
-- 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 ()
-- | Type for the callback on the (unwrapped) C side.
type C_ResolverReloadCallback = Ptr () -> Ptr () -> IO ()
-- | 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 --afterResolverReload :: (IsResolver a, MonadIO m) => a -> ResolverReloadCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_ResolverReload :: MonadIO m => ResolverReloadCallback -> m (GClosure C_ResolverReloadCallback) -- | Generate a function pointer callable from C code, from a -- C_ResolverReloadCallback. mk_ResolverReloadCallback :: C_ResolverReloadCallback -> IO (FunPtr C_ResolverReloadCallback) -- | A convenience synonym for Nothing :: Maybe -- ResolverReloadCallback. noResolverReloadCallback :: Maybe ResolverReloadCallback -- | 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 -> ResolverReloadCallback -> m SignalHandlerId -- | Wrap a ResolverReloadCallback into a -- C_ResolverReloadCallback. wrap_ResolverReloadCallback :: ResolverReloadCallback -> C_ResolverReloadCallback 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.GObject GI.Gio.Objects.Resolver.Resolver instance Data.GI.Base.Overloading.HasParentTypes GI.Gio.Objects.Resolver.Resolver module GI.Gio.Objects -- | 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 -- 'GI.Gio.Objects.NetworkService.NetworkService'\'s -- SocketConnectable interface and not need to worry about -- SrvTarget at all. module GI.Gio.Structs.SrvTarget -- | Memory-managed wrapper type. newtype SrvTarget SrvTarget :: ManagedPtr SrvTarget -> SrvTarget -- | A convenience alias for Nothing :: Maybe -- SrvTarget. noSrvTarget :: Maybe 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SrvTarget.SrvTarget -- | 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 -- | A convenience alias for Nothing :: Maybe -- StaticResource. noStaticResource :: Maybe 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.WrappedPtr GI.Gio.Structs.StaticResource.StaticResource instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.StaticResource.StaticResource tag -- | Defines a Unix mount entry (e.g. -- <filename>/media/cdrom</filename>). This corresponds -- roughly to a mtab entry. module GI.Gio.Structs.UnixMountEntry -- | Memory-managed wrapper type. newtype UnixMountEntry UnixMountEntry :: ManagedPtr UnixMountEntry -> UnixMountEntry -- | A convenience alias for Nothing :: Maybe -- UnixMountEntry. noUnixMountEntry :: Maybe UnixMountEntry instance Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.UnixMountEntry.UnixMountEntry 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 a 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. -- -- Note that the returned DBusConnection object will (usually) -- have the DBusConnection:exit-on-close 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. -- -- Note that the returned DBusConnection object will (usually) -- have the DBusConnection:exit-on-close 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. -- -- Since: 2.26 busUnownName :: (HasCallStack, MonadIO m) => Word32 -> m () -- | Stops watching a name. -- -- 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 Text -> 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. -- -- Since: 2.26 dbusAddressGetStreamFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (IOStream, 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. -- -- 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, 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 -- GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). -- -- 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: -- --
-- [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 Word64 -- | 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 (Word64, 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. unixMountAt :: (HasCallStack, MonadIO m) => [Char] -> m (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. -- -- Since: 2.52 unixMountFor :: (HasCallStack, MonadIO m) => [Char] -> m (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) -- | Defines a Unix mount point (e.g. -- <filename>/dev</filename>). This corresponds roughly to a -- fstab entry. module GI.Gio.Structs.UnixMountPoint -- | Memory-managed wrapper type. newtype UnixMountPoint UnixMountPoint :: ManagedPtr UnixMountPoint -> UnixMountPoint -- | A convenience alias for Nothing :: Maybe -- UnixMountPoint. noUnixMountPoint :: Maybe UnixMountPoint -- | 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 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 Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.UnixMountPoint.UnixMountPoint module GI.Gio.Structs module GI.Gio