-- 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.12 -- | Defines a Unix mount entry (e.g. -- <filename>/media/cdrom</filename>). This corresponds -- roughly to a mtab entry. module GI.Gio.Structs.UnixMountEntry newtype UnixMountEntry UnixMountEntry :: (ManagedPtr UnixMountEntry) -> UnixMountEntry noUnixMountEntry :: Maybe UnixMountEntry instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.UnixMountEntry.UnixMountEntry instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.UnixMountEntry.UnixMountEntry instance (info ~ GI.Gio.Structs.UnixMountEntry.ResolveUnixMountEntryMethod t GI.Gio.Structs.UnixMountEntry.UnixMountEntry, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.UnixMountEntry.UnixMountEntry p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.UnixMountEntry.UnixMountEntry -> p) instance (info ~ GI.Gio.Structs.UnixMountEntry.ResolveUnixMountEntryMethod t GI.Gio.Structs.UnixMountEntry.UnixMountEntry, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.UnixMountEntry.UnixMountEntry p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.UnixMountEntry.UnixMountEntry -> p) -- | 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 newtype SrvTarget SrvTarget :: (ManagedPtr SrvTarget) -> SrvTarget noSrvTarget :: Maybe SrvTarget data SrvTargetCopyMethodInfo -- | Copies target srvTargetCopy :: (HasCallStack, MonadIO m) => SrvTarget -> m SrvTarget data SrvTargetFreeMethodInfo -- | Frees target srvTargetFree :: (HasCallStack, MonadIO m) => SrvTarget -> m () data SrvTargetGetHostnameMethodInfo -- | 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.) srvTargetGetHostname :: (HasCallStack, MonadIO m) => SrvTarget -> m Text data SrvTargetGetPortMethodInfo -- | Gets target's port srvTargetGetPort :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16 data SrvTargetGetPriorityMethodInfo -- | Gets target's priority. You should not need to look at -- this; Resolver already sorts the targets according to the -- algorithm in RFC 2782. srvTargetGetPriority :: (HasCallStack, MonadIO m) => SrvTarget -> m Word16 data SrvTargetGetWeightMethodInfo -- | Gets target's weight. You should not need to look at -- this; Resolver already sorts the targets according to the -- algorithm in RFC 2782. 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. srvTargetNew :: (HasCallStack, MonadIO m) => Text -> Word16 -> Word16 -> Word16 -> m SrvTarget instance Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SrvTarget.SrvTarget instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.SrvTarget.SrvTarget instance (signature ~ m GI.Gio.Structs.SrvTarget.SrvTarget, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SrvTarget.SrvTargetCopyMethodInfo GI.Gio.Structs.SrvTarget.SrvTarget signature instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SrvTarget.SrvTargetFreeMethodInfo GI.Gio.Structs.SrvTarget.SrvTarget signature instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SrvTarget.SrvTargetGetHostnameMethodInfo GI.Gio.Structs.SrvTarget.SrvTarget signature instance (signature ~ m GHC.Word.Word16, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SrvTarget.SrvTargetGetPortMethodInfo GI.Gio.Structs.SrvTarget.SrvTarget signature instance (signature ~ m GHC.Word.Word16, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SrvTarget.SrvTargetGetPriorityMethodInfo GI.Gio.Structs.SrvTarget.SrvTarget signature instance (signature ~ m GHC.Word.Word16, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SrvTarget.SrvTargetGetWeightMethodInfo GI.Gio.Structs.SrvTarget.SrvTarget signature instance (info ~ GI.Gio.Structs.SrvTarget.ResolveSrvTargetMethod t GI.Gio.Structs.SrvTarget.SrvTarget, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SrvTarget.SrvTarget p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.SrvTarget.SrvTarget -> p) instance (info ~ GI.Gio.Structs.SrvTarget.ResolveSrvTargetMethod t GI.Gio.Structs.SrvTarget.SrvTarget, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SrvTarget.SrvTarget p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.SrvTarget.SrvTarget -> p) -- | SettingsSchemaKey is an opaque data structure and can only be -- accessed using the following functions. module GI.Gio.Structs.SettingsSchemaKey newtype SettingsSchemaKey SettingsSchemaKey :: (ManagedPtr SettingsSchemaKey) -> SettingsSchemaKey noSettingsSchemaKey :: Maybe SettingsSchemaKey data SettingsSchemaKeyGetDefaultValueMethodInfo -- | 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. settingsSchemaKeyGetDefaultValue :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m GVariant data SettingsSchemaKeyGetDescriptionMethodInfo -- | 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. settingsSchemaKeyGetDescription :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m Text data SettingsSchemaKeyGetNameMethodInfo -- | Gets the name of key. settingsSchemaKeyGetName :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m Text data SettingsSchemaKeyGetRangeMethodInfo -- | 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. settingsSchemaKeyGetRange :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m GVariant data SettingsSchemaKeyGetSummaryMethodInfo -- | 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. settingsSchemaKeyGetSummary :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m Text data SettingsSchemaKeyGetValueTypeMethodInfo -- | Gets the VariantType of key. settingsSchemaKeyGetValueType :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m VariantType data SettingsSchemaKeyRangeCheckMethodInfo -- | 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. settingsSchemaKeyRangeCheck :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> GVariant -> m Bool data SettingsSchemaKeyRefMethodInfo -- | Increase the reference count of key, returning a new -- reference. settingsSchemaKeyRef :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m SettingsSchemaKey data SettingsSchemaKeyUnrefMethodInfo -- | Decrease the reference count of key, possibly freeing -- it. settingsSchemaKeyUnref :: (HasCallStack, MonadIO m) => SettingsSchemaKey -> m () instance Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey instance (signature ~ m Data.GI.Base.BasicTypes.GVariant, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyGetDefaultValueMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyGetDescriptionMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyGetNameMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ m Data.GI.Base.BasicTypes.GVariant, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyGetRangeMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyGetSummaryMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ m GI.GLib.Structs.VariantType.VariantType, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyGetValueTypeMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ (Data.GI.Base.BasicTypes.GVariant -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyRangeCheckMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ m GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyRefMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKeyUnrefMethodInfo GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey signature instance (info ~ GI.Gio.Structs.SettingsSchemaKey.ResolveSettingsSchemaKeyMethod t GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey -> p) instance (info ~ GI.Gio.Structs.SettingsSchemaKey.ResolveSettingsSchemaKeyMethod t GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey -> p) -- | 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_new_schema_source_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.
module GI.Gio.Structs.SettingsSchema
newtype SettingsSchema
SettingsSchema :: (ManagedPtr SettingsSchema) -> SettingsSchema
noSettingsSchema :: Maybe SettingsSchema
data SettingsSchemaGetIdMethodInfo
-- | Get the ID of schema.
settingsSchemaGetId :: (HasCallStack, MonadIO m) => SettingsSchema -> m Text
data SettingsSchemaGetKeyMethodInfo
-- | Gets the key named name from schema.
--
-- It is a programmer error to request a key that does not exist. See
-- settingsSchemaListKeys.
settingsSchemaGetKey :: (HasCallStack, MonadIO m) => SettingsSchema -> Text -> m SettingsSchemaKey
data SettingsSchemaGetPathMethodInfo
-- | 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.
settingsSchemaGetPath :: (HasCallStack, MonadIO m) => SettingsSchema -> m Text
data SettingsSchemaHasKeyMethodInfo
-- | Checks if schema has a key named name.
settingsSchemaHasKey :: (HasCallStack, MonadIO m) => SettingsSchema -> Text -> m Bool
data SettingsSchemaListChildrenMethodInfo
-- | Gets the list of children in schema.
--
-- You should free the return value with strfreev when you are
-- done with it.
settingsSchemaListChildren :: (HasCallStack, MonadIO m) => SettingsSchema -> m [Text]
data SettingsSchemaListKeysMethodInfo
-- | 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.
settingsSchemaListKeys :: (HasCallStack, MonadIO m) => SettingsSchema -> m [Text]
data SettingsSchemaRefMethodInfo
-- | Increase the reference count of schema, returning a
-- new reference.
settingsSchemaRef :: (HasCallStack, MonadIO m) => SettingsSchema -> m SettingsSchema
data SettingsSchemaUnrefMethodInfo
-- | Decrease the reference count of schema, possibly
-- freeing it.
settingsSchemaUnref :: (HasCallStack, MonadIO m) => SettingsSchema -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SettingsSchema.SettingsSchema
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.SettingsSchema.SettingsSchema
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaGetIdMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Structs.SettingsSchemaKey.SettingsSchemaKey), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaGetKeyMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaGetPathMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaHasKeyMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaListChildrenMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaListKeysMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (signature ~ m GI.Gio.Structs.SettingsSchema.SettingsSchema, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaRefMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchemaUnrefMethodInfo GI.Gio.Structs.SettingsSchema.SettingsSchema signature
instance (info ~ GI.Gio.Structs.SettingsSchema.ResolveSettingsSchemaMethod t GI.Gio.Structs.SettingsSchema.SettingsSchema, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsSchema.SettingsSchema p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.SettingsSchema.SettingsSchema -> p)
instance (info ~ GI.Gio.Structs.SettingsSchema.ResolveSettingsSchemaMethod t GI.Gio.Structs.SettingsSchema.SettingsSchema, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsSchema.SettingsSchema p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.SettingsSchema.SettingsSchema -> p)
-- | This is an opaque structure type. You may not access it directly.
module GI.Gio.Structs.SettingsSchemaSource
newtype SettingsSchemaSource
SettingsSchemaSource :: (ManagedPtr SettingsSchemaSource) -> 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.
settingsSchemaSourceGetDefault :: (HasCallStack, MonadIO m) => m SettingsSchemaSource
data SettingsSchemaSourceListSchemasMethodInfo
-- | 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.
settingsSchemaSourceListSchemas :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> Bool -> m ([Text], [Text])
data SettingsSchemaSourceLookupMethodInfo
-- | 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.
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.
--
-- 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.
settingsSchemaSourceNewFromDirectory :: (HasCallStack, MonadIO m) => [Char] -> Maybe (SettingsSchemaSource) -> Bool -> m SettingsSchemaSource
data SettingsSchemaSourceRefMethodInfo
-- | Increase the reference count of source, returning a
-- new reference.
settingsSchemaSourceRef :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> m SettingsSchemaSource
data SettingsSchemaSourceUnrefMethodInfo
-- | Decrease the reference count of source, possibly
-- freeing it.
settingsSchemaSourceUnref :: (HasCallStack, MonadIO m) => SettingsSchemaSource -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource
instance (signature ~ (GHC.Types.Bool -> m ([Data.Text.Internal.Text], [Data.Text.Internal.Text])), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSourceListSchemasMethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Types.Bool -> m (GHC.Base.Maybe GI.Gio.Structs.SettingsSchema.SettingsSchema)), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSourceLookupMethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource signature
instance (signature ~ m GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSourceRefMethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSourceUnrefMethodInfo GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource signature
instance (info ~ GI.Gio.Structs.SettingsSchemaSource.ResolveSettingsSchemaSourceMethod t GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource -> p)
instance (info ~ GI.Gio.Structs.SettingsSchemaSource.ResolveSettingsSchemaSourceMethod t GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.SettingsSchemaSource.SettingsSchemaSource -> p)
-- | 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
-- G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.
--
-- The interface defines methods for reading and writing values, a method
-- for determining if writing of certain values will fail (lockdown) and
-- a change notification mechanism.
--
-- The semantics of the interface are very precisely defined and
-- implementations must carefully adhere to the expectations of callers
-- that are documented on each of the interface methods.
--
-- Some of the GSettingsBackend functions accept or return a Tree.
-- These trees always have strings as keys and GVariant as values.
-- g_settings_backend_create_tree() is a convenience
-- function to create suitable trees.
--
-- The GSettingsBackend API is exported to allow third-party
-- implementations, but does not carry the same stability guarantees as
-- the public GIO API. For this reason, you have to define the C
-- preprocessor symbol G_SETTINGS_ENABLE_BACKEND before
-- including gio/gsettingsbackend.h.
module GI.Gio.Structs.SettingsBackend
newtype SettingsBackend
SettingsBackend :: (ManagedPtr SettingsBackend) -> SettingsBackend
noSettingsBackend :: Maybe SettingsBackend
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.SettingsBackend.SettingsBackend
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.SettingsBackend.SettingsBackend
instance (info ~ GI.Gio.Structs.SettingsBackend.ResolveSettingsBackendMethod t GI.Gio.Structs.SettingsBackend.SettingsBackend, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsBackend.SettingsBackend p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.SettingsBackend.SettingsBackend -> p)
instance (info ~ GI.Gio.Structs.SettingsBackend.ResolveSettingsBackendMethod t GI.Gio.Structs.SettingsBackend.SettingsBackend, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.SettingsBackend.SettingsBackend p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.SettingsBackend.SettingsBackend -> p)
-- | StaticResource is an opaque data structure and can only be
-- accessed using the following functions.
module GI.Gio.Structs.StaticResource
newtype StaticResource
StaticResource :: (ManagedPtr StaticResource) -> StaticResource
-- | Construct a StaticResource struct initialized to zero.
newZeroStaticResource :: MonadIO m => m StaticResource
noStaticResource :: Maybe StaticResource
data StaticResourceFiniMethodInfo
-- | 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.
staticResourceFini :: (HasCallStack, MonadIO m) => StaticResource -> m ()
data StaticResourceGetResourceMethodInfo
-- | 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.
staticResourceGetResource :: (HasCallStack, MonadIO m) => StaticResource -> m Resource
data StaticResourceInitMethodInfo
-- | 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.
staticResourceInit :: (HasCallStack, MonadIO m) => StaticResource -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.StaticResource.StaticResource
instance tag ~ 'Data.GI.Base.Attributes.AttrSet => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.StaticResource.StaticResource tag
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.StaticResource.StaticResource
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.StaticResource.StaticResourceFiniMethodInfo GI.Gio.Structs.StaticResource.StaticResource signature
instance (signature ~ m GI.Gio.Structs.Resource.Resource, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.StaticResource.StaticResourceGetResourceMethodInfo GI.Gio.Structs.StaticResource.StaticResource signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.StaticResource.StaticResourceInitMethodInfo GI.Gio.Structs.StaticResource.StaticResource signature
instance (info ~ GI.Gio.Structs.StaticResource.ResolveStaticResourceMethod t GI.Gio.Structs.StaticResource.StaticResource, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.StaticResource.StaticResource p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.StaticResource.StaticResource -> p)
instance (info ~ GI.Gio.Structs.StaticResource.ResolveStaticResourceMethod t GI.Gio.Structs.StaticResource.StaticResource, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.StaticResource.StaticResource p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.StaticResource.StaticResource -> p)
-- | 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.
module GI.Gio.Structs.OutputVector
newtype OutputVector
OutputVector :: (ManagedPtr OutputVector) -> OutputVector
-- | Construct a OutputVector struct initialized to zero.
newZeroOutputVector :: MonadIO m => m OutputVector
noOutputVector :: Maybe OutputVector
clearOutputVectorBuffer :: MonadIO m => OutputVector -> m ()
getOutputVectorBuffer :: MonadIO m => OutputVector -> m (Ptr ())
outputVector_buffer :: AttrLabelProxy "buffer"
setOutputVectorBuffer :: MonadIO m => OutputVector -> Ptr () -> m ()
getOutputVectorSize :: MonadIO m => OutputVector -> m Word64
outputVector_size :: AttrLabelProxy "size"
setOutputVectorSize :: MonadIO m => OutputVector -> Word64 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.OutputVector.OutputVector
instance tag ~ 'Data.GI.Base.Attributes.AttrSet => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.OutputVector.OutputVector tag
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.OutputVector.OutputVectorBufferFieldInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.OutputVector.OutputVectorSizeFieldInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.OutputVector.OutputVector
instance (info ~ GI.Gio.Structs.OutputVector.ResolveOutputVectorMethod t GI.Gio.Structs.OutputVector.OutputVector, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.OutputVector.OutputVector p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.OutputVector.OutputVector -> p)
instance (info ~ GI.Gio.Structs.OutputVector.ResolveOutputVectorMethod t GI.Gio.Structs.OutputVector.OutputVector, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.OutputVector.OutputVector p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.OutputVector.OutputVector -> p)
-- | An socket address of some unknown native type.
module GI.Gio.Structs.NativeSocketAddress
newtype NativeSocketAddress
NativeSocketAddress :: (ManagedPtr NativeSocketAddress) -> NativeSocketAddress
noNativeSocketAddress :: Maybe NativeSocketAddress
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress
instance (info ~ GI.Gio.Structs.NativeSocketAddress.ResolveNativeSocketAddressMethod t GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress -> p)
instance (info ~ GI.Gio.Structs.NativeSocketAddress.ResolveNativeSocketAddressMethod t GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.NativeSocketAddress.NativeSocketAddress -> p)
-- | 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.
module GI.Gio.Structs.InputVector
newtype InputVector
InputVector :: (ManagedPtr InputVector) -> InputVector
-- | Construct a InputVector struct initialized to zero.
newZeroInputVector :: MonadIO m => m InputVector
noInputVector :: Maybe InputVector
clearInputVectorBuffer :: MonadIO m => InputVector -> m ()
getInputVectorBuffer :: MonadIO m => InputVector -> m (Ptr ())
inputVector_buffer :: AttrLabelProxy "buffer"
setInputVectorBuffer :: MonadIO m => InputVector -> Ptr () -> m ()
getInputVectorSize :: MonadIO m => InputVector -> m Word64
inputVector_size :: AttrLabelProxy "size"
setInputVectorSize :: MonadIO m => InputVector -> Word64 -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.InputVector.InputVector
instance tag ~ 'Data.GI.Base.Attributes.AttrSet => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.InputVector.InputVector tag
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.InputVector.InputVectorBufferFieldInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.InputVector.InputVectorSizeFieldInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.InputVector.InputVector
instance (info ~ GI.Gio.Structs.InputVector.ResolveInputVectorMethod t GI.Gio.Structs.InputVector.InputVector, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.InputVector.InputVector p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.InputVector.InputVector -> p)
instance (info ~ GI.Gio.Structs.InputVector.ResolveInputVectorMethod t GI.Gio.Structs.InputVector.InputVector, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.InputVector.InputVector p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.InputVector.InputVector -> p)
module GI.Gio.Structs.IOStreamAdapter
newtype IOStreamAdapter
IOStreamAdapter :: (ManagedPtr IOStreamAdapter) -> IOStreamAdapter
noIOStreamAdapter :: Maybe IOStreamAdapter
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter
instance (info ~ GI.Gio.Structs.IOStreamAdapter.ResolveIOStreamAdapterMethod t GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter -> p)
instance (info ~ GI.Gio.Structs.IOStreamAdapter.ResolveIOStreamAdapterMethod t GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.IOStreamAdapter.IOStreamAdapter -> p)
-- | Opaque class for defining and scheduling IO jobs.
module GI.Gio.Structs.IOSchedulerJob
newtype IOSchedulerJob
IOSchedulerJob :: (ManagedPtr IOSchedulerJob) -> IOSchedulerJob
noIOSchedulerJob :: Maybe IOSchedulerJob
data IOSchedulerJobSendToMainloopMethodInfo
-- | 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
data IOSchedulerJobSendToMainloopAsyncMethodInfo
-- | 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
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob
instance (signature ~ (GI.GLib.Callbacks.SourceFunc -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOSchedulerJob.IOSchedulerJobSendToMainloopMethodInfo GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob signature
instance (signature ~ (GI.GLib.Callbacks.SourceFunc -> m ()), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOSchedulerJob.IOSchedulerJobSendToMainloopAsyncMethodInfo GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob signature
instance (info ~ GI.Gio.Structs.IOSchedulerJob.ResolveIOSchedulerJobMethod t GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob -> p)
instance (info ~ GI.Gio.Structs.IOSchedulerJob.ResolveIOSchedulerJobMethod t GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.IOSchedulerJob.IOSchedulerJob -> p)
-- | Represents a scope for loading IO modules. A scope can be used for
-- blocking duplicate modules, or blocking a module you don't want to
-- load.
--
-- The scope can be used with
-- g_io_modules_load_all_in_directory_with_scope() or
-- ioModulesScanAllInDirectoryWithScope.
module GI.Gio.Structs.IOModuleScope
newtype IOModuleScope
IOModuleScope :: (ManagedPtr IOModuleScope) -> IOModuleScope
noIOModuleScope :: Maybe IOModuleScope
data IOModuleScopeBlockMethodInfo
-- | Block modules with the given basename from being
-- loaded when this scope is used with
-- ioModulesScanAllInDirectoryWithScope or
-- g_io_modules_load_all_in_directory_with_scope().
iOModuleScopeBlock :: (HasCallStack, MonadIO m) => IOModuleScope -> Text -> m ()
data IOModuleScopeFreeMethodInfo
-- | Free a module scope.
iOModuleScopeFree :: (HasCallStack, MonadIO m) => IOModuleScope -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.IOModuleScope.IOModuleScope
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.IOModuleScope.IOModuleScope
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOModuleScope.IOModuleScopeBlockMethodInfo GI.Gio.Structs.IOModuleScope.IOModuleScope signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOModuleScope.IOModuleScopeFreeMethodInfo GI.Gio.Structs.IOModuleScope.IOModuleScope signature
instance (info ~ GI.Gio.Structs.IOModuleScope.ResolveIOModuleScopeMethod t GI.Gio.Structs.IOModuleScope.IOModuleScope, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOModuleScope.IOModuleScope p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.IOModuleScope.IOModuleScope -> p)
instance (info ~ GI.Gio.Structs.IOModuleScope.ResolveIOModuleScopeMethod t GI.Gio.Structs.IOModuleScope.IOModuleScope, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOModuleScope.IOModuleScope p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.IOModuleScope.IOModuleScope -> p)
-- | IOExtension is an opaque data structure and can only be
-- accessed using the following functions.
module GI.Gio.Structs.IOExtension
newtype IOExtension
IOExtension :: (ManagedPtr IOExtension) -> IOExtension
noIOExtension :: Maybe IOExtension
data IOExtensionGetNameMethodInfo
-- | Gets the name under which extension was registered.
--
-- Note that the same type may be registered as extension for multiple
-- extension points, under different names.
iOExtensionGetName :: (HasCallStack, MonadIO m) => IOExtension -> m Text
data IOExtensionGetPriorityMethodInfo
-- | Gets the priority with which extension was registered.
iOExtensionGetPriority :: (HasCallStack, MonadIO m) => IOExtension -> m Int32
data IOExtensionGetTypeMethodInfo
-- | Gets the type associated with extension.
iOExtensionGetType :: (HasCallStack, MonadIO m) => IOExtension -> m GType
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.IOExtension.IOExtension
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.IOExtension.IOExtension
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOExtension.IOExtensionGetNameMethodInfo GI.Gio.Structs.IOExtension.IOExtension signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOExtension.IOExtensionGetPriorityMethodInfo GI.Gio.Structs.IOExtension.IOExtension signature
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOExtension.IOExtensionGetTypeMethodInfo GI.Gio.Structs.IOExtension.IOExtension signature
instance (info ~ GI.Gio.Structs.IOExtension.ResolveIOExtensionMethod t GI.Gio.Structs.IOExtension.IOExtension, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOExtension.IOExtension p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.IOExtension.IOExtension -> p)
instance (info ~ GI.Gio.Structs.IOExtension.ResolveIOExtensionMethod t GI.Gio.Structs.IOExtension.IOExtension, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOExtension.IOExtension p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.IOExtension.IOExtension -> p)
-- | IOExtensionPoint is an opaque data structure and can only be
-- accessed using the following functions.
module GI.Gio.Structs.IOExtensionPoint
newtype IOExtensionPoint
IOExtensionPoint :: (ManagedPtr IOExtensionPoint) -> IOExtensionPoint
noIOExtensionPoint :: Maybe IOExtensionPoint
data IOExtensionPointGetExtensionByNameMethodInfo
-- | Finds a IOExtension for an extension point by name.
iOExtensionPointGetExtensionByName :: (HasCallStack, MonadIO m) => IOExtensionPoint -> Text -> m IOExtension
data IOExtensionPointGetExtensionsMethodInfo
-- | Gets a list of all extensions that implement this extension point. The
-- list is sorted by priority, beginning with the highest priority.
iOExtensionPointGetExtensions :: (HasCallStack, MonadIO m) => IOExtensionPoint -> m [IOExtension]
data IOExtensionPointGetRequiredTypeMethodInfo
-- | Gets the required type for extensionPoint.
iOExtensionPointGetRequiredType :: (HasCallStack, MonadIO m) => IOExtensionPoint -> m GType
-- | Registers type as extension for the extension point
-- with name extensionPointName.
--
-- If type has already been registered as an extension
-- for this extension point, the existing IOExtension object is
-- returned.
iOExtensionPointImplement :: (HasCallStack, MonadIO m) => Text -> GType -> Text -> Int32 -> m IOExtension
-- | Looks up an existing extension point.
iOExtensionPointLookup :: (HasCallStack, MonadIO m) => Text -> m IOExtensionPoint
-- | Registers an extension point.
iOExtensionPointRegister :: (HasCallStack, MonadIO m) => Text -> m IOExtensionPoint
data IOExtensionPointSetRequiredTypeMethodInfo
-- | Sets the required type for extensionPoint to
-- type. All implementations must henceforth have this
-- type.
iOExtensionPointSetRequiredType :: (HasCallStack, MonadIO m) => IOExtensionPoint -> GType -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Structs.IOExtension.IOExtension), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPointGetExtensionByNameMethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint signature
instance (signature ~ m [GI.Gio.Structs.IOExtension.IOExtension], Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPointGetExtensionsMethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint signature
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPointGetRequiredTypeMethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint signature
instance (signature ~ (Data.GI.Base.GType.GType -> m ()), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPointSetRequiredTypeMethodInfo GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint signature
instance (info ~ GI.Gio.Structs.IOExtensionPoint.ResolveIOExtensionPointMethod t GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint -> p)
instance (info ~ GI.Gio.Structs.IOExtensionPoint.ResolveIOExtensionPointMethod t GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.IOExtensionPoint.IOExtensionPoint -> p)
-- | Determines if a string matches a file attribute.
module GI.Gio.Structs.FileAttributeMatcher
newtype FileAttributeMatcher
FileAttributeMatcher :: (ManagedPtr FileAttributeMatcher) -> FileAttributeMatcher
noFileAttributeMatcher :: Maybe FileAttributeMatcher
data FileAttributeMatcherEnumerateNamespaceMethodInfo
-- | 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
data FileAttributeMatcherEnumerateNextMethodInfo
-- | Gets the next matched attribute from a FileAttributeMatcher.
fileAttributeMatcherEnumerateNext :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> m Text
data FileAttributeMatcherMatchesMethodInfo
-- | 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
data FileAttributeMatcherMatchesOnlyMethodInfo
-- | 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.
--
--
-- 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;
-- }
--
module GI.Gio.Objects.DBusAuthObserver
newtype DBusAuthObserver
DBusAuthObserver :: (ManagedPtr DBusAuthObserver) -> DBusAuthObserver
class GObject o => IsDBusAuthObserver o
toDBusAuthObserver :: IsDBusAuthObserver o => o -> IO DBusAuthObserver
noDBusAuthObserver :: Maybe DBusAuthObserver
data DBusAuthObserverAllowMechanismMethodInfo
-- | Emits the DBusAuthObserver::allow-mechanism
-- signal on observer.
dBusAuthObserverAllowMechanism :: (HasCallStack, MonadIO m, IsDBusAuthObserver a) => a -> Text -> m Bool
data DBusAuthObserverAuthorizeAuthenticatedPeerMethodInfo
-- | Emits the
-- DBusAuthObserver::authorize-authenticated-peer
-- signal on observer.
dBusAuthObserverAuthorizeAuthenticatedPeer :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsIOStream b, IsCredentials c) => a -> b -> Maybe (c) -> m Bool
-- | Creates a new DBusAuthObserver object.
dBusAuthObserverNew :: (HasCallStack, MonadIO m) => m DBusAuthObserver
type C_DBusAuthObserverAllowMechanismCallback = Ptr () -> CString -> Ptr () -> IO CInt
type DBusAuthObserverAllowMechanismCallback = Text -> IO Bool
data DBusAuthObserverAllowMechanismSignalInfo
afterDBusAuthObserverAllowMechanism :: (IsDBusAuthObserver a, MonadIO m) => a -> DBusAuthObserverAllowMechanismCallback -> m SignalHandlerId
genClosure_DBusAuthObserverAllowMechanism :: DBusAuthObserverAllowMechanismCallback -> IO Closure
mk_DBusAuthObserverAllowMechanismCallback :: C_DBusAuthObserverAllowMechanismCallback -> IO (FunPtr C_DBusAuthObserverAllowMechanismCallback)
noDBusAuthObserverAllowMechanismCallback :: Maybe DBusAuthObserverAllowMechanismCallback
onDBusAuthObserverAllowMechanism :: (IsDBusAuthObserver a, MonadIO m) => a -> DBusAuthObserverAllowMechanismCallback -> m SignalHandlerId
wrap_DBusAuthObserverAllowMechanismCallback :: DBusAuthObserverAllowMechanismCallback -> Ptr () -> CString -> Ptr () -> IO CInt
type C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback = Ptr () -> Ptr IOStream -> Ptr Credentials -> Ptr () -> IO CInt
type DBusAuthObserverAuthorizeAuthenticatedPeerCallback = IOStream -> Maybe Credentials -> IO Bool
data DBusAuthObserverAuthorizeAuthenticatedPeerSignalInfo
afterDBusAuthObserverAuthorizeAuthenticatedPeer :: (IsDBusAuthObserver a, MonadIO m) => a -> DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> m SignalHandlerId
genClosure_DBusAuthObserverAuthorizeAuthenticatedPeer :: DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> IO Closure
mk_DBusAuthObserverAuthorizeAuthenticatedPeerCallback :: C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> IO (FunPtr C_DBusAuthObserverAuthorizeAuthenticatedPeerCallback)
noDBusAuthObserverAuthorizeAuthenticatedPeerCallback :: Maybe DBusAuthObserverAuthorizeAuthenticatedPeerCallback
onDBusAuthObserverAuthorizeAuthenticatedPeer :: (IsDBusAuthObserver a, MonadIO m) => a -> DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> m SignalHandlerId
wrap_DBusAuthObserverAuthorizeAuthenticatedPeerCallback :: DBusAuthObserverAuthorizeAuthenticatedPeerCallback -> Ptr () -> Ptr IOStream -> Ptr Credentials -> Ptr () -> IO CInt
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver a) => GI.Gio.Objects.DBusAuthObserver.IsDBusAuthObserver a
instance GI.Gio.Objects.DBusAuthObserver.IsDBusAuthObserver GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance (info ~ GI.Gio.Objects.DBusAuthObserver.ResolveDBusAuthObserverMethod t GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver -> p)
instance (info ~ GI.Gio.Objects.DBusAuthObserver.ResolveDBusAuthObserverMethod t GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusAuthObserver.DBusAuthObserver
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusAuthObserver.DBusAuthObserverAllowMechanismSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusAuthObserver.DBusAuthObserverAuthorizeAuthenticatedPeerSignalInfo
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusAuthObserver.IsDBusAuthObserver a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusAuthObserver.DBusAuthObserverAllowMechanismMethodInfo a signature
instance (signature ~ (b -> GHC.Base.Maybe c -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusAuthObserver.IsDBusAuthObserver a, GI.Gio.Objects.IOStream.IsIOStream b, GI.Gio.Objects.Credentials.IsCredentials c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusAuthObserver.DBusAuthObserverAuthorizeAuthenticatedPeerMethodInfo a signature
-- | 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.
module GI.Gio.Objects.UnixCredentialsMessage
newtype UnixCredentialsMessage
UnixCredentialsMessage :: (ManagedPtr UnixCredentialsMessage) -> UnixCredentialsMessage
class GObject o => IsUnixCredentialsMessage o
toUnixCredentialsMessage :: IsUnixCredentialsMessage o => o -> IO UnixCredentialsMessage
noUnixCredentialsMessage :: Maybe UnixCredentialsMessage
data UnixCredentialsMessageGetCredentialsMethodInfo
-- | Gets the credentials stored in message.
unixCredentialsMessageGetCredentials :: (HasCallStack, MonadIO m, IsUnixCredentialsMessage a) => a -> m Credentials
-- | Checks if passing Credentials on a Socket is supported
-- on this platform.
unixCredentialsMessageIsSupported :: (HasCallStack, MonadIO m) => m Bool
-- | Creates a new UnixCredentialsMessage with credentials matching
-- the current processes.
unixCredentialsMessageNew :: (HasCallStack, MonadIO m) => m UnixCredentialsMessage
-- | Creates a new UnixCredentialsMessage holding
-- credentials.
unixCredentialsMessageNewWithCredentials :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m UnixCredentialsMessage
data UnixCredentialsMessageCredentialsPropertyInfo
constructUnixCredentialsMessageCredentials :: (IsUnixCredentialsMessage o, IsCredentials a) => a -> IO (GValueConstruct o)
getUnixCredentialsMessageCredentials :: (MonadIO m, IsUnixCredentialsMessage o) => o -> m Credentials
unixCredentialsMessageCredentials :: AttrLabelProxy "credentials"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage a) => GI.Gio.Objects.UnixCredentialsMessage.IsUnixCredentialsMessage a
instance GI.Gio.Objects.UnixCredentialsMessage.IsUnixCredentialsMessage GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance GI.Gio.Objects.SocketControlMessage.IsSocketControlMessage GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance (info ~ GI.Gio.Objects.UnixCredentialsMessage.ResolveUnixCredentialsMessageMethod t GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage -> p)
instance (info ~ GI.Gio.Objects.UnixCredentialsMessage.ResolveUnixCredentialsMessageMethod t GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessageCredentialsPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessage
instance (signature ~ m GI.Gio.Objects.Credentials.Credentials, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixCredentialsMessage.IsUnixCredentialsMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixCredentialsMessage.UnixCredentialsMessageGetCredentialsMethodInfo a signature
-- | 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
newtype Cancellable
Cancellable :: (ManagedPtr Cancellable) -> Cancellable
class GObject o => IsCancellable o
toCancellable :: IsCancellable o => o -> IO Cancellable
noCancellable :: Maybe Cancellable
data CancellableCancelMethodInfo
-- | 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 ()
data CancellableConnectMethodInfo
-- | 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.
cancellableConnect :: (HasCallStack, MonadIO m, IsCancellable a) => a -> Callback -> m CULong
data CancellableDisconnectMethodInfo
-- | 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.
cancellableDisconnect :: (HasCallStack, MonadIO m, IsCancellable a) => a -> CULong -> m ()
-- | Gets the top cancellable from the stack.
cancellableGetCurrent :: (HasCallStack, MonadIO m) => m (Maybe Cancellable)
data CancellableGetFdMethodInfo
-- | 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
data CancellableIsCancelledMethodInfo
-- | Checks if a cancellable job has been cancelled.
cancellableIsCancelled :: (HasCallStack, MonadIO m, IsCancellable a) => a -> m Bool
data CancellableMakePollfdMethodInfo
-- | 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.
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
data CancellablePopCurrentMethodInfo
-- | Pops cancellable off the cancellable stack (verifying
-- that cancellable is on the top of the stack).
cancellablePopCurrent :: (HasCallStack, MonadIO m, IsCancellable a) => a -> m ()
data CancellablePushCurrentMethodInfo
-- | 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 ()
data CancellableReleaseFdMethodInfo
-- | 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.
cancellableReleaseFd :: (HasCallStack, MonadIO m, IsCancellable a) => a -> m ()
data CancellableResetMethodInfo
-- | 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 ()
data CancellableSetErrorIfCancelledMethodInfo
-- | If the cancellable is cancelled, sets the error to
-- notify that the operation was cancelled.
cancellableSetErrorIfCancelled :: (HasCallStack, MonadIO m, IsCancellable a) => a -> m ()
type C_CancellableCancelledCallback = Ptr () -> Ptr () -> IO ()
type CancellableCancelledCallback = IO ()
data CancellableCancelledSignalInfo
afterCancellableCancelled :: (IsCancellable a, MonadIO m) => a -> CancellableCancelledCallback -> m SignalHandlerId
genClosure_CancellableCancelled :: CancellableCancelledCallback -> IO Closure
mk_CancellableCancelledCallback :: C_CancellableCancelledCallback -> IO (FunPtr C_CancellableCancelledCallback)
noCancellableCancelledCallback :: Maybe CancellableCancelledCallback
onCancellableCancelled :: (IsCancellable a, MonadIO m) => a -> CancellableCancelledCallback -> m SignalHandlerId
wrap_CancellableCancelledCallback :: CancellableCancelledCallback -> Ptr () -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Cancellable.Cancellable
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Cancellable.Cancellable a) => GI.Gio.Objects.Cancellable.IsCancellable a
instance GI.Gio.Objects.Cancellable.IsCancellable GI.Gio.Objects.Cancellable.Cancellable
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Cancellable.Cancellable
instance (info ~ GI.Gio.Objects.Cancellable.ResolveCancellableMethod t GI.Gio.Objects.Cancellable.Cancellable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Cancellable.Cancellable p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Cancellable.Cancellable -> p)
instance (info ~ GI.Gio.Objects.Cancellable.ResolveCancellableMethod t GI.Gio.Objects.Cancellable.Cancellable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Cancellable.Cancellable p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Cancellable.Cancellable -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Cancellable.Cancellable
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.Cancellable.CancellableCancelledSignalInfo
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableCancelMethodInfo a signature
instance (signature ~ (GI.GObject.Callbacks.Callback -> m Foreign.C.Types.CULong), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableConnectMethodInfo a signature
instance (signature ~ (Foreign.C.Types.CULong -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableDisconnectMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableGetFdMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableIsCancelledMethodInfo a signature
instance (signature ~ (GI.GLib.Structs.PollFD.PollFD -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableMakePollfdMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellablePopCurrentMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellablePushCurrentMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableReleaseFdMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableResetMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Cancellable.IsCancellable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Cancellable.CancellableSetErrorIfCancelledMethodInfo a signature
-- | 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.
module GI.Gio.Objects.AppInfoMonitor
newtype AppInfoMonitor
AppInfoMonitor :: (ManagedPtr AppInfoMonitor) -> AppInfoMonitor
class GObject o => IsAppInfoMonitor o
toAppInfoMonitor :: IsAppInfoMonitor o => o -> IO 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.
appInfoMonitorGet :: (HasCallStack, MonadIO m) => m AppInfoMonitor
type AppInfoMonitorChangedCallback = IO ()
data AppInfoMonitorChangedSignalInfo
type C_AppInfoMonitorChangedCallback = Ptr () -> Ptr () -> IO ()
afterAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> AppInfoMonitorChangedCallback -> m SignalHandlerId
genClosure_AppInfoMonitorChanged :: AppInfoMonitorChangedCallback -> IO Closure
mk_AppInfoMonitorChangedCallback :: C_AppInfoMonitorChangedCallback -> IO (FunPtr C_AppInfoMonitorChangedCallback)
noAppInfoMonitorChangedCallback :: Maybe AppInfoMonitorChangedCallback
onAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> AppInfoMonitorChangedCallback -> m SignalHandlerId
wrap_AppInfoMonitorChangedCallback :: AppInfoMonitorChangedCallback -> Ptr () -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor a) => GI.Gio.Objects.AppInfoMonitor.IsAppInfoMonitor a
instance GI.Gio.Objects.AppInfoMonitor.IsAppInfoMonitor GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance (info ~ GI.Gio.Objects.AppInfoMonitor.ResolveAppInfoMonitorMethod t GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor -> p)
instance (info ~ GI.Gio.Objects.AppInfoMonitor.ResolveAppInfoMonitorMethod t GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.AppInfoMonitor.AppInfoMonitor
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.AppInfoMonitor.AppInfoMonitorChangedSignalInfo
-- | TlsFileDatabase is implemented by TlsDatabase objects
-- which load their certificate information from a file. It is an
-- interface which TLS library specific subtypes implement.
module GI.Gio.Interfaces.TlsFileDatabase
newtype TlsFileDatabase
TlsFileDatabase :: (ManagedPtr TlsFileDatabase) -> TlsFileDatabase
noTlsFileDatabase :: Maybe TlsFileDatabase
class GObject o => IsTlsFileDatabase o
toTlsFileDatabase :: IsTlsFileDatabase o => o -> IO TlsFileDatabase
-- | Creates a new TlsFileDatabase which uses anchor certificate
-- authorities in anchors to verify certificate chains.
--
-- The certificates in anchors must be PEM encoded.
tlsFileDatabaseNew :: (HasCallStack, MonadIO m) => [Char] -> m TlsFileDatabase
data TlsFileDatabaseAnchorsPropertyInfo
clearTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m ()
constructTlsFileDatabaseAnchors :: (IsTlsFileDatabase o) => Text -> IO (GValueConstruct o)
getTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> m (Maybe Text)
setTlsFileDatabaseAnchors :: (MonadIO m, IsTlsFileDatabase o) => o -> Text -> m ()
tlsFileDatabaseAnchors :: AttrLabelProxy "anchors"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase a) => GI.Gio.Interfaces.TlsFileDatabase.IsTlsFileDatabase a
instance GI.Gio.Interfaces.TlsFileDatabase.IsTlsFileDatabase GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance GI.Gio.Objects.TlsDatabase.IsTlsDatabase GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabaseAnchorsPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase
instance (info ~ GI.Gio.Interfaces.TlsFileDatabase.ResolveTlsFileDatabaseMethod t GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase -> p)
instance (info ~ GI.Gio.Interfaces.TlsFileDatabase.ResolveTlsFileDatabaseMethod t GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.TlsFileDatabase.TlsFileDatabase -> p)
-- | TLS (Transport Layer Security, aka SSL) and DTLS backend.
module GI.Gio.Interfaces.TlsBackend
newtype TlsBackend
TlsBackend :: (ManagedPtr TlsBackend) -> TlsBackend
noTlsBackend :: Maybe TlsBackend
class GObject o => IsTlsBackend o
toTlsBackend :: IsTlsBackend o => o -> IO TlsBackend
data TlsBackendGetCertificateTypeMethodInfo
-- | Gets the GType of backend's
-- TlsCertificate implementation.
tlsBackendGetCertificateType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType
data TlsBackendGetClientConnectionTypeMethodInfo
-- | Gets the GType of backend's
-- TlsClientConnection implementation.
tlsBackendGetClientConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType
-- | Gets the default TlsBackend for the system.
tlsBackendGetDefault :: (HasCallStack, MonadIO m) => m TlsBackend
data TlsBackendGetDefaultDatabaseMethodInfo
-- | Gets the default TlsDatabase used to verify TLS connections.
tlsBackendGetDefaultDatabase :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m TlsDatabase
data TlsBackendGetDtlsClientConnectionTypeMethodInfo
-- | Gets the GType of backend’s
-- DtlsClientConnection implementation.
tlsBackendGetDtlsClientConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType
data TlsBackendGetDtlsServerConnectionTypeMethodInfo
-- | Gets the GType of backend’s
-- DtlsServerConnection implementation.
tlsBackendGetDtlsServerConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType
data TlsBackendGetFileDatabaseTypeMethodInfo
-- | Gets the GType of backend's
-- TlsFileDatabase implementation.
tlsBackendGetFileDatabaseType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType
data TlsBackendGetServerConnectionTypeMethodInfo
-- | Gets the GType of backend's
-- TlsServerConnection implementation.
tlsBackendGetServerConnectionType :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m GType
data TlsBackendSupportsDtlsMethodInfo
-- | Checks if DTLS is supported. DTLS support may not be available even if
-- TLS support is available, and vice-versa.
tlsBackendSupportsDtls :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m Bool
data TlsBackendSupportsTlsMethodInfo
-- | Checks if TLS is supported; if this returns False for the
-- default TlsBackend, it means no "real" TLS backend is
-- available.
tlsBackendSupportsTls :: (HasCallStack, MonadIO m, IsTlsBackend a) => a -> m Bool
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsBackend.TlsBackend
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.TlsBackend.TlsBackend a) => GI.Gio.Interfaces.TlsBackend.IsTlsBackend a
instance GI.Gio.Interfaces.TlsBackend.IsTlsBackend GI.Gio.Interfaces.TlsBackend.TlsBackend
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.TlsBackend.TlsBackend
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.TlsBackend.TlsBackend
instance (info ~ GI.Gio.Interfaces.TlsBackend.ResolveTlsBackendMethod t GI.Gio.Interfaces.TlsBackend.TlsBackend, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsBackend.TlsBackend p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.TlsBackend.TlsBackend -> p)
instance (info ~ GI.Gio.Interfaces.TlsBackend.ResolveTlsBackendMethod t GI.Gio.Interfaces.TlsBackend.TlsBackend, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsBackend.TlsBackend p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.TlsBackend.TlsBackend -> p)
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendGetCertificateTypeMethodInfo a signature
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendGetClientConnectionTypeMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.TlsDatabase.TlsDatabase, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendGetDefaultDatabaseMethodInfo a signature
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendGetDtlsClientConnectionTypeMethodInfo a signature
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendGetDtlsServerConnectionTypeMethodInfo a signature
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendGetFileDatabaseTypeMethodInfo a signature
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendGetServerConnectionTypeMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendSupportsDtlsMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsBackend.IsTlsBackend a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsBackend.TlsBackendSupportsTlsMethodInfo a signature
-- | 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
newtype SocketConnectable
SocketConnectable :: (ManagedPtr SocketConnectable) -> SocketConnectable
noSocketConnectable :: Maybe SocketConnectable
class GObject o => IsSocketConnectable o
toSocketConnectable :: IsSocketConnectable o => o -> IO SocketConnectable
data SocketConnectableEnumerateMethodInfo
-- | Creates a SocketAddressEnumerator for
-- connectable.
socketConnectableEnumerate :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m SocketAddressEnumerator
data SocketConnectableProxyEnumerateMethodInfo
-- | 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.
socketConnectableProxyEnumerate :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m SocketAddressEnumerator
data SocketConnectableToStringMethodInfo
-- | 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.
socketConnectableToString :: (HasCallStack, MonadIO m, IsSocketConnectable a) => a -> m Text
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.SocketConnectable.SocketConnectable a) => GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable a
instance GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.SocketConnectable.SocketConnectable
instance (info ~ GI.Gio.Interfaces.SocketConnectable.ResolveSocketConnectableMethod t GI.Gio.Interfaces.SocketConnectable.SocketConnectable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.SocketConnectable.SocketConnectable p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.SocketConnectable.SocketConnectable -> p)
instance (info ~ GI.Gio.Interfaces.SocketConnectable.ResolveSocketConnectableMethod t GI.Gio.Interfaces.SocketConnectable.SocketConnectable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.SocketConnectable.SocketConnectable p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.SocketConnectable.SocketConnectable -> p)
instance (signature ~ m GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.SocketConnectable.SocketConnectableEnumerateMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.SocketConnectable.SocketConnectableProxyEnumerateMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.SocketConnectable.SocketConnectableToStringMethodInfo a signature
-- | An IPv4 or IPv6 socket address; that is, the combination of a
-- InetAddress and a port number.
module GI.Gio.Objects.InetSocketAddress
newtype InetSocketAddress
InetSocketAddress :: (ManagedPtr InetSocketAddress) -> InetSocketAddress
class GObject o => IsInetSocketAddress o
toInetSocketAddress :: IsInetSocketAddress o => o -> IO InetSocketAddress
noInetSocketAddress :: Maybe InetSocketAddress
data InetSocketAddressGetAddressMethodInfo
-- | Gets address's InetAddress.
inetSocketAddressGetAddress :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m InetAddress
data InetSocketAddressGetFlowinfoMethodInfo
-- | Gets the sin6_flowinfo field from address,
-- which must be an IPv6 address.
inetSocketAddressGetFlowinfo :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32
data InetSocketAddressGetPortMethodInfo
-- | Gets address's port.
inetSocketAddressGetPort :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word16
data InetSocketAddressGetScopeIdMethodInfo
-- | Gets the sin6_scope_id field from address,
-- which must be an IPv6 address.
inetSocketAddressGetScopeId :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32
-- | Creates a new InetSocketAddress for address and
-- port.
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 %).
inetSocketAddressNewFromString :: (HasCallStack, MonadIO m) => Text -> Word32 -> m InetSocketAddress
data InetSocketAddressAddressPropertyInfo
constructInetSocketAddressAddress :: (IsInetSocketAddress o, IsInetAddress a) => a -> IO (GValueConstruct o)
getInetSocketAddressAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetAddress
inetSocketAddressAddress :: AttrLabelProxy "address"
data InetSocketAddressFlowinfoPropertyInfo
constructInetSocketAddressFlowinfo :: (IsInetSocketAddress o) => Word32 -> IO (GValueConstruct o)
getInetSocketAddressFlowinfo :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32
inetSocketAddressFlowinfo :: AttrLabelProxy "flowinfo"
data InetSocketAddressPortPropertyInfo
constructInetSocketAddressPort :: (IsInetSocketAddress o) => Word32 -> IO (GValueConstruct o)
getInetSocketAddressPort :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32
inetSocketAddressPort :: AttrLabelProxy "port"
data InetSocketAddressScopeIdPropertyInfo
constructInetSocketAddressScopeId :: (IsInetSocketAddress o) => Word32 -> IO (GValueConstruct o)
getInetSocketAddressScopeId :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32
inetSocketAddressScopeId :: AttrLabelProxy "scopeId"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.InetSocketAddress.InetSocketAddress a) => GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress a
instance GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance GI.Gio.Objects.SocketAddress.IsSocketAddress GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance (info ~ GI.Gio.Objects.InetSocketAddress.ResolveInetSocketAddressMethod t GI.Gio.Objects.InetSocketAddress.InetSocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InetSocketAddress.InetSocketAddress p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.InetSocketAddress.InetSocketAddress -> p)
instance (info ~ GI.Gio.Objects.InetSocketAddress.ResolveInetSocketAddressMethod t GI.Gio.Objects.InetSocketAddress.InetSocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InetSocketAddress.InetSocketAddress p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.InetSocketAddress.InetSocketAddress -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressAddressPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressFlowinfoPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressPortPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressScopeIdPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.InetSocketAddress.InetSocketAddress
instance (signature ~ m GI.Gio.Objects.InetAddress.InetAddress, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressGetAddressMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressGetFlowinfoMethodInfo a signature
instance (signature ~ m GHC.Word.Word16, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressGetPortMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetSocketAddress.InetSocketAddressGetScopeIdMethodInfo a signature
-- | 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 and example of using the connectable
-- interface.
module GI.Gio.Objects.NetworkAddress
newtype NetworkAddress
NetworkAddress :: (ManagedPtr NetworkAddress) -> NetworkAddress
class GObject o => IsNetworkAddress o
toNetworkAddress :: IsNetworkAddress o => o -> IO NetworkAddress
noNetworkAddress :: Maybe NetworkAddress
data NetworkAddressGetHostnameMethodInfo
-- | Gets addr's hostname. This might be either UTF-8 or
-- ASCII-encoded, depending on what addr was created
-- with.
networkAddressGetHostname :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m Text
data NetworkAddressGetPortMethodInfo
-- | Gets addr's port number
networkAddressGetPort :: (HasCallStack, MonadIO m, IsNetworkAddress a) => a -> m Word16
data NetworkAddressGetSchemeMethodInfo
-- | Gets addr's scheme
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.
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.
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 overide 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.)
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.
networkAddressParseUri :: (HasCallStack, MonadIO m) => Text -> Word16 -> m NetworkAddress
data NetworkAddressHostnamePropertyInfo
constructNetworkAddressHostname :: (IsNetworkAddress o) => Text -> IO (GValueConstruct o)
getNetworkAddressHostname :: (MonadIO m, IsNetworkAddress o) => o -> m Text
networkAddressHostname :: AttrLabelProxy "hostname"
data NetworkAddressPortPropertyInfo
constructNetworkAddressPort :: (IsNetworkAddress o) => Word32 -> IO (GValueConstruct o)
getNetworkAddressPort :: (MonadIO m, IsNetworkAddress o) => o -> m Word32
networkAddressPort :: AttrLabelProxy "port"
data NetworkAddressSchemePropertyInfo
constructNetworkAddressScheme :: (IsNetworkAddress o) => Text -> IO (GValueConstruct o)
getNetworkAddressScheme :: (MonadIO m, IsNetworkAddress o) => o -> m Text
networkAddressScheme :: AttrLabelProxy "scheme"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.NetworkAddress.NetworkAddress
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.NetworkAddress.NetworkAddress a) => GI.Gio.Objects.NetworkAddress.IsNetworkAddress a
instance GI.Gio.Objects.NetworkAddress.IsNetworkAddress GI.Gio.Objects.NetworkAddress.NetworkAddress
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.NetworkAddress.NetworkAddress
instance GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable GI.Gio.Objects.NetworkAddress.NetworkAddress
instance (info ~ GI.Gio.Objects.NetworkAddress.ResolveNetworkAddressMethod t GI.Gio.Objects.NetworkAddress.NetworkAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.NetworkAddress.NetworkAddress p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.NetworkAddress.NetworkAddress -> p)
instance (info ~ GI.Gio.Objects.NetworkAddress.ResolveNetworkAddressMethod t GI.Gio.Objects.NetworkAddress.NetworkAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.NetworkAddress.NetworkAddress p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.NetworkAddress.NetworkAddress -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.NetworkAddress.NetworkAddressHostnamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.NetworkAddress.NetworkAddressPortPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.NetworkAddress.NetworkAddressSchemePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.NetworkAddress.NetworkAddress
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkAddress.IsNetworkAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkAddress.NetworkAddressGetHostnameMethodInfo a signature
instance (signature ~ m GHC.Word.Word16, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkAddress.IsNetworkAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkAddress.NetworkAddressGetPortMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkAddress.IsNetworkAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkAddress.NetworkAddressGetSchemeMethodInfo a signature
-- | 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 and example of using the connectable
-- interface.
module GI.Gio.Objects.NetworkService
newtype NetworkService
NetworkService :: (ManagedPtr NetworkService) -> NetworkService
class GObject o => IsNetworkService o
toNetworkService :: IsNetworkService o => o -> IO NetworkService
noNetworkService :: Maybe NetworkService
data NetworkServiceGetDomainMethodInfo
-- | Gets the domain that srv serves. This might be either
-- UTF-8 or ASCII-encoded, depending on what srv was
-- created with.
networkServiceGetDomain :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text
data NetworkServiceGetProtocolMethodInfo
-- | Gets srv's protocol name (eg, "tcp").
networkServiceGetProtocol :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text
data NetworkServiceGetSchemeMethodInfo
-- | Get's the URI scheme used to resolve proxies. By default, the service
-- name is used as scheme.
networkServiceGetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text
data NetworkServiceGetServiceMethodInfo
-- | Gets srv's service name (eg, "ldap").
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.
networkServiceNew :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> m NetworkService
data NetworkServiceSetSchemeMethodInfo
-- | Set's the URI scheme used to resolve proxies. By default, the service
-- name is used as scheme.
networkServiceSetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> Text -> m ()
data NetworkServiceDomainPropertyInfo
constructNetworkServiceDomain :: (IsNetworkService o) => Text -> IO (GValueConstruct o)
getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m Text
networkServiceDomain :: AttrLabelProxy "domain"
data NetworkServiceProtocolPropertyInfo
constructNetworkServiceProtocol :: (IsNetworkService o) => Text -> IO (GValueConstruct o)
getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m Text
networkServiceProtocol :: AttrLabelProxy "protocol"
data NetworkServiceSchemePropertyInfo
constructNetworkServiceScheme :: (IsNetworkService o) => Text -> IO (GValueConstruct o)
getNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> m Text
networkServiceScheme :: AttrLabelProxy "scheme"
setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> Text -> m ()
data NetworkServiceServicePropertyInfo
constructNetworkServiceService :: (IsNetworkService o) => Text -> IO (GValueConstruct o)
getNetworkServiceService :: (MonadIO m, IsNetworkService o) => o -> m Text
networkServiceService :: AttrLabelProxy "service"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.NetworkService.NetworkService
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.NetworkService.NetworkService a) => GI.Gio.Objects.NetworkService.IsNetworkService a
instance GI.Gio.Objects.NetworkService.IsNetworkService GI.Gio.Objects.NetworkService.NetworkService
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.NetworkService.NetworkService
instance GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable GI.Gio.Objects.NetworkService.NetworkService
instance (info ~ GI.Gio.Objects.NetworkService.ResolveNetworkServiceMethod t GI.Gio.Objects.NetworkService.NetworkService, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.NetworkService.NetworkService p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.NetworkService.NetworkService -> p)
instance (info ~ GI.Gio.Objects.NetworkService.ResolveNetworkServiceMethod t GI.Gio.Objects.NetworkService.NetworkService, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.NetworkService.NetworkService p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.NetworkService.NetworkService -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.NetworkService.NetworkServiceDomainPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.NetworkService.NetworkServiceProtocolPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.NetworkService.NetworkServiceSchemePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.NetworkService.NetworkServiceServicePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.NetworkService.NetworkService
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkService.IsNetworkService a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkService.NetworkServiceGetDomainMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkService.IsNetworkService a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkService.NetworkServiceGetProtocolMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkService.IsNetworkService a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkService.NetworkServiceGetSchemeMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkService.IsNetworkService a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkService.NetworkServiceGetServiceMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.NetworkService.IsNetworkService a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.NetworkService.NetworkServiceSetSchemeMethodInfo a signature
-- | Support for proxied InetSocketAddress.
module GI.Gio.Objects.ProxyAddress
newtype ProxyAddress
ProxyAddress :: (ManagedPtr ProxyAddress) -> ProxyAddress
class GObject o => IsProxyAddress o
toProxyAddress :: IsProxyAddress o => o -> IO ProxyAddress
noProxyAddress :: Maybe ProxyAddress
data ProxyAddressGetDestinationHostnameMethodInfo
-- | 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.
proxyAddressGetDestinationHostname :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
data ProxyAddressGetDestinationPortMethodInfo
-- | 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.
proxyAddressGetDestinationPort :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Word16
data ProxyAddressGetDestinationProtocolMethodInfo
-- | Gets the protocol that is being spoken to the destination server; eg,
-- "http" or "ftp".
proxyAddressGetDestinationProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
data ProxyAddressGetPasswordMethodInfo
-- | Gets proxy's password.
proxyAddressGetPassword :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
data ProxyAddressGetProtocolMethodInfo
-- | Gets proxy's protocol. eg, "socks" or "http"
proxyAddressGetProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
data ProxyAddressGetUriMethodInfo
-- | Gets the proxy URI that proxy was constructed from.
proxyAddressGetUri :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
data ProxyAddressGetUsernameMethodInfo
-- | Gets proxy's username.
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.)
proxyAddressNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word16 -> Text -> Text -> Word16 -> Maybe (Text) -> Maybe (Text) -> m ProxyAddress
data ProxyAddressDestinationHostnamePropertyInfo
constructProxyAddressDestinationHostname :: (IsProxyAddress o) => Text -> IO (GValueConstruct o)
getProxyAddressDestinationHostname :: (MonadIO m, IsProxyAddress o) => o -> m Text
proxyAddressDestinationHostname :: AttrLabelProxy "destinationHostname"
data ProxyAddressDestinationPortPropertyInfo
constructProxyAddressDestinationPort :: (IsProxyAddress o) => Word32 -> IO (GValueConstruct o)
getProxyAddressDestinationPort :: (MonadIO m, IsProxyAddress o) => o -> m Word32
proxyAddressDestinationPort :: AttrLabelProxy "destinationPort"
data ProxyAddressDestinationProtocolPropertyInfo
constructProxyAddressDestinationProtocol :: (IsProxyAddress o) => Text -> IO (GValueConstruct o)
getProxyAddressDestinationProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text
proxyAddressDestinationProtocol :: AttrLabelProxy "destinationProtocol"
data ProxyAddressPasswordPropertyInfo
constructProxyAddressPassword :: (IsProxyAddress o) => Text -> IO (GValueConstruct o)
getProxyAddressPassword :: (MonadIO m, IsProxyAddress o) => o -> m Text
proxyAddressPassword :: AttrLabelProxy "password"
data ProxyAddressProtocolPropertyInfo
constructProxyAddressProtocol :: (IsProxyAddress o) => Text -> IO (GValueConstruct o)
getProxyAddressProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text
proxyAddressProtocol :: AttrLabelProxy "protocol"
data ProxyAddressUriPropertyInfo
constructProxyAddressUri :: (IsProxyAddress o) => Text -> IO (GValueConstruct o)
getProxyAddressUri :: (MonadIO m, IsProxyAddress o) => o -> m Text
proxyAddressUri :: AttrLabelProxy "uri"
data ProxyAddressUsernamePropertyInfo
constructProxyAddressUsername :: (IsProxyAddress o) => Text -> IO (GValueConstruct o)
getProxyAddressUsername :: (MonadIO m, IsProxyAddress o) => o -> m Text
proxyAddressUsername :: AttrLabelProxy "username"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ProxyAddress.ProxyAddress
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ProxyAddress.ProxyAddress a) => GI.Gio.Objects.ProxyAddress.IsProxyAddress a
instance GI.Gio.Objects.ProxyAddress.IsProxyAddress GI.Gio.Objects.ProxyAddress.ProxyAddress
instance GI.Gio.Objects.InetSocketAddress.IsInetSocketAddress GI.Gio.Objects.ProxyAddress.ProxyAddress
instance GI.Gio.Objects.SocketAddress.IsSocketAddress GI.Gio.Objects.ProxyAddress.ProxyAddress
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ProxyAddress.ProxyAddress
instance GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable GI.Gio.Objects.ProxyAddress.ProxyAddress
instance (info ~ GI.Gio.Objects.ProxyAddress.ResolveProxyAddressMethod t GI.Gio.Objects.ProxyAddress.ProxyAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ProxyAddress.ProxyAddress p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ProxyAddress.ProxyAddress -> p)
instance (info ~ GI.Gio.Objects.ProxyAddress.ResolveProxyAddressMethod t GI.Gio.Objects.ProxyAddress.ProxyAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ProxyAddress.ProxyAddress p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ProxyAddress.ProxyAddress -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddress.ProxyAddressDestinationHostnamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddress.ProxyAddressDestinationPortPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddress.ProxyAddressDestinationProtocolPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddress.ProxyAddressPasswordPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddress.ProxyAddressProtocolPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddress.ProxyAddressUriPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddress.ProxyAddressUsernamePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ProxyAddress.ProxyAddress
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ProxyAddress.IsProxyAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ProxyAddress.ProxyAddressGetDestinationHostnameMethodInfo a signature
instance (signature ~ m GHC.Word.Word16, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ProxyAddress.IsProxyAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ProxyAddress.ProxyAddressGetDestinationPortMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ProxyAddress.IsProxyAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ProxyAddress.ProxyAddressGetDestinationProtocolMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ProxyAddress.IsProxyAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ProxyAddress.ProxyAddressGetPasswordMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ProxyAddress.IsProxyAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ProxyAddress.ProxyAddressGetProtocolMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ProxyAddress.IsProxyAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ProxyAddress.ProxyAddressGetUriMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ProxyAddress.IsProxyAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ProxyAddress.ProxyAddressGetUsernameMethodInfo a signature
-- | 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:
-- attmepting 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
newtype Seekable
Seekable :: (ManagedPtr Seekable) -> Seekable
noSeekable :: Maybe Seekable
class GObject o => IsSeekable o
toSeekable :: IsSeekable o => o -> IO Seekable
data SeekableCanSeekMethodInfo
-- | Tests if the stream supports the SeekableIface.
seekableCanSeek :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Bool
data SeekableCanTruncateMethodInfo
-- | Tests if the stream can be truncated.
seekableCanTruncate :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Bool
data SeekableSeekMethodInfo
-- | 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 ()
data SeekableTellMethodInfo
-- | Tells the current position within the stream.
seekableTell :: (HasCallStack, MonadIO m, IsSeekable a) => a -> m Int64
data SeekableTruncateMethodInfo
-- | Truncates a stream with a given offset.
--
-- 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 GI.Gio.Interfaces.Seekable.Seekable
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.Seekable.Seekable a) => GI.Gio.Interfaces.Seekable.IsSeekable a
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Interfaces.Seekable.Seekable
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.Seekable.Seekable
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.Seekable.Seekable
instance (info ~ GI.Gio.Interfaces.Seekable.ResolveSeekableMethod t GI.Gio.Interfaces.Seekable.Seekable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Seekable.Seekable p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.Seekable.Seekable -> p)
instance (info ~ GI.Gio.Interfaces.Seekable.ResolveSeekableMethod t GI.Gio.Interfaces.Seekable.Seekable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Seekable.Seekable p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.Seekable.Seekable -> p)
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Seekable.IsSeekable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Seekable.SeekableCanSeekMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Seekable.IsSeekable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Seekable.SeekableCanTruncateMethodInfo a signature
instance (signature ~ (GHC.Int.Int64 -> GI.GLib.Enums.SeekType -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Seekable.IsSeekable a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Seekable.SeekableSeekMethodInfo a signature
instance (signature ~ m GHC.Int.Int64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Seekable.IsSeekable a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Seekable.SeekableTellMethodInfo a signature
instance (signature ~ (GHC.Int.Int64 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Seekable.IsSeekable a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Seekable.SeekableTruncateMethodInfo a signature
-- | 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
newtype BufferedOutputStream
BufferedOutputStream :: (ManagedPtr BufferedOutputStream) -> BufferedOutputStream
class GObject o => IsBufferedOutputStream o
toBufferedOutputStream :: IsBufferedOutputStream o => o -> IO BufferedOutputStream
noBufferedOutputStream :: Maybe BufferedOutputStream
data BufferedOutputStreamGetAutoGrowMethodInfo
-- | Checks if the buffer automatically grows as data is added.
bufferedOutputStreamGetAutoGrow :: (HasCallStack, MonadIO m, IsBufferedOutputStream a) => a -> m Bool
data BufferedOutputStreamGetBufferSizeMethodInfo
-- | 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
data BufferedOutputStreamSetAutoGrowMethodInfo
-- | 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 ()
data BufferedOutputStreamSetBufferSizeMethodInfo
-- | Sets the size of the internal buffer to size.
bufferedOutputStreamSetBufferSize :: (HasCallStack, MonadIO m, IsBufferedOutputStream a) => a -> Word64 -> m ()
data BufferedOutputStreamAutoGrowPropertyInfo
bufferedOutputStreamAutoGrow :: AttrLabelProxy "autoGrow"
constructBufferedOutputStreamAutoGrow :: (IsBufferedOutputStream o) => Bool -> IO (GValueConstruct o)
getBufferedOutputStreamAutoGrow :: (MonadIO m, IsBufferedOutputStream o) => o -> m Bool
setBufferedOutputStreamAutoGrow :: (MonadIO m, IsBufferedOutputStream o) => o -> Bool -> m ()
data BufferedOutputStreamBufferSizePropertyInfo
bufferedOutputStreamBufferSize :: AttrLabelProxy "bufferSize"
constructBufferedOutputStreamBufferSize :: (IsBufferedOutputStream o) => Word32 -> IO (GValueConstruct o)
getBufferedOutputStreamBufferSize :: (MonadIO m, IsBufferedOutputStream o) => o -> m Word32
setBufferedOutputStreamBufferSize :: (MonadIO m, IsBufferedOutputStream o) => o -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream a) => GI.Gio.Objects.BufferedOutputStream.IsBufferedOutputStream a
instance GI.Gio.Objects.BufferedOutputStream.IsBufferedOutputStream GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance GI.Gio.Objects.FilterOutputStream.IsFilterOutputStream GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance (info ~ GI.Gio.Objects.BufferedOutputStream.ResolveBufferedOutputStreamMethod t GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream -> p)
instance (info ~ GI.Gio.Objects.BufferedOutputStream.ResolveBufferedOutputStreamMethod t GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.BufferedOutputStream.BufferedOutputStreamAutoGrowPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.BufferedOutputStream.BufferedOutputStreamBufferSizePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.BufferedOutputStream.BufferedOutputStream
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedOutputStream.IsBufferedOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedOutputStream.BufferedOutputStreamGetAutoGrowMethodInfo a signature
instance (signature ~ m GHC.Word.Word64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedOutputStream.IsBufferedOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedOutputStream.BufferedOutputStreamGetBufferSizeMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedOutputStream.IsBufferedOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedOutputStream.BufferedOutputStreamSetAutoGrowMethodInfo a signature
instance (signature ~ (GHC.Word.Word64 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedOutputStream.IsBufferedOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedOutputStream.BufferedOutputStreamSetBufferSizeMethodInfo a signature
-- | A subclass of SocketAddressEnumerator that takes another
-- address enumerator and wraps its results in ProxyAddress<!--
-- -->es as directed by the default ProxyResolver.
module GI.Gio.Objects.ProxyAddressEnumerator
newtype ProxyAddressEnumerator
ProxyAddressEnumerator :: (ManagedPtr ProxyAddressEnumerator) -> ProxyAddressEnumerator
class GObject o => IsProxyAddressEnumerator o
toProxyAddressEnumerator :: IsProxyAddressEnumerator o => o -> IO ProxyAddressEnumerator
noProxyAddressEnumerator :: Maybe ProxyAddressEnumerator
data ProxyAddressEnumeratorConnectablePropertyInfo
constructProxyAddressEnumeratorConnectable :: (IsProxyAddressEnumerator o, IsSocketConnectable a) => a -> IO (GValueConstruct o)
getProxyAddressEnumeratorConnectable :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe SocketConnectable)
proxyAddressEnumeratorConnectable :: AttrLabelProxy "connectable"
data ProxyAddressEnumeratorDefaultPortPropertyInfo
constructProxyAddressEnumeratorDefaultPort :: (IsProxyAddressEnumerator o) => Word32 -> IO (GValueConstruct o)
getProxyAddressEnumeratorDefaultPort :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m Word32
proxyAddressEnumeratorDefaultPort :: AttrLabelProxy "defaultPort"
data ProxyAddressEnumeratorProxyResolverPropertyInfo
clearProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m ()
constructProxyAddressEnumeratorProxyResolver :: (IsProxyAddressEnumerator o, IsProxyResolver a) => a -> IO (GValueConstruct o)
getProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe ProxyResolver)
proxyAddressEnumeratorProxyResolver :: AttrLabelProxy "proxyResolver"
setProxyAddressEnumeratorProxyResolver :: (MonadIO m, IsProxyAddressEnumerator o, IsProxyResolver a) => o -> a -> m ()
data ProxyAddressEnumeratorUriPropertyInfo
constructProxyAddressEnumeratorUri :: (IsProxyAddressEnumerator o) => Text -> IO (GValueConstruct o)
getProxyAddressEnumeratorUri :: (MonadIO m, IsProxyAddressEnumerator o) => o -> m (Maybe Text)
proxyAddressEnumeratorUri :: AttrLabelProxy "uri"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator a) => GI.Gio.Objects.ProxyAddressEnumerator.IsProxyAddressEnumerator a
instance GI.Gio.Objects.ProxyAddressEnumerator.IsProxyAddressEnumerator GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance GI.Gio.Objects.SocketAddressEnumerator.IsSocketAddressEnumerator GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
instance (info ~ GI.Gio.Objects.ProxyAddressEnumerator.ResolveProxyAddressEnumeratorMethod t GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator -> p)
instance (info ~ GI.Gio.Objects.ProxyAddressEnumerator.ResolveProxyAddressEnumeratorMethod t GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumeratorConnectablePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumeratorDefaultPortPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumeratorProxyResolverPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumeratorUriPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ProxyAddressEnumerator.ProxyAddressEnumerator
-- | 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.
module GI.Gio.Objects.SimpleProxyResolver
newtype SimpleProxyResolver
SimpleProxyResolver :: (ManagedPtr SimpleProxyResolver) -> SimpleProxyResolver
class GObject o => IsSimpleProxyResolver o
toSimpleProxyResolver :: IsSimpleProxyResolver o => o -> IO 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.
simpleProxyResolverNew :: (HasCallStack, MonadIO m) => Maybe (Text) -> Maybe (Text) -> m ProxyResolver
data SimpleProxyResolverSetDefaultProxyMethodInfo
-- | 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.
simpleProxyResolverSetDefaultProxy :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> Text -> m ()
data SimpleProxyResolverSetIgnoreHostsMethodInfo
-- | Sets the list of ignored hosts.
--
-- See SimpleProxyResolver:ignore-hosts for more
-- details on how the ignoreHosts argument is
-- interpreted.
simpleProxyResolverSetIgnoreHosts :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> Text -> m ()
data SimpleProxyResolverSetUriProxyMethodInfo
-- | 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.
simpleProxyResolverSetUriProxy :: (HasCallStack, MonadIO m, IsSimpleProxyResolver a) => a -> Text -> Text -> m ()
data SimpleProxyResolverDefaultProxyPropertyInfo
constructSimpleProxyResolverDefaultProxy :: (IsSimpleProxyResolver o) => Text -> IO (GValueConstruct o)
getSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe Text)
setSimpleProxyResolverDefaultProxy :: (MonadIO m, IsSimpleProxyResolver o) => o -> Text -> m ()
simpleProxyResolverDefaultProxy :: AttrLabelProxy "defaultProxy"
data SimpleProxyResolverIgnoreHostsPropertyInfo
clearSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> m ()
constructSimpleProxyResolverIgnoreHosts :: (IsSimpleProxyResolver o) => [Text] -> IO (GValueConstruct o)
getSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> m (Maybe [Text])
setSimpleProxyResolverIgnoreHosts :: (MonadIO m, IsSimpleProxyResolver o) => o -> [Text] -> m ()
simpleProxyResolverIgnoreHosts :: AttrLabelProxy "ignoreHosts"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver a) => GI.Gio.Objects.SimpleProxyResolver.IsSimpleProxyResolver a
instance GI.Gio.Objects.SimpleProxyResolver.IsSimpleProxyResolver GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance GI.Gio.Interfaces.ProxyResolver.IsProxyResolver GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance (info ~ GI.Gio.Objects.SimpleProxyResolver.ResolveSimpleProxyResolverMethod t GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver -> p)
instance (info ~ GI.Gio.Objects.SimpleProxyResolver.ResolveSimpleProxyResolverMethod t GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolverDefaultProxyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolverIgnoreHostsPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolver
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleProxyResolver.IsSimpleProxyResolver a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolverSetDefaultProxyMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleProxyResolver.IsSimpleProxyResolver a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolverSetIgnoreHostsMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleProxyResolver.IsSimpleProxyResolver a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleProxyResolver.SimpleProxyResolverSetUriProxyMethodInfo a signature
-- | 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.
module GI.Gio.Interfaces.PollableOutputStream
newtype PollableOutputStream
PollableOutputStream :: (ManagedPtr PollableOutputStream) -> PollableOutputStream
noPollableOutputStream :: Maybe PollableOutputStream
class GObject o => IsPollableOutputStream o
toPollableOutputStream :: IsPollableOutputStream o => o -> IO PollableOutputStream
data PollableOutputStreamCanPollMethodInfo
-- | 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.
pollableOutputStreamCanPoll :: (HasCallStack, MonadIO m, IsPollableOutputStream a) => a -> m Bool
data PollableOutputStreamCreateSourceMethodInfo
-- | 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.
pollableOutputStreamCreateSource :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> Maybe (b) -> m Source
data PollableOutputStreamIsWritableMethodInfo
-- | 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.
pollableOutputStreamIsWritable :: (HasCallStack, MonadIO m, IsPollableOutputStream a) => a -> m Bool
data PollableOutputStreamWriteNonblockingMethodInfo
-- | 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.
pollableOutputStreamWriteNonblocking :: (HasCallStack, MonadIO m, IsPollableOutputStream a, IsCancellable b) => a -> Maybe (ByteString) -> Maybe (b) -> m Int64
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream a) => GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream a
instance GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream
instance (info ~ GI.Gio.Interfaces.PollableOutputStream.ResolvePollableOutputStreamMethod t GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream -> p)
instance (info ~ GI.Gio.Interfaces.PollableOutputStream.ResolvePollableOutputStreamMethod t GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.PollableOutputStream.PollableOutputStream -> p)
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableOutputStream.PollableOutputStreamCanPollMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GI.GLib.Structs.Source.Source), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableOutputStream.PollableOutputStreamCreateSourceMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableOutputStream.PollableOutputStreamIsWritableMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableOutputStream.PollableOutputStreamWriteNonblockingMethodInfo a signature
-- | 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
newtype MemoryOutputStream
MemoryOutputStream :: (ManagedPtr MemoryOutputStream) -> MemoryOutputStream
class GObject o => IsMemoryOutputStream o
toMemoryOutputStream :: IsMemoryOutputStream o => o -> IO MemoryOutputStream
noMemoryOutputStream :: Maybe MemoryOutputStream
data MemoryOutputStreamGetDataMethodInfo
-- | 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 ())
data MemoryOutputStreamGetDataSizeMethodInfo
-- | Returns the number of bytes from the start up to including the last
-- byte written in the stream that has not been truncated away.
memoryOutputStreamGetDataSize :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m Word64
data MemoryOutputStreamGetSizeMethodInfo
-- | 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.
memoryOutputStreamNewResizable :: (HasCallStack, MonadIO m) => m MemoryOutputStream
data MemoryOutputStreamStealAsBytesMethodInfo
-- | Returns data from the ostream as a Bytes.
-- ostream must be closed before calling this function.
memoryOutputStreamStealAsBytes :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m Bytes
data MemoryOutputStreamStealDataMethodInfo
-- | 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.
memoryOutputStreamStealData :: (HasCallStack, MonadIO m, IsMemoryOutputStream a) => a -> m (Ptr ())
data MemoryOutputStreamDataPropertyInfo
constructMemoryOutputStreamData :: (IsMemoryOutputStream o) => Ptr () -> IO (GValueConstruct o)
getMemoryOutputStreamData :: (MonadIO m, IsMemoryOutputStream o) => o -> m (Ptr ())
memoryOutputStreamData :: AttrLabelProxy "data"
data MemoryOutputStreamDataSizePropertyInfo
getMemoryOutputStreamDataSize :: (MonadIO m, IsMemoryOutputStream o) => o -> m CULong
memoryOutputStreamDataSize :: AttrLabelProxy "dataSize"
data MemoryOutputStreamSizePropertyInfo
constructMemoryOutputStreamSize :: (IsMemoryOutputStream o) => CULong -> IO (GValueConstruct o)
getMemoryOutputStreamSize :: (MonadIO m, IsMemoryOutputStream o) => o -> m CULong
memoryOutputStreamSize :: AttrLabelProxy "size"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream a) => GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream a
instance GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance (info ~ GI.Gio.Objects.MemoryOutputStream.ResolveMemoryOutputStreamMethod t GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream -> p)
instance (info ~ GI.Gio.Objects.MemoryOutputStream.ResolveMemoryOutputStreamMethod t GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamDataPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamDataSizePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamSizePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.MemoryOutputStream.MemoryOutputStream
instance (signature ~ m (GHC.Ptr.Ptr ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamGetDataMethodInfo a signature
instance (signature ~ m GHC.Word.Word64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamGetDataSizeMethodInfo a signature
instance (signature ~ m GHC.Word.Word64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamGetSizeMethodInfo a signature
instance (signature ~ m GI.GLib.Structs.Bytes.Bytes, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamStealAsBytesMethodInfo a signature
instance (signature ~ m (GHC.Ptr.Ptr ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MemoryOutputStream.IsMemoryOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MemoryOutputStream.MemoryOutputStreamStealDataMethodInfo a signature
-- | 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.
module GI.Gio.Interfaces.PollableInputStream
newtype PollableInputStream
PollableInputStream :: (ManagedPtr PollableInputStream) -> PollableInputStream
noPollableInputStream :: Maybe PollableInputStream
class GObject o => IsPollableInputStream o
toPollableInputStream :: IsPollableInputStream o => o -> IO PollableInputStream
data PollableInputStreamCanPollMethodInfo
-- | 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.
pollableInputStreamCanPoll :: (HasCallStack, MonadIO m, IsPollableInputStream a) => a -> m Bool
data PollableInputStreamCreateSourceMethodInfo
-- | 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.
pollableInputStreamCreateSource :: (HasCallStack, MonadIO m, IsPollableInputStream a, IsCancellable b) => a -> Maybe (b) -> m Source
data PollableInputStreamIsReadableMethodInfo
-- | 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.
pollableInputStreamIsReadable :: (HasCallStack, MonadIO m, IsPollableInputStream a) => a -> m Bool
data PollableInputStreamReadNonblockingMethodInfo
-- | 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 GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.PollableInputStream.PollableInputStream a) => GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream a
instance GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.PollableInputStream.PollableInputStream
instance (info ~ GI.Gio.Interfaces.PollableInputStream.ResolvePollableInputStreamMethod t GI.Gio.Interfaces.PollableInputStream.PollableInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.PollableInputStream.PollableInputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.PollableInputStream.PollableInputStream -> p)
instance (info ~ GI.Gio.Interfaces.PollableInputStream.ResolvePollableInputStreamMethod t GI.Gio.Interfaces.PollableInputStream.PollableInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.PollableInputStream.PollableInputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.PollableInputStream.PollableInputStream -> p)
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableInputStream.PollableInputStreamCanPollMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GI.GLib.Structs.Source.Source), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableInputStream.PollableInputStreamCreateSourceMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableInputStream.PollableInputStreamIsReadableMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.PollableInputStream.PollableInputStreamReadNonblockingMethodInfo a signature
-- | 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
newtype MemoryInputStream
MemoryInputStream :: (ManagedPtr MemoryInputStream) -> MemoryInputStream
class GObject o => IsMemoryInputStream o
toMemoryInputStream :: IsMemoryInputStream o => o -> IO MemoryInputStream
noMemoryInputStream :: Maybe MemoryInputStream
data MemoryInputStreamAddBytesMethodInfo
-- | Appends bytes to data that can be read from the input
-- stream.
memoryInputStreamAddBytes :: (HasCallStack, MonadIO m, IsMemoryInputStream a) => a -> Bytes -> m ()
data MemoryInputStreamAddDataMethodInfo
-- | 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.
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 GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.MemoryInputStream.MemoryInputStream a) => GI.Gio.Objects.MemoryInputStream.IsMemoryInputStream a
instance GI.Gio.Objects.MemoryInputStream.IsMemoryInputStream GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance (info ~ GI.Gio.Objects.MemoryInputStream.ResolveMemoryInputStreamMethod t GI.Gio.Objects.MemoryInputStream.MemoryInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.MemoryInputStream.MemoryInputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.MemoryInputStream.MemoryInputStream -> p)
instance (info ~ GI.Gio.Objects.MemoryInputStream.ResolveMemoryInputStreamMethod t GI.Gio.Objects.MemoryInputStream.MemoryInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.MemoryInputStream.MemoryInputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.MemoryInputStream.MemoryInputStream -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.MemoryInputStream.MemoryInputStream
instance (signature ~ (GI.GLib.Structs.Bytes.Bytes -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MemoryInputStream.IsMemoryInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MemoryInputStream.MemoryInputStreamAddBytesMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe GI.GLib.Callbacks.DestroyNotify -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MemoryInputStream.IsMemoryInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MemoryInputStream.MemoryInputStreamAddDataMethodInfo a signature
-- | ListModel is an interface that represents a mutable list of
-- GObjects. Its main intention is as a model for various
-- widgets in user interfaces, such as list views, but it can also be
-- used as a convenient method of returning lists of data, with support
-- for updates.
--
-- Each object in the list may also report changes in itself via some
-- mechanism (normally the Object::notify signal).
-- Taken together with the
-- ListModel::items-changed signal, this provides
-- for a list that can change its membership, and in which the members
-- can change their individual properties.
--
-- A good example would be the list of visible wireless network access
-- points, where each access point can report dynamic properties such as
-- signal strength.
--
-- It is important to note that the ListModel itself does not
-- report changes to the individual items. It only reports changes to the
-- list membership. If you want to observe changes to the objects
-- themselves then you need to connect signals to the objects that you
-- are interested in.
--
-- All items in a ListModel are of (or derived from) the same
-- type. listModelGetItemType returns that type. The type may be
-- an interface, in which case all objects in the list must implement it.
--
-- The semantics are close to that of an array: listModelGetNItems
-- returns the number of items in the list and
-- g_list_model_get_item() returns an item at a (0-based)
-- position. In order to allow implementations to calculate the list
-- length lazily, you can also iterate over items: starting from 0,
-- repeatedly call g_list_model_get_item() until it
-- returns Nothing.
--
-- An implementation may create objects lazily, but must take care to
-- return the same object for a given position until all references to it
-- are gone.
--
-- On the other side, a consumer is expected only to hold references on
-- objects that are currently "user visible", in order to faciliate the
-- maximum level of laziness in the implementation of the list and to
-- reduce the required number of signal connections at a given time.
--
-- This interface is intended only to be used from a single thread. The
-- thread in which it is appropriate to use it depends on the particular
-- implementation, but typically it will be from the thread that owns the
-- [thread-default main context][g-main-context-push-thread-default] in
-- effect at the time that the model was created.
module GI.Gio.Interfaces.ListModel
newtype ListModel
ListModel :: (ManagedPtr ListModel) -> ListModel
noListModel :: Maybe ListModel
class GObject o => IsListModel o
toListModel :: IsListModel o => o -> IO ListModel
data ListModelGetItemMethodInfo
-- | Get the item at position. If position
-- is greater than the number of items in list,
-- Nothing is returned.
--
-- Nothing is never returned for an index that is smaller than the
-- length of the list. See listModelGetNItems.
listModelGetItem :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> m (Maybe Object)
data ListModelGetItemTypeMethodInfo
-- | Gets the type of the items in list. All items returned
-- from g_list_model_get_type() are of that type or a
-- subtype, or are an implementation of that interface.
--
-- The item type of a ListModel can not change during the life of
-- the model.
listModelGetItemType :: (HasCallStack, MonadIO m, IsListModel a) => a -> m GType
data ListModelGetNItemsMethodInfo
-- | Gets the number of items in list.
--
-- Depending on the model implementation, calling this function may be
-- less efficient than iterating the list with increasing values for
-- position until g_list_model_get_item()
-- returns Nothing.
listModelGetNItems :: (HasCallStack, MonadIO m, IsListModel a) => a -> m Word32
data ListModelItemsChangedMethodInfo
-- | Emits the ListModel::items-changed signal on
-- list.
--
-- This function should only be called by classes implementing
-- ListModel. It has to be called after the internal
-- representation of list has been updated, because
-- handlers connected to this signal might query the new state of the
-- list.
--
-- Implementations must only make changes to the model (as visible to its
-- consumer) in places that will not cause problems for that consumer.
-- For models that are driven directly by a write API (such as
-- ListStore), changes can be reported in response to uses of that
-- API. For models that represent remote data, changes should only be
-- made from a fresh mainloop dispatch. It is particularly not permitted
-- to make changes in response to a call to the ListModel consumer
-- API.
--
-- Stated another way: in general, it is assumed that code making a
-- series of accesses to the model via the API, without returning to the
-- mainloop, and without calling other code, will continue to view the
-- same contents of the model.
listModelItemsChanged :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> Word32 -> Word32 -> m ()
type C_ListModelItemsChangedCallback = Ptr () -> Word32 -> Word32 -> Word32 -> Ptr () -> IO ()
type ListModelItemsChangedCallback = Word32 -> Word32 -> Word32 -> IO ()
data ListModelItemsChangedSignalInfo
afterListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ListModelItemsChangedCallback -> m SignalHandlerId
genClosure_ListModelItemsChanged :: ListModelItemsChangedCallback -> IO Closure
mk_ListModelItemsChangedCallback :: C_ListModelItemsChangedCallback -> IO (FunPtr C_ListModelItemsChangedCallback)
noListModelItemsChangedCallback :: Maybe ListModelItemsChangedCallback
onListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ListModelItemsChangedCallback -> m SignalHandlerId
wrap_ListModelItemsChangedCallback :: ListModelItemsChangedCallback -> Ptr () -> Word32 -> Word32 -> Word32 -> Ptr () -> IO ()
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.ListModel.ListModelItemsChangedSignalInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.ListModel.ListModel
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.ListModel.ListModel a) => GI.Gio.Interfaces.ListModel.IsListModel a
instance GI.Gio.Interfaces.ListModel.IsListModel GI.Gio.Interfaces.ListModel.ListModel
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.ListModel.ListModel
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.ListModel.ListModel
instance (info ~ GI.Gio.Interfaces.ListModel.ResolveListModelMethod t GI.Gio.Interfaces.ListModel.ListModel, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.ListModel.ListModel p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.ListModel.ListModel -> p)
instance (info ~ GI.Gio.Interfaces.ListModel.ResolveListModelMethod t GI.Gio.Interfaces.ListModel.ListModel, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.ListModel.ListModel p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.ListModel.ListModel -> p)
instance (signature ~ m Data.GI.Base.GType.GType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ListModel.IsListModel a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ListModel.ListModelGetItemTypeMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ListModel.IsListModel a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ListModel.ListModelGetNItemsMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m (GHC.Base.Maybe GI.GObject.Objects.Object.Object)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ListModel.IsListModel a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ListModel.ListModelGetItemMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> GHC.Word.Word32 -> GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ListModel.IsListModel a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ListModel.ListModelItemsChangedMethodInfo a signature
-- | 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
newtype ListStore
ListStore :: (ManagedPtr ListStore) -> ListStore
class GObject o => IsListStore o
toListStore :: IsListStore o => o -> IO ListStore
noListStore :: Maybe ListStore
data ListStoreAppendMethodInfo
-- | 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.
listStoreAppend :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> m ()
data ListStoreInsertMethodInfo
-- | 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.
listStoreInsert :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Word32 -> b -> m ()
data ListStoreInsertSortedMethodInfo
-- | 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.
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.
listStoreNew :: (HasCallStack, MonadIO m) => GType -> m ListStore
data ListStoreRemoveMethodInfo
-- | 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.
listStoreRemove :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> m ()
data ListStoreRemoveAllMethodInfo
-- | Removes all items from store.
listStoreRemoveAll :: (HasCallStack, MonadIO m, IsListStore a) => a -> m ()
data ListStoreSortMethodInfo
-- | Sort the items in store according to
-- compareFunc.
listStoreSort :: (HasCallStack, MonadIO m, IsListStore a) => a -> CompareDataFunc -> m ()
data ListStoreSpliceMethodInfo
-- | 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).
listStoreSplice :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> Word32 -> [Object] -> m ()
data ListStoreItemTypePropertyInfo
constructListStoreItemType :: (IsListStore o) => GType -> IO (GValueConstruct o)
getListStoreItemType :: (MonadIO m, IsListStore o) => o -> m GType
listStoreItemType :: AttrLabelProxy "itemType"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ListStore.ListStore
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ListStore.ListStore a) => GI.Gio.Objects.ListStore.IsListStore a
instance GI.Gio.Objects.ListStore.IsListStore GI.Gio.Objects.ListStore.ListStore
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ListStore.ListStore
instance GI.Gio.Interfaces.ListModel.IsListModel GI.Gio.Objects.ListStore.ListStore
instance (info ~ GI.Gio.Objects.ListStore.ResolveListStoreMethod t GI.Gio.Objects.ListStore.ListStore, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ListStore.ListStore p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ListStore.ListStore -> p)
instance (info ~ GI.Gio.Objects.ListStore.ResolveListStoreMethod t GI.Gio.Objects.ListStore.ListStore, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ListStore.ListStore p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ListStore.ListStore -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ListStore.ListStoreItemTypePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ListStore.ListStore
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ListStore.IsListStore a, GI.GObject.Objects.Object.IsObject b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ListStore.ListStoreAppendMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ListStore.IsListStore a, GI.GObject.Objects.Object.IsObject b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ListStore.ListStoreInsertMethodInfo a signature
instance (signature ~ (b -> GI.GLib.Callbacks.CompareDataFunc -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ListStore.IsListStore a, GI.GObject.Objects.Object.IsObject b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ListStore.ListStoreInsertSortedMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ListStore.IsListStore a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ListStore.ListStoreRemoveMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ListStore.IsListStore a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ListStore.ListStoreRemoveAllMethodInfo a signature
instance (signature ~ (GI.GLib.Callbacks.CompareDataFunc -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ListStore.IsListStore a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ListStore.ListStoreSortMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> GHC.Word.Word32 -> [GI.GObject.Objects.Object.Object] -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ListStore.IsListStore a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ListStore.ListStoreSpliceMethodInfo a signature
-- | 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.
module GI.Gio.Interfaces.Initable
newtype Initable
Initable :: (ManagedPtr Initable) -> Initable
noInitable :: Maybe Initable
class GObject o => IsInitable o
toInitable :: IsInitable o => o -> IO Initable
data InitableInitMethodInfo
-- | Initializes the object implementing the interface.
--
-- 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.
--
-- Implementations of this method must be idempotent, i.e. multiple calls
-- to this function with the same argument should return the same
-- results. Only the first call initializes the object, further calls
-- return the result of the first call. This is so that it's safe to
-- implement the singleton pattern in the GObject constructor function.
initableInit :: (HasCallStack, MonadIO m, IsInitable a, IsCancellable b) => a -> Maybe (b) -> m ()
-- | Helper function for constructing Initable object. This is
-- similar to objectNew but also initializes the object and
-- returns Nothing, setting an error on failure.
initableNewv :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> [Parameter] -> Maybe (a) -> m Object
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Initable.Initable
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.Initable.Initable a) => GI.Gio.Interfaces.Initable.IsInitable a
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Interfaces.Initable.Initable
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.Initable.Initable
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.Initable.Initable
instance (info ~ GI.Gio.Interfaces.Initable.ResolveInitableMethod t GI.Gio.Interfaces.Initable.Initable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Initable.Initable p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.Initable.Initable -> p)
instance (info ~ GI.Gio.Interfaces.Initable.ResolveInitableMethod t GI.Gio.Interfaces.Initable.Initable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Initable.Initable p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.Initable.Initable -> p)
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Initable.IsInitable a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Initable.InitableInitMethodInfo a signature
-- | 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
newtype Icon
Icon :: (ManagedPtr Icon) -> Icon
noIcon :: Maybe Icon
class GObject o => IsIcon o
toIcon :: IsIcon o => o -> IO Icon
-- | Deserializes a Icon previously serialized using
-- iconSerialize.
iconDeserialize :: (HasCallStack, MonadIO m) => GVariant -> m Icon
data IconEqualMethodInfo
-- | 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.
iconNewForString :: (HasCallStack, MonadIO m) => Text -> m Icon
data IconSerializeMethodInfo
-- | 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.
iconSerialize :: (HasCallStack, MonadIO m, IsIcon a) => a -> m GVariant
data IconToStringMethodInfo
-- | 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
--
--
-- 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
data ThemedIconPrependNameMethodInfo
-- | Prepend a name to the list of icons from within icon.
--
-- Note that doing so invalidates the hash computed by prior calls to
-- iconHash.
themedIconPrependName :: (HasCallStack, MonadIO m, IsThemedIcon a) => a -> Text -> m ()
data ThemedIconNamePropertyInfo
constructThemedIconName :: (IsThemedIcon o) => Text -> IO (GValueConstruct o)
themedIconName :: AttrLabelProxy "name"
data ThemedIconNamesPropertyInfo
constructThemedIconNames :: (IsThemedIcon o) => [Text] -> IO (GValueConstruct o)
getThemedIconNames :: (MonadIO m, IsThemedIcon o) => o -> m [Text]
themedIconNames :: AttrLabelProxy "names"
data ThemedIconUseDefaultFallbacksPropertyInfo
constructThemedIconUseDefaultFallbacks :: (IsThemedIcon o) => Bool -> IO (GValueConstruct o)
getThemedIconUseDefaultFallbacks :: (MonadIO m, IsThemedIcon o) => o -> m Bool
themedIconUseDefaultFallbacks :: AttrLabelProxy "useDefaultFallbacks"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ThemedIcon.ThemedIcon
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ThemedIcon.ThemedIcon a) => GI.Gio.Objects.ThemedIcon.IsThemedIcon a
instance GI.Gio.Objects.ThemedIcon.IsThemedIcon GI.Gio.Objects.ThemedIcon.ThemedIcon
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ThemedIcon.ThemedIcon
instance GI.Gio.Interfaces.Icon.IsIcon GI.Gio.Objects.ThemedIcon.ThemedIcon
instance (info ~ GI.Gio.Objects.ThemedIcon.ResolveThemedIconMethod t GI.Gio.Objects.ThemedIcon.ThemedIcon, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ThemedIcon.ThemedIcon p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ThemedIcon.ThemedIcon -> p)
instance (info ~ GI.Gio.Objects.ThemedIcon.ResolveThemedIconMethod t GI.Gio.Objects.ThemedIcon.ThemedIcon, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ThemedIcon.ThemedIcon p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ThemedIcon.ThemedIcon -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ThemedIcon.ThemedIconNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ThemedIcon.ThemedIconNamesPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ThemedIcon.ThemedIconUseDefaultFallbacksPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ThemedIcon.ThemedIcon
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ThemedIcon.IsThemedIcon a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ThemedIcon.ThemedIconAppendNameMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ThemedIcon.IsThemedIcon a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ThemedIcon.ThemedIconGetNamesMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ThemedIcon.IsThemedIcon a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ThemedIcon.ThemedIconPrependNameMethodInfo a signature
-- | Defines a Unix mount point (e.g.
-- <filename>/dev</filename>). This corresponds roughly to a
-- fstab entry.
module GI.Gio.Structs.UnixMountPoint
newtype UnixMountPoint
UnixMountPoint :: (ManagedPtr UnixMountPoint) -> UnixMountPoint
noUnixMountPoint :: Maybe UnixMountPoint
data UnixMountPointCompareMethodInfo
-- | Compares two unix mount points.
unixMountPointCompare :: (HasCallStack, MonadIO m) => UnixMountPoint -> UnixMountPoint -> m Int32
data UnixMountPointFreeMethodInfo
-- | Frees a unix mount point.
unixMountPointFree :: (HasCallStack, MonadIO m) => UnixMountPoint -> m ()
data UnixMountPointGetDevicePathMethodInfo
-- | Gets the device path for a unix mount point.
unixMountPointGetDevicePath :: (HasCallStack, MonadIO m) => UnixMountPoint -> m [Char]
data UnixMountPointGetFsTypeMethodInfo
-- | Gets the file system type for the mount point.
unixMountPointGetFsType :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text
data UnixMountPointGetMountPathMethodInfo
-- | Gets the mount path for a unix mount point.
unixMountPointGetMountPath :: (HasCallStack, MonadIO m) => UnixMountPoint -> m [Char]
data UnixMountPointGetOptionsMethodInfo
-- | Gets the options for the mount point.
unixMountPointGetOptions :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text
data UnixMountPointGuessCanEjectMethodInfo
-- | Guesses whether a Unix mount point can be ejected.
unixMountPointGuessCanEject :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool
data UnixMountPointGuessIconMethodInfo
-- | Guesses the icon of a Unix mount point.
unixMountPointGuessIcon :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Icon
data UnixMountPointGuessNameMethodInfo
-- | Guesses the name of a Unix mount point. The result is a translated
-- string.
unixMountPointGuessName :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text
data UnixMountPointGuessSymbolicIconMethodInfo
-- | Guesses the symbolic icon of a Unix mount point.
unixMountPointGuessSymbolicIcon :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Icon
data UnixMountPointIsLoopbackMethodInfo
-- | Checks if a unix mount point is a loopback device.
unixMountPointIsLoopback :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool
data UnixMountPointIsReadonlyMethodInfo
-- | Checks if a unix mount point is read only.
unixMountPointIsReadonly :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool
data UnixMountPointIsUserMountableMethodInfo
-- | Checks if a unix mount point is mountable by the user.
unixMountPointIsUserMountable :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.UnixMountPoint.UnixMountPoint
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.UnixMountPoint.UnixMountPoint
instance (signature ~ (GI.Gio.Structs.UnixMountPoint.UnixMountPoint -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointCompareMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointFreeMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m [GHC.Types.Char], Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGetDevicePathMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGetFsTypeMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m [GHC.Types.Char], Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGetMountPathMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGetOptionsMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGuessCanEjectMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGuessIconMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGuessNameMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointGuessSymbolicIconMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointIsLoopbackMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointIsReadonlyMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPointIsUserMountableMethodInfo GI.Gio.Structs.UnixMountPoint.UnixMountPoint signature
instance (info ~ GI.Gio.Structs.UnixMountPoint.ResolveUnixMountPointMethod t GI.Gio.Structs.UnixMountPoint.UnixMountPoint, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.UnixMountPoint.UnixMountPoint p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.UnixMountPoint.UnixMountPoint -> p)
instance (info ~ GI.Gio.Structs.UnixMountPoint.ResolveUnixMountPointMethod t GI.Gio.Structs.UnixMountPoint.UnixMountPoint, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.UnixMountPoint.UnixMountPoint p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.UnixMountPoint.UnixMountPoint -> p)
-- | 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.
module GI.Gio.Interfaces.FileDescriptorBased
newtype FileDescriptorBased
FileDescriptorBased :: (ManagedPtr FileDescriptorBased) -> FileDescriptorBased
noFileDescriptorBased :: Maybe FileDescriptorBased
class GObject o => IsFileDescriptorBased o
toFileDescriptorBased :: IsFileDescriptorBased o => o -> IO FileDescriptorBased
data FileDescriptorBasedGetFdMethodInfo
-- | Gets the underlying file descriptor.
fileDescriptorBasedGetFd :: (HasCallStack, MonadIO m, IsFileDescriptorBased a) => a -> m Int32
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased a) => GI.Gio.Interfaces.FileDescriptorBased.IsFileDescriptorBased a
instance GI.Gio.Interfaces.FileDescriptorBased.IsFileDescriptorBased GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased
instance (info ~ GI.Gio.Interfaces.FileDescriptorBased.ResolveFileDescriptorBasedMethod t GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased -> p)
instance (info ~ GI.Gio.Interfaces.FileDescriptorBased.ResolveFileDescriptorBasedMethod t GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBased -> p)
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.FileDescriptorBased.IsFileDescriptorBased a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.FileDescriptorBased.FileDescriptorBasedGetFdMethodInfo a signature
-- | 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
newtype UnixInputStream
UnixInputStream :: (ManagedPtr UnixInputStream) -> UnixInputStream
class GObject o => IsUnixInputStream o
toUnixInputStream :: IsUnixInputStream o => o -> IO UnixInputStream
noUnixInputStream :: Maybe UnixInputStream
data UnixInputStreamGetCloseFdMethodInfo
-- | Returns whether the file descriptor of stream will be
-- closed when the stream is closed.
unixInputStreamGetCloseFd :: (HasCallStack, MonadIO m, IsUnixInputStream a) => a -> m Bool
data UnixInputStreamGetFdMethodInfo
-- | Return the UNIX file descriptor that the stream reads from.
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
data UnixInputStreamSetCloseFdMethodInfo
-- | Sets whether the file descriptor of stream shall be
-- closed when the stream is closed.
unixInputStreamSetCloseFd :: (HasCallStack, MonadIO m, IsUnixInputStream a) => a -> Bool -> m ()
data UnixInputStreamCloseFdPropertyInfo
constructUnixInputStreamCloseFd :: (IsUnixInputStream o) => Bool -> IO (GValueConstruct o)
getUnixInputStreamCloseFd :: (MonadIO m, IsUnixInputStream o) => o -> m Bool
setUnixInputStreamCloseFd :: (MonadIO m, IsUnixInputStream o) => o -> Bool -> m ()
unixInputStreamCloseFd :: AttrLabelProxy "closeFd"
data UnixInputStreamFdPropertyInfo
constructUnixInputStreamFd :: (IsUnixInputStream o) => Int32 -> IO (GValueConstruct o)
getUnixInputStreamFd :: (MonadIO m, IsUnixInputStream o) => o -> m Int32
unixInputStreamFd :: AttrLabelProxy "fd"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixInputStream.UnixInputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.UnixInputStream.UnixInputStream a) => GI.Gio.Objects.UnixInputStream.IsUnixInputStream a
instance GI.Gio.Objects.UnixInputStream.IsUnixInputStream GI.Gio.Objects.UnixInputStream.UnixInputStream
instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Objects.UnixInputStream.UnixInputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.UnixInputStream.UnixInputStream
instance GI.Gio.Interfaces.FileDescriptorBased.IsFileDescriptorBased GI.Gio.Objects.UnixInputStream.UnixInputStream
instance GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream GI.Gio.Objects.UnixInputStream.UnixInputStream
instance (info ~ GI.Gio.Objects.UnixInputStream.ResolveUnixInputStreamMethod t GI.Gio.Objects.UnixInputStream.UnixInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixInputStream.UnixInputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.UnixInputStream.UnixInputStream -> p)
instance (info ~ GI.Gio.Objects.UnixInputStream.ResolveUnixInputStreamMethod t GI.Gio.Objects.UnixInputStream.UnixInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixInputStream.UnixInputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.UnixInputStream.UnixInputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixInputStream.UnixInputStreamCloseFdPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixInputStream.UnixInputStreamFdPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.UnixInputStream.UnixInputStream
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixInputStream.IsUnixInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixInputStream.UnixInputStreamGetCloseFdMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixInputStream.IsUnixInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixInputStream.UnixInputStreamGetFdMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixInputStream.IsUnixInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixInputStream.UnixInputStreamSetCloseFdMethodInfo a signature
-- | 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
newtype UnixOutputStream
UnixOutputStream :: (ManagedPtr UnixOutputStream) -> UnixOutputStream
class GObject o => IsUnixOutputStream o
toUnixOutputStream :: IsUnixOutputStream o => o -> IO UnixOutputStream
noUnixOutputStream :: Maybe UnixOutputStream
data UnixOutputStreamGetCloseFdMethodInfo
-- | Returns whether the file descriptor of stream will be
-- closed when the stream is closed.
unixOutputStreamGetCloseFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> m Bool
data UnixOutputStreamGetFdMethodInfo
-- | Return the UNIX file descriptor that the stream writes to.
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
data UnixOutputStreamSetCloseFdMethodInfo
-- | Sets whether the file descriptor of stream shall be
-- closed when the stream is closed.
unixOutputStreamSetCloseFd :: (HasCallStack, MonadIO m, IsUnixOutputStream a) => a -> Bool -> m ()
data UnixOutputStreamCloseFdPropertyInfo
constructUnixOutputStreamCloseFd :: (IsUnixOutputStream o) => Bool -> IO (GValueConstruct o)
getUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Bool
setUnixOutputStreamCloseFd :: (MonadIO m, IsUnixOutputStream o) => o -> Bool -> m ()
unixOutputStreamCloseFd :: AttrLabelProxy "closeFd"
data UnixOutputStreamFdPropertyInfo
constructUnixOutputStreamFd :: (IsUnixOutputStream o) => Int32 -> IO (GValueConstruct o)
getUnixOutputStreamFd :: (MonadIO m, IsUnixOutputStream o) => o -> m Int32
unixOutputStreamFd :: AttrLabelProxy "fd"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixOutputStream.UnixOutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.UnixOutputStream.UnixOutputStream a) => GI.Gio.Objects.UnixOutputStream.IsUnixOutputStream a
instance GI.Gio.Objects.UnixOutputStream.IsUnixOutputStream GI.Gio.Objects.UnixOutputStream.UnixOutputStream
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Objects.UnixOutputStream.UnixOutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.UnixOutputStream.UnixOutputStream
instance GI.Gio.Interfaces.FileDescriptorBased.IsFileDescriptorBased GI.Gio.Objects.UnixOutputStream.UnixOutputStream
instance GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream GI.Gio.Objects.UnixOutputStream.UnixOutputStream
instance (info ~ GI.Gio.Objects.UnixOutputStream.ResolveUnixOutputStreamMethod t GI.Gio.Objects.UnixOutputStream.UnixOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixOutputStream.UnixOutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.UnixOutputStream.UnixOutputStream -> p)
instance (info ~ GI.Gio.Objects.UnixOutputStream.ResolveUnixOutputStreamMethod t GI.Gio.Objects.UnixOutputStream.UnixOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixOutputStream.UnixOutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.UnixOutputStream.UnixOutputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixOutputStream.UnixOutputStreamCloseFdPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixOutputStream.UnixOutputStreamFdPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.UnixOutputStream.UnixOutputStream
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixOutputStream.IsUnixOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixOutputStream.UnixOutputStreamGetCloseFdMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixOutputStream.IsUnixOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixOutputStream.UnixOutputStreamGetFdMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixOutputStream.IsUnixOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixOutputStream.UnixOutputStreamSetCloseFdMethodInfo a signature
-- | 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
newtype ApplicationCommandLine
ApplicationCommandLine :: (ManagedPtr ApplicationCommandLine) -> ApplicationCommandLine
class GObject o => IsApplicationCommandLine o
toApplicationCommandLine :: IsApplicationCommandLine o => o -> IO ApplicationCommandLine
noApplicationCommandLine :: Maybe ApplicationCommandLine
data ApplicationCommandLineCreateFileForArgMethodInfo
-- | 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.
applicationCommandLineCreateFileForArg :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Text -> m File
data ApplicationCommandLineGetArgumentsMethodInfo
-- | 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.
applicationCommandLineGetArguments :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m [Text]
data ApplicationCommandLineGetCwdMethodInfo
-- | 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.
applicationCommandLineGetCwd :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m (Maybe [Char])
data ApplicationCommandLineGetEnvironMethodInfo
-- | 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.
applicationCommandLineGetEnviron :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m [Text]
data ApplicationCommandLineGetExitStatusMethodInfo
-- | Gets the exit status of cmdline. See
-- applicationCommandLineSetExitStatus for more information.
applicationCommandLineGetExitStatus :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m Int32
data ApplicationCommandLineGetIsRemoteMethodInfo
-- | Determines if cmdline represents a remote invocation.
applicationCommandLineGetIsRemote :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m Bool
data ApplicationCommandLineGetOptionsDictMethodInfo
-- | 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.
applicationCommandLineGetOptionsDict :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m VariantDict
data ApplicationCommandLineGetPlatformDataMethodInfo
-- | 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.
applicationCommandLineGetPlatformData :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m (Maybe GVariant)
data ApplicationCommandLineGetStdinMethodInfo
-- | 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.
applicationCommandLineGetStdin :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> m InputStream
data ApplicationCommandLineGetenvMethodInfo
-- | 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.
applicationCommandLineGetenv :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Text -> m Text
data ApplicationCommandLineSetExitStatusMethodInfo
-- | 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.
applicationCommandLineSetExitStatus :: (HasCallStack, MonadIO m, IsApplicationCommandLine a) => a -> Int32 -> m ()
data ApplicationCommandLineArgumentsPropertyInfo
applicationCommandLineArguments :: AttrLabelProxy "arguments"
constructApplicationCommandLineArguments :: (IsApplicationCommandLine o) => GVariant -> IO (GValueConstruct o)
data ApplicationCommandLineIsRemotePropertyInfo
applicationCommandLineIsRemote :: AttrLabelProxy "isRemote"
getApplicationCommandLineIsRemote :: (MonadIO m, IsApplicationCommandLine o) => o -> m Bool
data ApplicationCommandLineOptionsPropertyInfo
applicationCommandLineOptions :: AttrLabelProxy "options"
constructApplicationCommandLineOptions :: (IsApplicationCommandLine o) => GVariant -> IO (GValueConstruct o)
data ApplicationCommandLinePlatformDataPropertyInfo
applicationCommandLinePlatformData :: AttrLabelProxy "platformData"
constructApplicationCommandLinePlatformData :: (IsApplicationCommandLine o) => GVariant -> IO (GValueConstruct o)
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine a) => GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a
instance GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance (info ~ GI.Gio.Objects.ApplicationCommandLine.ResolveApplicationCommandLineMethod t GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine -> p)
instance (info ~ GI.Gio.Objects.ApplicationCommandLine.ResolveApplicationCommandLineMethod t GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineArgumentsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineIsRemotePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineOptionsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLinePlatformDataPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLine
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.File.File), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineCreateFileForArgMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetArgumentsMethodInfo a signature
instance (signature ~ m (GHC.Base.Maybe [GHC.Types.Char]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetCwdMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetEnvironMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetExitStatusMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetIsRemoteMethodInfo a signature
instance (signature ~ m GI.GLib.Structs.VariantDict.VariantDict, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetOptionsDictMethodInfo a signature
instance (signature ~ m (GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetPlatformDataMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.InputStream.InputStream, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetStdinMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineGetenvMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ApplicationCommandLine.IsApplicationCommandLine a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ApplicationCommandLine.ApplicationCommandLineSetExitStatusMethodInfo a signature
-- | FileIcon specifies an icon by pointing to an image file to be
-- used as icon.
module GI.Gio.Objects.FileIcon
newtype FileIcon
FileIcon :: (ManagedPtr FileIcon) -> FileIcon
class GObject o => IsFileIcon o
toFileIcon :: IsFileIcon o => o -> IO FileIcon
noFileIcon :: Maybe FileIcon
data FileIconGetFileMethodInfo
-- | 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
data FileIconFilePropertyInfo
constructFileIconFile :: (IsFileIcon o, IsFile a) => a -> IO (GValueConstruct o)
fileIconFile :: AttrLabelProxy "file"
getFileIconFile :: (MonadIO m, IsFileIcon o) => o -> m File
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileIcon.FileIcon
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.FileIcon.FileIcon a) => GI.Gio.Objects.FileIcon.IsFileIcon a
instance GI.Gio.Objects.FileIcon.IsFileIcon GI.Gio.Objects.FileIcon.FileIcon
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.FileIcon.FileIcon
instance GI.Gio.Interfaces.Icon.IsIcon GI.Gio.Objects.FileIcon.FileIcon
instance GI.Gio.Interfaces.LoadableIcon.IsLoadableIcon GI.Gio.Objects.FileIcon.FileIcon
instance (info ~ GI.Gio.Objects.FileIcon.ResolveFileIconMethod t GI.Gio.Objects.FileIcon.FileIcon, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileIcon.FileIcon p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.FileIcon.FileIcon -> p)
instance (info ~ GI.Gio.Objects.FileIcon.ResolveFileIconMethod t GI.Gio.Objects.FileIcon.FileIcon, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileIcon.FileIcon p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.FileIcon.FileIcon -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.FileIcon.FileIconFilePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.FileIcon.FileIcon
instance (signature ~ m GI.Gio.Interfaces.File.File, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileIcon.IsFileIcon a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileIcon.FileIconGetFileMethodInfo a signature
-- | 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.
module GI.Gio.Objects.VolumeMonitor
newtype VolumeMonitor
VolumeMonitor :: (ManagedPtr VolumeMonitor) -> VolumeMonitor
class GObject o => IsVolumeMonitor o
toVolumeMonitor :: IsVolumeMonitor o => o -> IO 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
--
-- Similary, 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
data VolumeMonitorGetConnectedDrivesMethodInfo
-- | 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]
data VolumeMonitorGetMountForUuidMethodInfo
-- | Finds a Mount object by its UUID (see mountGetUuid)
volumeMonitorGetMountForUuid :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> Text -> m Mount
data VolumeMonitorGetMountsMethodInfo
-- | 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]
data VolumeMonitorGetVolumeForUuidMethodInfo
-- | Finds a Volume object by its UUID (see volumeGetUuid)
volumeMonitorGetVolumeForUuid :: (HasCallStack, MonadIO m, IsVolumeMonitor a) => a -> Text -> m Volume
data VolumeMonitorGetVolumesMethodInfo
-- | 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 C_VolumeMonitorDriveChangedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
type VolumeMonitorDriveChangedCallback = Drive -> IO ()
data VolumeMonitorDriveChangedSignalInfo
afterVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
genClosure_VolumeMonitorDriveChanged :: VolumeMonitorDriveChangedCallback -> IO Closure
mk_VolumeMonitorDriveChangedCallback :: C_VolumeMonitorDriveChangedCallback -> IO (FunPtr C_VolumeMonitorDriveChangedCallback)
noVolumeMonitorDriveChangedCallback :: Maybe VolumeMonitorDriveChangedCallback
onVolumeMonitorDriveChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveChangedCallback -> m SignalHandlerId
wrap_VolumeMonitorDriveChangedCallback :: VolumeMonitorDriveChangedCallback -> Ptr () -> Ptr Drive -> Ptr () -> IO ()
type C_VolumeMonitorDriveConnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
type VolumeMonitorDriveConnectedCallback = Drive -> IO ()
data VolumeMonitorDriveConnectedSignalInfo
afterVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
genClosure_VolumeMonitorDriveConnected :: VolumeMonitorDriveConnectedCallback -> IO Closure
mk_VolumeMonitorDriveConnectedCallback :: C_VolumeMonitorDriveConnectedCallback -> IO (FunPtr C_VolumeMonitorDriveConnectedCallback)
noVolumeMonitorDriveConnectedCallback :: Maybe VolumeMonitorDriveConnectedCallback
onVolumeMonitorDriveConnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveConnectedCallback -> m SignalHandlerId
wrap_VolumeMonitorDriveConnectedCallback :: VolumeMonitorDriveConnectedCallback -> Ptr () -> Ptr Drive -> Ptr () -> IO ()
type C_VolumeMonitorDriveDisconnectedCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
type VolumeMonitorDriveDisconnectedCallback = Drive -> IO ()
data VolumeMonitorDriveDisconnectedSignalInfo
afterVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
genClosure_VolumeMonitorDriveDisconnected :: VolumeMonitorDriveDisconnectedCallback -> IO Closure
mk_VolumeMonitorDriveDisconnectedCallback :: C_VolumeMonitorDriveDisconnectedCallback -> IO (FunPtr C_VolumeMonitorDriveDisconnectedCallback)
noVolumeMonitorDriveDisconnectedCallback :: Maybe VolumeMonitorDriveDisconnectedCallback
onVolumeMonitorDriveDisconnected :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveDisconnectedCallback -> m SignalHandlerId
wrap_VolumeMonitorDriveDisconnectedCallback :: VolumeMonitorDriveDisconnectedCallback -> Ptr () -> Ptr Drive -> Ptr () -> IO ()
type C_VolumeMonitorDriveEjectButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
type VolumeMonitorDriveEjectButtonCallback = Drive -> IO ()
data VolumeMonitorDriveEjectButtonSignalInfo
afterVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
genClosure_VolumeMonitorDriveEjectButton :: VolumeMonitorDriveEjectButtonCallback -> IO Closure
mk_VolumeMonitorDriveEjectButtonCallback :: C_VolumeMonitorDriveEjectButtonCallback -> IO (FunPtr C_VolumeMonitorDriveEjectButtonCallback)
noVolumeMonitorDriveEjectButtonCallback :: Maybe VolumeMonitorDriveEjectButtonCallback
onVolumeMonitorDriveEjectButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveEjectButtonCallback -> m SignalHandlerId
wrap_VolumeMonitorDriveEjectButtonCallback :: VolumeMonitorDriveEjectButtonCallback -> Ptr () -> Ptr Drive -> Ptr () -> IO ()
type C_VolumeMonitorDriveStopButtonCallback = Ptr () -> Ptr Drive -> Ptr () -> IO ()
type VolumeMonitorDriveStopButtonCallback = Drive -> IO ()
data VolumeMonitorDriveStopButtonSignalInfo
afterVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
genClosure_VolumeMonitorDriveStopButton :: VolumeMonitorDriveStopButtonCallback -> IO Closure
mk_VolumeMonitorDriveStopButtonCallback :: C_VolumeMonitorDriveStopButtonCallback -> IO (FunPtr C_VolumeMonitorDriveStopButtonCallback)
noVolumeMonitorDriveStopButtonCallback :: Maybe VolumeMonitorDriveStopButtonCallback
onVolumeMonitorDriveStopButton :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorDriveStopButtonCallback -> m SignalHandlerId
wrap_VolumeMonitorDriveStopButtonCallback :: VolumeMonitorDriveStopButtonCallback -> Ptr () -> Ptr Drive -> Ptr () -> IO ()
type C_VolumeMonitorMountAddedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
type VolumeMonitorMountAddedCallback = Mount -> IO ()
data VolumeMonitorMountAddedSignalInfo
afterVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
genClosure_VolumeMonitorMountAdded :: VolumeMonitorMountAddedCallback -> IO Closure
mk_VolumeMonitorMountAddedCallback :: C_VolumeMonitorMountAddedCallback -> IO (FunPtr C_VolumeMonitorMountAddedCallback)
noVolumeMonitorMountAddedCallback :: Maybe VolumeMonitorMountAddedCallback
onVolumeMonitorMountAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountAddedCallback -> m SignalHandlerId
wrap_VolumeMonitorMountAddedCallback :: VolumeMonitorMountAddedCallback -> Ptr () -> Ptr Mount -> Ptr () -> IO ()
type C_VolumeMonitorMountChangedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
type VolumeMonitorMountChangedCallback = Mount -> IO ()
data VolumeMonitorMountChangedSignalInfo
afterVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
genClosure_VolumeMonitorMountChanged :: VolumeMonitorMountChangedCallback -> IO Closure
mk_VolumeMonitorMountChangedCallback :: C_VolumeMonitorMountChangedCallback -> IO (FunPtr C_VolumeMonitorMountChangedCallback)
noVolumeMonitorMountChangedCallback :: Maybe VolumeMonitorMountChangedCallback
onVolumeMonitorMountChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountChangedCallback -> m SignalHandlerId
wrap_VolumeMonitorMountChangedCallback :: VolumeMonitorMountChangedCallback -> Ptr () -> Ptr Mount -> Ptr () -> IO ()
type C_VolumeMonitorMountPreUnmountCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
type VolumeMonitorMountPreUnmountCallback = Mount -> IO ()
data VolumeMonitorMountPreUnmountSignalInfo
afterVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
genClosure_VolumeMonitorMountPreUnmount :: VolumeMonitorMountPreUnmountCallback -> IO Closure
mk_VolumeMonitorMountPreUnmountCallback :: C_VolumeMonitorMountPreUnmountCallback -> IO (FunPtr C_VolumeMonitorMountPreUnmountCallback)
noVolumeMonitorMountPreUnmountCallback :: Maybe VolumeMonitorMountPreUnmountCallback
onVolumeMonitorMountPreUnmount :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountPreUnmountCallback -> m SignalHandlerId
wrap_VolumeMonitorMountPreUnmountCallback :: VolumeMonitorMountPreUnmountCallback -> Ptr () -> Ptr Mount -> Ptr () -> IO ()
type C_VolumeMonitorMountRemovedCallback = Ptr () -> Ptr Mount -> Ptr () -> IO ()
type VolumeMonitorMountRemovedCallback = Mount -> IO ()
data VolumeMonitorMountRemovedSignalInfo
afterVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
genClosure_VolumeMonitorMountRemoved :: VolumeMonitorMountRemovedCallback -> IO Closure
mk_VolumeMonitorMountRemovedCallback :: C_VolumeMonitorMountRemovedCallback -> IO (FunPtr C_VolumeMonitorMountRemovedCallback)
noVolumeMonitorMountRemovedCallback :: Maybe VolumeMonitorMountRemovedCallback
onVolumeMonitorMountRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorMountRemovedCallback -> m SignalHandlerId
wrap_VolumeMonitorMountRemovedCallback :: VolumeMonitorMountRemovedCallback -> Ptr () -> Ptr Mount -> Ptr () -> IO ()
type C_VolumeMonitorVolumeAddedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO ()
type VolumeMonitorVolumeAddedCallback = Volume -> IO ()
data VolumeMonitorVolumeAddedSignalInfo
afterVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
genClosure_VolumeMonitorVolumeAdded :: VolumeMonitorVolumeAddedCallback -> IO Closure
mk_VolumeMonitorVolumeAddedCallback :: C_VolumeMonitorVolumeAddedCallback -> IO (FunPtr C_VolumeMonitorVolumeAddedCallback)
noVolumeMonitorVolumeAddedCallback :: Maybe VolumeMonitorVolumeAddedCallback
onVolumeMonitorVolumeAdded :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeAddedCallback -> m SignalHandlerId
wrap_VolumeMonitorVolumeAddedCallback :: VolumeMonitorVolumeAddedCallback -> Ptr () -> Ptr Volume -> Ptr () -> IO ()
type C_VolumeMonitorVolumeChangedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO ()
type VolumeMonitorVolumeChangedCallback = Volume -> IO ()
data VolumeMonitorVolumeChangedSignalInfo
afterVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
genClosure_VolumeMonitorVolumeChanged :: VolumeMonitorVolumeChangedCallback -> IO Closure
mk_VolumeMonitorVolumeChangedCallback :: C_VolumeMonitorVolumeChangedCallback -> IO (FunPtr C_VolumeMonitorVolumeChangedCallback)
noVolumeMonitorVolumeChangedCallback :: Maybe VolumeMonitorVolumeChangedCallback
onVolumeMonitorVolumeChanged :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeChangedCallback -> m SignalHandlerId
wrap_VolumeMonitorVolumeChangedCallback :: VolumeMonitorVolumeChangedCallback -> Ptr () -> Ptr Volume -> Ptr () -> IO ()
type C_VolumeMonitorVolumeRemovedCallback = Ptr () -> Ptr Volume -> Ptr () -> IO ()
type VolumeMonitorVolumeRemovedCallback = Volume -> IO ()
data VolumeMonitorVolumeRemovedSignalInfo
afterVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
genClosure_VolumeMonitorVolumeRemoved :: VolumeMonitorVolumeRemovedCallback -> IO Closure
mk_VolumeMonitorVolumeRemovedCallback :: C_VolumeMonitorVolumeRemovedCallback -> IO (FunPtr C_VolumeMonitorVolumeRemovedCallback)
noVolumeMonitorVolumeRemovedCallback :: Maybe VolumeMonitorVolumeRemovedCallback
onVolumeMonitorVolumeRemoved :: (IsVolumeMonitor a, MonadIO m) => a -> VolumeMonitorVolumeRemovedCallback -> m SignalHandlerId
wrap_VolumeMonitorVolumeRemovedCallback :: VolumeMonitorVolumeRemovedCallback -> Ptr () -> Ptr Volume -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.VolumeMonitor.VolumeMonitor a) => GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor a
instance GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance (info ~ GI.Gio.Objects.VolumeMonitor.ResolveVolumeMonitorMethod t GI.Gio.Objects.VolumeMonitor.VolumeMonitor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.VolumeMonitor.VolumeMonitor p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.VolumeMonitor.VolumeMonitor -> p)
instance (info ~ GI.Gio.Objects.VolumeMonitor.ResolveVolumeMonitorMethod t GI.Gio.Objects.VolumeMonitor.VolumeMonitor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.VolumeMonitor.VolumeMonitor p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.VolumeMonitor.VolumeMonitor -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.VolumeMonitor.VolumeMonitor
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorDriveChangedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorDriveConnectedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorDriveDisconnectedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorDriveEjectButtonSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorDriveStopButtonSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorMountAddedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorMountChangedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorMountPreUnmountSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorMountRemovedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorVolumeAddedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorVolumeChangedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorVolumeRemovedSignalInfo
instance (signature ~ m [GI.Gio.Interfaces.Drive.Drive], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorGetConnectedDrivesMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.Mount.Mount), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorGetMountForUuidMethodInfo a signature
instance (signature ~ m [GI.Gio.Interfaces.Mount.Mount], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorGetMountsMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.Volume.Volume), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorGetVolumeForUuidMethodInfo a signature
instance (signature ~ m [GI.Gio.Interfaces.Volume.Volume], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.VolumeMonitor.IsVolumeMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.VolumeMonitor.VolumeMonitorGetVolumesMethodInfo a signature
-- | 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.
module GI.Gio.Interfaces.DatagramBased
newtype DatagramBased
DatagramBased :: (ManagedPtr DatagramBased) -> DatagramBased
noDatagramBased :: Maybe DatagramBased
class GObject o => IsDatagramBased o
toDatagramBased :: IsDatagramBased o => o -> IO DatagramBased
data DatagramBasedConditionCheckMethodInfo
-- | 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.
datagramBasedConditionCheck :: (HasCallStack, MonadIO m, IsDatagramBased a) => a -> [IOCondition] -> m [IOCondition]
data DatagramBasedConditionWaitMethodInfo
-- | 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).
datagramBasedConditionWait :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [IOCondition] -> Int64 -> Maybe (b) -> m ()
data DatagramBasedCreateSourceMethodInfo
-- | 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.
datagramBasedCreateSource :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [IOCondition] -> Maybe (b) -> m Source
data DatagramBasedReceiveMessagesMethodInfo
-- | 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.
datagramBasedReceiveMessages :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [InputMessage] -> Int32 -> Int64 -> Maybe (b) -> m Int32
data DatagramBasedSendMessagesMethodInfo
-- | 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.
datagramBasedSendMessages :: (HasCallStack, MonadIO m, IsDatagramBased a, IsCancellable b) => a -> [OutputMessage] -> Int32 -> Int64 -> Maybe (b) -> m Int32
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DatagramBased.DatagramBased
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DatagramBased.DatagramBased a) => GI.Gio.Interfaces.DatagramBased.IsDatagramBased a
instance GI.Gio.Interfaces.DatagramBased.IsDatagramBased GI.Gio.Interfaces.DatagramBased.DatagramBased
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DatagramBased.DatagramBased
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DatagramBased.DatagramBased
instance (info ~ GI.Gio.Interfaces.DatagramBased.ResolveDatagramBasedMethod t GI.Gio.Interfaces.DatagramBased.DatagramBased, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DatagramBased.DatagramBased p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DatagramBased.DatagramBased -> p)
instance (info ~ GI.Gio.Interfaces.DatagramBased.ResolveDatagramBasedMethod t GI.Gio.Interfaces.DatagramBased.DatagramBased, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DatagramBased.DatagramBased p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DatagramBased.DatagramBased -> p)
instance (signature ~ ([GI.GLib.Flags.IOCondition] -> m [GI.GLib.Flags.IOCondition]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DatagramBased.IsDatagramBased a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DatagramBased.DatagramBasedConditionCheckMethodInfo a signature
instance (signature ~ ([GI.GLib.Flags.IOCondition] -> GHC.Int.Int64 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DatagramBased.IsDatagramBased a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DatagramBased.DatagramBasedConditionWaitMethodInfo a signature
instance (signature ~ ([GI.GLib.Flags.IOCondition] -> GHC.Base.Maybe b -> m GI.GLib.Structs.Source.Source), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DatagramBased.IsDatagramBased a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DatagramBased.DatagramBasedCreateSourceMethodInfo a signature
instance (signature ~ ([GI.Gio.Structs.InputMessage.InputMessage] -> GHC.Int.Int32 -> GHC.Int.Int64 -> GHC.Base.Maybe b -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DatagramBased.IsDatagramBased a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DatagramBased.DatagramBasedReceiveMessagesMethodInfo a signature
instance (signature ~ ([GI.Gio.Structs.OutputMessage.OutputMessage] -> GHC.Int.Int32 -> GHC.Int.Int64 -> GHC.Base.Maybe b -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DatagramBased.IsDatagramBased a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DatagramBased.DatagramBasedSendMessagesMethodInfo a signature
-- | 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.
module GI.Gio.Objects.DBusObjectManagerServer
newtype DBusObjectManagerServer
DBusObjectManagerServer :: (ManagedPtr DBusObjectManagerServer) -> DBusObjectManagerServer
class GObject o => IsDBusObjectManagerServer o
toDBusObjectManagerServer :: IsDBusObjectManagerServer o => o -> IO DBusObjectManagerServer
noDBusObjectManagerServer :: Maybe DBusObjectManagerServer
data DBusObjectManagerServerExportMethodInfo
-- | 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.
dBusObjectManagerServerExport :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m ()
data DBusObjectManagerServerExportUniquelyMethodInfo
-- | 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.
dBusObjectManagerServerExportUniquely :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a, IsDBusObjectSkeleton b) => a -> b -> m ()
data DBusObjectManagerServerGetConnectionMethodInfo
-- | Gets the DBusConnection used by manager.
dBusObjectManagerServerGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a) => a -> m DBusConnection
data DBusObjectManagerServerIsExportedMethodInfo
-- | Returns whether object is currently exported on
-- manager.
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.
dBusObjectManagerServerNew :: (HasCallStack, MonadIO m) => Text -> m DBusObjectManagerServer
data DBusObjectManagerServerSetConnectionMethodInfo
-- | 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 ()
data DBusObjectManagerServerUnexportMethodInfo
-- | 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.
dBusObjectManagerServerUnexport :: (HasCallStack, MonadIO m, IsDBusObjectManagerServer a) => a -> Text -> m Bool
data DBusObjectManagerServerConnectionPropertyInfo
clearDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m ()
constructDBusObjectManagerServerConnection :: (IsDBusObjectManagerServer o, IsDBusConnection a) => a -> IO (GValueConstruct o)
dBusObjectManagerServerConnection :: AttrLabelProxy "connection"
getDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe DBusConnection)
setDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o, IsDBusConnection a) => o -> a -> m ()
data DBusObjectManagerServerObjectPathPropertyInfo
constructDBusObjectManagerServerObjectPath :: (IsDBusObjectManagerServer o) => Text -> IO (GValueConstruct o)
dBusObjectManagerServerObjectPath :: AttrLabelProxy "objectPath"
getDBusObjectManagerServerObjectPath :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe Text)
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer a) => GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer a
instance GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance (info ~ GI.Gio.Objects.DBusObjectManagerServer.ResolveDBusObjectManagerServerMethod t GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer -> p)
instance (info ~ GI.Gio.Objects.DBusObjectManagerServer.ResolveDBusObjectManagerServerMethod t GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerConnectionPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerObjectPathPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServer
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer a, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerExportMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer a, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerExportUniquelyMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.DBusConnection.DBusConnection, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerGetConnectionMethodInfo a signature
instance (signature ~ (b -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer a, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerIsExportedMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer a, GI.Gio.Objects.DBusConnection.IsDBusConnection b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerSetConnectionMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerServer.IsDBusObjectManagerServer a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerServer.DBusObjectManagerServerUnexportMethodInfo a signature
-- | 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.
module GI.Gio.Objects.DBusObjectProxy
newtype DBusObjectProxy
DBusObjectProxy :: (ManagedPtr DBusObjectProxy) -> DBusObjectProxy
class GObject o => IsDBusObjectProxy o
toDBusObjectProxy :: IsDBusObjectProxy o => o -> IO DBusObjectProxy
noDBusObjectProxy :: Maybe DBusObjectProxy
data DBusObjectProxyGetConnectionMethodInfo
-- | Gets the connection that proxy is for.
dBusObjectProxyGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectProxy a) => a -> m DBusConnection
-- | Creates a new DBusObjectProxy for the given connection and
-- object path.
dBusObjectProxyNew :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> m DBusObjectProxy
data DBusObjectProxyGConnectionPropertyInfo
constructDBusObjectProxyGConnection :: (IsDBusObjectProxy o, IsDBusConnection a) => a -> IO (GValueConstruct o)
dBusObjectProxyGConnection :: AttrLabelProxy "gConnection"
getDBusObjectProxyGConnection :: (MonadIO m, IsDBusObjectProxy o) => o -> m (Maybe DBusConnection)
data DBusObjectProxyGObjectPathPropertyInfo
constructDBusObjectProxyGObjectPath :: (IsDBusObjectProxy o) => Text -> IO (GValueConstruct o)
dBusObjectProxyGObjectPath :: AttrLabelProxy "gObjectPath"
getDBusObjectProxyGObjectPath :: (MonadIO m, IsDBusObjectProxy o) => o -> m (Maybe Text)
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy a) => GI.Gio.Objects.DBusObjectProxy.IsDBusObjectProxy a
instance GI.Gio.Objects.DBusObjectProxy.IsDBusObjectProxy GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance GI.Gio.Interfaces.DBusObject.IsDBusObject GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance (info ~ GI.Gio.Objects.DBusObjectProxy.ResolveDBusObjectProxyMethod t GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy -> p)
instance (info ~ GI.Gio.Objects.DBusObjectProxy.ResolveDBusObjectProxyMethod t GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectProxy.DBusObjectProxyGConnectionPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectProxy.DBusObjectProxyGObjectPathPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusObjectProxy.DBusObjectProxy
instance (signature ~ m GI.Gio.Objects.DBusConnection.DBusConnection, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectProxy.IsDBusObjectProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectProxy.DBusObjectProxyGetConnectionMethodInfo a signature
-- | 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.
module GI.Gio.Objects.DBusObjectSkeleton
newtype DBusObjectSkeleton
DBusObjectSkeleton :: (ManagedPtr DBusObjectSkeleton) -> DBusObjectSkeleton
class GObject o => IsDBusObjectSkeleton o
toDBusObjectSkeleton :: IsDBusObjectSkeleton o => o -> IO DBusObjectSkeleton
noDBusObjectSkeleton :: Maybe DBusObjectSkeleton
data DBusObjectSkeletonAddInterfaceMethodInfo
-- | 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.
dBusObjectSkeletonAddInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m ()
data DBusObjectSkeletonFlushMethodInfo
-- | This method simply calls dBusInterfaceSkeletonFlush on all
-- interfaces belonging to object. See that method for
-- when flushing is useful.
dBusObjectSkeletonFlush :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> m ()
-- | Creates a new DBusObjectSkeleton.
dBusObjectSkeletonNew :: (HasCallStack, MonadIO m) => Text -> m DBusObjectSkeleton
data DBusObjectSkeletonRemoveInterfaceMethodInfo
-- | Removes interface_ from object.
dBusObjectSkeletonRemoveInterface :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a, IsDBusInterfaceSkeleton b) => a -> b -> m ()
data DBusObjectSkeletonRemoveInterfaceByNameMethodInfo
-- | Removes the DBusInterface with interfaceName
-- from object.
--
-- If no D-Bus interface of the given interface exists, this function
-- does nothing.
dBusObjectSkeletonRemoveInterfaceByName :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m ()
data DBusObjectSkeletonSetObjectPathMethodInfo
-- | Sets the object path for object.
dBusObjectSkeletonSetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectSkeleton a) => a -> Text -> m ()
data DBusObjectSkeletonGObjectPathPropertyInfo
clearDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m ()
constructDBusObjectSkeletonGObjectPath :: (IsDBusObjectSkeleton o) => Text -> IO (GValueConstruct o)
dBusObjectSkeletonGObjectPath :: AttrLabelProxy "gObjectPath"
getDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m (Maybe Text)
setDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> Text -> m ()
type C_DBusObjectSkeletonAuthorizeMethodCallback = Ptr () -> Ptr DBusInterfaceSkeleton -> Ptr DBusMethodInvocation -> Ptr () -> IO CInt
type DBusObjectSkeletonAuthorizeMethodCallback = DBusInterfaceSkeleton -> DBusMethodInvocation -> IO Bool
data DBusObjectSkeletonAuthorizeMethodSignalInfo
afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
genClosure_DBusObjectSkeletonAuthorizeMethod :: DBusObjectSkeletonAuthorizeMethodCallback -> IO Closure
mk_DBusObjectSkeletonAuthorizeMethodCallback :: C_DBusObjectSkeletonAuthorizeMethodCallback -> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback)
noDBusObjectSkeletonAuthorizeMethodCallback :: Maybe DBusObjectSkeletonAuthorizeMethodCallback
onDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
wrap_DBusObjectSkeletonAuthorizeMethodCallback :: DBusObjectSkeletonAuthorizeMethodCallback -> Ptr () -> Ptr DBusInterfaceSkeleton -> Ptr DBusMethodInvocation -> Ptr () -> IO CInt
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton a) => GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton a
instance GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance GI.Gio.Interfaces.DBusObject.IsDBusObject GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance (info ~ GI.Gio.Objects.DBusObjectSkeleton.ResolveDBusObjectSkeletonMethod t GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton -> p)
instance (info ~ GI.Gio.Objects.DBusObjectSkeleton.ResolveDBusObjectSkeletonMethod t GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeletonGObjectPathPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeletonAuthorizeMethodSignalInfo
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton a, GI.Gio.Objects.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeletonAddInterfaceMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeletonFlushMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton a, GI.Gio.Objects.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeletonRemoveInterfaceMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeletonRemoveInterfaceByNameMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectSkeleton.IsDBusObjectSkeleton a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeletonSetObjectPathMethodInfo a signature
-- | The DBusInterface type is the base type for D-Bus interfaces
-- both on the service side (see DBusInterfaceSkeleton) and client
-- side (see DBusProxy).
module GI.Gio.Interfaces.DBusInterface
newtype DBusInterface
DBusInterface :: (ManagedPtr DBusInterface) -> DBusInterface
noDBusInterface :: Maybe DBusInterface
class GObject o => IsDBusInterface o
toDBusInterface :: IsDBusInterface o => o -> IO DBusInterface
data DBusInterfaceGetInfoMethodInfo
-- | Gets D-Bus introspection information for the D-Bus interface
-- implemented by interface_.
dBusInterfaceGetInfo :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m DBusInterfaceInfo
data DBusInterfaceGetObjectMethodInfo
-- | Gets the DBusObject that interface_ belongs to,
-- if any.
dBusInterfaceGetObject :: (HasCallStack, MonadIO m, IsDBusInterface a) => a -> m DBusObject
data DBusInterfaceSetObjectMethodInfo
-- | Sets the DBusObject for interface_ to
-- object.
--
-- Note that interface_ will hold a weak reference to
-- object.
dBusInterfaceSetObject :: (HasCallStack, MonadIO m, IsDBusInterface a, IsDBusObject b) => a -> Maybe (b) -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DBusInterface.DBusInterface
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DBusInterface.DBusInterface a) => GI.Gio.Interfaces.DBusInterface.IsDBusInterface a
instance GI.Gio.Interfaces.DBusInterface.IsDBusInterface GI.Gio.Interfaces.DBusInterface.DBusInterface
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DBusInterface.DBusInterface
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DBusInterface.DBusInterface
instance (info ~ GI.Gio.Interfaces.DBusInterface.ResolveDBusInterfaceMethod t GI.Gio.Interfaces.DBusInterface.DBusInterface, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DBusInterface.DBusInterface p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DBusInterface.DBusInterface -> p)
instance (info ~ GI.Gio.Interfaces.DBusInterface.ResolveDBusInterfaceMethod t GI.Gio.Interfaces.DBusInterface.DBusInterface, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DBusInterface.DBusInterface p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DBusInterface.DBusInterface -> p)
instance (signature ~ m GI.Gio.Interfaces.DBusObject.DBusObject, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusInterface.IsDBusInterface a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusInterface.DBusInterfaceGetObjectMethodInfo a signature
instance (signature ~ m GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusInterface.IsDBusInterface a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusInterface.DBusInterfaceGetInfoMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusInterface.IsDBusInterface a, GI.Gio.Interfaces.DBusObject.IsDBusObject b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusInterface.DBusInterfaceSetObjectMethodInfo a signature
-- | 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
newtype DBusObject
DBusObject :: (ManagedPtr DBusObject) -> DBusObject
noDBusObject :: Maybe DBusObject
class GObject o => IsDBusObject o
toDBusObject :: IsDBusObject o => o -> IO DBusObject
data DBusObjectGetInterfaceMethodInfo
-- | Gets the D-Bus interface with name interfaceName
-- associated with object, if any.
dBusObjectGetInterface :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> Text -> m DBusInterface
data DBusObjectGetInterfacesMethodInfo
-- | Gets the D-Bus interfaces associated with object.
dBusObjectGetInterfaces :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m [DBusInterface]
data DBusObjectGetObjectPathMethodInfo
-- | Gets the object path for object.
dBusObjectGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObject a) => a -> m Text
type C_DBusObjectInterfaceAddedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO ()
type DBusObjectInterfaceAddedCallback = DBusInterface -> IO ()
data DBusObjectInterfaceAddedSignalInfo
afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
genClosure_DBusObjectInterfaceAdded :: DBusObjectInterfaceAddedCallback -> IO Closure
mk_DBusObjectInterfaceAddedCallback :: C_DBusObjectInterfaceAddedCallback -> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
noDBusObjectInterfaceAddedCallback :: Maybe DBusObjectInterfaceAddedCallback
onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
wrap_DBusObjectInterfaceAddedCallback :: DBusObjectInterfaceAddedCallback -> Ptr () -> Ptr DBusInterface -> Ptr () -> IO ()
type C_DBusObjectInterfaceRemovedCallback = Ptr () -> Ptr DBusInterface -> Ptr () -> IO ()
type DBusObjectInterfaceRemovedCallback = DBusInterface -> IO ()
data DBusObjectInterfaceRemovedSignalInfo
afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId
genClosure_DBusObjectInterfaceRemoved :: DBusObjectInterfaceRemovedCallback -> IO Closure
mk_DBusObjectInterfaceRemovedCallback :: C_DBusObjectInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectInterfaceRemovedCallback)
noDBusObjectInterfaceRemovedCallback :: Maybe DBusObjectInterfaceRemovedCallback
onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId
wrap_DBusObjectInterfaceRemovedCallback :: DBusObjectInterfaceRemovedCallback -> Ptr () -> Ptr DBusInterface -> Ptr () -> IO ()
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.DBusObject.DBusObjectInterfaceAddedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.DBusObject.DBusObjectInterfaceRemovedSignalInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DBusObject.DBusObject
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DBusObject.DBusObject a) => GI.Gio.Interfaces.DBusObject.IsDBusObject a
instance GI.Gio.Interfaces.DBusObject.IsDBusObject GI.Gio.Interfaces.DBusObject.DBusObject
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DBusObject.DBusObject
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DBusObject.DBusObject
instance (info ~ GI.Gio.Interfaces.DBusObject.ResolveDBusObjectMethod t GI.Gio.Interfaces.DBusObject.DBusObject, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DBusObject.DBusObject p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DBusObject.DBusObject -> p)
instance (info ~ GI.Gio.Interfaces.DBusObject.ResolveDBusObjectMethod t GI.Gio.Interfaces.DBusObject.DBusObject, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DBusObject.DBusObject p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DBusObject.DBusObject -> p)
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.DBusInterface.DBusInterface), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusObject.IsDBusObject a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusObject.DBusObjectGetInterfaceMethodInfo a signature
instance (signature ~ m [GI.Gio.Interfaces.DBusInterface.DBusInterface], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusObject.IsDBusObject a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusObject.DBusObjectGetInterfacesMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusObject.IsDBusObject a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusObject.DBusObjectGetObjectPathMethodInfo a signature
-- | 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
newtype DBusObjectManager
DBusObjectManager :: (ManagedPtr DBusObjectManager) -> DBusObjectManager
noDBusObjectManager :: Maybe DBusObjectManager
class GObject o => IsDBusObjectManager o
toDBusObjectManager :: IsDBusObjectManager o => o -> IO DBusObjectManager
data DBusObjectManagerGetInterfaceMethodInfo
-- | Gets the interface proxy for interfaceName at
-- objectPath, if any.
dBusObjectManagerGetInterface :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> Text -> m DBusInterface
data DBusObjectManagerGetObjectMethodInfo
-- | Gets the DBusObjectProxy at objectPath, if any.
dBusObjectManagerGetObject :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> Text -> m DBusObject
data DBusObjectManagerGetObjectPathMethodInfo
-- | Gets the object path that manager is for.
dBusObjectManagerGetObjectPath :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m Text
data DBusObjectManagerGetObjectsMethodInfo
-- | Gets all DBusObject objects known to manager.
dBusObjectManagerGetObjects :: (HasCallStack, MonadIO m, IsDBusObjectManager a) => a -> m [DBusObject]
type C_DBusObjectManagerInterfaceAddedCallback = Ptr () -> Ptr DBusObject -> Ptr DBusInterface -> Ptr () -> IO ()
type DBusObjectManagerInterfaceAddedCallback = DBusObject -> DBusInterface -> IO ()
data DBusObjectManagerInterfaceAddedSignalInfo
afterDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerInterfaceAddedCallback -> m SignalHandlerId
genClosure_DBusObjectManagerInterfaceAdded :: DBusObjectManagerInterfaceAddedCallback -> IO Closure
mk_DBusObjectManagerInterfaceAddedCallback :: C_DBusObjectManagerInterfaceAddedCallback -> IO (FunPtr C_DBusObjectManagerInterfaceAddedCallback)
noDBusObjectManagerInterfaceAddedCallback :: Maybe DBusObjectManagerInterfaceAddedCallback
onDBusObjectManagerInterfaceAdded :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerInterfaceAddedCallback -> m SignalHandlerId
wrap_DBusObjectManagerInterfaceAddedCallback :: DBusObjectManagerInterfaceAddedCallback -> Ptr () -> Ptr DBusObject -> Ptr DBusInterface -> Ptr () -> IO ()
type C_DBusObjectManagerInterfaceRemovedCallback = Ptr () -> Ptr DBusObject -> Ptr DBusInterface -> Ptr () -> IO ()
type DBusObjectManagerInterfaceRemovedCallback = DBusObject -> DBusInterface -> IO ()
data DBusObjectManagerInterfaceRemovedSignalInfo
afterDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerInterfaceRemovedCallback -> m SignalHandlerId
genClosure_DBusObjectManagerInterfaceRemoved :: DBusObjectManagerInterfaceRemovedCallback -> IO Closure
mk_DBusObjectManagerInterfaceRemovedCallback :: C_DBusObjectManagerInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectManagerInterfaceRemovedCallback)
noDBusObjectManagerInterfaceRemovedCallback :: Maybe DBusObjectManagerInterfaceRemovedCallback
onDBusObjectManagerInterfaceRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerInterfaceRemovedCallback -> m SignalHandlerId
wrap_DBusObjectManagerInterfaceRemovedCallback :: DBusObjectManagerInterfaceRemovedCallback -> Ptr () -> Ptr DBusObject -> Ptr DBusInterface -> Ptr () -> IO ()
type C_DBusObjectManagerObjectAddedCallback = Ptr () -> Ptr DBusObject -> Ptr () -> IO ()
type DBusObjectManagerObjectAddedCallback = DBusObject -> IO ()
data DBusObjectManagerObjectAddedSignalInfo
afterDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerObjectAddedCallback -> m SignalHandlerId
genClosure_DBusObjectManagerObjectAdded :: DBusObjectManagerObjectAddedCallback -> IO Closure
mk_DBusObjectManagerObjectAddedCallback :: C_DBusObjectManagerObjectAddedCallback -> IO (FunPtr C_DBusObjectManagerObjectAddedCallback)
noDBusObjectManagerObjectAddedCallback :: Maybe DBusObjectManagerObjectAddedCallback
onDBusObjectManagerObjectAdded :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerObjectAddedCallback -> m SignalHandlerId
wrap_DBusObjectManagerObjectAddedCallback :: DBusObjectManagerObjectAddedCallback -> Ptr () -> Ptr DBusObject -> Ptr () -> IO ()
type C_DBusObjectManagerObjectRemovedCallback = Ptr () -> Ptr DBusObject -> Ptr () -> IO ()
type DBusObjectManagerObjectRemovedCallback = DBusObject -> IO ()
data DBusObjectManagerObjectRemovedSignalInfo
afterDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerObjectRemovedCallback -> m SignalHandlerId
genClosure_DBusObjectManagerObjectRemoved :: DBusObjectManagerObjectRemovedCallback -> IO Closure
mk_DBusObjectManagerObjectRemovedCallback :: C_DBusObjectManagerObjectRemovedCallback -> IO (FunPtr C_DBusObjectManagerObjectRemovedCallback)
noDBusObjectManagerObjectRemovedCallback :: Maybe DBusObjectManagerObjectRemovedCallback
onDBusObjectManagerObjectRemoved :: (IsDBusObjectManager a, MonadIO m) => a -> DBusObjectManagerObjectRemovedCallback -> m SignalHandlerId
wrap_DBusObjectManagerObjectRemovedCallback :: DBusObjectManagerObjectRemovedCallback -> Ptr () -> Ptr DBusObject -> Ptr () -> IO ()
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerInterfaceAddedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerInterfaceRemovedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerObjectAddedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerObjectRemovedSignalInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager a) => GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager a
instance GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager
instance (info ~ GI.Gio.Interfaces.DBusObjectManager.ResolveDBusObjectManagerMethod t GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager -> p)
instance (info ~ GI.Gio.Interfaces.DBusObjectManager.ResolveDBusObjectManagerMethod t GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager -> p)
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> m GI.Gio.Interfaces.DBusInterface.DBusInterface), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerGetInterfaceMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.DBusObject.DBusObject), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerGetObjectMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerGetObjectPathMethodInfo a signature
instance (signature ~ m [GI.Gio.Interfaces.DBusObject.DBusObject], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DBusObjectManager.DBusObjectManagerGetObjectsMethodInfo a signature
-- | CharsetConverter is an implementation of Converter based
-- on GIConv.
module GI.Gio.Objects.CharsetConverter
newtype CharsetConverter
CharsetConverter :: (ManagedPtr CharsetConverter) -> CharsetConverter
class GObject o => IsCharsetConverter o
toCharsetConverter :: IsCharsetConverter o => o -> IO CharsetConverter
noCharsetConverter :: Maybe CharsetConverter
data CharsetConverterGetNumFallbacksMethodInfo
-- | Gets the number of fallbacks that converter has
-- applied so far.
charsetConverterGetNumFallbacks :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Word32
data CharsetConverterGetUseFallbackMethodInfo
-- | Gets the CharsetConverter:use-fallback
-- property.
charsetConverterGetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Bool
-- | Creates a new CharsetConverter.
charsetConverterNew :: (HasCallStack, MonadIO m) => Text -> Text -> m CharsetConverter
data CharsetConverterSetUseFallbackMethodInfo
-- | Sets the CharsetConverter:use-fallback
-- property.
charsetConverterSetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> Bool -> m ()
data CharsetConverterFromCharsetPropertyInfo
charsetConverterFromCharset :: AttrLabelProxy "fromCharset"
constructCharsetConverterFromCharset :: (IsCharsetConverter o) => Text -> IO (GValueConstruct o)
getCharsetConverterFromCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text)
data CharsetConverterToCharsetPropertyInfo
charsetConverterToCharset :: AttrLabelProxy "toCharset"
constructCharsetConverterToCharset :: (IsCharsetConverter o) => Text -> IO (GValueConstruct o)
getCharsetConverterToCharset :: (MonadIO m, IsCharsetConverter o) => o -> m (Maybe Text)
data CharsetConverterUseFallbackPropertyInfo
charsetConverterUseFallback :: AttrLabelProxy "useFallback"
constructCharsetConverterUseFallback :: (IsCharsetConverter o) => Bool -> IO (GValueConstruct o)
getCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> m Bool
setCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> Bool -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.CharsetConverter.CharsetConverter
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.CharsetConverter.CharsetConverter a) => GI.Gio.Objects.CharsetConverter.IsCharsetConverter a
instance GI.Gio.Objects.CharsetConverter.IsCharsetConverter GI.Gio.Objects.CharsetConverter.CharsetConverter
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.CharsetConverter.CharsetConverter
instance GI.Gio.Interfaces.Converter.IsConverter GI.Gio.Objects.CharsetConverter.CharsetConverter
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Objects.CharsetConverter.CharsetConverter
instance (info ~ GI.Gio.Objects.CharsetConverter.ResolveCharsetConverterMethod t GI.Gio.Objects.CharsetConverter.CharsetConverter, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.CharsetConverter.CharsetConverter p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.CharsetConverter.CharsetConverter -> p)
instance (info ~ GI.Gio.Objects.CharsetConverter.ResolveCharsetConverterMethod t GI.Gio.Objects.CharsetConverter.CharsetConverter, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.CharsetConverter.CharsetConverter p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.CharsetConverter.CharsetConverter -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.CharsetConverter.CharsetConverterFromCharsetPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.CharsetConverter.CharsetConverterToCharsetPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.CharsetConverter.CharsetConverterUseFallbackPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.CharsetConverter.CharsetConverter
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.CharsetConverter.IsCharsetConverter a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.CharsetConverter.CharsetConverterGetNumFallbacksMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.CharsetConverter.IsCharsetConverter a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.CharsetConverter.CharsetConverterGetUseFallbackMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.CharsetConverter.IsCharsetConverter a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.CharsetConverter.CharsetConverterSetUseFallbackMethodInfo a signature
-- | 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
newtype ConverterInputStream
ConverterInputStream :: (ManagedPtr ConverterInputStream) -> ConverterInputStream
class GObject o => IsConverterInputStream o
toConverterInputStream :: IsConverterInputStream o => o -> IO ConverterInputStream
noConverterInputStream :: Maybe ConverterInputStream
data ConverterInputStreamGetConverterMethodInfo
-- | Gets the Converter that is used by
-- converterStream.
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
data ConverterInputStreamConverterPropertyInfo
constructConverterInputStreamConverter :: (IsConverterInputStream o, IsConverter a) => a -> IO (GValueConstruct o)
converterInputStreamConverter :: AttrLabelProxy "converter"
getConverterInputStreamConverter :: (MonadIO m, IsConverterInputStream o) => o -> m Converter
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ConverterInputStream.ConverterInputStream a) => GI.Gio.Objects.ConverterInputStream.IsConverterInputStream a
instance GI.Gio.Objects.ConverterInputStream.IsConverterInputStream GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance GI.Gio.Objects.FilterInputStream.IsFilterInputStream GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance GI.Gio.Interfaces.PollableInputStream.IsPollableInputStream GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance (info ~ GI.Gio.Objects.ConverterInputStream.ResolveConverterInputStreamMethod t GI.Gio.Objects.ConverterInputStream.ConverterInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ConverterInputStream.ConverterInputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ConverterInputStream.ConverterInputStream -> p)
instance (info ~ GI.Gio.Objects.ConverterInputStream.ResolveConverterInputStreamMethod t GI.Gio.Objects.ConverterInputStream.ConverterInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ConverterInputStream.ConverterInputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ConverterInputStream.ConverterInputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ConverterInputStream.ConverterInputStreamConverterPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ConverterInputStream.ConverterInputStream
instance (signature ~ m GI.Gio.Interfaces.Converter.Converter, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ConverterInputStream.IsConverterInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ConverterInputStream.ConverterInputStreamGetConverterMethodInfo a signature
-- | 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
newtype ConverterOutputStream
ConverterOutputStream :: (ManagedPtr ConverterOutputStream) -> ConverterOutputStream
class GObject o => IsConverterOutputStream o
toConverterOutputStream :: IsConverterOutputStream o => o -> IO ConverterOutputStream
noConverterOutputStream :: Maybe ConverterOutputStream
data ConverterOutputStreamGetConverterMethodInfo
-- | Gets the Converter that is used by
-- converterStream.
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
data ConverterOutputStreamConverterPropertyInfo
constructConverterOutputStreamConverter :: (IsConverterOutputStream o, IsConverter a) => a -> IO (GValueConstruct o)
converterOutputStreamConverter :: AttrLabelProxy "converter"
getConverterOutputStreamConverter :: (MonadIO m, IsConverterOutputStream o) => o -> m Converter
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream a) => GI.Gio.Objects.ConverterOutputStream.IsConverterOutputStream a
instance GI.Gio.Objects.ConverterOutputStream.IsConverterOutputStream GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance GI.Gio.Objects.FilterOutputStream.IsFilterOutputStream GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance GI.Gio.Interfaces.PollableOutputStream.IsPollableOutputStream GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance (info ~ GI.Gio.Objects.ConverterOutputStream.ResolveConverterOutputStreamMethod t GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream -> p)
instance (info ~ GI.Gio.Objects.ConverterOutputStream.ResolveConverterOutputStreamMethod t GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ConverterOutputStream.ConverterOutputStreamConverterPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ConverterOutputStream.ConverterOutputStream
instance (signature ~ m GI.Gio.Interfaces.Converter.Converter, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ConverterOutputStream.IsConverterOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ConverterOutputStream.ConverterOutputStreamGetConverterMethodInfo a signature
-- | 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 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
newtype AsyncResult
AsyncResult :: (ManagedPtr AsyncResult) -> AsyncResult
noAsyncResult :: Maybe AsyncResult
class GObject o => IsAsyncResult o
toAsyncResult :: IsAsyncResult o => o -> IO AsyncResult
data AsyncResultGetSourceObjectMethodInfo
-- | Gets the source object from a AsyncResult.
asyncResultGetSourceObject :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m Object
data AsyncResultGetUserDataMethodInfo
-- | Gets the user data from a AsyncResult.
asyncResultGetUserData :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m (Ptr ())
data AsyncResultIsTaggedMethodInfo
-- | Checks if res has the given sourceTag
-- (generally a function pointer indicating the function
-- res was created by).
asyncResultIsTagged :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> Ptr () -> m Bool
data AsyncResultLegacyPropagateErrorMethodInfo
-- | 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.
asyncResultLegacyPropagateError :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.AsyncResult.AsyncResult
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.AsyncResult.AsyncResult a) => GI.Gio.Interfaces.AsyncResult.IsAsyncResult a
instance GI.Gio.Interfaces.AsyncResult.IsAsyncResult GI.Gio.Interfaces.AsyncResult.AsyncResult
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.AsyncResult.AsyncResult
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.AsyncResult.AsyncResult
instance (info ~ GI.Gio.Interfaces.AsyncResult.ResolveAsyncResultMethod t GI.Gio.Interfaces.AsyncResult.AsyncResult, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.AsyncResult.AsyncResult p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.AsyncResult.AsyncResult -> p)
instance (info ~ GI.Gio.Interfaces.AsyncResult.ResolveAsyncResultMethod t GI.Gio.Interfaces.AsyncResult.AsyncResult, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.AsyncResult.AsyncResult p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.AsyncResult.AsyncResult -> p)
instance (signature ~ m GI.GObject.Objects.Object.Object, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AsyncResult.IsAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AsyncResult.AsyncResultGetSourceObjectMethodInfo a signature
instance (signature ~ m (GHC.Ptr.Ptr ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AsyncResult.IsAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AsyncResult.AsyncResultGetUserDataMethodInfo a signature
instance (signature ~ (GHC.Ptr.Ptr () -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AsyncResult.IsAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AsyncResult.AsyncResultIsTaggedMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AsyncResult.IsAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AsyncResult.AsyncResultLegacyPropagateErrorMethodInfo a signature
-- | DesktopAppInfoLookup is an opaque data structure and can only
-- be accessed using the following functions.
module GI.Gio.Interfaces.DesktopAppInfoLookup
newtype DesktopAppInfoLookup
DesktopAppInfoLookup :: (ManagedPtr DesktopAppInfoLookup) -> DesktopAppInfoLookup
noDesktopAppInfoLookup :: Maybe DesktopAppInfoLookup
class GObject o => IsDesktopAppInfoLookup o
toDesktopAppInfoLookup :: IsDesktopAppInfoLookup o => o -> IO DesktopAppInfoLookup
data DesktopAppInfoLookupGetDefaultForUriSchemeMethodInfo
-- | 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 GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup a) => GI.Gio.Interfaces.DesktopAppInfoLookup.IsDesktopAppInfoLookup a
instance GI.Gio.Interfaces.DesktopAppInfoLookup.IsDesktopAppInfoLookup GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup
instance (info ~ GI.Gio.Interfaces.DesktopAppInfoLookup.ResolveDesktopAppInfoLookupMethod t GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup -> p)
instance (info ~ GI.Gio.Interfaces.DesktopAppInfoLookup.ResolveDesktopAppInfoLookupMethod t GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup -> p)
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.AppInfo.AppInfo), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DesktopAppInfoLookup.IsDesktopAppInfoLookup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookupGetDefaultForUriSchemeMethodInfo a signature
-- | 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
newtype AppLaunchContext
AppLaunchContext :: (ManagedPtr AppLaunchContext) -> AppLaunchContext
class GObject o => IsAppLaunchContext o
toAppLaunchContext :: IsAppLaunchContext o => o -> IO AppLaunchContext
noAppLaunchContext :: Maybe AppLaunchContext
data AppLaunchContextGetDisplayMethodInfo
-- | 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
data AppLaunchContextGetEnvironmentMethodInfo
-- | 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.
appLaunchContextGetEnvironment :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> m [Text]
data AppLaunchContextGetStartupNotifyIdMethodInfo
-- | 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
data AppLaunchContextLaunchFailedMethodInfo
-- | 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
data AppLaunchContextSetenvMethodInfo
-- | Arranges for variable to be set to
-- value in the child's environment when
-- context is used to launch an application.
appLaunchContextSetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> Text -> Text -> m ()
data AppLaunchContextUnsetenvMethodInfo
-- | Arranges for variable to be unset in the child's
-- environment when context is used to launch an
-- application.
appLaunchContextUnsetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> Text -> m ()
type AppLaunchContextLaunchFailedCallback = Text -> IO ()
data AppLaunchContextLaunchFailedSignalInfo
type C_AppLaunchContextLaunchFailedCallback = Ptr () -> CString -> Ptr () -> IO ()
afterAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId
genClosure_AppLaunchContextLaunchFailed :: AppLaunchContextLaunchFailedCallback -> IO Closure
mk_AppLaunchContextLaunchFailedCallback :: C_AppLaunchContextLaunchFailedCallback -> IO (FunPtr C_AppLaunchContextLaunchFailedCallback)
noAppLaunchContextLaunchFailedCallback :: Maybe AppLaunchContextLaunchFailedCallback
onAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId
wrap_AppLaunchContextLaunchFailedCallback :: AppLaunchContextLaunchFailedCallback -> Ptr () -> CString -> Ptr () -> IO ()
type AppLaunchContextLaunchedCallback = AppInfo -> GVariant -> IO ()
data AppLaunchContextLaunchedSignalInfo
type C_AppLaunchContextLaunchedCallback = Ptr () -> Ptr AppInfo -> Ptr GVariant -> Ptr () -> IO ()
afterAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchedCallback -> m SignalHandlerId
genClosure_AppLaunchContextLaunched :: AppLaunchContextLaunchedCallback -> IO Closure
mk_AppLaunchContextLaunchedCallback :: C_AppLaunchContextLaunchedCallback -> IO (FunPtr C_AppLaunchContextLaunchedCallback)
noAppLaunchContextLaunchedCallback :: Maybe AppLaunchContextLaunchedCallback
onAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchedCallback -> m SignalHandlerId
wrap_AppLaunchContextLaunchedCallback :: AppLaunchContextLaunchedCallback -> Ptr () -> Ptr AppInfo -> Ptr GVariant -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.AppLaunchContext.AppLaunchContext a) => GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext a
instance GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance (info ~ GI.Gio.Objects.AppLaunchContext.ResolveAppLaunchContextMethod t GI.Gio.Objects.AppLaunchContext.AppLaunchContext, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.AppLaunchContext.AppLaunchContext p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.AppLaunchContext.AppLaunchContext -> p)
instance (info ~ GI.Gio.Objects.AppLaunchContext.ResolveAppLaunchContextMethod t GI.Gio.Objects.AppLaunchContext.AppLaunchContext, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.AppLaunchContext.AppLaunchContext p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.AppLaunchContext.AppLaunchContext -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.AppLaunchContext.AppLaunchContext
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextLaunchFailedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextLaunchedSignalInfo
instance (signature ~ (b -> [c] -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext a, GI.Gio.Interfaces.AppInfo.IsAppInfo b, GI.Gio.Interfaces.File.IsFile c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextGetDisplayMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextGetEnvironmentMethodInfo a signature
instance (signature ~ (b -> [c] -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext a, GI.Gio.Interfaces.AppInfo.IsAppInfo b, GI.Gio.Interfaces.File.IsFile c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextGetStartupNotifyIdMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextLaunchFailedMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextSetenvMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.AppLaunchContext.AppLaunchContextUnsetenvMethodInfo a signature
-- | 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
newtype DesktopAppInfo
DesktopAppInfo :: (ManagedPtr DesktopAppInfo) -> DesktopAppInfo
class GObject o => IsDesktopAppInfo o
toDesktopAppInfo :: IsDesktopAppInfo o => o -> IO DesktopAppInfo
noDesktopAppInfo :: Maybe DesktopAppInfo
data DesktopAppInfoLaunchUrisAsManagerMethodInfo
data DesktopAppInfoGetActionNameMethodInfo
-- | 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.
desktopAppInfoGetActionName :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Text
data DesktopAppInfoGetBooleanMethodInfo
-- | Looks up a boolean value in the keyfile backing info.
--
-- The key is looked up in the "Desktop Entry" group.
desktopAppInfoGetBoolean :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Bool
data DesktopAppInfoGetCategoriesMethodInfo
-- | Gets the categories from the desktop file.
desktopAppInfoGetCategories :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Text
data DesktopAppInfoGetFilenameMethodInfo
-- | 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.
desktopAppInfoGetFilename :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m [Char]
data DesktopAppInfoGetGenericNameMethodInfo
-- | 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.
desktopAppInfoGetImplementations :: (HasCallStack, MonadIO m) => Text -> m [DesktopAppInfo]
data DesktopAppInfoGetIsHiddenMethodInfo
-- | A desktop file is hidden if the Hidden key in it is set to True.
desktopAppInfoGetIsHidden :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Bool
data DesktopAppInfoGetKeywordsMethodInfo
-- | Gets the keywords from the desktop file.
desktopAppInfoGetKeywords :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m [Text]
data DesktopAppInfoGetNodisplayMethodInfo
-- | 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.
desktopAppInfoGetNodisplay :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Bool
data DesktopAppInfoGetShowInMethodInfo
-- | 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.
desktopAppInfoGetShowIn :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Maybe (Text) -> m Bool
data DesktopAppInfoGetStartupWmClassMethodInfo
-- | Retrieves the StartupWMClass field from info. This
-- represents the WM_CLASS property of the main window of the
-- application, if launched through info.
desktopAppInfoGetStartupWmClass :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Text
data DesktopAppInfoGetStringMethodInfo
-- | Looks up a string value in the keyfile backing info.
--
-- The key is looked up in the "Desktop Entry" group.
desktopAppInfoGetString :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Text
data DesktopAppInfoHasKeyMethodInfo
-- | Returns whether key exists in the "Desktop Entry"
-- group of the keyfile backing info.
desktopAppInfoHasKey :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Bool
data DesktopAppInfoLaunchActionMethodInfo
-- | 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.
desktopAppInfoLaunchAction :: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => a -> Text -> Maybe (b) -> m ()
data DesktopAppInfoListActionsMethodInfo
-- | 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.
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 DesktopAppInfo
-- | Creates a new DesktopAppInfo.
desktopAppInfoNewFromFilename :: (HasCallStack, MonadIO m) => [Char] -> m DesktopAppInfo
-- | Creates a new DesktopAppInfo.
desktopAppInfoNewFromKeyfile :: (HasCallStack, MonadIO m) => KeyFile -> m 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 ()
data DesktopAppInfoFilenamePropertyInfo
constructDesktopAppInfoFilename :: (IsDesktopAppInfo o) => Text -> IO (GValueConstruct o)
desktopAppInfoFilename :: AttrLabelProxy "filename"
getDesktopAppInfoFilename :: (MonadIO m, IsDesktopAppInfo o) => o -> m (Maybe Text)
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo a) => GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a
instance GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo
instance GI.Gio.Interfaces.AppInfo.IsAppInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo
instance (info ~ GI.Gio.Objects.DesktopAppInfo.ResolveDesktopAppInfoMethod t GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo -> p)
instance (info ~ GI.Gio.Objects.DesktopAppInfo.ResolveDesktopAppInfoMethod t GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoFilenamePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo
instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetActionNameMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetBooleanMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetCategoriesMethodInfo a signature
instance (signature ~ m [GHC.Types.Char], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetFilenameMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetGenericNameMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetIsHiddenMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetKeywordsMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetNodisplayMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetShowInMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetStartupWmClassMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoGetStringMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoHasKeyMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoLaunchActionMethodInfo a signature
instance (p ~ (), o ~ Data.GI.Base.Overloading.MethodResolutionFailed "launchUrisAsManager" GI.Gio.Objects.DesktopAppInfo.DesktopAppInfo) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoLaunchUrisAsManagerMethodInfo o p
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DesktopAppInfo.IsDesktopAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DesktopAppInfo.DesktopAppInfoListActionsMethodInfo a signature
-- | 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
newtype ActionGroup
ActionGroup :: (ManagedPtr ActionGroup) -> ActionGroup
noActionGroup :: Maybe ActionGroup
class GObject o => IsActionGroup o
toActionGroup :: IsActionGroup o => o -> IO ActionGroup
data ActionGroupActionAddedMethodInfo
-- | Emits the ActionGroup::action-added signal on
-- actionGroup.
--
-- This function should only be called by ActionGroup
-- implementations.
actionGroupActionAdded :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m ()
data ActionGroupActionEnabledChangedMethodInfo
-- | Emits the ActionGroup::action-enabled-changed
-- signal on actionGroup.
--
-- This function should only be called by ActionGroup
-- implementations.
actionGroupActionEnabledChanged :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> Bool -> m ()
data ActionGroupActionRemovedMethodInfo
-- | Emits the ActionGroup::action-removed signal on
-- actionGroup.
--
-- This function should only be called by ActionGroup
-- implementations.
actionGroupActionRemoved :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m ()
data ActionGroupActionStateChangedMethodInfo
-- | Emits the ActionGroup::action-state-changed
-- signal on actionGroup.
--
-- This function should only be called by ActionGroup
-- implementations.
actionGroupActionStateChanged :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> GVariant -> m ()
data ActionGroupActivateActionMethodInfo
-- | 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.
actionGroupActivateAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> Maybe (GVariant) -> m ()
data ActionGroupChangeActionStateMethodInfo
-- | 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.
actionGroupChangeActionState :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> GVariant -> m ()
data ActionGroupGetActionEnabledMethodInfo
-- | 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.
actionGroupGetActionEnabled :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m Bool
data ActionGroupGetActionParameterTypeMethodInfo
-- | 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.
actionGroupGetActionParameterType :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe VariantType)
data ActionGroupGetActionStateMethodInfo
-- | 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.
actionGroupGetActionState :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe GVariant)
data ActionGroupGetActionStateHintMethodInfo
-- | 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.
actionGroupGetActionStateHint :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe GVariant)
data ActionGroupGetActionStateTypeMethodInfo
-- | 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.
actionGroupGetActionStateType :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Maybe VariantType)
data ActionGroupHasActionMethodInfo
-- | Checks if the named action exists within actionGroup.
actionGroupHasAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m Bool
data ActionGroupListActionsMethodInfo
-- | Lists the actions contained within actionGroup.
--
-- The caller is responsible for freeing the list with strfreev
-- when it is no longer required.
actionGroupListActions :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> m [Text]
data ActionGroupQueryActionMethodInfo
-- | 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.
actionGroupQueryAction :: (HasCallStack, MonadIO m, IsActionGroup a) => a -> Text -> m (Bool, Bool, VariantType, VariantType, GVariant, GVariant)
type ActionGroupActionAddedCallback = Text -> IO ()
data ActionGroupActionAddedSignalInfo
type C_ActionGroupActionAddedCallback = Ptr () -> CString -> Ptr () -> IO ()
afterActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionAddedCallback -> m SignalHandlerId
genClosure_ActionGroupActionAdded :: ActionGroupActionAddedCallback -> IO Closure
mk_ActionGroupActionAddedCallback :: C_ActionGroupActionAddedCallback -> IO (FunPtr C_ActionGroupActionAddedCallback)
noActionGroupActionAddedCallback :: Maybe ActionGroupActionAddedCallback
onActionGroupActionAdded :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionAddedCallback -> m SignalHandlerId
wrap_ActionGroupActionAddedCallback :: ActionGroupActionAddedCallback -> Ptr () -> CString -> Ptr () -> IO ()
type ActionGroupActionEnabledChangedCallback = Text -> Bool -> IO ()
data ActionGroupActionEnabledChangedSignalInfo
type C_ActionGroupActionEnabledChangedCallback = Ptr () -> CString -> CInt -> Ptr () -> IO ()
afterActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionEnabledChangedCallback -> m SignalHandlerId
genClosure_ActionGroupActionEnabledChanged :: ActionGroupActionEnabledChangedCallback -> IO Closure
mk_ActionGroupActionEnabledChangedCallback :: C_ActionGroupActionEnabledChangedCallback -> IO (FunPtr C_ActionGroupActionEnabledChangedCallback)
noActionGroupActionEnabledChangedCallback :: Maybe ActionGroupActionEnabledChangedCallback
onActionGroupActionEnabledChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionEnabledChangedCallback -> m SignalHandlerId
wrap_ActionGroupActionEnabledChangedCallback :: ActionGroupActionEnabledChangedCallback -> Ptr () -> CString -> CInt -> Ptr () -> IO ()
type ActionGroupActionRemovedCallback = Text -> IO ()
data ActionGroupActionRemovedSignalInfo
type C_ActionGroupActionRemovedCallback = Ptr () -> CString -> Ptr () -> IO ()
afterActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionRemovedCallback -> m SignalHandlerId
genClosure_ActionGroupActionRemoved :: ActionGroupActionRemovedCallback -> IO Closure
mk_ActionGroupActionRemovedCallback :: C_ActionGroupActionRemovedCallback -> IO (FunPtr C_ActionGroupActionRemovedCallback)
noActionGroupActionRemovedCallback :: Maybe ActionGroupActionRemovedCallback
onActionGroupActionRemoved :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionRemovedCallback -> m SignalHandlerId
wrap_ActionGroupActionRemovedCallback :: ActionGroupActionRemovedCallback -> Ptr () -> CString -> Ptr () -> IO ()
type ActionGroupActionStateChangedCallback = Text -> GVariant -> IO ()
data ActionGroupActionStateChangedSignalInfo
type C_ActionGroupActionStateChangedCallback = Ptr () -> CString -> Ptr GVariant -> Ptr () -> IO ()
afterActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionStateChangedCallback -> m SignalHandlerId
genClosure_ActionGroupActionStateChanged :: ActionGroupActionStateChangedCallback -> IO Closure
mk_ActionGroupActionStateChangedCallback :: C_ActionGroupActionStateChangedCallback -> IO (FunPtr C_ActionGroupActionStateChangedCallback)
noActionGroupActionStateChangedCallback :: Maybe ActionGroupActionStateChangedCallback
onActionGroupActionStateChanged :: (IsActionGroup a, MonadIO m) => a -> ActionGroupActionStateChangedCallback -> m SignalHandlerId
wrap_ActionGroupActionStateChangedCallback :: ActionGroupActionStateChangedCallback -> Ptr () -> CString -> Ptr GVariant -> Ptr () -> IO ()
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionAddedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionEnabledChangedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionRemovedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionStateChangedSignalInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.ActionGroup.ActionGroup
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.ActionGroup.ActionGroup a) => GI.Gio.Interfaces.ActionGroup.IsActionGroup a
instance GI.Gio.Interfaces.ActionGroup.IsActionGroup GI.Gio.Interfaces.ActionGroup.ActionGroup
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.ActionGroup.ActionGroup
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.ActionGroup.ActionGroup
instance (info ~ GI.Gio.Interfaces.ActionGroup.ResolveActionGroupMethod t GI.Gio.Interfaces.ActionGroup.ActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.ActionGroup.ActionGroup p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.ActionGroup.ActionGroup -> p)
instance (info ~ GI.Gio.Interfaces.ActionGroup.ResolveActionGroupMethod t GI.Gio.Interfaces.ActionGroup.ActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.ActionGroup.ActionGroup p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.ActionGroup.ActionGroup -> p)
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionAddedMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionEnabledChangedMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionRemovedMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActionStateChangedMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupActivateActionMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupChangeActionStateMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupGetActionEnabledMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m (GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupGetActionParameterTypeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m (GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupGetActionStateMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m (GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupGetActionStateHintMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m (GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupGetActionStateTypeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupHasActionMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupListActionsMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m (GHC.Types.Bool, GHC.Types.Bool, GI.GLib.Structs.VariantType.VariantType, GI.GLib.Structs.VariantType.VariantType, Data.GI.Base.BasicTypes.GVariant, Data.GI.Base.BasicTypes.GVariant)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionGroup.IsActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionGroup.ActionGroupQueryActionMethodInfo a signature
-- | 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.
module GI.Gio.Interfaces.RemoteActionGroup
newtype RemoteActionGroup
RemoteActionGroup :: (ManagedPtr RemoteActionGroup) -> RemoteActionGroup
noRemoteActionGroup :: Maybe RemoteActionGroup
class GObject o => IsRemoteActionGroup o
toRemoteActionGroup :: IsRemoteActionGroup o => o -> IO RemoteActionGroup
data RemoteActionGroupActivateActionFullMethodInfo
-- | 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.
remoteActionGroupActivateActionFull :: (HasCallStack, MonadIO m, IsRemoteActionGroup a) => a -> Text -> Maybe (GVariant) -> GVariant -> m ()
data RemoteActionGroupChangeActionStateFullMethodInfo
-- | 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.
remoteActionGroupChangeActionStateFull :: (HasCallStack, MonadIO m, IsRemoteActionGroup a) => a -> Text -> GVariant -> GVariant -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup a) => GI.Gio.Interfaces.RemoteActionGroup.IsRemoteActionGroup a
instance GI.Gio.Interfaces.RemoteActionGroup.IsRemoteActionGroup GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance GI.Gio.Interfaces.ActionGroup.IsActionGroup GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup
instance (info ~ GI.Gio.Interfaces.RemoteActionGroup.ResolveRemoteActionGroupMethod t GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup -> p)
instance (info ~ GI.Gio.Interfaces.RemoteActionGroup.ResolveRemoteActionGroupMethod t GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroup -> p)
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.RemoteActionGroup.IsRemoteActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroupActivateActionFullMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.GI.Base.BasicTypes.GVariant -> Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.RemoteActionGroup.IsRemoteActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.RemoteActionGroup.RemoteActionGroupChangeActionStateFullMethodInfo a signature
-- | 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
newtype DBusActionGroup
DBusActionGroup :: (ManagedPtr DBusActionGroup) -> DBusActionGroup
class GObject o => IsDBusActionGroup o
toDBusActionGroup :: IsDBusActionGroup o => o -> IO 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.
dBusActionGroupGet :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> Text -> m DBusActionGroup
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusActionGroup.DBusActionGroup a) => GI.Gio.Objects.DBusActionGroup.IsDBusActionGroup a
instance GI.Gio.Objects.DBusActionGroup.IsDBusActionGroup GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance GI.Gio.Interfaces.ActionGroup.IsActionGroup GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance GI.Gio.Interfaces.RemoteActionGroup.IsRemoteActionGroup GI.Gio.Objects.DBusActionGroup.DBusActionGroup
instance (info ~ GI.Gio.Objects.DBusActionGroup.ResolveDBusActionGroupMethod t GI.Gio.Objects.DBusActionGroup.DBusActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusActionGroup.DBusActionGroup p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusActionGroup.DBusActionGroup -> p)
instance (info ~ GI.Gio.Objects.DBusActionGroup.ResolveDBusActionGroupMethod t GI.Gio.Objects.DBusActionGroup.DBusActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusActionGroup.DBusActionGroup p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusActionGroup.DBusActionGroup -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusActionGroup.DBusActionGroup
-- | 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
newtype Action
Action :: (ManagedPtr Action) -> Action
noAction :: Maybe Action
class GObject o => IsAction o
toAction :: IsAction o => o -> IO Action
data ActionActivateMethodInfo
-- | 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.
actionActivate :: (HasCallStack, MonadIO m, IsAction a) => a -> Maybe (GVariant) -> m ()
data ActionChangeStateMethodInfo
-- | 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.
actionChangeState :: (HasCallStack, MonadIO m, IsAction a) => a -> GVariant -> m ()
data ActionGetEnabledMethodInfo
-- | 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.
actionGetEnabled :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
data ActionGetNameMethodInfo
-- | Queries the name of action.
actionGetName :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
data ActionGetParameterTypeMethodInfo
-- | 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.
actionGetParameterType :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe VariantType)
data ActionGetStateMethodInfo
-- | 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.
actionGetState :: (HasCallStack, MonadIO m, IsAction a) => a -> m GVariant
data ActionGetStateHintMethodInfo
-- | 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.
actionGetStateHint :: (HasCallStack, MonadIO m, IsAction a) => a -> m (Maybe GVariant)
data ActionGetStateTypeMethodInfo
-- | 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.
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.
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 '.'.
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.
actionPrintDetailedName :: (HasCallStack, MonadIO m) => Text -> Maybe (GVariant) -> m Text
data ActionEnabledPropertyInfo
actionEnabled :: AttrLabelProxy "enabled"
getActionEnabled :: (MonadIO m, IsAction o) => o -> m Bool
data ActionNamePropertyInfo
actionName :: AttrLabelProxy "name"
getActionName :: (MonadIO m, IsAction o) => o -> m Text
data ActionParameterTypePropertyInfo
actionParameterType :: AttrLabelProxy "parameterType"
getActionParameterType :: (MonadIO m, IsAction o) => o -> m (Maybe VariantType)
data ActionStatePropertyInfo
actionState :: AttrLabelProxy "state"
getActionState :: (MonadIO m, IsAction o) => o -> m (Maybe GVariant)
data ActionStateTypePropertyInfo
actionStateType :: AttrLabelProxy "stateType"
getActionStateType :: (MonadIO m, IsAction o) => o -> m (Maybe VariantType)
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Action.Action
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.Action.Action a) => GI.Gio.Interfaces.Action.IsAction a
instance GI.Gio.Interfaces.Action.IsAction GI.Gio.Interfaces.Action.Action
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.Action.Action
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.Action.ActionEnabledPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.Action.ActionNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.Action.ActionParameterTypePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.Action.ActionStatePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.Action.ActionStateTypePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.Action.Action
instance (info ~ GI.Gio.Interfaces.Action.ResolveActionMethod t GI.Gio.Interfaces.Action.Action, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Action.Action p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.Action.Action -> p)
instance (info ~ GI.Gio.Interfaces.Action.ResolveActionMethod t GI.Gio.Interfaces.Action.Action, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Action.Action p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.Action.Action -> p)
instance (signature ~ (GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionActivateMethodInfo a signature
instance (signature ~ (Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionChangeStateMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionGetEnabledMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionGetNameMethodInfo a signature
instance (signature ~ m (GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionGetParameterTypeMethodInfo a signature
instance (signature ~ m Data.GI.Base.BasicTypes.GVariant, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionGetStateMethodInfo a signature
instance (signature ~ m (GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionGetStateHintMethodInfo a signature
instance (signature ~ m (GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Action.IsAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Action.ActionGetStateTypeMethodInfo a signature
-- | 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.
module GI.Gio.Interfaces.ActionMap
newtype ActionMap
ActionMap :: (ManagedPtr ActionMap) -> ActionMap
noActionMap :: Maybe ActionMap
class GObject o => IsActionMap o
toActionMap :: IsActionMap o => o -> IO ActionMap
data ActionMapAddActionMethodInfo
-- | 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.
actionMapAddAction :: (HasCallStack, MonadIO m, IsActionMap a, IsAction b) => a -> b -> m ()
data ActionMapAddActionEntriesMethodInfo
-- | 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);
-- }
--
actionMapAddActionEntries :: (HasCallStack, MonadIO m, IsActionMap a) => a -> [ActionEntry] -> Ptr () -> m ()
data ActionMapLookupActionMethodInfo
-- | Looks up the action with the name actionName in
-- actionMap.
--
-- If no such action exists, returns Nothing.
actionMapLookupAction :: (HasCallStack, MonadIO m, IsActionMap a) => a -> Text -> m Action
data ActionMapRemoveActionMethodInfo
-- | Removes the named action from the action map.
--
-- If no action of this name is in the map then nothing happens.
actionMapRemoveAction :: (HasCallStack, MonadIO m, IsActionMap a) => a -> Text -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.ActionMap.ActionMap
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.ActionMap.ActionMap a) => GI.Gio.Interfaces.ActionMap.IsActionMap a
instance GI.Gio.Interfaces.ActionMap.IsActionMap GI.Gio.Interfaces.ActionMap.ActionMap
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.ActionMap.ActionMap
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.ActionMap.ActionMap
instance (info ~ GI.Gio.Interfaces.ActionMap.ResolveActionMapMethod t GI.Gio.Interfaces.ActionMap.ActionMap, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.ActionMap.ActionMap p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.ActionMap.ActionMap -> p)
instance (info ~ GI.Gio.Interfaces.ActionMap.ResolveActionMapMethod t GI.Gio.Interfaces.ActionMap.ActionMap, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.ActionMap.ActionMap p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.ActionMap.ActionMap -> p)
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionMap.IsActionMap a, GI.Gio.Interfaces.Action.IsAction b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionMap.ActionMapAddActionMethodInfo a signature
instance (signature ~ ([GI.Gio.Structs.ActionEntry.ActionEntry] -> GHC.Ptr.Ptr () -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionMap.IsActionMap a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionMap.ActionMapAddActionEntriesMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.Action.Action), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionMap.IsActionMap a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionMap.ActionMapLookupActionMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.ActionMap.IsActionMap a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.ActionMap.ActionMapRemoveActionMethodInfo a signature
-- | 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.
module GI.Gio.Objects.PropertyAction
newtype PropertyAction
PropertyAction :: (ManagedPtr PropertyAction) -> PropertyAction
class GObject o => IsPropertyAction o
toPropertyAction :: IsPropertyAction o => o -> IO 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.
propertyActionNew :: (HasCallStack, MonadIO m, IsObject a) => Text -> a -> Text -> m PropertyAction
data PropertyActionEnabledPropertyInfo
getPropertyActionEnabled :: (MonadIO m, IsPropertyAction o) => o -> m Bool
propertyActionEnabled :: AttrLabelProxy "enabled"
data PropertyActionInvertBooleanPropertyInfo
constructPropertyActionInvertBoolean :: (IsPropertyAction o) => Bool -> IO (GValueConstruct o)
getPropertyActionInvertBoolean :: (MonadIO m, IsPropertyAction o) => o -> m Bool
propertyActionInvertBoolean :: AttrLabelProxy "invertBoolean"
data PropertyActionNamePropertyInfo
constructPropertyActionName :: (IsPropertyAction o) => Text -> IO (GValueConstruct o)
getPropertyActionName :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe Text)
propertyActionName :: AttrLabelProxy "name"
data PropertyActionObjectPropertyInfo
constructPropertyActionObject :: (IsPropertyAction o, IsObject a) => a -> IO (GValueConstruct o)
propertyActionObject :: AttrLabelProxy "object"
data PropertyActionParameterTypePropertyInfo
getPropertyActionParameterType :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe VariantType)
propertyActionParameterType :: AttrLabelProxy "parameterType"
data PropertyActionPropertyNamePropertyInfo
constructPropertyActionPropertyName :: (IsPropertyAction o) => Text -> IO (GValueConstruct o)
propertyActionPropertyName :: AttrLabelProxy "propertyName"
data PropertyActionStatePropertyInfo
getPropertyActionState :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe GVariant)
propertyActionState :: AttrLabelProxy "state"
data PropertyActionStateTypePropertyInfo
getPropertyActionStateType :: (MonadIO m, IsPropertyAction o) => o -> m (Maybe VariantType)
propertyActionStateType :: AttrLabelProxy "stateType"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.PropertyAction.PropertyAction
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.PropertyAction.PropertyAction a) => GI.Gio.Objects.PropertyAction.IsPropertyAction a
instance GI.Gio.Objects.PropertyAction.IsPropertyAction GI.Gio.Objects.PropertyAction.PropertyAction
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.PropertyAction.PropertyAction
instance GI.Gio.Interfaces.Action.IsAction GI.Gio.Objects.PropertyAction.PropertyAction
instance (info ~ GI.Gio.Objects.PropertyAction.ResolvePropertyActionMethod t GI.Gio.Objects.PropertyAction.PropertyAction, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.PropertyAction.PropertyAction p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.PropertyAction.PropertyAction -> p)
instance (info ~ GI.Gio.Objects.PropertyAction.ResolvePropertyActionMethod t GI.Gio.Objects.PropertyAction.PropertyAction, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.PropertyAction.PropertyAction p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.PropertyAction.PropertyAction -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionEnabledPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionInvertBooleanPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionObjectPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionParameterTypePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionPropertyNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionStatePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.PropertyAction.PropertyActionStateTypePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.PropertyAction.PropertyAction
-- | 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
newtype SimpleAction
SimpleAction :: (ManagedPtr SimpleAction) -> SimpleAction
class GObject o => IsSimpleAction o
toSimpleAction :: IsSimpleAction o => o -> IO SimpleAction
noSimpleAction :: Maybe SimpleAction
-- | Creates a new action.
--
-- The created action is stateless. See simpleActionNewStateful.
simpleActionNew :: (HasCallStack, MonadIO m) => Text -> Maybe (VariantType) -> m SimpleAction
-- | Creates a new stateful action.
--
-- state is the initial state of the action. All future
-- state values must have the same VariantType as the initial
-- state.
--
-- If the state GVariant is floating, it is consumed.
simpleActionNewStateful :: (HasCallStack, MonadIO m) => Text -> Maybe (VariantType) -> GVariant -> m SimpleAction
data SimpleActionSetEnabledMethodInfo
-- | 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.
simpleActionSetEnabled :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> Bool -> m ()
data SimpleActionSetStateMethodInfo
-- | 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.
simpleActionSetState :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> GVariant -> m ()
data SimpleActionSetStateHintMethodInfo
-- | Sets the state hint for the action.
--
-- See actionGetStateHint for more information about action state
-- hints.
simpleActionSetStateHint :: (HasCallStack, MonadIO m, IsSimpleAction a) => a -> Maybe (GVariant) -> m ()
data SimpleActionEnabledPropertyInfo
constructSimpleActionEnabled :: (IsSimpleAction o) => Bool -> IO (GValueConstruct o)
getSimpleActionEnabled :: (MonadIO m, IsSimpleAction o) => o -> m Bool
setSimpleActionEnabled :: (MonadIO m, IsSimpleAction o) => o -> Bool -> m ()
simpleActionEnabled :: AttrLabelProxy "enabled"
data SimpleActionNamePropertyInfo
constructSimpleActionName :: (IsSimpleAction o) => Text -> IO (GValueConstruct o)
getSimpleActionName :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe Text)
simpleActionName :: AttrLabelProxy "name"
data SimpleActionParameterTypePropertyInfo
constructSimpleActionParameterType :: (IsSimpleAction o) => VariantType -> IO (GValueConstruct o)
getSimpleActionParameterType :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe VariantType)
simpleActionParameterType :: AttrLabelProxy "parameterType"
data SimpleActionStatePropertyInfo
constructSimpleActionState :: (IsSimpleAction o) => GVariant -> IO (GValueConstruct o)
getSimpleActionState :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe GVariant)
setSimpleActionState :: (MonadIO m, IsSimpleAction o) => o -> GVariant -> m ()
simpleActionState :: AttrLabelProxy "state"
data SimpleActionStateTypePropertyInfo
getSimpleActionStateType :: (MonadIO m, IsSimpleAction o) => o -> m (Maybe VariantType)
simpleActionStateType :: AttrLabelProxy "stateType"
type C_SimpleActionActivateCallback = Ptr () -> Ptr GVariant -> Ptr () -> IO ()
type SimpleActionActivateCallback = Maybe GVariant -> IO ()
data SimpleActionActivateSignalInfo
afterSimpleActionActivate :: (IsSimpleAction a, MonadIO m) => a -> SimpleActionActivateCallback -> m SignalHandlerId
genClosure_SimpleActionActivate :: SimpleActionActivateCallback -> IO Closure
mk_SimpleActionActivateCallback :: C_SimpleActionActivateCallback -> IO (FunPtr C_SimpleActionActivateCallback)
noSimpleActionActivateCallback :: Maybe SimpleActionActivateCallback
onSimpleActionActivate :: (IsSimpleAction a, MonadIO m) => a -> SimpleActionActivateCallback -> m SignalHandlerId
wrap_SimpleActionActivateCallback :: SimpleActionActivateCallback -> Ptr () -> Ptr GVariant -> Ptr () -> IO ()
type C_SimpleActionChangeStateCallback = Ptr () -> Ptr GVariant -> Ptr () -> IO ()
type SimpleActionChangeStateCallback = Maybe GVariant -> IO ()
data SimpleActionChangeStateSignalInfo
afterSimpleActionChangeState :: (IsSimpleAction a, MonadIO m) => a -> SimpleActionChangeStateCallback -> m SignalHandlerId
genClosure_SimpleActionChangeState :: SimpleActionChangeStateCallback -> IO Closure
mk_SimpleActionChangeStateCallback :: C_SimpleActionChangeStateCallback -> IO (FunPtr C_SimpleActionChangeStateCallback)
noSimpleActionChangeStateCallback :: Maybe SimpleActionChangeStateCallback
onSimpleActionChangeState :: (IsSimpleAction a, MonadIO m) => a -> SimpleActionChangeStateCallback -> m SignalHandlerId
wrap_SimpleActionChangeStateCallback :: SimpleActionChangeStateCallback -> Ptr () -> Ptr GVariant -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleAction.SimpleAction
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SimpleAction.SimpleAction a) => GI.Gio.Objects.SimpleAction.IsSimpleAction a
instance GI.Gio.Objects.SimpleAction.IsSimpleAction GI.Gio.Objects.SimpleAction.SimpleAction
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SimpleAction.SimpleAction
instance GI.Gio.Interfaces.Action.IsAction GI.Gio.Objects.SimpleAction.SimpleAction
instance (info ~ GI.Gio.Objects.SimpleAction.ResolveSimpleActionMethod t GI.Gio.Objects.SimpleAction.SimpleAction, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleAction.SimpleAction p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SimpleAction.SimpleAction -> p)
instance (info ~ GI.Gio.Objects.SimpleAction.ResolveSimpleActionMethod t GI.Gio.Objects.SimpleAction.SimpleAction, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleAction.SimpleAction p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SimpleAction.SimpleAction -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SimpleAction.SimpleActionEnabledPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SimpleAction.SimpleActionNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SimpleAction.SimpleActionParameterTypePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SimpleAction.SimpleActionStatePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SimpleAction.SimpleActionStateTypePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SimpleAction.SimpleAction
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.SimpleAction.SimpleActionActivateSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.SimpleAction.SimpleActionChangeStateSignalInfo
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAction.IsSimpleAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAction.SimpleActionSetEnabledMethodInfo a signature
instance (signature ~ (Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAction.IsSimpleAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAction.SimpleActionSetStateMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAction.IsSimpleAction a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAction.SimpleActionSetStateHintMethodInfo a signature
-- | SimpleActionGroup is a hash table filled with Action
-- objects, implementing the ActionGroup and ActionMap
-- interfaces.
module GI.Gio.Objects.SimpleActionGroup
newtype SimpleActionGroup
SimpleActionGroup :: (ManagedPtr SimpleActionGroup) -> SimpleActionGroup
class GObject o => IsSimpleActionGroup o
toSimpleActionGroup :: IsSimpleActionGroup o => o -> IO SimpleActionGroup
noSimpleActionGroup :: Maybe SimpleActionGroup
data SimpleActionGroupAddEntriesMethodInfo
-- | A convenience function for creating multiple SimpleAction
-- instances and adding them to the action group.
-- | Deprecated: (Since version 2.38)Use
-- actionMapAddActionEntries
simpleActionGroupAddEntries :: (HasCallStack, MonadIO m, IsSimpleActionGroup a) => a -> [ActionEntry] -> Ptr () -> m ()
data SimpleActionGroupInsertMethodInfo
-- | 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.
-- | Deprecated: (Since version 2.38)Use actionMapAddAction
simpleActionGroupInsert :: (HasCallStack, MonadIO m, IsSimpleActionGroup a, IsAction b) => a -> b -> m ()
data SimpleActionGroupLookupMethodInfo
-- | Looks up the action with the name actionName in the
-- group.
--
-- If no such action exists, returns Nothing.
-- | Deprecated: (Since version 2.38)Use
-- actionMapLookupAction
simpleActionGroupLookup :: (HasCallStack, MonadIO m, IsSimpleActionGroup a) => a -> Text -> m Action
-- | Creates a new, empty, SimpleActionGroup.
simpleActionGroupNew :: (HasCallStack, MonadIO m) => m SimpleActionGroup
data SimpleActionGroupRemoveMethodInfo
-- | Removes the named action from the action group.
--
-- If no action of this name is in the group then nothing happens.
-- | Deprecated: (Since version 2.38)Use
-- actionMapRemoveAction
simpleActionGroupRemove :: (HasCallStack, MonadIO m, IsSimpleActionGroup a) => a -> Text -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup a) => GI.Gio.Objects.SimpleActionGroup.IsSimpleActionGroup a
instance GI.Gio.Objects.SimpleActionGroup.IsSimpleActionGroup GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance GI.Gio.Interfaces.ActionGroup.IsActionGroup GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance GI.Gio.Interfaces.ActionMap.IsActionMap GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance (info ~ GI.Gio.Objects.SimpleActionGroup.ResolveSimpleActionGroupMethod t GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup -> p)
instance (info ~ GI.Gio.Objects.SimpleActionGroup.ResolveSimpleActionGroupMethod t GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SimpleActionGroup.SimpleActionGroup
instance (signature ~ ([GI.Gio.Structs.ActionEntry.ActionEntry] -> GHC.Ptr.Ptr () -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleActionGroup.IsSimpleActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleActionGroup.SimpleActionGroupAddEntriesMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleActionGroup.IsSimpleActionGroup a, GI.Gio.Interfaces.Action.IsAction b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleActionGroup.SimpleActionGroupInsertMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Interfaces.Action.Action), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleActionGroup.IsSimpleActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleActionGroup.SimpleActionGroupLookupMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleActionGroup.IsSimpleActionGroup a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleActionGroup.SimpleActionGroupRemoveMethodInfo a signature
module GI.Gio.Flags
-- | Various flags for the password.
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
-- | Flags for tlsDatabaseVerifyChain.
data TlsDatabaseVerifyFlags
-- | No verification flags
TlsDatabaseVerifyFlagsNone :: TlsDatabaseVerifyFlags
-- | Catch-all for unknown values
AnotherTlsDatabaseVerifyFlags :: Int -> TlsDatabaseVerifyFlags
-- | 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).
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 to define future TestDBus behaviour.
data TestDBusFlags
-- | No flags.
TestDBusFlagsNone :: TestDBusFlags
-- | Catch-all for unknown values
AnotherTestDBusFlags :: Int -> TestDBusFlags
-- | 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.
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 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.
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 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
-- | GResourceLookupFlags determine how resource path lookups are handled.
data ResourceLookupFlags
-- | No flags set.
ResourceLookupFlagsNone :: ResourceLookupFlags
-- | Catch-all for unknown values
AnotherResourceLookupFlags :: Int -> ResourceLookupFlags
-- | GResourceFlags give information about a particular file inside a
-- resource bundle.
data ResourceFlags
-- | No flags set.
ResourceFlagsNone :: ResourceFlags
-- | The file is compressed.
ResourceFlagsCompressed :: ResourceFlags
-- | Catch-all for unknown values
AnotherResourceFlags :: Int -> ResourceFlags
-- | 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 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
-- | Flags used when mounting a mount.
data MountMountFlags
-- | No flags set.
MountMountFlagsNone :: MountMountFlags
-- | Catch-all for unknown values
AnotherMountMountFlags :: Int -> MountMountFlags
-- | GIOStreamSpliceFlags determine how streams should be spliced.
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 querying a FileInfo.
data FileQueryInfoFlags
-- | No flags set.
FileQueryInfoFlagsNone :: FileQueryInfoFlags
-- | Don't follow symlinks.
FileQueryInfoFlagsNofollowSymlinks :: FileQueryInfoFlags
-- | Catch-all for unknown values
AnotherFileQueryInfoFlags :: Int -> FileQueryInfoFlags
-- | 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.44: 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.44.
FileMonitorFlagsWatchMoves :: FileMonitorFlags
-- | Catch-all for unknown values
AnotherFileMonitorFlags :: Int -> FileMonitorFlags
-- | Flags that can be used with
-- g_file_measure_disk_usage().
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 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 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 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 starting a drive.
data DriveStartFlags
-- | No flags set.
DriveStartFlagsNone :: DriveStartFlags
-- | Catch-all for unknown values
AnotherDriveStartFlags :: Int -> DriveStartFlags
-- | Flags passed to dBusConnectionRegisterSubtree.
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 subscribing to signals via
-- dBusConnectionSignalSubscribe.
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 used when creating a DBusServer.
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 sending GDBusMessages on a
-- DBusConnection.
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 constructing an instance of a DBusProxy derived
-- class.
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 <emphasis>invalidated
-- property</emphasis> will be (asynchronously) retrieved upon
-- receiving the <ulink
-- url="http://dbus.freedesktop.org/doc/dbus-specification.htmlstandard-interfaces-properties">PropertiesChanged</ulink>
-- 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 describing the access control of a D-Bus property.
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 a DBusObjectManagerClient.
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
-- | Message flags used in DBusMessage.
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 describing the behavior of a DBusInterfaceSkeleton
-- instance.
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
-- | Flags used when creating a new DBusConnection.
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
-- | Capabilities negotiated with the remote peer.
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 in dBusConnectionCall and similar APIs.
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
-- | Flags used when calling a converterConvert.
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 g_bus_watch_name().
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 in g_bus_own_name().
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
-- | Catch-all for unknown values
AnotherBusNameOwnerFlags :: Int -> BusNameOwnerFlags
-- | 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
-- | Catch-all for unknown values
AnotherAskPasswordFlags :: Int -> AskPasswordFlags
-- | Flags used to define the behaviour of a Application.
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
-- | Catch-all for unknown values
AnotherApplicationFlags :: Int -> ApplicationFlags
-- | 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
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.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.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
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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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
-- | DtlsClientConnection is the client-side subclass of
-- DtlsConnection, representing a client-side DTLS connection.
module GI.Gio.Interfaces.DtlsClientConnection
newtype DtlsClientConnection
DtlsClientConnection :: (ManagedPtr DtlsClientConnection) -> DtlsClientConnection
noDtlsClientConnection :: Maybe DtlsClientConnection
class GObject o => IsDtlsClientConnection o
toDtlsClientConnection :: IsDtlsClientConnection o => o -> IO DtlsClientConnection
data DtlsClientConnectionGetAcceptedCasMethodInfo
-- | 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.
dtlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m [ByteString]
data DtlsClientConnectionGetServerIdentityMethodInfo
-- | Gets conn's expected server identity
dtlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> m SocketConnectable
data DtlsClientConnectionGetValidationFlagsMethodInfo
-- | Gets conn's validation flags
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.
dtlsClientConnectionNew :: (HasCallStack, MonadIO m, IsDatagramBased a, IsSocketConnectable b) => a -> Maybe (b) -> m DtlsClientConnection
data DtlsClientConnectionSetServerIdentityMethodInfo
-- | 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.
dtlsClientConnectionSetServerIdentity :: (HasCallStack, MonadIO m, IsDtlsClientConnection a, IsSocketConnectable b) => a -> b -> m ()
data DtlsClientConnectionSetValidationFlagsMethodInfo
-- | Sets conn's validation flags, to override the default
-- set of checks performed when validating a server certificate. By
-- default, TlsCertificateFlagsValidateAll is used.
dtlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsDtlsClientConnection a) => a -> [TlsCertificateFlags] -> m ()
data DtlsClientConnectionAcceptedCasPropertyInfo
dtlsClientConnectionAcceptedCas :: AttrLabelProxy "acceptedCas"
getDtlsClientConnectionAcceptedCas :: (MonadIO m, IsDtlsClientConnection o) => o -> m [Ptr ()]
data DtlsClientConnectionServerIdentityPropertyInfo
constructDtlsClientConnectionServerIdentity :: (IsDtlsClientConnection o, IsSocketConnectable a) => a -> IO (GValueConstruct o)
dtlsClientConnectionServerIdentity :: AttrLabelProxy "serverIdentity"
getDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o) => o -> m SocketConnectable
setDtlsClientConnectionServerIdentity :: (MonadIO m, IsDtlsClientConnection o, IsSocketConnectable a) => o -> a -> m ()
data DtlsClientConnectionValidationFlagsPropertyInfo
constructDtlsClientConnectionValidationFlags :: (IsDtlsClientConnection o) => [TlsCertificateFlags] -> IO (GValueConstruct o)
dtlsClientConnectionValidationFlags :: AttrLabelProxy "validationFlags"
getDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> m [TlsCertificateFlags]
setDtlsClientConnectionValidationFlags :: (MonadIO m, IsDtlsClientConnection o) => o -> [TlsCertificateFlags] -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection a) => GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection a
instance GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance GI.Gio.Interfaces.DatagramBased.IsDatagramBased GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionAcceptedCasPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionServerIdentityPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionValidationFlagsPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection
instance (info ~ GI.Gio.Interfaces.DtlsClientConnection.ResolveDtlsClientConnectionMethod t GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection -> p)
instance (info ~ GI.Gio.Interfaces.DtlsClientConnection.ResolveDtlsClientConnectionMethod t GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnection -> p)
instance (signature ~ m [Data.ByteString.Internal.ByteString], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionGetAcceptedCasMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.SocketConnectable.SocketConnectable, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionGetServerIdentityMethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.TlsCertificateFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionGetValidationFlagsMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection a, GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionSetServerIdentityMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.TlsCertificateFlags] -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsClientConnection.IsDtlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsClientConnection.DtlsClientConnectionSetValidationFlagsMethodInfo a signature
-- | TlsClientConnection is the client-side subclass of
-- TlsConnection, representing a client-side TLS connection.
module GI.Gio.Interfaces.TlsClientConnection
newtype TlsClientConnection
TlsClientConnection :: (ManagedPtr TlsClientConnection) -> TlsClientConnection
noTlsClientConnection :: Maybe TlsClientConnection
class GObject o => IsTlsClientConnection o
toTlsClientConnection :: IsTlsClientConnection o => o -> IO TlsClientConnection
data TlsClientConnectionCopySessionStateMethodInfo
-- | 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.
tlsClientConnectionCopySessionState :: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsTlsClientConnection b) => a -> b -> m ()
data TlsClientConnectionGetAcceptedCasMethodInfo
-- | 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.
tlsClientConnectionGetAcceptedCas :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m [ByteString]
data TlsClientConnectionGetServerIdentityMethodInfo
-- | Gets conn's expected server identity
tlsClientConnectionGetServerIdentity :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m SocketConnectable
data TlsClientConnectionGetUseSsl3MethodInfo
-- | Gets whether conn will use SSL 3.0 rather than the
-- highest-supported version of TLS; see
-- tlsClientConnectionSetUseSsl3.
tlsClientConnectionGetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> m Bool
data TlsClientConnectionGetValidationFlagsMethodInfo
-- | Gets conn's validation flags
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.
tlsClientConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsSocketConnectable b) => a -> Maybe (b) -> m TlsClientConnection
data TlsClientConnectionSetServerIdentityMethodInfo
-- | 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.
tlsClientConnectionSetServerIdentity :: (HasCallStack, MonadIO m, IsTlsClientConnection a, IsSocketConnectable b) => a -> b -> m ()
data TlsClientConnectionSetUseSsl3MethodInfo
-- | If useSsl3 is True, this forces
-- conn to use SSL 3.0 rather than trying to properly
-- negotiate the right version of TLS or SSL to use. This can be used
-- when talking to servers that do not implement the fallbacks correctly
-- and which will therefore fail to handshake with a "modern" TLS
-- handshake attempt.
tlsClientConnectionSetUseSsl3 :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> Bool -> m ()
data TlsClientConnectionSetValidationFlagsMethodInfo
-- | Sets conn's validation flags, to override the default
-- set of checks performed when validating a server certificate. By
-- default, TlsCertificateFlagsValidateAll is used.
tlsClientConnectionSetValidationFlags :: (HasCallStack, MonadIO m, IsTlsClientConnection a) => a -> [TlsCertificateFlags] -> m ()
data TlsClientConnectionAcceptedCasPropertyInfo
getTlsClientConnectionAcceptedCas :: (MonadIO m, IsTlsClientConnection o) => o -> m [Ptr ()]
tlsClientConnectionAcceptedCas :: AttrLabelProxy "acceptedCas"
data TlsClientConnectionServerIdentityPropertyInfo
constructTlsClientConnectionServerIdentity :: (IsTlsClientConnection o, IsSocketConnectable a) => a -> IO (GValueConstruct o)
getTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o) => o -> m SocketConnectable
setTlsClientConnectionServerIdentity :: (MonadIO m, IsTlsClientConnection o, IsSocketConnectable a) => o -> a -> m ()
tlsClientConnectionServerIdentity :: AttrLabelProxy "serverIdentity"
data TlsClientConnectionUseSsl3PropertyInfo
constructTlsClientConnectionUseSsl3 :: (IsTlsClientConnection o) => Bool -> IO (GValueConstruct o)
getTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> m Bool
setTlsClientConnectionUseSsl3 :: (MonadIO m, IsTlsClientConnection o) => o -> Bool -> m ()
tlsClientConnectionUseSsl3 :: AttrLabelProxy "useSsl3"
data TlsClientConnectionValidationFlagsPropertyInfo
constructTlsClientConnectionValidationFlags :: (IsTlsClientConnection o) => [TlsCertificateFlags] -> IO (GValueConstruct o)
getTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> m [TlsCertificateFlags]
setTlsClientConnectionValidationFlags :: (MonadIO m, IsTlsClientConnection o) => o -> [TlsCertificateFlags] -> m ()
tlsClientConnectionValidationFlags :: AttrLabelProxy "validationFlags"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection a) => GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a
instance GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance GI.Gio.Objects.TlsConnection.IsTlsConnection GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance GI.Gio.Objects.IOStream.IsIOStream GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionAcceptedCasPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionServerIdentityPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionUseSsl3PropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionValidationFlagsPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection
instance (info ~ GI.Gio.Interfaces.TlsClientConnection.ResolveTlsClientConnectionMethod t GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection -> p)
instance (info ~ GI.Gio.Interfaces.TlsClientConnection.ResolveTlsClientConnectionMethod t GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.TlsClientConnection.TlsClientConnection -> p)
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionCopySessionStateMethodInfo a signature
instance (signature ~ m [Data.ByteString.Internal.ByteString], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionGetAcceptedCasMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.SocketConnectable.SocketConnectable, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionGetServerIdentityMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionGetUseSsl3MethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.TlsCertificateFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionGetValidationFlagsMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a, GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionSetServerIdentityMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionSetUseSsl3MethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.TlsCertificateFlags] -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.TlsClientConnection.IsTlsClientConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.TlsClientConnection.TlsClientConnectionSetValidationFlagsMethodInfo a signature
-- | 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 very close
-- to that of of a DBus bus name. Examples include:
-- "com.example.MyApp", "org.example.internal-apps.Calculator". 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:
--
-- -- /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. module GI.Gio.Structs.Resource newtype Resource Resource :: (ManagedPtr Resource) -> Resource noResource :: Maybe Resource data ResourceEnumerateChildrenMethodInfo -- | 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. resourceEnumerateChildren :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m [Text] data ResourceGetInfoMethodInfo -- | 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. 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. resourceLoad :: (HasCallStack, MonadIO m) => [Char] -> m Resource data ResourceLookupDataMethodInfo -- | 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. 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. resourceNewFromData :: (HasCallStack, MonadIO m) => Bytes -> m Resource data ResourceOpenStreamMethodInfo -- | 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. resourceOpenStream :: (HasCallStack, MonadIO m) => Resource -> Text -> [ResourceLookupFlags] -> m InputStream data ResourceRefMethodInfo -- | Atomically increments the reference count of resource -- by one. This function is MT-safe and may be called from any thread. resourceRef :: (HasCallStack, MonadIO m) => Resource -> m Resource data ResourceUnrefMethodInfo -- | 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. resourceUnref :: (HasCallStack, MonadIO m) => Resource -> m () instance Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.Resource.Resource instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.Resource.Resource instance (signature ~ (Data.Text.Internal.Text -> [GI.Gio.Flags.ResourceLookupFlags] -> m [Data.Text.Internal.Text]), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.Resource.ResourceEnumerateChildrenMethodInfo GI.Gio.Structs.Resource.Resource signature instance (signature ~ (Data.Text.Internal.Text -> [GI.Gio.Flags.ResourceLookupFlags] -> m (GHC.Word.Word64, GHC.Word.Word32)), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.Resource.ResourceGetInfoMethodInfo GI.Gio.Structs.Resource.Resource signature instance (signature ~ (Data.Text.Internal.Text -> [GI.Gio.Flags.ResourceLookupFlags] -> m GI.GLib.Structs.Bytes.Bytes), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.Resource.ResourceLookupDataMethodInfo GI.Gio.Structs.Resource.Resource signature instance (signature ~ (Data.Text.Internal.Text -> [GI.Gio.Flags.ResourceLookupFlags] -> m GI.Gio.Objects.InputStream.InputStream), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.Resource.ResourceOpenStreamMethodInfo GI.Gio.Structs.Resource.Resource signature instance (signature ~ m GI.Gio.Structs.Resource.Resource, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.Resource.ResourceRefMethodInfo GI.Gio.Structs.Resource.Resource signature instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.Resource.ResourceUnrefMethodInfo GI.Gio.Structs.Resource.Resource signature instance (info ~ GI.Gio.Structs.Resource.ResolveResourceMethod t GI.Gio.Structs.Resource.Resource, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.Resource.Resource p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.Resource.Resource -> p) instance (info ~ GI.Gio.Structs.Resource.ResolveResourceMethod t GI.Gio.Structs.Resource.Resource, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.Resource.Resource p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.Resource.Resource -> p) module GI.Gio.Enums catchTlsError :: IO a -> (TlsError -> GErrorMessage -> IO a) -> IO a handleTlsError :: (TlsError -> GErrorMessage -> IO a) -> IO a -> IO a catchResourceError :: IO a -> (ResourceError -> GErrorMessage -> IO a) -> IO a handleResourceError :: (ResourceError -> GErrorMessage -> IO a) -> IO a -> IO a catchResolverError :: IO a -> (ResolverError -> GErrorMessage -> IO a) -> IO a handleResolverError :: (ResolverError -> GErrorMessage -> IO a) -> IO a -> IO a catchIOErrorEnum :: IO a -> (IOErrorEnum -> GErrorMessage -> IO a) -> IO a handleIOErrorEnum :: (IOErrorEnum -> GErrorMessage -> IO a) -> IO a -> IO a catchDBusError :: IO a -> (DBusError -> GErrorMessage -> IO a) -> IO a handleDBusError :: (DBusError -> GErrorMessage -> IO a) -> IO a -> IO a -- | Used to select the type of data format to use for -- ZlibDecompressor and ZlibCompressor. 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 -- | 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. 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 -- | When to allow rehandshaking. See -- tlsConnectionSetRehandshakeMode. 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 -- | TlsInteractionResult is returned by various functions in -- TlsInteraction when finishing an interaction request. 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 -- | An error code used with G_TLS_ERROR in a GError -- returned from a TLS-related routine. data TlsError -- | No TLS provider is available TlsErrorUnavailable :: TlsError -- | Miscellaneous TLS error TlsErrorMisc :: TlsError -- | A certificate could not be parsed 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 -- | Catch-all for unknown values AnotherTlsError :: Int -> TlsError -- | Flags for g_tls_database_lookup_certificate_handle(), -- tlsDatabaseLookupCertificateIssuer, and -- tlsDatabaseLookupCertificatesIssuedBy. data TlsDatabaseLookupFlags -- | No lookup flags TlsDatabaseLookupFlagsNone :: TlsDatabaseLookupFlags -- | Restrict lookup to certificates that have a private key. TlsDatabaseLookupFlagsKeypair :: TlsDatabaseLookupFlags -- | Catch-all for unknown values AnotherTlsDatabaseLookupFlags :: Int -> TlsDatabaseLookupFlags -- | Flags for tlsInteractionRequestCertificate, -- tlsInteractionRequestCertificateAsync, and -- tlsInteractionInvokeRequestCertificate. data TlsCertificateRequestFlags -- | No flags TlsCertificateRequestFlagsNone :: TlsCertificateRequestFlags -- | Catch-all for unknown values AnotherTlsCertificateRequestFlags :: Int -> TlsCertificateRequestFlags -- | The client authentication mode for a TlsServerConnection. 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 used when creating a Socket. Some protocols may not -- implement all the socket types. 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 -- | 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. 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 -- | 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. 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 -- | The protocol family of a SocketAddress. (These values are -- identical to the system defines AF_INET, -- AF_INET6 and AF_UNIX, if available.) 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 SocketClient. See the -- SocketClient::event signal for more details. -- -- Additional values may be added to this type in the future. 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 -- | An error code used with G_RESOURCE_ERROR in a -- GError returned from a Resource routine. data ResourceError -- | no file was found at the requested path ResourceErrorNotFound :: ResourceError -- | unknown error ResourceErrorInternal :: ResourceError -- | Catch-all for unknown values AnotherResourceError :: Int -> ResourceError -- | 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. 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_RESOLVER_ERROR in a -- GError returned from a Resolver routine. 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 -- | 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 -- | Priority levels for GNotifications. 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 -- | The host's network connectivity state, as reported by -- NetworkMonitor. 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 -- | 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 -- | Flags for use with g_io_module_scope_new(). 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 -- | 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.
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
-- | 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
-- | 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
-- | 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.44.
FileMonitorEventRenamed :: FileMonitorEvent
-- | the file was moved into the monitored directory from another location
-- -- only sent if the FileMonitorFlagsWatchMoves flag is set.
-- Since: 2.44.
FileMonitorEventMovedIn :: FileMonitorEvent
-- | the file was moved out of the monitored directory to another location
-- -- only sent if the FileMonitorFlagsWatchMoves flag is set.
-- Since: 2.44
FileMonitorEventMovedOut :: FileMonitorEvent
-- | Catch-all for unknown values
AnotherFileMonitorEvent :: Int -> FileMonitorEvent
-- | 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
-- | 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
-- | GEmblemOrigin is used to add information about the origin of the
-- emblem to Emblem.
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
-- | Enumeration describing how a drive can be started/stopped.
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
-- | 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
-- | 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
-- | Message types used in DBusMessage.
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
-- | Header fields used in DBusMessage.
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
-- | Enumeration used to describe the byte order of a D-Bus message.
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
-- | Error codes for the G_DBUS_ERROR error domain.
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
-- | Enumeration describing different kinds of native credential types.
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
-- | Results returned from converterConvert.
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
-- | An enumeration for well-known message buses.
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
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.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.ZlibCompressorFormat
instance GHC.Classes.Ord GI.Gio.Enums.ZlibCompressorFormat
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.ZlibCompressorFormat
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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.BusType
instance GHC.Classes.Ord GI.Gio.Enums.BusType
instance Data.GI.Base.BasicTypes.BoxedEnum GI.Gio.Enums.BusType
-- | 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.
module GI.Gio.Interfaces.Converter
newtype Converter
Converter :: (ManagedPtr Converter) -> Converter
noConverter :: Maybe Converter
class GObject o => IsConverter o
toConverter :: IsConverter o => o -> IO Converter
data ConverterConvertMethodInfo
-- | 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).
converterConvert :: (HasCallStack, MonadIO m, IsConverter a) => a -> Maybe (ByteString) -> Maybe (ByteString) -> [ConverterFlags] -> m (ConverterResult, Word64, Word64)
data ConverterResetMethodInfo
-- | 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.
converterReset :: (HasCallStack, MonadIO m, IsConverter a) => a -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Converter.Converter
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.Converter.Converter a) => GI.Gio.Interfaces.Converter.IsConverter a
instance GI.Gio.Interfaces.Converter.IsConverter GI.Gio.Interfaces.Converter.Converter
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.Converter.Converter
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.Converter.Converter
instance (info ~ GI.Gio.Interfaces.Converter.ResolveConverterMethod t GI.Gio.Interfaces.Converter.Converter, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Converter.Converter p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.Converter.Converter -> p)
instance (info ~ GI.Gio.Interfaces.Converter.ResolveConverterMethod t GI.Gio.Interfaces.Converter.Converter, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Converter.Converter p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.Converter.Converter -> p)
instance (signature ~ (GHC.Base.Maybe Data.ByteString.Internal.ByteString -> GHC.Base.Maybe Data.ByteString.Internal.ByteString -> [GI.Gio.Flags.ConverterFlags] -> m (GI.Gio.Enums.ConverterResult, GHC.Word.Word64, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Converter.IsConverter a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Converter.ConverterConvertMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Converter.IsConverter a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Converter.ConverterResetMethodInfo a signature
-- | DtlsServerConnection is the server-side subclass of
-- DtlsConnection, representing a server-side DTLS connection.
module GI.Gio.Interfaces.DtlsServerConnection
newtype DtlsServerConnection
DtlsServerConnection :: (ManagedPtr DtlsServerConnection) -> DtlsServerConnection
noDtlsServerConnection :: Maybe DtlsServerConnection
class GObject o => IsDtlsServerConnection o
toDtlsServerConnection :: IsDtlsServerConnection o => o -> IO DtlsServerConnection
-- | Creates a new DtlsServerConnection wrapping
-- baseSocket.
dtlsServerConnectionNew :: (HasCallStack, MonadIO m, IsDatagramBased a, IsTlsCertificate b) => a -> Maybe (b) -> m DtlsServerConnection
data DtlsServerConnectionAuthenticationModePropertyInfo
constructDtlsServerConnectionAuthenticationMode :: (IsDtlsServerConnection o) => TlsAuthenticationMode -> IO (GValueConstruct o)
dtlsServerConnectionAuthenticationMode :: AttrLabelProxy "authenticationMode"
getDtlsServerConnectionAuthenticationMode :: (MonadIO m, IsDtlsServerConnection o) => o -> m TlsAuthenticationMode
setDtlsServerConnectionAuthenticationMode :: (MonadIO m, IsDtlsServerConnection o) => o -> TlsAuthenticationMode -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection a) => GI.Gio.Interfaces.DtlsServerConnection.IsDtlsServerConnection a
instance GI.Gio.Interfaces.DtlsServerConnection.IsDtlsServerConnection GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance GI.Gio.Interfaces.DatagramBased.IsDatagramBased GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnectionAuthenticationModePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection
instance (info ~ GI.Gio.Interfaces.DtlsServerConnection.ResolveDtlsServerConnectionMethod t GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection -> p)
instance (info ~ GI.Gio.Interfaces.DtlsServerConnection.ResolveDtlsServerConnectionMethod t GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DtlsServerConnection.DtlsServerConnection -> p)
-- | TlsServerConnection is the server-side subclass of
-- TlsConnection, representing a server-side TLS connection.
module GI.Gio.Interfaces.TlsServerConnection
newtype TlsServerConnection
TlsServerConnection :: (ManagedPtr TlsServerConnection) -> TlsServerConnection
noTlsServerConnection :: Maybe TlsServerConnection
class GObject o => IsTlsServerConnection o
toTlsServerConnection :: IsTlsServerConnection o => o -> IO 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.
tlsServerConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsTlsCertificate b) => a -> Maybe (b) -> m TlsServerConnection
data TlsServerConnectionAuthenticationModePropertyInfo
constructTlsServerConnectionAuthenticationMode :: (IsTlsServerConnection o) => TlsAuthenticationMode -> IO (GValueConstruct o)
getTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsAuthenticationMode
setTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> TlsAuthenticationMode -> m ()
tlsServerConnectionAuthenticationMode :: AttrLabelProxy "authenticationMode"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection a) => GI.Gio.Interfaces.TlsServerConnection.IsTlsServerConnection a
instance GI.Gio.Interfaces.TlsServerConnection.IsTlsServerConnection GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance GI.Gio.Objects.TlsConnection.IsTlsConnection GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance GI.Gio.Objects.IOStream.IsIOStream GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.TlsServerConnection.TlsServerConnectionAuthenticationModePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection
instance (info ~ GI.Gio.Interfaces.TlsServerConnection.ResolveTlsServerConnectionMethod t GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection -> p)
instance (info ~ GI.Gio.Interfaces.TlsServerConnection.ResolveTlsServerConnectionMethod t GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.TlsServerConnection.TlsServerConnection -> p)
-- | 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.
module GI.Gio.Objects.Credentials
newtype Credentials
Credentials :: (ManagedPtr Credentials) -> Credentials
class GObject o => IsCredentials o
toCredentials :: IsCredentials o => o -> IO Credentials
noCredentials :: Maybe Credentials
data CredentialsGetUnixPidMethodInfo
-- | 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.
credentialsGetUnixPid :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Int32
data CredentialsGetUnixUserMethodInfo
-- | 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.
credentialsGetUnixUser :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Word32
data CredentialsIsSameUserMethodInfo
-- | Checks if credentials and
-- otherCredentials is the same user.
--
-- This operation can fail if Credentials is not supported on the
-- the OS.
credentialsIsSameUser :: (HasCallStack, MonadIO m, IsCredentials a, IsCredentials b) => a -> b -> m ()
-- | Creates a new Credentials object with credentials matching the
-- the current process.
credentialsNew :: (HasCallStack, MonadIO m) => m Credentials
data CredentialsSetNativeMethodInfo
-- | 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.
credentialsSetNative :: (HasCallStack, MonadIO m, IsCredentials a) => a -> CredentialsType -> Ptr () -> m ()
data CredentialsSetUnixUserMethodInfo
-- | 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.
credentialsSetUnixUser :: (HasCallStack, MonadIO m, IsCredentials a) => a -> Word32 -> m ()
data CredentialsToStringMethodInfo
-- | 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.
credentialsToString :: (HasCallStack, MonadIO m, IsCredentials a) => a -> m Text
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Credentials.Credentials
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Credentials.Credentials a) => GI.Gio.Objects.Credentials.IsCredentials a
instance GI.Gio.Objects.Credentials.IsCredentials GI.Gio.Objects.Credentials.Credentials
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Credentials.Credentials
instance (info ~ GI.Gio.Objects.Credentials.ResolveCredentialsMethod t GI.Gio.Objects.Credentials.Credentials, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Credentials.Credentials p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Credentials.Credentials -> p)
instance (info ~ GI.Gio.Objects.Credentials.ResolveCredentialsMethod t GI.Gio.Objects.Credentials.Credentials, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Credentials.Credentials p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Credentials.Credentials -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Credentials.Credentials
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Credentials.IsCredentials a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Credentials.CredentialsGetUnixPidMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Credentials.IsCredentials a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Credentials.CredentialsGetUnixUserMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Credentials.IsCredentials a, GI.Gio.Objects.Credentials.IsCredentials b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Credentials.CredentialsIsSameUserMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.CredentialsType -> GHC.Ptr.Ptr () -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Credentials.IsCredentials a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Credentials.CredentialsSetNativeMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Credentials.IsCredentials a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Credentials.CredentialsSetUnixUserMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Credentials.IsCredentials a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Credentials.CredentialsToStringMethodInfo a signature
-- | A type for representing D-Bus messages that can be sent or received on
-- a DBusConnection.
module GI.Gio.Objects.DBusMessage
newtype DBusMessage
DBusMessage :: (ManagedPtr DBusMessage) -> DBusMessage
class GObject o => IsDBusMessage o
toDBusMessage :: IsDBusMessage o => o -> IO DBusMessage
noDBusMessage :: Maybe DBusMessage
-- | Utility function to calculate how many bytes are needed to completely
-- deserialize the D-Bus message stored at blob.
dBusMessageBytesNeeded :: (HasCallStack, MonadIO m) => ByteString -> m Int64
data DBusMessageCopyMethodInfo
-- | 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.
dBusMessageCopy :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessage
data DBusMessageGetArg0MethodInfo
-- | Convenience to get the first item in the body of
-- message.
dBusMessageGetArg0 :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetBodyMethodInfo
-- | Gets the body of a message.
dBusMessageGetBody :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m GVariant
data DBusMessageGetByteOrderMethodInfo
-- | Gets the byte order of message.
dBusMessageGetByteOrder :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessageByteOrder
data DBusMessageGetDestinationMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldDestination
-- header field.
dBusMessageGetDestination :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetErrorNameMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldErrorName
-- header field.
dBusMessageGetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetFlagsMethodInfo
-- | Gets the flags for message.
dBusMessageGetFlags :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m [DBusMessageFlags]
data DBusMessageGetHeaderMethodInfo
-- | Gets a header field on message.
dBusMessageGetHeader :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageHeaderField -> m GVariant
data DBusMessageGetHeaderFieldsMethodInfo
-- | Gets an array of all header fields on message that are
-- set.
dBusMessageGetHeaderFields :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m ByteString
data DBusMessageGetInterfaceMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldInterface
-- header field.
dBusMessageGetInterface :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetLockedMethodInfo
-- | 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.
dBusMessageGetLocked :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Bool
data DBusMessageGetMemberMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldMember header
-- field.
dBusMessageGetMember :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetMessageTypeMethodInfo
-- | Gets the type of message.
dBusMessageGetMessageType :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessageType
data DBusMessageGetNumUnixFdsMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldNumUnixFds
-- header field.
dBusMessageGetNumUnixFds :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32
data DBusMessageGetPathMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldPath header
-- field.
dBusMessageGetPath :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetReplySerialMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldReplySerial
-- header field.
dBusMessageGetReplySerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32
data DBusMessageGetSenderMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldSender header
-- field.
dBusMessageGetSender :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetSerialMethodInfo
-- | Gets the serial for message.
dBusMessageGetSerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Word32
data DBusMessageGetSignatureMethodInfo
-- | Convenience getter for the DBusMessageHeaderFieldSignature
-- header field.
dBusMessageGetSignature :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m Text
data DBusMessageGetUnixFdListMethodInfo
-- | Gets the UNIX file descriptors associated with
-- message, if any.
--
-- This method is only available on UNIX.
dBusMessageGetUnixFdList :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m UnixFDList
data DBusMessageLockMethodInfo
-- | If message is locked, does nothing. Otherwise locks
-- the message.
dBusMessageLock :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m ()
-- | Creates a new empty DBusMessage.
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.
dBusMessageNewFromBlob :: (HasCallStack, MonadIO m) => ByteString -> [DBusCapabilityFlags] -> m DBusMessage
-- | Creates a new DBusMessage for a method call.
dBusMessageNewMethodCall :: (HasCallStack, MonadIO m) => Maybe (Text) -> Text -> Maybe (Text) -> Text -> m DBusMessage
data DBusMessageNewMethodErrorLiteralMethodInfo
-- | Creates a new DBusMessage that is an error reply to
-- methodCallMessage.
dBusMessageNewMethodErrorLiteral :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> Text -> m DBusMessage
data DBusMessageNewMethodReplyMethodInfo
-- | Creates a new DBusMessage that is a reply to
-- methodCallMessage.
dBusMessageNewMethodReply :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m DBusMessage
-- | Creates a new DBusMessage for a signal emission.
dBusMessageNewSignal :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> m DBusMessage
data DBusMessagePrintMethodInfo
-- | 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
dBusMessagePrint :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m Text
data DBusMessageSetBodyMethodInfo
-- | 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.
dBusMessageSetBody :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> GVariant -> m ()
data DBusMessageSetByteOrderMethodInfo
-- | Sets the byte order of message.
dBusMessageSetByteOrder :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageByteOrder -> m ()
data DBusMessageSetDestinationMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldDestination
-- header field.
dBusMessageSetDestination :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> m ()
data DBusMessageSetErrorNameMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldErrorName
-- header field.
dBusMessageSetErrorName :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> m ()
data DBusMessageSetFlagsMethodInfo
-- | Sets the flags to set on message.
dBusMessageSetFlags :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> [DBusMessageFlags] -> m ()
data DBusMessageSetHeaderMethodInfo
-- | Sets a header field on message.
--
-- If value is floating, message assumes
-- ownership of value.
dBusMessageSetHeader :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageHeaderField -> Maybe (GVariant) -> m ()
data DBusMessageSetInterfaceMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldInterface
-- header field.
dBusMessageSetInterface :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> m ()
data DBusMessageSetMemberMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldMember header
-- field.
dBusMessageSetMember :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> m ()
data DBusMessageSetMessageTypeMethodInfo
-- | Sets message to be of type.
dBusMessageSetMessageType :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> DBusMessageType -> m ()
data DBusMessageSetNumUnixFdsMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldNumUnixFds
-- header field.
dBusMessageSetNumUnixFds :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m ()
data DBusMessageSetPathMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldPath header
-- field.
dBusMessageSetPath :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> m ()
data DBusMessageSetReplySerialMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldReplySerial
-- header field.
dBusMessageSetReplySerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m ()
data DBusMessageSetSenderMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldSender header
-- field.
dBusMessageSetSender :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> m ()
data DBusMessageSetSerialMethodInfo
-- | Sets the serial for message.
dBusMessageSetSerial :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Word32 -> m ()
data DBusMessageSetSignatureMethodInfo
-- | Convenience setter for the DBusMessageHeaderFieldSignature
-- header field.
dBusMessageSetSignature :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> Text -> m ()
data DBusMessageSetUnixFdListMethodInfo
-- | 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.
dBusMessageSetUnixFdList :: (HasCallStack, MonadIO m, IsDBusMessage a, IsUnixFDList b) => a -> Maybe (b) -> m ()
data DBusMessageToBlobMethodInfo
-- | Serializes message to a blob. The byte order returned
-- by dBusMessageGetByteOrder will be used.
dBusMessageToBlob :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> [DBusCapabilityFlags] -> m ByteString
data DBusMessageToGerrorMethodInfo
-- | 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.
dBusMessageToGerror :: (HasCallStack, MonadIO m, IsDBusMessage a) => a -> m ()
data DBusMessageLockedPropertyInfo
dBusMessageLocked :: AttrLabelProxy "locked"
getDBusMessageLocked :: (MonadIO m, IsDBusMessage o) => o -> m Bool
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusMessage.DBusMessage
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusMessage.DBusMessage a) => GI.Gio.Objects.DBusMessage.IsDBusMessage a
instance GI.Gio.Objects.DBusMessage.IsDBusMessage GI.Gio.Objects.DBusMessage.DBusMessage
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusMessage.DBusMessage
instance (info ~ GI.Gio.Objects.DBusMessage.ResolveDBusMessageMethod t GI.Gio.Objects.DBusMessage.DBusMessage, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusMessage.DBusMessage p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusMessage.DBusMessage -> p)
instance (info ~ GI.Gio.Objects.DBusMessage.ResolveDBusMessageMethod t GI.Gio.Objects.DBusMessage.DBusMessage, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusMessage.DBusMessage p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusMessage.DBusMessage -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusMessage.DBusMessageLockedPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusMessage.DBusMessage
instance (signature ~ m GI.Gio.Objects.DBusMessage.DBusMessage, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageCopyMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetArg0MethodInfo a signature
instance (signature ~ m Data.GI.Base.BasicTypes.GVariant, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetBodyMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.DBusMessageByteOrder, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetByteOrderMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetDestinationMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetErrorNameMethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.DBusMessageFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetFlagsMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.DBusMessageHeaderField -> m Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetHeaderMethodInfo a signature
instance (signature ~ m Data.ByteString.Internal.ByteString, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetHeaderFieldsMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetInterfaceMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetLockedMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetMemberMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.DBusMessageType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetMessageTypeMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetNumUnixFdsMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetPathMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetReplySerialMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetSenderMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetSerialMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetSignatureMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.UnixFDList.UnixFDList, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageGetUnixFdListMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageLockMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> m GI.Gio.Objects.DBusMessage.DBusMessage), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageNewMethodErrorLiteralMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.DBusMessage.DBusMessage, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageNewMethodReplyMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessagePrintMethodInfo a signature
instance (signature ~ (Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetBodyMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.DBusMessageByteOrder -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetByteOrderMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetDestinationMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetErrorNameMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.DBusMessageFlags] -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetFlagsMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.DBusMessageHeaderField -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetHeaderMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetInterfaceMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetMemberMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.DBusMessageType -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetMessageTypeMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetNumUnixFdsMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetPathMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetReplySerialMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetSenderMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetSerialMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetSignatureMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a, GI.Gio.Objects.UnixFDList.IsUnixFDList b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageSetUnixFdListMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.DBusCapabilityFlags] -> m Data.ByteString.Internal.ByteString), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageToBlobMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusMessage.IsDBusMessage a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusMessage.DBusMessageToGerrorMethodInfo a signature
-- | Data output stream implements OutputStream and includes
-- functions for writing data directly to an output stream.
module GI.Gio.Objects.DataOutputStream
newtype DataOutputStream
DataOutputStream :: (ManagedPtr DataOutputStream) -> DataOutputStream
class GObject o => IsDataOutputStream o
toDataOutputStream :: IsDataOutputStream o => o -> IO DataOutputStream
noDataOutputStream :: Maybe DataOutputStream
data DataOutputStreamGetByteOrderMethodInfo
-- | 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
data DataOutputStreamPutByteMethodInfo
-- | Puts a byte into the output stream.
dataOutputStreamPutByte :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word8 -> Maybe (b) -> m ()
data DataOutputStreamPutInt16MethodInfo
-- | Puts a signed 16-bit integer into the output stream.
dataOutputStreamPutInt16 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int16 -> Maybe (b) -> m ()
data DataOutputStreamPutInt32MethodInfo
-- | Puts a signed 32-bit integer into the output stream.
dataOutputStreamPutInt32 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int32 -> Maybe (b) -> m ()
data DataOutputStreamPutInt64MethodInfo
-- | Puts a signed 64-bit integer into the stream.
dataOutputStreamPutInt64 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Int64 -> Maybe (b) -> m ()
data DataOutputStreamPutStringMethodInfo
-- | Puts a string into the output stream.
dataOutputStreamPutString :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Text -> Maybe (b) -> m ()
data DataOutputStreamPutUint16MethodInfo
-- | Puts an unsigned 16-bit integer into the output stream.
dataOutputStreamPutUint16 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word16 -> Maybe (b) -> m ()
data DataOutputStreamPutUint32MethodInfo
-- | Puts an unsigned 32-bit integer into the stream.
dataOutputStreamPutUint32 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word32 -> Maybe (b) -> m ()
data DataOutputStreamPutUint64MethodInfo
-- | Puts an unsigned 64-bit integer into the stream.
dataOutputStreamPutUint64 :: (HasCallStack, MonadIO m, IsDataOutputStream a, IsCancellable b) => a -> Word64 -> Maybe (b) -> m ()
data DataOutputStreamSetByteOrderMethodInfo
-- | Sets the byte order of the data output stream to
-- order.
dataOutputStreamSetByteOrder :: (HasCallStack, MonadIO m, IsDataOutputStream a) => a -> DataStreamByteOrder -> m ()
data DataOutputStreamByteOrderPropertyInfo
constructDataOutputStreamByteOrder :: (IsDataOutputStream o) => DataStreamByteOrder -> IO (GValueConstruct o)
dataOutputStreamByteOrder :: AttrLabelProxy "byteOrder"
getDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> m DataStreamByteOrder
setDataOutputStreamByteOrder :: (MonadIO m, IsDataOutputStream o) => o -> DataStreamByteOrder -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DataOutputStream.DataOutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DataOutputStream.DataOutputStream a) => GI.Gio.Objects.DataOutputStream.IsDataOutputStream a
instance GI.Gio.Objects.DataOutputStream.IsDataOutputStream GI.Gio.Objects.DataOutputStream.DataOutputStream
instance GI.Gio.Objects.FilterOutputStream.IsFilterOutputStream GI.Gio.Objects.DataOutputStream.DataOutputStream
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Objects.DataOutputStream.DataOutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DataOutputStream.DataOutputStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.DataOutputStream.DataOutputStream
instance (info ~ GI.Gio.Objects.DataOutputStream.ResolveDataOutputStreamMethod t GI.Gio.Objects.DataOutputStream.DataOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DataOutputStream.DataOutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DataOutputStream.DataOutputStream -> p)
instance (info ~ GI.Gio.Objects.DataOutputStream.ResolveDataOutputStreamMethod t GI.Gio.Objects.DataOutputStream.DataOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DataOutputStream.DataOutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DataOutputStream.DataOutputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamByteOrderPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DataOutputStream.DataOutputStream
instance (signature ~ m GI.Gio.Enums.DataStreamByteOrder, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamGetByteOrderMethodInfo a signature
instance (signature ~ (GHC.Word.Word8 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutByteMethodInfo a signature
instance (signature ~ (GHC.Int.Int16 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutInt16MethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutInt32MethodInfo a signature
instance (signature ~ (GHC.Int.Int64 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutInt64MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutStringMethodInfo a signature
instance (signature ~ (GHC.Word.Word16 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutUint16MethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutUint32MethodInfo a signature
instance (signature ~ (GHC.Word.Word64 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamPutUint64MethodInfo a signature
instance (signature ~ (GI.Gio.Enums.DataStreamByteOrder -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataOutputStream.IsDataOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataOutputStream.DataOutputStreamSetByteOrderMethodInfo a signature
-- | 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
newtype Emblem
Emblem :: (ManagedPtr Emblem) -> Emblem
class GObject o => IsEmblem o
toEmblem :: IsEmblem o => o -> IO Emblem
noEmblem :: Maybe Emblem
data EmblemGetIconMethodInfo
-- | Gives back the icon from emblem.
emblemGetIcon :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m Icon
data EmblemGetOriginMethodInfo
-- | Gets the origin of the emblem.
emblemGetOrigin :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m EmblemOrigin
-- | Creates a new emblem for icon.
emblemNew :: (HasCallStack, MonadIO m, IsIcon a) => a -> m Emblem
-- | Creates a new emblem for icon.
emblemNewWithOrigin :: (HasCallStack, MonadIO m, IsIcon a) => a -> EmblemOrigin -> m Emblem
data EmblemIconPropertyInfo
constructEmblemIcon :: (IsEmblem o, IsObject a) => a -> IO (GValueConstruct o)
emblemIcon :: AttrLabelProxy "icon"
getEmblemIcon :: (MonadIO m, IsEmblem o) => o -> m (Maybe Object)
data EmblemOriginPropertyInfo
constructEmblemOrigin :: (IsEmblem o) => EmblemOrigin -> IO (GValueConstruct o)
emblemOrigin :: AttrLabelProxy "origin"
getEmblemOrigin :: (MonadIO m, IsEmblem o) => o -> m EmblemOrigin
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Emblem.Emblem
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Emblem.Emblem a) => GI.Gio.Objects.Emblem.IsEmblem a
instance GI.Gio.Objects.Emblem.IsEmblem GI.Gio.Objects.Emblem.Emblem
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Emblem.Emblem
instance GI.Gio.Interfaces.Icon.IsIcon GI.Gio.Objects.Emblem.Emblem
instance (info ~ GI.Gio.Objects.Emblem.ResolveEmblemMethod t GI.Gio.Objects.Emblem.Emblem, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Emblem.Emblem p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Emblem.Emblem -> p)
instance (info ~ GI.Gio.Objects.Emblem.ResolveEmblemMethod t GI.Gio.Objects.Emblem.Emblem, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Emblem.Emblem p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Emblem.Emblem -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Emblem.EmblemIconPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Emblem.EmblemOriginPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Emblem.Emblem
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Emblem.IsEmblem a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Emblem.EmblemGetIconMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.EmblemOrigin, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Emblem.IsEmblem a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Emblem.EmblemGetOriginMethodInfo a signature
-- | 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
newtype FileInfo
FileInfo :: (ManagedPtr FileInfo) -> FileInfo
class GObject o => IsFileInfo o
toFileInfo :: IsFileInfo o => o -> IO FileInfo
noFileInfo :: Maybe FileInfo
data FileInfoClearStatusMethodInfo
-- | Clears the status information from info.
fileInfoClearStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m ()
data FileInfoCopyIntoMethodInfo
-- | 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 ()
data FileInfoDupMethodInfo
-- | Duplicates a file info structure.
fileInfoDup :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m FileInfo
data FileInfoGetAttributeAsStringMethodInfo
-- | 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
data FileInfoGetAttributeBooleanMethodInfo
-- | 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
data FileInfoGetAttributeByteStringMethodInfo
-- | 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
data FileInfoGetAttributeDataMethodInfo
-- | Gets the attribute type, value and status for an attribute key.
fileInfoGetAttributeData :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
data FileInfoGetAttributeInt32MethodInfo
-- | 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
data FileInfoGetAttributeInt64MethodInfo
-- | 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
data FileInfoGetAttributeObjectMethodInfo
-- | 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
data FileInfoGetAttributeStatusMethodInfo
-- | Gets the attribute status for an attribute key.
fileInfoGetAttributeStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m FileAttributeStatus
data FileInfoGetAttributeStringMethodInfo
-- | 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
data FileInfoGetAttributeStringvMethodInfo
-- | Gets the value of a stringv attribute. If the attribute does not
-- contain a stringv, Nothing will be returned.
fileInfoGetAttributeStringv :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m [Text]
data FileInfoGetAttributeTypeMethodInfo
-- | Gets the attribute type for an attribute key.
fileInfoGetAttributeType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m FileAttributeType
data FileInfoGetAttributeUint32MethodInfo
-- | 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
data FileInfoGetAttributeUint64MethodInfo
-- | 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
data FileInfoGetContentTypeMethodInfo
-- | Gets the file's content type.
fileInfoGetContentType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text
data FileInfoGetDeletionDateMethodInfo
-- | 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.
fileInfoGetDeletionDate :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m DateTime
data FileInfoGetDisplayNameMethodInfo
-- | Gets a display name for a file.
fileInfoGetDisplayName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text
data FileInfoGetEditNameMethodInfo
-- | Gets the edit name for a file.
fileInfoGetEditName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text
data FileInfoGetEtagMethodInfo
-- | Gets the [entity tag][gfile-etag] for a given FileInfo. See
-- FILE_ATTRIBUTE_ETAG_VALUE.
fileInfoGetEtag :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text
data FileInfoGetFileTypeMethodInfo
-- | 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
data FileInfoGetIconMethodInfo
-- | Gets the icon for a file.
fileInfoGetIcon :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Icon
data FileInfoGetIsBackupMethodInfo
-- | Checks if a file is a backup file.
fileInfoGetIsBackup :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool
data FileInfoGetIsHiddenMethodInfo
-- | Checks if a file is hidden.
fileInfoGetIsHidden :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool
data FileInfoGetIsSymlinkMethodInfo
-- | Checks if a file is a symlink.
fileInfoGetIsSymlink :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Bool
data FileInfoGetModificationTimeMethodInfo
-- | Gets the modification time of the current info and
-- sets it in result.
fileInfoGetModificationTime :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m (TimeVal)
data FileInfoGetNameMethodInfo
-- | Gets the name for a file.
fileInfoGetName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m [Char]
data FileInfoGetSizeMethodInfo
-- | Gets the file's size.
fileInfoGetSize :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Int64
data FileInfoGetSortOrderMethodInfo
-- | 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
data FileInfoGetSymbolicIconMethodInfo
-- | Gets the symbolic icon for a file.
fileInfoGetSymbolicIcon :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Icon
data FileInfoGetSymlinkTargetMethodInfo
-- | Gets the symlink target for a given FileInfo.
fileInfoGetSymlinkTarget :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m Text
data FileInfoHasAttributeMethodInfo
-- | Checks if a file info structure has an attribute named
-- attribute.
fileInfoHasAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Bool
data FileInfoHasNamespaceMethodInfo
-- | Checks if a file info structure has an attribute in the specified
-- nameSpace.
fileInfoHasNamespace :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m Bool
data FileInfoListAttributesMethodInfo
-- | 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
data FileInfoRemoveAttributeMethodInfo
-- | Removes all cases of attribute from
-- info if it exists.
fileInfoRemoveAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()
data FileInfoSetAttributeMethodInfo
-- | Sets the attribute to contain the given value, if
-- possible. To unset the attribute, use
-- G_ATTRIBUTE_TYPE_INVALID for type.
fileInfoSetAttribute :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> FileAttributeType -> Ptr () -> m ()
data FileInfoSetAttributeBooleanMethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeBoolean :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Bool -> m ()
data FileInfoSetAttributeByteStringMethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeByteString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Text -> m ()
data FileInfoSetAttributeInt32MethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeInt32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Int32 -> m ()
data FileInfoSetAttributeInt64MethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeInt64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Int64 -> m ()
data FileInfoSetAttributeMaskMethodInfo
-- | Sets mask on info to match specific
-- attribute types.
fileInfoSetAttributeMask :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> FileAttributeMatcher -> m ()
data FileInfoSetAttributeObjectMethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeObject :: (HasCallStack, MonadIO m, IsFileInfo a, IsObject b) => a -> Text -> b -> m ()
data FileInfoSetAttributeStatusMethodInfo
-- | 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.
fileInfoSetAttributeStatus :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> FileAttributeStatus -> m Bool
data FileInfoSetAttributeStringMethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeString :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Text -> m ()
data FileInfoSetAttributeStringvMethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
--
-- Sinze: 2.22
fileInfoSetAttributeStringv :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Ptr CString -> m ()
data FileInfoSetAttributeUint32MethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeUint32 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Word32 -> m ()
data FileInfoSetAttributeUint64MethodInfo
-- | Sets the attribute to contain the given
-- attrValue, if possible.
fileInfoSetAttributeUint64 :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> Word64 -> m ()
data FileInfoSetContentTypeMethodInfo
-- | Sets the content type attribute for a given FileInfo. See
-- FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.
fileInfoSetContentType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()
data FileInfoSetDisplayNameMethodInfo
-- | Sets the display name for the current FileInfo. See
-- FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.
fileInfoSetDisplayName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()
data FileInfoSetEditNameMethodInfo
-- | Sets the edit name for the current file. See
-- FILE_ATTRIBUTE_STANDARD_EDIT_NAME.
fileInfoSetEditName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Text -> m ()
data FileInfoSetFileTypeMethodInfo
-- | Sets the file type in a FileInfo to type. See
-- FILE_ATTRIBUTE_STANDARD_TYPE.
fileInfoSetFileType :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> FileType -> m ()
data FileInfoSetIconMethodInfo
-- | Sets the icon for a given FileInfo. See
-- FILE_ATTRIBUTE_STANDARD_ICON.
fileInfoSetIcon :: (HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) => a -> b -> m ()
data FileInfoSetIsHiddenMethodInfo
-- | 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 ()
data FileInfoSetIsSymlinkMethodInfo
-- | 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 ()
data FileInfoSetModificationTimeMethodInfo
-- | 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 ()
data FileInfoSetNameMethodInfo
-- | Sets the name attribute for the current FileInfo. See
-- FILE_ATTRIBUTE_STANDARD_NAME.
fileInfoSetName :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> [Char] -> m ()
data FileInfoSetSizeMethodInfo
-- | Sets the FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file
-- info to the given size.
fileInfoSetSize :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> Int64 -> m ()
data FileInfoSetSortOrderMethodInfo
-- | 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 ()
data FileInfoSetSymbolicIconMethodInfo
-- | Sets the symbolic icon for a given FileInfo. See
-- FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.
fileInfoSetSymbolicIcon :: (HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) => a -> b -> m ()
data FileInfoSetSymlinkTargetMethodInfo
-- | 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 ()
data FileInfoUnsetAttributeMaskMethodInfo
-- | Unsets a mask set by fileInfoSetAttributeMask, if one is set.
fileInfoUnsetAttributeMask :: (HasCallStack, MonadIO m, IsFileInfo a) => a -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileInfo.FileInfo
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.FileInfo.FileInfo a) => GI.Gio.Objects.FileInfo.IsFileInfo a
instance GI.Gio.Objects.FileInfo.IsFileInfo GI.Gio.Objects.FileInfo.FileInfo
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.FileInfo.FileInfo
instance (info ~ GI.Gio.Objects.FileInfo.ResolveFileInfoMethod t GI.Gio.Objects.FileInfo.FileInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileInfo.FileInfo p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.FileInfo.FileInfo -> p)
instance (info ~ GI.Gio.Objects.FileInfo.ResolveFileInfoMethod t GI.Gio.Objects.FileInfo.FileInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileInfo.FileInfo p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.FileInfo.FileInfo -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.FileInfo.FileInfo
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoClearStatusMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a, GI.Gio.Objects.FileInfo.IsFileInfo b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoCopyIntoMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.FileInfo.FileInfo, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoDupMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeAsStringMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeBooleanMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeByteStringMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m (GHC.Types.Bool, GI.Gio.Enums.FileAttributeType, GHC.Ptr.Ptr (), GI.Gio.Enums.FileAttributeStatus)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeDataMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeInt32MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeInt64MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.GObject.Objects.Object.Object), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeObjectMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Enums.FileAttributeStatus), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeStatusMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeStringMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m [Data.Text.Internal.Text]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeStringvMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Enums.FileAttributeType), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeTypeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeUint32MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Word.Word64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetAttributeUint64MethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetContentTypeMethodInfo a signature
instance (signature ~ m GI.GLib.Structs.DateTime.DateTime, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetDeletionDateMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetDisplayNameMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetEditNameMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetEtagMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.FileType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetFileTypeMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetIconMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetIsBackupMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetIsHiddenMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetIsSymlinkMethodInfo a signature
instance (signature ~ m GI.GLib.Structs.TimeVal.TimeVal, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetModificationTimeMethodInfo a signature
instance (signature ~ m [GHC.Types.Char], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetNameMethodInfo a signature
instance (signature ~ m GHC.Int.Int64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetSizeMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetSortOrderMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetSymbolicIconMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoGetSymlinkTargetMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoHasAttributeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoHasNamespaceMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> m (GHC.Base.Maybe [Data.Text.Internal.Text])), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoListAttributesMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoRemoveAttributeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GI.Gio.Enums.FileAttributeType -> GHC.Ptr.Ptr () -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeBooleanMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeByteStringMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeInt32MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int64 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeInt64MethodInfo a signature
instance (signature ~ (GI.Gio.Structs.FileAttributeMatcher.FileAttributeMatcher -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeMaskMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a, GI.GObject.Objects.Object.IsObject b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeObjectMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GI.Gio.Enums.FileAttributeStatus -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeStatusMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeStringMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Ptr.Ptr Foreign.C.String.CString -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeStringvMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeUint32MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Word.Word64 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetAttributeUint64MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetContentTypeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetDisplayNameMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetEditNameMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.FileType -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetFileTypeMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a, GI.Gio.Interfaces.Icon.IsIcon b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetIconMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetIsHiddenMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetIsSymlinkMethodInfo a signature
instance (signature ~ (GI.GLib.Structs.TimeVal.TimeVal -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetModificationTimeMethodInfo a signature
instance (signature ~ ([GHC.Types.Char] -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetNameMethodInfo a signature
instance (signature ~ (GHC.Int.Int64 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetSizeMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetSortOrderMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a, GI.Gio.Interfaces.Icon.IsIcon b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetSymbolicIconMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoSetSymlinkTargetMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInfo.IsFileInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInfo.FileInfoUnsetAttributeMaskMethodInfo a signature
-- | 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
newtype FileMonitor
FileMonitor :: (ManagedPtr FileMonitor) -> FileMonitor
class GObject o => IsFileMonitor o
toFileMonitor :: IsFileMonitor o => o -> IO FileMonitor
noFileMonitor :: Maybe FileMonitor
data FileMonitorCancelMethodInfo
-- | Cancels a file monitor.
fileMonitorCancel :: (HasCallStack, MonadIO m, IsFileMonitor a) => a -> m Bool
data FileMonitorEmitEventMethodInfo
-- | 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 ()
data FileMonitorIsCancelledMethodInfo
-- | Returns whether the monitor is canceled.
fileMonitorIsCancelled :: (HasCallStack, MonadIO m, IsFileMonitor a) => a -> m Bool
data FileMonitorSetRateLimitMethodInfo
-- | 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 ()
data FileMonitorCancelledPropertyInfo
fileMonitorCancelled :: AttrLabelProxy "cancelled"
getFileMonitorCancelled :: (MonadIO m, IsFileMonitor o) => o -> m Bool
data FileMonitorRateLimitPropertyInfo
constructFileMonitorRateLimit :: (IsFileMonitor o) => Int32 -> IO (GValueConstruct o)
fileMonitorRateLimit :: AttrLabelProxy "rateLimit"
getFileMonitorRateLimit :: (MonadIO m, IsFileMonitor o) => o -> m Int32
setFileMonitorRateLimit :: (MonadIO m, IsFileMonitor o) => o -> Int32 -> m ()
type C_FileMonitorChangedCallback = Ptr () -> Ptr File -> Ptr File -> CUInt -> Ptr () -> IO ()
type FileMonitorChangedCallback = File -> Maybe File -> FileMonitorEvent -> IO ()
data FileMonitorChangedSignalInfo
afterFileMonitorChanged :: (IsFileMonitor a, MonadIO m) => a -> FileMonitorChangedCallback -> m SignalHandlerId
genClosure_FileMonitorChanged :: FileMonitorChangedCallback -> IO Closure
mk_FileMonitorChangedCallback :: C_FileMonitorChangedCallback -> IO (FunPtr C_FileMonitorChangedCallback)
noFileMonitorChangedCallback :: Maybe FileMonitorChangedCallback
onFileMonitorChanged :: (IsFileMonitor a, MonadIO m) => a -> FileMonitorChangedCallback -> m SignalHandlerId
wrap_FileMonitorChangedCallback :: FileMonitorChangedCallback -> Ptr () -> Ptr File -> Ptr File -> CUInt -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileMonitor.FileMonitor
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.FileMonitor.FileMonitor a) => GI.Gio.Objects.FileMonitor.IsFileMonitor a
instance GI.Gio.Objects.FileMonitor.IsFileMonitor GI.Gio.Objects.FileMonitor.FileMonitor
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.FileMonitor.FileMonitor
instance (info ~ GI.Gio.Objects.FileMonitor.ResolveFileMonitorMethod t GI.Gio.Objects.FileMonitor.FileMonitor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileMonitor.FileMonitor p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.FileMonitor.FileMonitor -> p)
instance (info ~ GI.Gio.Objects.FileMonitor.ResolveFileMonitorMethod t GI.Gio.Objects.FileMonitor.FileMonitor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileMonitor.FileMonitor p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.FileMonitor.FileMonitor -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.FileMonitor.FileMonitorCancelledPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.FileMonitor.FileMonitorRateLimitPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.FileMonitor.FileMonitor
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.FileMonitor.FileMonitorChangedSignalInfo
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileMonitor.IsFileMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileMonitor.FileMonitorCancelMethodInfo a signature
instance (signature ~ (b -> c -> GI.Gio.Enums.FileMonitorEvent -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileMonitor.IsFileMonitor a, GI.Gio.Interfaces.File.IsFile b, GI.Gio.Interfaces.File.IsFile c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileMonitor.FileMonitorEmitEventMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileMonitor.IsFileMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileMonitor.FileMonitorIsCancelledMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileMonitor.IsFileMonitor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileMonitor.FileMonitorSetRateLimitMethodInfo a signature
-- | 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
newtype InetAddress
InetAddress :: (ManagedPtr InetAddress) -> InetAddress
class GObject o => IsInetAddress o
toInetAddress :: IsInetAddress o => o -> IO InetAddress
noInetAddress :: Maybe InetAddress
data InetAddressEqualMethodInfo
-- | Checks if two InetAddress instances are equal, e.g. the same
-- address.
inetAddressEqual :: (HasCallStack, MonadIO m, IsInetAddress a, IsInetAddress b) => a -> b -> m Bool
data InetAddressGetFamilyMethodInfo
-- | Gets address's family
inetAddressGetFamily :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m SocketFamily
data InetAddressGetIsAnyMethodInfo
-- | Tests whether address is the "any" address for its
-- family.
inetAddressGetIsAny :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsLinkLocalMethodInfo
-- | 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).
inetAddressGetIsLinkLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsLoopbackMethodInfo
-- | Tests whether address is the loopback address for its
-- family.
inetAddressGetIsLoopback :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsMcGlobalMethodInfo
-- | Tests whether address is a global multicast address.
inetAddressGetIsMcGlobal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsMcLinkLocalMethodInfo
-- | Tests whether address is a link-local multicast
-- address.
inetAddressGetIsMcLinkLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsMcNodeLocalMethodInfo
-- | Tests whether address is a node-local multicast
-- address.
inetAddressGetIsMcNodeLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsMcOrgLocalMethodInfo
-- | Tests whether address is an organization-local
-- multicast address.
inetAddressGetIsMcOrgLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsMcSiteLocalMethodInfo
-- | Tests whether address is a site-local multicast
-- address.
inetAddressGetIsMcSiteLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsMulticastMethodInfo
-- | Tests whether address is a multicast address.
inetAddressGetIsMulticast :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetIsSiteLocalMethodInfo
-- | 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).
inetAddressGetIsSiteLocal :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Bool
data InetAddressGetNativeSizeMethodInfo
-- | 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().
inetAddressGetNativeSize :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Word64
-- | Creates a InetAddress for the "any" address (unassigned/"don't
-- care") for family.
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.
inetAddressNewFromBytes :: (HasCallStack, MonadIO m) => Ptr Word8 -> SocketFamily -> m InetAddress
-- | Parses string as an IP address and creates a new
-- InetAddress.
inetAddressNewFromString :: (HasCallStack, MonadIO m) => Text -> m InetAddress
-- | Creates a InetAddress for the loopback address for
-- family.
inetAddressNewLoopback :: (HasCallStack, MonadIO m) => SocketFamily -> m InetAddress
data InetAddressToStringMethodInfo
-- | Converts address to string form.
inetAddressToString :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> m Text
data InetAddressBytesPropertyInfo
constructInetAddressBytes :: (IsInetAddress o) => Ptr () -> IO (GValueConstruct o)
getInetAddressBytes :: (MonadIO m, IsInetAddress o) => o -> m (Ptr ())
inetAddressBytes :: AttrLabelProxy "bytes"
data InetAddressFamilyPropertyInfo
constructInetAddressFamily :: (IsInetAddress o) => SocketFamily -> IO (GValueConstruct o)
getInetAddressFamily :: (MonadIO m, IsInetAddress o) => o -> m SocketFamily
inetAddressFamily :: AttrLabelProxy "family"
data InetAddressIsAnyPropertyInfo
getInetAddressIsAny :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsAny :: AttrLabelProxy "isAny"
data InetAddressIsLinkLocalPropertyInfo
getInetAddressIsLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsLinkLocal :: AttrLabelProxy "isLinkLocal"
data InetAddressIsLoopbackPropertyInfo
getInetAddressIsLoopback :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsLoopback :: AttrLabelProxy "isLoopback"
data InetAddressIsMcGlobalPropertyInfo
getInetAddressIsMcGlobal :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsMcGlobal :: AttrLabelProxy "isMcGlobal"
data InetAddressIsMcLinkLocalPropertyInfo
getInetAddressIsMcLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsMcLinkLocal :: AttrLabelProxy "isMcLinkLocal"
data InetAddressIsMcNodeLocalPropertyInfo
getInetAddressIsMcNodeLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsMcNodeLocal :: AttrLabelProxy "isMcNodeLocal"
data InetAddressIsMcOrgLocalPropertyInfo
getInetAddressIsMcOrgLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsMcOrgLocal :: AttrLabelProxy "isMcOrgLocal"
data InetAddressIsMcSiteLocalPropertyInfo
getInetAddressIsMcSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsMcSiteLocal :: AttrLabelProxy "isMcSiteLocal"
data InetAddressIsMulticastPropertyInfo
getInetAddressIsMulticast :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsMulticast :: AttrLabelProxy "isMulticast"
data InetAddressIsSiteLocalPropertyInfo
getInetAddressIsSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
inetAddressIsSiteLocal :: AttrLabelProxy "isSiteLocal"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InetAddress.InetAddress
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.InetAddress.InetAddress a) => GI.Gio.Objects.InetAddress.IsInetAddress a
instance GI.Gio.Objects.InetAddress.IsInetAddress GI.Gio.Objects.InetAddress.InetAddress
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.InetAddress.InetAddress
instance (info ~ GI.Gio.Objects.InetAddress.ResolveInetAddressMethod t GI.Gio.Objects.InetAddress.InetAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InetAddress.InetAddress p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.InetAddress.InetAddress -> p)
instance (info ~ GI.Gio.Objects.InetAddress.ResolveInetAddressMethod t GI.Gio.Objects.InetAddress.InetAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InetAddress.InetAddress p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.InetAddress.InetAddress -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressBytesPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressFamilyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsAnyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsLinkLocalPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsLoopbackPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsMcGlobalPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsMcLinkLocalPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsMcNodeLocalPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsMcOrgLocalPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsMcSiteLocalPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsMulticastPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddress.InetAddressIsSiteLocalPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.InetAddress.InetAddress
instance (signature ~ (b -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a, GI.Gio.Objects.InetAddress.IsInetAddress b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressEqualMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketFamily, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetFamilyMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsAnyMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsLinkLocalMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsLoopbackMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsMcGlobalMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsMcLinkLocalMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsMcNodeLocalMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsMcOrgLocalMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsMcSiteLocalMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsMulticastMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetIsSiteLocalMethodInfo a signature
instance (signature ~ m GHC.Word.Word64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressGetNativeSizeMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddress.IsInetAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddress.InetAddressToStringMethodInfo a signature
-- | 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".
module GI.Gio.Objects.InetAddressMask
newtype InetAddressMask
InetAddressMask :: (ManagedPtr InetAddressMask) -> InetAddressMask
class GObject o => IsInetAddressMask o
toInetAddressMask :: IsInetAddressMask o => o -> IO InetAddressMask
noInetAddressMask :: Maybe InetAddressMask
data InetAddressMaskEqualMethodInfo
-- | Tests if mask and mask2 are the same
-- mask.
inetAddressMaskEqual :: (HasCallStack, MonadIO m, IsInetAddressMask a, IsInetAddressMask b) => a -> b -> m Bool
data InetAddressMaskGetAddressMethodInfo
-- | Gets mask's base address
inetAddressMaskGetAddress :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m InetAddress
data InetAddressMaskGetFamilyMethodInfo
-- | Gets the SocketFamily of mask's address
inetAddressMaskGetFamily :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m SocketFamily
data InetAddressMaskGetLengthMethodInfo
-- | Gets mask's length
inetAddressMaskGetLength :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Word32
data InetAddressMaskMatchesMethodInfo
-- | Tests if address falls within the range described by
-- mask.
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.
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.
inetAddressMaskNewFromString :: (HasCallStack, MonadIO m) => Text -> m InetAddressMask
data InetAddressMaskToStringMethodInfo
-- | Converts mask back to its corresponding string form.
inetAddressMaskToString :: (HasCallStack, MonadIO m, IsInetAddressMask a) => a -> m Text
data InetAddressMaskAddressPropertyInfo
clearInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m ()
constructInetAddressMaskAddress :: (IsInetAddressMask o, IsInetAddress a) => a -> IO (GValueConstruct o)
getInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o) => o -> m InetAddress
inetAddressMaskAddress :: AttrLabelProxy "address"
setInetAddressMaskAddress :: (MonadIO m, IsInetAddressMask o, IsInetAddress a) => o -> a -> m ()
data InetAddressMaskFamilyPropertyInfo
getInetAddressMaskFamily :: (MonadIO m, IsInetAddressMask o) => o -> m SocketFamily
inetAddressMaskFamily :: AttrLabelProxy "family"
data InetAddressMaskLengthPropertyInfo
constructInetAddressMaskLength :: (IsInetAddressMask o) => Word32 -> IO (GValueConstruct o)
getInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> m Word32
inetAddressMaskLength :: AttrLabelProxy "length"
setInetAddressMaskLength :: (MonadIO m, IsInetAddressMask o) => o -> Word32 -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InetAddressMask.InetAddressMask
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.InetAddressMask.InetAddressMask a) => GI.Gio.Objects.InetAddressMask.IsInetAddressMask a
instance GI.Gio.Objects.InetAddressMask.IsInetAddressMask GI.Gio.Objects.InetAddressMask.InetAddressMask
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.InetAddressMask.InetAddressMask
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Objects.InetAddressMask.InetAddressMask
instance (info ~ GI.Gio.Objects.InetAddressMask.ResolveInetAddressMaskMethod t GI.Gio.Objects.InetAddressMask.InetAddressMask, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InetAddressMask.InetAddressMask p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.InetAddressMask.InetAddressMask -> p)
instance (info ~ GI.Gio.Objects.InetAddressMask.ResolveInetAddressMaskMethod t GI.Gio.Objects.InetAddressMask.InetAddressMask, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InetAddressMask.InetAddressMask p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.InetAddressMask.InetAddressMask -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskAddressPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskFamilyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskLengthPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.InetAddressMask.InetAddressMask
instance (signature ~ (b -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddressMask.IsInetAddressMask a, GI.Gio.Objects.InetAddressMask.IsInetAddressMask b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskEqualMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.InetAddress.InetAddress, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddressMask.IsInetAddressMask a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskGetAddressMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketFamily, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddressMask.IsInetAddressMask a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskGetFamilyMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddressMask.IsInetAddressMask a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskGetLengthMethodInfo a signature
instance (signature ~ (b -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddressMask.IsInetAddressMask a, GI.Gio.Objects.InetAddress.IsInetAddress b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskMatchesMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InetAddressMask.IsInetAddressMask a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InetAddressMask.InetAddressMaskToStringMethodInfo a signature
-- | 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.
module GI.Gio.Objects.MountOperation
newtype MountOperation
MountOperation :: (ManagedPtr MountOperation) -> MountOperation
class GObject o => IsMountOperation o
toMountOperation :: IsMountOperation o => o -> IO MountOperation
noMountOperation :: Maybe MountOperation
data MountOperationGetAnonymousMethodInfo
-- | Check to see whether the mount operation is being used for an
-- anonymous user.
mountOperationGetAnonymous :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Bool
data MountOperationGetChoiceMethodInfo
-- | Gets a choice from the mount operation.
mountOperationGetChoice :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Int32
data MountOperationGetDomainMethodInfo
-- | Gets the domain of the mount operation.
mountOperationGetDomain :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Text
data MountOperationGetPasswordMethodInfo
-- | Gets a password from the mount operation.
mountOperationGetPassword :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m Text
data MountOperationGetPasswordSaveMethodInfo
-- | Gets the state of saving passwords for the mount operation.
mountOperationGetPasswordSave :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> m PasswordSave
data MountOperationGetUsernameMethodInfo
-- | 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
data MountOperationReplyMethodInfo
-- | Emits the MountOperation::reply signal.
mountOperationReply :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> MountOperationResult -> m ()
data MountOperationSetAnonymousMethodInfo
-- | Sets the mount operation to use an anonymous user if
-- anonymous is True.
mountOperationSetAnonymous :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Bool -> m ()
data MountOperationSetChoiceMethodInfo
-- | Sets a default choice for the mount operation.
mountOperationSetChoice :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Int32 -> m ()
data MountOperationSetDomainMethodInfo
-- | Sets the mount operation's domain.
mountOperationSetDomain :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Text -> m ()
data MountOperationSetPasswordMethodInfo
-- | Sets the mount operation's password to password.
mountOperationSetPassword :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Text -> m ()
data MountOperationSetPasswordSaveMethodInfo
-- | Sets the state of saving passwords for the mount operation.
mountOperationSetPasswordSave :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> PasswordSave -> m ()
data MountOperationSetUsernameMethodInfo
-- | Sets the user name within op to
-- username.
mountOperationSetUsername :: (HasCallStack, MonadIO m, IsMountOperation a) => a -> Text -> m ()
data MountOperationAnonymousPropertyInfo
constructMountOperationAnonymous :: (IsMountOperation o) => Bool -> IO (GValueConstruct o)
getMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> m Bool
mountOperationAnonymous :: AttrLabelProxy "anonymous"
setMountOperationAnonymous :: (MonadIO m, IsMountOperation o) => o -> Bool -> m ()
data MountOperationChoicePropertyInfo
constructMountOperationChoice :: (IsMountOperation o) => Int32 -> IO (GValueConstruct o)
getMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> m Int32
mountOperationChoice :: AttrLabelProxy "choice"
setMountOperationChoice :: (MonadIO m, IsMountOperation o) => o -> Int32 -> m ()
data MountOperationDomainPropertyInfo
constructMountOperationDomain :: (IsMountOperation o) => Text -> IO (GValueConstruct o)
getMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> m Text
mountOperationDomain :: AttrLabelProxy "domain"
setMountOperationDomain :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()
data MountOperationPasswordPropertyInfo
constructMountOperationPassword :: (IsMountOperation o) => Text -> IO (GValueConstruct o)
getMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> m Text
mountOperationPassword :: AttrLabelProxy "password"
setMountOperationPassword :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()
data MountOperationPasswordSavePropertyInfo
constructMountOperationPasswordSave :: (IsMountOperation o) => PasswordSave -> IO (GValueConstruct o)
getMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> m PasswordSave
mountOperationPasswordSave :: AttrLabelProxy "passwordSave"
setMountOperationPasswordSave :: (MonadIO m, IsMountOperation o) => o -> PasswordSave -> m ()
data MountOperationUsernamePropertyInfo
constructMountOperationUsername :: (IsMountOperation o) => Text -> IO (GValueConstruct o)
getMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> m Text
mountOperationUsername :: AttrLabelProxy "username"
setMountOperationUsername :: (MonadIO m, IsMountOperation o) => o -> Text -> m ()
type C_MountOperationAbortedCallback = Ptr () -> Ptr () -> IO ()
type MountOperationAbortedCallback = IO ()
data MountOperationAbortedSignalInfo
afterMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> MountOperationAbortedCallback -> m SignalHandlerId
genClosure_MountOperationAborted :: MountOperationAbortedCallback -> IO Closure
mk_MountOperationAbortedCallback :: C_MountOperationAbortedCallback -> IO (FunPtr C_MountOperationAbortedCallback)
noMountOperationAbortedCallback :: Maybe MountOperationAbortedCallback
onMountOperationAborted :: (IsMountOperation a, MonadIO m) => a -> MountOperationAbortedCallback -> m SignalHandlerId
wrap_MountOperationAbortedCallback :: MountOperationAbortedCallback -> Ptr () -> Ptr () -> IO ()
type C_MountOperationAskPasswordCallback = Ptr () -> CString -> CString -> CString -> CUInt -> Ptr () -> IO ()
type MountOperationAskPasswordCallback = Text -> Text -> Text -> [AskPasswordFlags] -> IO ()
data MountOperationAskPasswordSignalInfo
afterMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskPasswordCallback -> m SignalHandlerId
genClosure_MountOperationAskPassword :: MountOperationAskPasswordCallback -> IO Closure
mk_MountOperationAskPasswordCallback :: C_MountOperationAskPasswordCallback -> IO (FunPtr C_MountOperationAskPasswordCallback)
noMountOperationAskPasswordCallback :: Maybe MountOperationAskPasswordCallback
onMountOperationAskPassword :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskPasswordCallback -> m SignalHandlerId
wrap_MountOperationAskPasswordCallback :: MountOperationAskPasswordCallback -> Ptr () -> CString -> CString -> CString -> CUInt -> Ptr () -> IO ()
type C_MountOperationAskQuestionCallback = Ptr () -> CString -> Ptr CString -> Ptr () -> IO ()
type MountOperationAskQuestionCallback = Text -> [Text] -> IO ()
data MountOperationAskQuestionSignalInfo
afterMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskQuestionCallback -> m SignalHandlerId
genClosure_MountOperationAskQuestion :: MountOperationAskQuestionCallback -> IO Closure
mk_MountOperationAskQuestionCallback :: C_MountOperationAskQuestionCallback -> IO (FunPtr C_MountOperationAskQuestionCallback)
noMountOperationAskQuestionCallback :: Maybe MountOperationAskQuestionCallback
onMountOperationAskQuestion :: (IsMountOperation a, MonadIO m) => a -> MountOperationAskQuestionCallback -> m SignalHandlerId
wrap_MountOperationAskQuestionCallback :: MountOperationAskQuestionCallback -> Ptr () -> CString -> Ptr CString -> Ptr () -> IO ()
type C_MountOperationReplyCallback = Ptr () -> CUInt -> Ptr () -> IO ()
type MountOperationReplyCallback = MountOperationResult -> IO ()
data MountOperationReplySignalInfo
afterMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> MountOperationReplyCallback -> m SignalHandlerId
genClosure_MountOperationReply :: MountOperationReplyCallback -> IO Closure
mk_MountOperationReplyCallback :: C_MountOperationReplyCallback -> IO (FunPtr C_MountOperationReplyCallback)
noMountOperationReplyCallback :: Maybe MountOperationReplyCallback
onMountOperationReply :: (IsMountOperation a, MonadIO m) => a -> MountOperationReplyCallback -> m SignalHandlerId
wrap_MountOperationReplyCallback :: MountOperationReplyCallback -> Ptr () -> CUInt -> Ptr () -> IO ()
type C_MountOperationShowProcessesCallback = Ptr () -> CString -> Ptr (GArray Int32) -> Ptr CString -> Ptr () -> IO ()
type MountOperationShowProcessesCallback = Text -> [Int32] -> [Text] -> IO ()
data MountOperationShowProcessesSignalInfo
afterMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowProcessesCallback -> m SignalHandlerId
genClosure_MountOperationShowProcesses :: MountOperationShowProcessesCallback -> IO Closure
mk_MountOperationShowProcessesCallback :: C_MountOperationShowProcessesCallback -> IO (FunPtr C_MountOperationShowProcessesCallback)
noMountOperationShowProcessesCallback :: Maybe MountOperationShowProcessesCallback
onMountOperationShowProcesses :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowProcessesCallback -> m SignalHandlerId
wrap_MountOperationShowProcessesCallback :: MountOperationShowProcessesCallback -> Ptr () -> CString -> Ptr (GArray Int32) -> Ptr CString -> Ptr () -> IO ()
type C_MountOperationShowUnmountProgressCallback = Ptr () -> CString -> Int64 -> Int64 -> Ptr () -> IO ()
type MountOperationShowUnmountProgressCallback = Text -> Int64 -> Int64 -> IO ()
data MountOperationShowUnmountProgressSignalInfo
afterMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowUnmountProgressCallback -> m SignalHandlerId
genClosure_MountOperationShowUnmountProgress :: MountOperationShowUnmountProgressCallback -> IO Closure
mk_MountOperationShowUnmountProgressCallback :: C_MountOperationShowUnmountProgressCallback -> IO (FunPtr C_MountOperationShowUnmountProgressCallback)
noMountOperationShowUnmountProgressCallback :: Maybe MountOperationShowUnmountProgressCallback
onMountOperationShowUnmountProgress :: (IsMountOperation a, MonadIO m) => a -> MountOperationShowUnmountProgressCallback -> m SignalHandlerId
wrap_MountOperationShowUnmountProgressCallback :: MountOperationShowUnmountProgressCallback -> Ptr () -> CString -> Int64 -> Int64 -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.MountOperation.MountOperation
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.MountOperation.MountOperation a) => GI.Gio.Objects.MountOperation.IsMountOperation a
instance GI.Gio.Objects.MountOperation.IsMountOperation GI.Gio.Objects.MountOperation.MountOperation
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.MountOperation.MountOperation
instance (info ~ GI.Gio.Objects.MountOperation.ResolveMountOperationMethod t GI.Gio.Objects.MountOperation.MountOperation, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.MountOperation.MountOperation p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.MountOperation.MountOperation -> p)
instance (info ~ GI.Gio.Objects.MountOperation.ResolveMountOperationMethod t GI.Gio.Objects.MountOperation.MountOperation, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.MountOperation.MountOperation p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.MountOperation.MountOperation -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MountOperation.MountOperationAnonymousPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MountOperation.MountOperationChoicePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MountOperation.MountOperationDomainPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MountOperation.MountOperationPasswordPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MountOperation.MountOperationPasswordSavePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.MountOperation.MountOperationUsernamePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.MountOperation.MountOperation
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.MountOperation.MountOperationAbortedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.MountOperation.MountOperationAskPasswordSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.MountOperation.MountOperationAskQuestionSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.MountOperation.MountOperationReplySignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.MountOperation.MountOperationShowProcessesSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.MountOperation.MountOperationShowUnmountProgressSignalInfo
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationGetAnonymousMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationGetChoiceMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationGetDomainMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationGetPasswordMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.PasswordSave, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationGetPasswordSaveMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationGetUsernameMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.MountOperationResult -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationReplyMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationSetAnonymousMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationSetChoiceMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationSetDomainMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationSetPasswordMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.PasswordSave -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationSetPasswordSaveMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.MountOperation.IsMountOperation a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.MountOperation.MountOperationSetUsernameMethodInfo a signature
-- | 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.
module GI.Gio.Objects.Notification
newtype Notification
Notification :: (ManagedPtr Notification) -> Notification
class GObject o => IsNotification o
toNotification :: IsNotification o => o -> IO Notification
noNotification :: Maybe Notification
data NotificationAddButtonMethodInfo
-- | 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.
notificationAddButton :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Text -> m ()
data NotificationAddButtonWithTargetMethodInfo
-- | 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.
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.
notificationNew :: (HasCallStack, MonadIO m) => Text -> m Notification
data NotificationSetBodyMethodInfo
-- | Sets the body of notification to body.
notificationSetBody :: (HasCallStack, MonadIO m, IsNotification a) => a -> Maybe (Text) -> m ()
data NotificationSetDefaultActionMethodInfo
-- | 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.
notificationSetDefaultAction :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()
data NotificationSetDefaultActionAndTargetMethodInfo
-- | 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.
notificationSetDefaultActionAndTarget :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> Maybe (GVariant) -> m ()
data NotificationSetIconMethodInfo
-- | Sets the icon of notification to icon.
notificationSetIcon :: (HasCallStack, MonadIO m, IsNotification a, IsIcon b) => a -> b -> m ()
data NotificationSetPriorityMethodInfo
-- | Sets the priority of notification to
-- priority. See NotificationPriority for possible
-- values.
notificationSetPriority :: (HasCallStack, MonadIO m, IsNotification a) => a -> NotificationPriority -> m ()
data NotificationSetTitleMethodInfo
-- | Sets the title of notification to
-- title.
notificationSetTitle :: (HasCallStack, MonadIO m, IsNotification a) => a -> Text -> m ()
data NotificationSetUrgentMethodInfo
-- | Deprecated in favor of notificationSetPriority.
notificationSetUrgent :: (HasCallStack, MonadIO m, IsNotification a) => a -> Bool -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Notification.Notification
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Notification.Notification a) => GI.Gio.Objects.Notification.IsNotification a
instance GI.Gio.Objects.Notification.IsNotification GI.Gio.Objects.Notification.Notification
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Notification.Notification
instance (info ~ GI.Gio.Objects.Notification.ResolveNotificationMethod t GI.Gio.Objects.Notification.Notification, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Notification.Notification p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Notification.Notification -> p)
instance (info ~ GI.Gio.Objects.Notification.ResolveNotificationMethod t GI.Gio.Objects.Notification.Notification, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Notification.Notification p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Notification.Notification -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Notification.Notification
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationAddButtonMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationAddButtonWithTargetMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationSetBodyMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationSetDefaultActionMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationSetDefaultActionAndTargetMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a, GI.Gio.Interfaces.Icon.IsIcon b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationSetIconMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.NotificationPriority -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationSetPriorityMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationSetTitleMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Notification.IsNotification a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Notification.NotificationSetUrgentMethodInfo a signature
-- | 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.
module GI.Gio.Objects.Socket
newtype Socket
Socket :: (ManagedPtr Socket) -> Socket
class GObject o => IsSocket o
toSocket :: IsSocket o => o -> IO Socket
noSocket :: Maybe Socket
data SocketAcceptMethodInfo
-- | 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.
socketAccept :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> Maybe (b) -> m Socket
data SocketBindMethodInfo
-- | 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.)
socketBind :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b) => a -> b -> Bool -> m ()
data SocketCheckConnectResultMethodInfo
-- | 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.
socketCheckConnectResult :: (HasCallStack, MonadIO m, IsSocket a) => a -> m ()
data SocketCloseMethodInfo
-- | 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.)
socketClose :: (HasCallStack, MonadIO m, IsSocket a) => a -> m ()
data SocketConditionCheckMethodInfo
-- | 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.
socketConditionCheck :: (HasCallStack, MonadIO m, IsSocket a) => a -> [IOCondition] -> m [IOCondition]
data SocketConditionTimedWaitMethodInfo
-- | Waits for up to timeout microseconds for
-- condition to become true on socket. If
-- the condition is met, True is returned.
--
-- If cancellable is cancelled before the condition is
-- met, or if timeout (or the socket's
-- 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 timeout.)
--
-- Note that although timeout is in microseconds for
-- consistency with other GLib APIs, this function actually only has
-- millisecond resolution, and the behavior is undefined if
-- timeout is not an exact number of milliseconds.
socketConditionTimedWait :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [IOCondition] -> Int64 -> Maybe (b) -> m ()
data SocketConditionWaitMethodInfo
-- | 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.
socketConditionWait :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [IOCondition] -> Maybe (b) -> m ()
data SocketConnectMethodInfo
-- | 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.
socketConnect :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe (c) -> m ()
data SocketConnectionFactoryCreateConnectionMethodInfo
-- | Creates a SocketConnection subclass of the right type for
-- socket.
socketConnectionFactoryCreateConnection :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketConnection
data SocketGetAvailableBytesMethodInfo
-- | 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.
socketGetAvailableBytes :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int64
data SocketGetBlockingMethodInfo
-- | Gets the blocking mode of the socket. For details on blocking I/O, see
-- socketSetBlocking.
socketGetBlocking :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
data SocketGetBroadcastMethodInfo
-- | Gets the broadcast setting on socket; if True,
-- it is possible to send packets to broadcast addresses.
socketGetBroadcast :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
data SocketGetCredentialsMethodInfo
-- | 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.
socketGetCredentials :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Credentials
data SocketGetFamilyMethodInfo
-- | Gets the socket family of the socket.
socketGetFamily :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketFamily
data SocketGetFdMethodInfo
-- | 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.
socketGetFd :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int32
data SocketGetKeepaliveMethodInfo
-- | Gets the keepalive mode of the socket. For details on this, see
-- socketSetKeepalive.
socketGetKeepalive :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
data SocketGetListenBacklogMethodInfo
-- | Gets the listen backlog setting of the socket. For details on this,
-- see socketSetListenBacklog.
socketGetListenBacklog :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Int32
data SocketGetLocalAddressMethodInfo
-- | 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.
socketGetLocalAddress :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketAddress
data SocketGetMulticastLoopbackMethodInfo
-- | 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.
socketGetMulticastLoopback :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
data SocketGetMulticastTtlMethodInfo
-- | Gets the multicast time-to-live setting on socket; see
-- socketSetMulticastTtl for more details.
socketGetMulticastTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32
data SocketGetOptionMethodInfo
-- | 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.
socketGetOption :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> Int32 -> m (Int32)
data SocketGetProtocolMethodInfo
-- | Gets the socket protocol id the socket was created with. In case the
-- protocol is unknown, -1 is returned.
socketGetProtocol :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketProtocol
data SocketGetRemoteAddressMethodInfo
-- | Try to get the remove address of a connected socket. This is only
-- useful for connection oriented sockets that have been connected.
socketGetRemoteAddress :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketAddress
data SocketGetSocketTypeMethodInfo
-- | Gets the socket type of the socket.
socketGetSocketType :: (HasCallStack, MonadIO m, IsSocket a) => a -> m SocketType
data SocketGetTimeoutMethodInfo
-- | Gets the timeout setting of the socket. For details on this, see
-- socketSetTimeout.
socketGetTimeout :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32
data SocketGetTtlMethodInfo
-- | Gets the unicast time-to-live setting on socket; see
-- socketSetTtl for more details.
socketGetTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Word32
data SocketIsClosedMethodInfo
-- | Checks whether a socket is closed.
socketIsClosed :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
data SocketIsConnectedMethodInfo
-- | 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.
socketIsConnected :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
data SocketJoinMulticastGroupMethodInfo
-- | 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.
socketJoinMulticastGroup :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b) => a -> b -> Bool -> Maybe (Text) -> m ()
data SocketLeaveMulticastGroupMethodInfo
-- | 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.
socketLeaveMulticastGroup :: (HasCallStack, MonadIO m, IsSocket a, IsInetAddress b) => a -> b -> Bool -> Maybe (Text) -> m ()
data SocketListenMethodInfo
-- | 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.
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.
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
socketNewFromFd :: (HasCallStack, MonadIO m) => Int32 -> m Socket
data SocketReceiveMethodInfo
-- | 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.
socketReceive :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe (b) -> m Int64
data SocketReceiveFromMethodInfo
-- | 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.
socketReceiveFrom :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe (b) -> m (Int64, SocketAddress)
data SocketReceiveMessageMethodInfo
-- | 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.
socketReceiveMessage :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [InputVector] -> Int32 -> Maybe (b) -> m (Int64, Maybe SocketAddress, Maybe [SocketControlMessage], Int32)
data SocketReceiveMessagesMethodInfo
-- | 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.
socketReceiveMessages :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [InputMessage] -> Int32 -> Maybe (b) -> m Int32
data SocketReceiveWithBlockingMethodInfo
-- | 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.
socketReceiveWithBlocking :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Bool -> Maybe (b) -> m Int64
data SocketSendMethodInfo
-- | 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.
socketSend :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Maybe (b) -> m Int64
data SocketSendMessageMethodInfo
-- | 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.
socketSendMessage :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe (b) -> [OutputVector] -> Maybe ([SocketControlMessage]) -> Int32 -> Maybe (c) -> m Int64
data SocketSendMessagesMethodInfo
-- | 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.
socketSendMessages :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> [OutputMessage] -> Int32 -> Maybe (b) -> m Int32
data SocketSendToMethodInfo
-- | 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.
socketSendTo :: (HasCallStack, MonadIO m, IsSocket a, IsSocketAddress b, IsCancellable c) => a -> Maybe (b) -> ByteString -> Maybe (c) -> m Int64
data SocketSendWithBlockingMethodInfo
-- | 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.
socketSendWithBlocking :: (HasCallStack, MonadIO m, IsSocket a, IsCancellable b) => a -> ByteString -> Bool -> Maybe (b) -> m Int64
data SocketSetBlockingMethodInfo
-- | 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.
socketSetBlocking :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()
data SocketSetBroadcastMethodInfo
-- | Sets whether socket should allow sending to broadcast
-- addresses. This is False by default.
socketSetBroadcast :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()
data SocketSetKeepaliveMethodInfo
-- | 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.
socketSetKeepalive :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()
data SocketSetListenBacklogMethodInfo
-- | 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.
socketSetListenBacklog :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> m ()
data SocketSetMulticastLoopbackMethodInfo
-- | Sets whether outgoing multicast packets will be received by sockets
-- listening on that multicast address on the same host. This is
-- True by default.
socketSetMulticastLoopback :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> m ()
data SocketSetMulticastTtlMethodInfo
-- | 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.
socketSetMulticastTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()
data SocketSetOptionMethodInfo
-- | 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.
socketSetOption :: (HasCallStack, MonadIO m, IsSocket a) => a -> Int32 -> Int32 -> Int32 -> m ()
data SocketSetTimeoutMethodInfo
-- | 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.
socketSetTimeout :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()
data SocketSetTtlMethodInfo
-- | Sets the time-to-live for outgoing unicast packets on
-- socket. By default the platform-specific default value
-- is used.
socketSetTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()
data SocketShutdownMethodInfo
-- | 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.
socketShutdown :: (HasCallStack, MonadIO m, IsSocket a) => a -> Bool -> Bool -> m ()
data SocketSpeaksIpv4MethodInfo
-- | 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.
socketSpeaksIpv4 :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
data SocketBlockingPropertyInfo
constructSocketBlocking :: (IsSocket o) => Bool -> IO (GValueConstruct o)
getSocketBlocking :: (MonadIO m, IsSocket o) => o -> m Bool
setSocketBlocking :: (MonadIO m, IsSocket o) => o -> Bool -> m ()
socketBlocking :: AttrLabelProxy "blocking"
data SocketBroadcastPropertyInfo
constructSocketBroadcast :: (IsSocket o) => Bool -> IO (GValueConstruct o)
getSocketBroadcast :: (MonadIO m, IsSocket o) => o -> m Bool
setSocketBroadcast :: (MonadIO m, IsSocket o) => o -> Bool -> m ()
socketBroadcast :: AttrLabelProxy "broadcast"
data SocketFamilyPropertyInfo
constructSocketFamily :: (IsSocket o) => SocketFamily -> IO (GValueConstruct o)
getSocketFamily :: (MonadIO m, IsSocket o) => o -> m SocketFamily
socketFamily :: AttrLabelProxy "family"
data SocketFdPropertyInfo
constructSocketFd :: (IsSocket o) => Int32 -> IO (GValueConstruct o)
getSocketFd :: (MonadIO m, IsSocket o) => o -> m Int32
socketFd :: AttrLabelProxy "fd"
data SocketKeepalivePropertyInfo
constructSocketKeepalive :: (IsSocket o) => Bool -> IO (GValueConstruct o)
getSocketKeepalive :: (MonadIO m, IsSocket o) => o -> m Bool
setSocketKeepalive :: (MonadIO m, IsSocket o) => o -> Bool -> m ()
socketKeepalive :: AttrLabelProxy "keepalive"
data SocketListenBacklogPropertyInfo
constructSocketListenBacklog :: (IsSocket o) => Int32 -> IO (GValueConstruct o)
getSocketListenBacklog :: (MonadIO m, IsSocket o) => o -> m Int32
setSocketListenBacklog :: (MonadIO m, IsSocket o) => o -> Int32 -> m ()
socketListenBacklog :: AttrLabelProxy "listenBacklog"
data SocketLocalAddressPropertyInfo
getSocketLocalAddress :: (MonadIO m, IsSocket o) => o -> m (Maybe SocketAddress)
socketLocalAddress :: AttrLabelProxy "localAddress"
data SocketMulticastLoopbackPropertyInfo
constructSocketMulticastLoopback :: (IsSocket o) => Bool -> IO (GValueConstruct o)
getSocketMulticastLoopback :: (MonadIO m, IsSocket o) => o -> m Bool
setSocketMulticastLoopback :: (MonadIO m, IsSocket o) => o -> Bool -> m ()
socketMulticastLoopback :: AttrLabelProxy "multicastLoopback"
data SocketMulticastTtlPropertyInfo
constructSocketMulticastTtl :: (IsSocket o) => Word32 -> IO (GValueConstruct o)
getSocketMulticastTtl :: (MonadIO m, IsSocket o) => o -> m Word32
setSocketMulticastTtl :: (MonadIO m, IsSocket o) => o -> Word32 -> m ()
socketMulticastTtl :: AttrLabelProxy "multicastTtl"
data SocketProtocolPropertyInfo
constructSocketProtocol :: (IsSocket o) => SocketProtocol -> IO (GValueConstruct o)
getSocketProtocol :: (MonadIO m, IsSocket o) => o -> m SocketProtocol
socketProtocol :: AttrLabelProxy "protocol"
data SocketRemoteAddressPropertyInfo
getSocketRemoteAddress :: (MonadIO m, IsSocket o) => o -> m (Maybe SocketAddress)
socketRemoteAddress :: AttrLabelProxy "remoteAddress"
data SocketTimeoutPropertyInfo
constructSocketTimeout :: (IsSocket o) => Word32 -> IO (GValueConstruct o)
getSocketTimeout :: (MonadIO m, IsSocket o) => o -> m Word32
setSocketTimeout :: (MonadIO m, IsSocket o) => o -> Word32 -> m ()
socketTimeout :: AttrLabelProxy "timeout"
data SocketTtlPropertyInfo
constructSocketTtl :: (IsSocket o) => Word32 -> IO (GValueConstruct o)
getSocketTtl :: (MonadIO m, IsSocket o) => o -> m Word32
setSocketTtl :: (MonadIO m, IsSocket o) => o -> Word32 -> m ()
socketTtl :: AttrLabelProxy "ttl"
data SocketTypePropertyInfo
constructSocketType :: (IsSocket o) => SocketType -> IO (GValueConstruct o)
getSocketType :: (MonadIO m, IsSocket o) => o -> m SocketType
socketType :: AttrLabelProxy "type"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Socket.Socket
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Socket.Socket a) => GI.Gio.Objects.Socket.IsSocket a
instance GI.Gio.Objects.Socket.IsSocket GI.Gio.Objects.Socket.Socket
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Socket.Socket
instance GI.Gio.Interfaces.DatagramBased.IsDatagramBased GI.Gio.Objects.Socket.Socket
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Objects.Socket.Socket
instance (info ~ GI.Gio.Objects.Socket.ResolveSocketMethod t GI.Gio.Objects.Socket.Socket, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Socket.Socket p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Socket.Socket -> p)
instance (info ~ GI.Gio.Objects.Socket.ResolveSocketMethod t GI.Gio.Objects.Socket.Socket, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Socket.Socket p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Socket.Socket -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketBlockingPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketBroadcastPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketFamilyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketFdPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketKeepalivePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketListenBacklogPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketLocalAddressPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketMulticastLoopbackPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketMulticastTtlPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketProtocolPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketRemoteAddressPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketTimeoutPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketTtlPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Socket.SocketTypePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Socket.Socket
instance (signature ~ (GHC.Base.Maybe b -> m GI.Gio.Objects.Socket.Socket), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketAcceptMethodInfo a signature
instance (signature ~ (b -> GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.SocketAddress.IsSocketAddress b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketBindMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketCheckConnectResultMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketCloseMethodInfo a signature
instance (signature ~ ([GI.GLib.Flags.IOCondition] -> m [GI.GLib.Flags.IOCondition]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketConditionCheckMethodInfo a signature
instance (signature ~ ([GI.GLib.Flags.IOCondition] -> GHC.Int.Int64 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketConditionTimedWaitMethodInfo a signature
instance (signature ~ ([GI.GLib.Flags.IOCondition] -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketConditionWaitMethodInfo a signature
instance (signature ~ (b -> GHC.Base.Maybe c -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.SocketAddress.IsSocketAddress b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketConnectMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.SocketConnection.SocketConnection, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketConnectionFactoryCreateConnectionMethodInfo a signature
instance (signature ~ m GHC.Int.Int64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetAvailableBytesMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetBlockingMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetBroadcastMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.Credentials.Credentials, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetCredentialsMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketFamily, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetFamilyMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetFdMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetKeepaliveMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetListenBacklogMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.SocketAddress.SocketAddress, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetLocalAddressMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetMulticastLoopbackMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetMulticastTtlMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Int.Int32 -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetOptionMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketProtocol, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetProtocolMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.SocketAddress.SocketAddress, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetRemoteAddressMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetSocketTypeMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetTimeoutMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketGetTtlMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketIsClosedMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketIsConnectedMethodInfo a signature
instance (signature ~ (b -> GHC.Types.Bool -> GHC.Base.Maybe Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.InetAddress.IsInetAddress b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketJoinMulticastGroupMethodInfo a signature
instance (signature ~ (b -> GHC.Types.Bool -> GHC.Base.Maybe Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.InetAddress.IsInetAddress b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketLeaveMulticastGroupMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketListenMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketReceiveMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m (GHC.Int.Int64, GI.Gio.Objects.SocketAddress.SocketAddress)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketReceiveFromMethodInfo a signature
instance (signature ~ ([GI.Gio.Structs.InputVector.InputVector] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> m (GHC.Int.Int64, GHC.Base.Maybe GI.Gio.Objects.SocketAddress.SocketAddress, GHC.Base.Maybe [GI.Gio.Objects.SocketControlMessage.SocketControlMessage], GHC.Int.Int32)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketReceiveMessageMethodInfo a signature
instance (signature ~ ([GI.Gio.Structs.InputMessage.InputMessage] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketReceiveMessagesMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Types.Bool -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketReceiveWithBlockingMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSendMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> [GI.Gio.Structs.OutputVector.OutputVector] -> GHC.Base.Maybe [GI.Gio.Objects.SocketControlMessage.SocketControlMessage] -> GHC.Int.Int32 -> GHC.Base.Maybe c -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.SocketAddress.IsSocketAddress b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSendMessageMethodInfo a signature
instance (signature ~ ([GI.Gio.Structs.OutputMessage.OutputMessage] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSendMessagesMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> Data.ByteString.Internal.ByteString -> GHC.Base.Maybe c -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.SocketAddress.IsSocketAddress b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSendToMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Types.Bool -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSendWithBlockingMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetBlockingMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetBroadcastMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetKeepaliveMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetListenBacklogMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetMulticastLoopbackMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetMulticastTtlMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetOptionMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetTimeoutMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSetTtlMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketShutdownMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Socket.IsSocket a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Socket.SocketSpeaksIpv4MethodInfo a signature
-- | 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
newtype SocketAddress
SocketAddress :: (ManagedPtr SocketAddress) -> SocketAddress
class GObject o => IsSocketAddress o
toSocketAddress :: IsSocketAddress o => o -> IO SocketAddress
noSocketAddress :: Maybe SocketAddress
data SocketAddressGetFamilyMethodInfo
-- | Gets the socket family type of address.
socketAddressGetFamily :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> m SocketFamily
data SocketAddressGetNativeSizeMethodInfo
-- | Gets the size of address's native struct sockaddr. You
-- can use this to allocate memory to pass to
-- socketAddressToNative.
socketAddressGetNativeSize :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> m Int64
-- | Creates a SocketAddress subclass corresponding to the native
-- struct sockaddr native.
socketAddressNewFromNative :: (HasCallStack, MonadIO m) => Ptr () -> Word64 -> m SocketAddress
data SocketAddressToNativeMethodInfo
-- | 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.
socketAddressToNative :: (HasCallStack, MonadIO m, IsSocketAddress a) => a -> Ptr () -> Word64 -> m ()
data SocketAddressFamilyPropertyInfo
getSocketAddressFamily :: (MonadIO m, IsSocketAddress o) => o -> m SocketFamily
socketAddressFamily :: AttrLabelProxy "family"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketAddress.SocketAddress
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SocketAddress.SocketAddress a) => GI.Gio.Objects.SocketAddress.IsSocketAddress a
instance GI.Gio.Objects.SocketAddress.IsSocketAddress GI.Gio.Objects.SocketAddress.SocketAddress
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SocketAddress.SocketAddress
instance GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable GI.Gio.Objects.SocketAddress.SocketAddress
instance (info ~ GI.Gio.Objects.SocketAddress.ResolveSocketAddressMethod t GI.Gio.Objects.SocketAddress.SocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketAddress.SocketAddress p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SocketAddress.SocketAddress -> p)
instance (info ~ GI.Gio.Objects.SocketAddress.ResolveSocketAddressMethod t GI.Gio.Objects.SocketAddress.SocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketAddress.SocketAddress p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SocketAddress.SocketAddress -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketAddress.SocketAddressFamilyPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SocketAddress.SocketAddress
instance (signature ~ m GI.Gio.Enums.SocketFamily, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketAddress.IsSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketAddress.SocketAddressGetFamilyMethodInfo a signature
instance (signature ~ m GHC.Int.Int64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketAddress.IsSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketAddress.SocketAddressGetNativeSizeMethodInfo a signature
instance (signature ~ (GHC.Ptr.Ptr () -> GHC.Word.Word64 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketAddress.IsSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketAddress.SocketAddressToNativeMethodInfo a signature
-- | 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
newtype UnixSocketAddress
UnixSocketAddress :: (ManagedPtr UnixSocketAddress) -> UnixSocketAddress
class GObject o => IsUnixSocketAddress o
toUnixSocketAddress :: IsUnixSocketAddress o => o -> IO UnixSocketAddress
noUnixSocketAddress :: Maybe UnixSocketAddress
-- | Checks if abstract UNIX domain socket names are supported.
unixSocketAddressAbstractNamesSupported :: (HasCallStack, MonadIO m) => m Bool
data UnixSocketAddressGetAddressTypeMethodInfo
-- | Gets address's type.
unixSocketAddressGetAddressType :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m UnixSocketAddressType
data UnixSocketAddressGetIsAbstractMethodInfo
-- | Tests if address is abstract.
-- | Deprecated: Use unixSocketAddressGetAddressType
unixSocketAddressGetIsAbstract :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m Bool
data UnixSocketAddressGetPathMethodInfo
-- | 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.
unixSocketAddressGetPath :: (HasCallStack, MonadIO m, IsUnixSocketAddress a) => a -> m Text
data UnixSocketAddressGetPathLenMethodInfo
-- | Gets the length of address's path.
--
-- For details, see unixSocketAddressGetPath.
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.
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.
unixSocketAddressNewWithType :: (HasCallStack, MonadIO m) => [Int8] -> UnixSocketAddressType -> m UnixSocketAddress
data UnixSocketAddressAbstractPropertyInfo
constructUnixSocketAddressAbstract :: (IsUnixSocketAddress o) => Bool -> IO (GValueConstruct o)
getUnixSocketAddressAbstract :: (MonadIO m, IsUnixSocketAddress o) => o -> m Bool
unixSocketAddressAbstract :: AttrLabelProxy "abstract"
data UnixSocketAddressAddressTypePropertyInfo
constructUnixSocketAddressAddressType :: (IsUnixSocketAddress o) => UnixSocketAddressType -> IO (GValueConstruct o)
getUnixSocketAddressAddressType :: (MonadIO m, IsUnixSocketAddress o) => o -> m UnixSocketAddressType
unixSocketAddressAddressType :: AttrLabelProxy "addressType"
data UnixSocketAddressPathPropertyInfo
constructUnixSocketAddressPath :: (IsUnixSocketAddress o) => Text -> IO (GValueConstruct o)
getUnixSocketAddressPath :: (MonadIO m, IsUnixSocketAddress o) => o -> m Text
unixSocketAddressPath :: AttrLabelProxy "path"
data UnixSocketAddressPathAsArrayPropertyInfo
constructUnixSocketAddressPathAsArray :: (IsUnixSocketAddress o) => ByteString -> IO (GValueConstruct o)
getUnixSocketAddressPathAsArray :: (MonadIO m, IsUnixSocketAddress o) => o -> m (Maybe ByteString)
unixSocketAddressPathAsArray :: AttrLabelProxy "pathAsArray"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress a) => GI.Gio.Objects.UnixSocketAddress.IsUnixSocketAddress a
instance GI.Gio.Objects.UnixSocketAddress.IsUnixSocketAddress GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance GI.Gio.Objects.SocketAddress.IsSocketAddress GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance (info ~ GI.Gio.Objects.UnixSocketAddress.ResolveUnixSocketAddressMethod t GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress -> p)
instance (info ~ GI.Gio.Objects.UnixSocketAddress.ResolveUnixSocketAddressMethod t GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressAbstractPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressAddressTypePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressPathPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressPathAsArrayPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.UnixSocketAddress.UnixSocketAddress
instance (signature ~ m GI.Gio.Enums.UnixSocketAddressType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixSocketAddress.IsUnixSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressGetAddressTypeMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixSocketAddress.IsUnixSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressGetIsAbstractMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixSocketAddress.IsUnixSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressGetPathMethodInfo a signature
instance (signature ~ m GHC.Word.Word64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.UnixSocketAddress.IsUnixSocketAddress a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.UnixSocketAddress.UnixSocketAddressGetPathLenMethodInfo a signature
-- | Zlib decompression
module GI.Gio.Objects.ZlibCompressor
newtype ZlibCompressor
ZlibCompressor :: (ManagedPtr ZlibCompressor) -> ZlibCompressor
class GObject o => IsZlibCompressor o
toZlibCompressor :: IsZlibCompressor o => o -> IO ZlibCompressor
noZlibCompressor :: Maybe ZlibCompressor
data ZlibCompressorGetFileInfoMethodInfo
-- | Returns the ZlibCompressor:file-info property.
zlibCompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> m FileInfo
-- | Creates a new ZlibCompressor.
zlibCompressorNew :: (HasCallStack, MonadIO m) => ZlibCompressorFormat -> Int32 -> m ZlibCompressor
data ZlibCompressorSetFileInfoMethodInfo
-- | 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.
zlibCompressorSetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a, IsFileInfo b) => a -> Maybe (b) -> m ()
data ZlibCompressorFileInfoPropertyInfo
clearZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m ()
constructZlibCompressorFileInfo :: (IsZlibCompressor o, IsFileInfo a) => a -> IO (GValueConstruct o)
getZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m FileInfo
setZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o, IsFileInfo a) => o -> a -> m ()
zlibCompressorFileInfo :: AttrLabelProxy "fileInfo"
data ZlibCompressorFormatPropertyInfo
constructZlibCompressorFormat :: (IsZlibCompressor o) => ZlibCompressorFormat -> IO (GValueConstruct o)
getZlibCompressorFormat :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressorFormat
zlibCompressorFormat :: AttrLabelProxy "format"
data ZlibCompressorLevelPropertyInfo
constructZlibCompressorLevel :: (IsZlibCompressor o) => Int32 -> IO (GValueConstruct o)
getZlibCompressorLevel :: (MonadIO m, IsZlibCompressor o) => o -> m Int32
zlibCompressorLevel :: AttrLabelProxy "level"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ZlibCompressor.ZlibCompressor a) => GI.Gio.Objects.ZlibCompressor.IsZlibCompressor a
instance GI.Gio.Objects.ZlibCompressor.IsZlibCompressor GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance GI.Gio.Interfaces.Converter.IsConverter GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance (info ~ GI.Gio.Objects.ZlibCompressor.ResolveZlibCompressorMethod t GI.Gio.Objects.ZlibCompressor.ZlibCompressor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ZlibCompressor.ZlibCompressor p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ZlibCompressor.ZlibCompressor -> p)
instance (info ~ GI.Gio.Objects.ZlibCompressor.ResolveZlibCompressorMethod t GI.Gio.Objects.ZlibCompressor.ZlibCompressor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ZlibCompressor.ZlibCompressor p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ZlibCompressor.ZlibCompressor -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ZlibCompressor.ZlibCompressorFileInfoPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ZlibCompressor.ZlibCompressorFormatPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ZlibCompressor.ZlibCompressorLevelPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ZlibCompressor.ZlibCompressor
instance (signature ~ m GI.Gio.Objects.FileInfo.FileInfo, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ZlibCompressor.IsZlibCompressor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ZlibCompressor.ZlibCompressorGetFileInfoMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ZlibCompressor.IsZlibCompressor a, GI.Gio.Objects.FileInfo.IsFileInfo b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ZlibCompressor.ZlibCompressorSetFileInfoMethodInfo a signature
-- | Zlib decompression
module GI.Gio.Objects.ZlibDecompressor
newtype ZlibDecompressor
ZlibDecompressor :: (ManagedPtr ZlibDecompressor) -> ZlibDecompressor
class GObject o => IsZlibDecompressor o
toZlibDecompressor :: IsZlibDecompressor o => o -> IO ZlibDecompressor
noZlibDecompressor :: Maybe ZlibDecompressor
data ZlibDecompressorGetFileInfoMethodInfo
-- | 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.
zlibDecompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibDecompressor a) => a -> m FileInfo
-- | Creates a new ZlibDecompressor.
zlibDecompressorNew :: (HasCallStack, MonadIO m) => ZlibCompressorFormat -> m ZlibDecompressor
data ZlibDecompressorFileInfoPropertyInfo
getZlibDecompressorFileInfo :: (MonadIO m, IsZlibDecompressor o) => o -> m FileInfo
zlibDecompressorFileInfo :: AttrLabelProxy "fileInfo"
data ZlibDecompressorFormatPropertyInfo
constructZlibDecompressorFormat :: (IsZlibDecompressor o) => ZlibCompressorFormat -> IO (GValueConstruct o)
getZlibDecompressorFormat :: (MonadIO m, IsZlibDecompressor o) => o -> m ZlibCompressorFormat
zlibDecompressorFormat :: AttrLabelProxy "format"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor a) => GI.Gio.Objects.ZlibDecompressor.IsZlibDecompressor a
instance GI.Gio.Objects.ZlibDecompressor.IsZlibDecompressor GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance GI.Gio.Interfaces.Converter.IsConverter GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance (info ~ GI.Gio.Objects.ZlibDecompressor.ResolveZlibDecompressorMethod t GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor -> p)
instance (info ~ GI.Gio.Objects.ZlibDecompressor.ResolveZlibDecompressorMethod t GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ZlibDecompressor.ZlibDecompressorFileInfoPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.ZlibDecompressor.ZlibDecompressorFormatPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.ZlibDecompressor.ZlibDecompressor
instance (signature ~ m GI.Gio.Objects.FileInfo.FileInfo, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.ZlibDecompressor.IsZlibDecompressor a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.ZlibDecompressor.ZlibDecompressorGetFileInfoMethodInfo a signature
-- | Information about a specific attribute.
module GI.Gio.Structs.FileAttributeInfo
newtype FileAttributeInfo
FileAttributeInfo :: (ManagedPtr FileAttributeInfo) -> FileAttributeInfo
-- | Construct a FileAttributeInfo struct initialized to zero.
newZeroFileAttributeInfo :: MonadIO m => m FileAttributeInfo
noFileAttributeInfo :: Maybe FileAttributeInfo
fileAttributeInfo_flags :: AttrLabelProxy "flags"
getFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> m [FileAttributeInfoFlags]
setFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> [FileAttributeInfoFlags] -> m ()
clearFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m ()
fileAttributeInfo_name :: AttrLabelProxy "name"
getFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m (Maybe Text)
setFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> CString -> m ()
fileAttributeInfo_type :: AttrLabelProxy "type"
getFileAttributeInfoType :: MonadIO m => FileAttributeInfo -> m FileAttributeType
setFileAttributeInfoType :: MonadIO m => FileAttributeInfo -> FileAttributeType -> m ()
instance Data.GI.Base.BasicTypes.WrappedPtr GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo
instance tag ~ 'Data.GI.Base.Attributes.AttrSet => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo tag
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.FileAttributeInfo.FileAttributeInfoNameFieldInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.FileAttributeInfo.FileAttributeInfoTypeFieldInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.FileAttributeInfo.FileAttributeInfoFlagsFieldInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo
instance (info ~ GI.Gio.Structs.FileAttributeInfo.ResolveFileAttributeInfoMethod t GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo -> p)
instance (info ~ GI.Gio.Structs.FileAttributeInfo.ResolveFileAttributeInfoMethod t GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo -> p)
-- | Acts as a lightweight registry for possible valid file attributes. The
-- registry stores Key-Value pair formats as
-- GFileAttributeInfos.
module GI.Gio.Structs.FileAttributeInfoList
newtype FileAttributeInfoList
FileAttributeInfoList :: (ManagedPtr FileAttributeInfoList) -> FileAttributeInfoList
-- | Construct a FileAttributeInfoList struct initialized to zero.
newZeroFileAttributeInfoList :: MonadIO m => m FileAttributeInfoList
noFileAttributeInfoList :: Maybe FileAttributeInfoList
data FileAttributeInfoListAddMethodInfo
-- | Adds a new attribute with name to the
-- list, setting its type and
-- flags.
fileAttributeInfoListAdd :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> Text -> FileAttributeType -> [FileAttributeInfoFlags] -> m ()
data FileAttributeInfoListDupMethodInfo
-- | Makes a duplicate of a file attribute info list.
fileAttributeInfoListDup :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> m FileAttributeInfoList
data FileAttributeInfoListLookupMethodInfo
-- | 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
data FileAttributeInfoListRefMethodInfo
-- | References a file attribute info list.
fileAttributeInfoListRef :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> m FileAttributeInfoList
data FileAttributeInfoListUnrefMethodInfo
-- | Removes a reference from the given list. If the
-- reference count falls to zero, the list is deleted.
fileAttributeInfoListUnref :: (HasCallStack, MonadIO m) => FileAttributeInfoList -> m ()
clearFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m ()
fileAttributeInfoList_infos :: AttrLabelProxy "infos"
getFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> m (Maybe FileAttributeInfo)
setFileAttributeInfoListInfos :: MonadIO m => FileAttributeInfoList -> Ptr FileAttributeInfo -> m ()
fileAttributeInfoList_nInfos :: AttrLabelProxy "nInfos"
getFileAttributeInfoListNInfos :: MonadIO m => FileAttributeInfoList -> m Int32
setFileAttributeInfoListNInfos :: MonadIO m => FileAttributeInfoList -> Int32 -> m ()
instance Data.GI.Base.BasicTypes.BoxedObject GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList
instance tag ~ 'Data.GI.Base.Attributes.AttrSet => Data.GI.Base.Constructible.Constructible GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList tag
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoListInfosFieldInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoListNInfosFieldInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList
instance (signature ~ (Data.Text.Internal.Text -> GI.Gio.Enums.FileAttributeType -> [GI.Gio.Flags.FileAttributeInfoFlags] -> m ()), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoListAddMethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList signature
instance (signature ~ m GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoListDupMethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList signature
instance (signature ~ (Data.Text.Internal.Text -> m GI.Gio.Structs.FileAttributeInfo.FileAttributeInfo), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoListLookupMethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList signature
instance (signature ~ m GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList, Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoListRefMethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoListUnrefMethodInfo GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList signature
instance (info ~ GI.Gio.Structs.FileAttributeInfoList.ResolveFileAttributeInfoListMethod t GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList -> p)
instance (info ~ GI.Gio.Structs.FileAttributeInfoList.ResolveFileAttributeInfoListMethod t GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Structs.FileAttributeInfoList.FileAttributeInfoList -> p)
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.
-- | The string used to obtain the volume class with
-- volumeGetIdentifier.
--
-- Known volume classes include device and network.
-- 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 proxy resolving functionality. See [Extending
-- GIO][extending-gio].
-- | Extension point for proxy functionality. See [Extending
-- GIO][extending-gio].
-- | Extension point for network status monitoring functionality. See
-- [Extending GIO][extending-gio].
-- | No description available in the introspection data.
-- | The name of the link that associates a menu item with a submenu.
--
-- See also menuItemSetLink.
-- | 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.
-- | 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()
-- | The menu item attribute which holds the label of the item.
-- | 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).
-- | The menu item attribute that holds the namespace for all action names
-- in menus that are linked from this item.
-- | 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().
-- | 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. 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.
-- | 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.
-- | A key in the "time" namespace for getting the miliseconds 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 UNIX time since the
-- file was modified.
-- | 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 UNIX time since the
-- file was created.
--
-- 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 UNIX time since the
-- file was last changed.
--
-- 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 UNIX time since the
-- file was last accessed.
-- | 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.
-- | 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.
-- | 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.
-- | 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.
-- | 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 "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.
-- | 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.
-- | 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.
-- | 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.
-- | 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.
-- | 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.
-- | A key in the "mountable" namespace for checking if a file (of type
-- G_FILE_TYPE_MOUNTABLE) can be started. Corresponding
-- FileAttributeType is FileAttributeTypeBoolean.
-- | A key in the "mountable" namespace for checking if a file (of type
-- G_FILE_TYPE_MOUNTABLE) can be polled. Corresponding
-- FileAttributeType is FileAttributeTypeBoolean.
-- | 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.
-- | 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 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'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.
-- | Extension point for default handler to URI association. See [Extending
-- GIO][extending-gio].
module GI.Gio.Callbacks
type ActionEntryActivateFieldCallback = SimpleAction -> GVariant -> IO ()
type ActionEntryActivateFieldCallback_WithClosures = SimpleAction -> GVariant -> Ptr () -> IO ()
type C_ActionEntryActivateFieldCallback = Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO ()
drop_closures_ActionEntryActivateFieldCallback :: ActionEntryActivateFieldCallback -> ActionEntryActivateFieldCallback_WithClosures
dynamic_ActionEntryActivateFieldCallback :: (HasCallStack, MonadIO m, IsSimpleAction a) => FunPtr C_ActionEntryActivateFieldCallback -> a -> GVariant -> Ptr () -> m ()
genClosure_ActionEntryActivateFieldCallback :: ActionEntryActivateFieldCallback -> IO Closure
mk_ActionEntryActivateFieldCallback :: C_ActionEntryActivateFieldCallback -> IO (FunPtr C_ActionEntryActivateFieldCallback)
noActionEntryActivateFieldCallback :: Maybe ActionEntryActivateFieldCallback
noActionEntryActivateFieldCallback_WithClosures :: Maybe ActionEntryActivateFieldCallback_WithClosures
wrap_ActionEntryActivateFieldCallback :: Maybe (Ptr (FunPtr C_ActionEntryActivateFieldCallback)) -> ActionEntryActivateFieldCallback_WithClosures -> Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO ()
type ActionEntryChangeStateFieldCallback = SimpleAction -> GVariant -> IO ()
type ActionEntryChangeStateFieldCallback_WithClosures = SimpleAction -> GVariant -> Ptr () -> IO ()
type C_ActionEntryChangeStateFieldCallback = Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO ()
drop_closures_ActionEntryChangeStateFieldCallback :: ActionEntryChangeStateFieldCallback -> ActionEntryChangeStateFieldCallback_WithClosures
dynamic_ActionEntryChangeStateFieldCallback :: (HasCallStack, MonadIO m, IsSimpleAction a) => FunPtr C_ActionEntryChangeStateFieldCallback -> a -> GVariant -> Ptr () -> m ()
genClosure_ActionEntryChangeStateFieldCallback :: ActionEntryChangeStateFieldCallback -> IO Closure
mk_ActionEntryChangeStateFieldCallback :: C_ActionEntryChangeStateFieldCallback -> IO (FunPtr C_ActionEntryChangeStateFieldCallback)
noActionEntryChangeStateFieldCallback :: Maybe ActionEntryChangeStateFieldCallback
noActionEntryChangeStateFieldCallback_WithClosures :: Maybe ActionEntryChangeStateFieldCallback_WithClosures
wrap_ActionEntryChangeStateFieldCallback :: Maybe (Ptr (FunPtr C_ActionEntryChangeStateFieldCallback)) -> ActionEntryChangeStateFieldCallback_WithClosures -> Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO ()
type AsyncReadyCallback = Object -> AsyncResult -> IO ()
type AsyncReadyCallback_WithClosures = Object -> AsyncResult -> Ptr () -> IO ()
type C_AsyncReadyCallback = Ptr Object -> Ptr AsyncResult -> Ptr () -> IO ()
drop_closures_AsyncReadyCallback :: AsyncReadyCallback -> AsyncReadyCallback_WithClosures
dynamic_AsyncReadyCallback :: (HasCallStack, MonadIO m, IsObject a, IsAsyncResult b) => FunPtr C_AsyncReadyCallback -> a -> b -> Ptr () -> m ()
genClosure_AsyncReadyCallback :: AsyncReadyCallback -> IO Closure
mk_AsyncReadyCallback :: C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
noAsyncReadyCallback :: Maybe AsyncReadyCallback
noAsyncReadyCallback_WithClosures :: Maybe AsyncReadyCallback_WithClosures
wrap_AsyncReadyCallback :: Maybe (Ptr (FunPtr C_AsyncReadyCallback)) -> AsyncReadyCallback_WithClosures -> Ptr Object -> Ptr AsyncResult -> Ptr () -> IO ()
type BusAcquiredCallback = DBusConnection -> Text -> IO ()
type BusAcquiredCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()
type C_BusAcquiredCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()
drop_closures_BusAcquiredCallback :: BusAcquiredCallback -> BusAcquiredCallback_WithClosures
dynamic_BusAcquiredCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusAcquiredCallback -> a -> Text -> Ptr () -> m ()
genClosure_BusAcquiredCallback :: BusAcquiredCallback -> IO Closure
mk_BusAcquiredCallback :: C_BusAcquiredCallback -> IO (FunPtr C_BusAcquiredCallback)
noBusAcquiredCallback :: Maybe BusAcquiredCallback
noBusAcquiredCallback_WithClosures :: Maybe BusAcquiredCallback_WithClosures
wrap_BusAcquiredCallback :: Maybe (Ptr (FunPtr C_BusAcquiredCallback)) -> BusAcquiredCallback_WithClosures -> Ptr DBusConnection -> CString -> Ptr () -> IO ()
type BusNameAcquiredCallback = DBusConnection -> Text -> IO ()
type BusNameAcquiredCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()
type C_BusNameAcquiredCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()
drop_closures_BusNameAcquiredCallback :: BusNameAcquiredCallback -> BusNameAcquiredCallback_WithClosures
dynamic_BusNameAcquiredCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameAcquiredCallback -> a -> Text -> Ptr () -> m ()
genClosure_BusNameAcquiredCallback :: BusNameAcquiredCallback -> IO Closure
mk_BusNameAcquiredCallback :: C_BusNameAcquiredCallback -> IO (FunPtr C_BusNameAcquiredCallback)
noBusNameAcquiredCallback :: Maybe BusNameAcquiredCallback
noBusNameAcquiredCallback_WithClosures :: Maybe BusNameAcquiredCallback_WithClosures
wrap_BusNameAcquiredCallback :: Maybe (Ptr (FunPtr C_BusNameAcquiredCallback)) -> BusNameAcquiredCallback_WithClosures -> Ptr DBusConnection -> CString -> Ptr () -> IO ()
type BusNameAppearedCallback = DBusConnection -> Text -> Text -> IO ()
type BusNameAppearedCallback_WithClosures = DBusConnection -> Text -> Text -> Ptr () -> IO ()
type C_BusNameAppearedCallback = Ptr DBusConnection -> CString -> CString -> Ptr () -> IO ()
drop_closures_BusNameAppearedCallback :: BusNameAppearedCallback -> BusNameAppearedCallback_WithClosures
dynamic_BusNameAppearedCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameAppearedCallback -> a -> Text -> Text -> Ptr () -> m ()
genClosure_BusNameAppearedCallback :: BusNameAppearedCallback -> IO Closure
mk_BusNameAppearedCallback :: C_BusNameAppearedCallback -> IO (FunPtr C_BusNameAppearedCallback)
noBusNameAppearedCallback :: Maybe BusNameAppearedCallback
noBusNameAppearedCallback_WithClosures :: Maybe BusNameAppearedCallback_WithClosures
wrap_BusNameAppearedCallback :: Maybe (Ptr (FunPtr C_BusNameAppearedCallback)) -> BusNameAppearedCallback_WithClosures -> Ptr DBusConnection -> CString -> CString -> Ptr () -> IO ()
type BusNameLostCallback = DBusConnection -> Text -> IO ()
type BusNameLostCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()
type C_BusNameLostCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()
drop_closures_BusNameLostCallback :: BusNameLostCallback -> BusNameLostCallback_WithClosures
dynamic_BusNameLostCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameLostCallback -> a -> Text -> Ptr () -> m ()
genClosure_BusNameLostCallback :: BusNameLostCallback -> IO Closure
mk_BusNameLostCallback :: C_BusNameLostCallback -> IO (FunPtr C_BusNameLostCallback)
noBusNameLostCallback :: Maybe BusNameLostCallback
noBusNameLostCallback_WithClosures :: Maybe BusNameLostCallback_WithClosures
wrap_BusNameLostCallback :: Maybe (Ptr (FunPtr C_BusNameLostCallback)) -> BusNameLostCallback_WithClosures -> Ptr DBusConnection -> CString -> Ptr () -> IO ()
type BusNameVanishedCallback = DBusConnection -> Text -> IO ()
type BusNameVanishedCallback_WithClosures = DBusConnection -> Text -> Ptr () -> IO ()
type C_BusNameVanishedCallback = Ptr DBusConnection -> CString -> Ptr () -> IO ()
drop_closures_BusNameVanishedCallback :: BusNameVanishedCallback -> BusNameVanishedCallback_WithClosures
dynamic_BusNameVanishedCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_BusNameVanishedCallback -> a -> Text -> Ptr () -> m ()
genClosure_BusNameVanishedCallback :: BusNameVanishedCallback -> IO Closure
mk_BusNameVanishedCallback :: C_BusNameVanishedCallback -> IO (FunPtr C_BusNameVanishedCallback)
noBusNameVanishedCallback :: Maybe BusNameVanishedCallback
noBusNameVanishedCallback_WithClosures :: Maybe BusNameVanishedCallback_WithClosures
wrap_BusNameVanishedCallback :: Maybe (Ptr (FunPtr C_BusNameVanishedCallback)) -> BusNameVanishedCallback_WithClosures -> Ptr DBusConnection -> CString -> Ptr () -> IO ()
type C_CancellableSourceFunc = Ptr Cancellable -> Ptr () -> IO CInt
type CancellableSourceFunc = Maybe Cancellable -> IO Bool
type CancellableSourceFunc_WithClosures = Maybe Cancellable -> Ptr () -> IO Bool
drop_closures_CancellableSourceFunc :: CancellableSourceFunc -> CancellableSourceFunc_WithClosures
dynamic_CancellableSourceFunc :: (HasCallStack, MonadIO m, IsCancellable a) => FunPtr C_CancellableSourceFunc -> Maybe (a) -> Ptr () -> m Bool
genClosure_CancellableSourceFunc :: CancellableSourceFunc -> IO Closure
mk_CancellableSourceFunc :: C_CancellableSourceFunc -> IO (FunPtr C_CancellableSourceFunc)
noCancellableSourceFunc :: Maybe CancellableSourceFunc
noCancellableSourceFunc_WithClosures :: Maybe CancellableSourceFunc_WithClosures
wrap_CancellableSourceFunc :: Maybe (Ptr (FunPtr C_CancellableSourceFunc)) -> CancellableSourceFunc_WithClosures -> Ptr Cancellable -> Ptr () -> IO CInt
type C_DBusInterfaceGetPropertyFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GError -> Ptr () -> IO (Ptr GVariant)
type DBusInterfaceGetPropertyFunc = DBusConnection -> Text -> Text -> Text -> Text -> GError -> IO GVariant
type DBusInterfaceGetPropertyFunc_WithClosures = DBusConnection -> Text -> Text -> Text -> Text -> GError -> Ptr () -> IO GVariant
drop_closures_DBusInterfaceGetPropertyFunc :: DBusInterfaceGetPropertyFunc -> DBusInterfaceGetPropertyFunc_WithClosures
dynamic_DBusInterfaceGetPropertyFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusInterfaceGetPropertyFunc -> a -> Text -> Text -> Text -> Text -> GError -> Ptr () -> m GVariant
genClosure_DBusInterfaceGetPropertyFunc :: DBusInterfaceGetPropertyFunc -> IO Closure
mk_DBusInterfaceGetPropertyFunc :: C_DBusInterfaceGetPropertyFunc -> IO (FunPtr C_DBusInterfaceGetPropertyFunc)
noDBusInterfaceGetPropertyFunc :: Maybe DBusInterfaceGetPropertyFunc
noDBusInterfaceGetPropertyFunc_WithClosures :: Maybe DBusInterfaceGetPropertyFunc_WithClosures
wrap_DBusInterfaceGetPropertyFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceGetPropertyFunc)) -> DBusInterfaceGetPropertyFunc_WithClosures -> Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GError -> Ptr () -> IO (Ptr GVariant)
type C_DBusInterfaceMethodCallFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr DBusMethodInvocation -> Ptr () -> IO ()
type DBusInterfaceMethodCallFunc = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> DBusMethodInvocation -> IO ()
type DBusInterfaceMethodCallFunc_WithClosures = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> DBusMethodInvocation -> Ptr () -> IO ()
drop_closures_DBusInterfaceMethodCallFunc :: DBusInterfaceMethodCallFunc -> DBusInterfaceMethodCallFunc_WithClosures
dynamic_DBusInterfaceMethodCallFunc :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMethodInvocation b) => FunPtr C_DBusInterfaceMethodCallFunc -> a -> Text -> Text -> Text -> Text -> GVariant -> b -> Ptr () -> m ()
genClosure_DBusInterfaceMethodCallFunc :: DBusInterfaceMethodCallFunc -> IO Closure
mk_DBusInterfaceMethodCallFunc :: C_DBusInterfaceMethodCallFunc -> IO (FunPtr C_DBusInterfaceMethodCallFunc)
noDBusInterfaceMethodCallFunc :: Maybe DBusInterfaceMethodCallFunc
noDBusInterfaceMethodCallFunc_WithClosures :: Maybe DBusInterfaceMethodCallFunc_WithClosures
wrap_DBusInterfaceMethodCallFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceMethodCallFunc)) -> DBusInterfaceMethodCallFunc_WithClosures -> Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr DBusMethodInvocation -> Ptr () -> IO ()
type C_DBusInterfaceSetPropertyFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr GError -> Ptr () -> IO CInt
type DBusInterfaceSetPropertyFunc = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> GError -> IO Bool
type DBusInterfaceSetPropertyFunc_WithClosures = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> GError -> Ptr () -> IO Bool
drop_closures_DBusInterfaceSetPropertyFunc :: DBusInterfaceSetPropertyFunc -> DBusInterfaceSetPropertyFunc_WithClosures
dynamic_DBusInterfaceSetPropertyFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusInterfaceSetPropertyFunc -> a -> Text -> Text -> Text -> Text -> GVariant -> GError -> Ptr () -> m Bool
genClosure_DBusInterfaceSetPropertyFunc :: DBusInterfaceSetPropertyFunc -> IO Closure
mk_DBusInterfaceSetPropertyFunc :: C_DBusInterfaceSetPropertyFunc -> IO (FunPtr C_DBusInterfaceSetPropertyFunc)
noDBusInterfaceSetPropertyFunc :: Maybe DBusInterfaceSetPropertyFunc
noDBusInterfaceSetPropertyFunc_WithClosures :: Maybe DBusInterfaceSetPropertyFunc_WithClosures
wrap_DBusInterfaceSetPropertyFunc :: Maybe (Ptr (FunPtr C_DBusInterfaceSetPropertyFunc)) -> DBusInterfaceSetPropertyFunc_WithClosures -> Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr GError -> Ptr () -> IO CInt
type C_DBusMessageFilterFunction = Ptr DBusConnection -> Ptr DBusMessage -> CInt -> Ptr () -> IO (Ptr DBusMessage)
type DBusMessageFilterFunction = DBusConnection -> DBusMessage -> Bool -> IO (Maybe DBusMessage)
type DBusMessageFilterFunction_WithClosures = DBusConnection -> DBusMessage -> Bool -> Ptr () -> IO (Maybe DBusMessage)
drop_closures_DBusMessageFilterFunction :: DBusMessageFilterFunction -> DBusMessageFilterFunction_WithClosures
dynamic_DBusMessageFilterFunction :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) => FunPtr C_DBusMessageFilterFunction -> a -> b -> Bool -> Ptr () -> m (Maybe DBusMessage)
genClosure_DBusMessageFilterFunction :: DBusMessageFilterFunction -> IO Closure
mk_DBusMessageFilterFunction :: C_DBusMessageFilterFunction -> IO (FunPtr C_DBusMessageFilterFunction)
noDBusMessageFilterFunction :: Maybe DBusMessageFilterFunction
noDBusMessageFilterFunction_WithClosures :: Maybe DBusMessageFilterFunction_WithClosures
wrap_DBusMessageFilterFunction :: Maybe (Ptr (FunPtr C_DBusMessageFilterFunction)) -> DBusMessageFilterFunction_WithClosures -> Ptr DBusConnection -> Ptr DBusMessage -> CInt -> Ptr () -> IO (Ptr DBusMessage)
type C_DBusProxyTypeFunc = Ptr DBusObjectManagerClient -> CString -> CString -> Ptr () -> IO CGType
type DBusProxyTypeFunc = DBusObjectManagerClient -> Text -> Maybe Text -> IO GType
type DBusProxyTypeFunc_WithClosures = DBusObjectManagerClient -> Text -> Maybe Text -> Ptr () -> IO GType
drop_closures_DBusProxyTypeFunc :: DBusProxyTypeFunc -> DBusProxyTypeFunc_WithClosures
dynamic_DBusProxyTypeFunc :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => FunPtr C_DBusProxyTypeFunc -> a -> Text -> Maybe (Text) -> Ptr () -> m GType
genClosure_DBusProxyTypeFunc :: DBusProxyTypeFunc -> IO Closure
mk_DBusProxyTypeFunc :: C_DBusProxyTypeFunc -> IO (FunPtr C_DBusProxyTypeFunc)
noDBusProxyTypeFunc :: Maybe DBusProxyTypeFunc
noDBusProxyTypeFunc_WithClosures :: Maybe DBusProxyTypeFunc_WithClosures
wrap_DBusProxyTypeFunc :: Maybe (Ptr (FunPtr C_DBusProxyTypeFunc)) -> DBusProxyTypeFunc_WithClosures -> Ptr DBusObjectManagerClient -> CString -> CString -> Ptr () -> IO CGType
type C_DBusSignalCallback = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr () -> IO ()
type DBusSignalCallback = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> IO ()
type DBusSignalCallback_WithClosures = DBusConnection -> Text -> Text -> Text -> Text -> GVariant -> Ptr () -> IO ()
drop_closures_DBusSignalCallback :: DBusSignalCallback -> DBusSignalCallback_WithClosures
dynamic_DBusSignalCallback :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusSignalCallback -> a -> Text -> Text -> Text -> Text -> GVariant -> Ptr () -> m ()
genClosure_DBusSignalCallback :: DBusSignalCallback -> IO Closure
mk_DBusSignalCallback :: C_DBusSignalCallback -> IO (FunPtr C_DBusSignalCallback)
noDBusSignalCallback :: Maybe DBusSignalCallback
noDBusSignalCallback_WithClosures :: Maybe DBusSignalCallback_WithClosures
wrap_DBusSignalCallback :: Maybe (Ptr (FunPtr C_DBusSignalCallback)) -> DBusSignalCallback_WithClosures -> Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr () -> IO ()
type C_DBusSubtreeDispatchFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr () -> Ptr () -> IO (Ptr DBusInterfaceVTable)
type DBusSubtreeDispatchFunc = DBusConnection -> Text -> Text -> Text -> Text -> Ptr () -> IO DBusInterfaceVTable
type DBusSubtreeDispatchFunc_WithClosures = DBusConnection -> Text -> Text -> Text -> Text -> Ptr () -> Ptr () -> IO DBusInterfaceVTable
drop_closures_DBusSubtreeDispatchFunc :: DBusSubtreeDispatchFunc -> DBusSubtreeDispatchFunc_WithClosures
dynamic_DBusSubtreeDispatchFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusSubtreeDispatchFunc -> a -> Text -> Text -> Text -> Text -> Ptr () -> Ptr () -> m DBusInterfaceVTable
genClosure_DBusSubtreeDispatchFunc :: DBusSubtreeDispatchFunc -> IO Closure
mk_DBusSubtreeDispatchFunc :: C_DBusSubtreeDispatchFunc -> IO (FunPtr C_DBusSubtreeDispatchFunc)
noDBusSubtreeDispatchFunc :: Maybe DBusSubtreeDispatchFunc
noDBusSubtreeDispatchFunc_WithClosures :: Maybe DBusSubtreeDispatchFunc_WithClosures
wrap_DBusSubtreeDispatchFunc :: Maybe (Ptr (FunPtr C_DBusSubtreeDispatchFunc)) -> DBusSubtreeDispatchFunc_WithClosures -> Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr () -> Ptr () -> IO (Ptr DBusInterfaceVTable)
type C_DBusSubtreeIntrospectFunc = Ptr DBusConnection -> CString -> CString -> CString -> Ptr () -> IO (Ptr DBusInterfaceInfo)
type DBusSubtreeIntrospectFunc = DBusConnection -> Text -> Text -> Text -> IO DBusInterfaceInfo
type DBusSubtreeIntrospectFunc_WithClosures = DBusConnection -> Text -> Text -> Text -> Ptr () -> IO DBusInterfaceInfo
drop_closures_DBusSubtreeIntrospectFunc :: DBusSubtreeIntrospectFunc -> DBusSubtreeIntrospectFunc_WithClosures
dynamic_DBusSubtreeIntrospectFunc :: (HasCallStack, MonadIO m, IsDBusConnection a) => FunPtr C_DBusSubtreeIntrospectFunc -> a -> Text -> Text -> Text -> Ptr () -> m DBusInterfaceInfo
genClosure_DBusSubtreeIntrospectFunc :: DBusSubtreeIntrospectFunc -> IO Closure
mk_DBusSubtreeIntrospectFunc :: C_DBusSubtreeIntrospectFunc -> IO (FunPtr C_DBusSubtreeIntrospectFunc)
noDBusSubtreeIntrospectFunc :: Maybe DBusSubtreeIntrospectFunc
noDBusSubtreeIntrospectFunc_WithClosures :: Maybe DBusSubtreeIntrospectFunc_WithClosures
wrap_DBusSubtreeIntrospectFunc :: Maybe (Ptr (FunPtr C_DBusSubtreeIntrospectFunc)) -> DBusSubtreeIntrospectFunc_WithClosures -> Ptr DBusConnection -> CString -> CString -> CString -> Ptr () -> IO (Ptr DBusInterfaceInfo)
type C_DatagramBasedSourceFunc = Ptr DatagramBased -> CUInt -> Ptr () -> IO CInt
type DatagramBasedSourceFunc = DatagramBased -> [IOCondition] -> IO Bool
type DatagramBasedSourceFunc_WithClosures = DatagramBased -> [IOCondition] -> Ptr () -> IO Bool
drop_closures_DatagramBasedSourceFunc :: DatagramBasedSourceFunc -> DatagramBasedSourceFunc_WithClosures
dynamic_DatagramBasedSourceFunc :: (HasCallStack, MonadIO m, IsDatagramBased a) => FunPtr C_DatagramBasedSourceFunc -> a -> [IOCondition] -> Ptr () -> m Bool
genClosure_DatagramBasedSourceFunc :: DatagramBasedSourceFunc -> IO Closure
mk_DatagramBasedSourceFunc :: C_DatagramBasedSourceFunc -> IO (FunPtr C_DatagramBasedSourceFunc)
noDatagramBasedSourceFunc :: Maybe DatagramBasedSourceFunc
noDatagramBasedSourceFunc_WithClosures :: Maybe DatagramBasedSourceFunc_WithClosures
wrap_DatagramBasedSourceFunc :: Maybe (Ptr (FunPtr C_DatagramBasedSourceFunc)) -> DatagramBasedSourceFunc_WithClosures -> Ptr DatagramBased -> CUInt -> Ptr () -> IO CInt
type C_DesktopAppLaunchCallback = Ptr DesktopAppInfo -> Int32 -> Ptr () -> IO ()
type DesktopAppLaunchCallback = DesktopAppInfo -> Int32 -> IO ()
type DesktopAppLaunchCallback_WithClosures = DesktopAppInfo -> Int32 -> Ptr () -> IO ()
drop_closures_DesktopAppLaunchCallback :: DesktopAppLaunchCallback -> DesktopAppLaunchCallback_WithClosures
dynamic_DesktopAppLaunchCallback :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => FunPtr C_DesktopAppLaunchCallback -> a -> Int32 -> Ptr () -> m ()
genClosure_DesktopAppLaunchCallback :: DesktopAppLaunchCallback -> IO Closure
mk_DesktopAppLaunchCallback :: C_DesktopAppLaunchCallback -> IO (FunPtr C_DesktopAppLaunchCallback)
noDesktopAppLaunchCallback :: Maybe DesktopAppLaunchCallback
noDesktopAppLaunchCallback_WithClosures :: Maybe DesktopAppLaunchCallback_WithClosures
wrap_DesktopAppLaunchCallback :: Maybe (Ptr (FunPtr C_DesktopAppLaunchCallback)) -> DesktopAppLaunchCallback_WithClosures -> Ptr DesktopAppInfo -> Int32 -> Ptr () -> IO ()
type C_FileMeasureProgressCallback = CInt -> Word64 -> Word64 -> Word64 -> Ptr () -> IO ()
type FileMeasureProgressCallback = Bool -> Word64 -> Word64 -> Word64 -> IO ()
type FileMeasureProgressCallback_WithClosures = Bool -> Word64 -> Word64 -> Word64 -> Ptr () -> IO ()
drop_closures_FileMeasureProgressCallback :: FileMeasureProgressCallback -> FileMeasureProgressCallback_WithClosures
dynamic_FileMeasureProgressCallback :: (HasCallStack, MonadIO m) => FunPtr C_FileMeasureProgressCallback -> Bool -> Word64 -> Word64 -> Word64 -> Ptr () -> m ()
genClosure_FileMeasureProgressCallback :: FileMeasureProgressCallback -> IO Closure
mk_FileMeasureProgressCallback :: C_FileMeasureProgressCallback -> IO (FunPtr C_FileMeasureProgressCallback)
noFileMeasureProgressCallback :: Maybe FileMeasureProgressCallback
noFileMeasureProgressCallback_WithClosures :: Maybe FileMeasureProgressCallback_WithClosures
wrap_FileMeasureProgressCallback :: Maybe (Ptr (FunPtr C_FileMeasureProgressCallback)) -> FileMeasureProgressCallback_WithClosures -> CInt -> Word64 -> Word64 -> Word64 -> Ptr () -> IO ()
type C_FileProgressCallback = Int64 -> Int64 -> Ptr () -> IO ()
type FileProgressCallback = Int64 -> Int64 -> IO ()
type FileProgressCallback_WithClosures = Int64 -> Int64 -> Ptr () -> IO ()
drop_closures_FileProgressCallback :: FileProgressCallback -> FileProgressCallback_WithClosures
dynamic_FileProgressCallback :: (HasCallStack, MonadIO m) => FunPtr C_FileProgressCallback -> Int64 -> Int64 -> Ptr () -> m ()
genClosure_FileProgressCallback :: FileProgressCallback -> IO Closure
mk_FileProgressCallback :: C_FileProgressCallback -> IO (FunPtr C_FileProgressCallback)
noFileProgressCallback :: Maybe FileProgressCallback
noFileProgressCallback_WithClosures :: Maybe FileProgressCallback_WithClosures
wrap_FileProgressCallback :: Maybe (Ptr (FunPtr C_FileProgressCallback)) -> FileProgressCallback_WithClosures -> Int64 -> Int64 -> Ptr () -> IO ()
type C_FileReadMoreCallback = CString -> Int64 -> Ptr () -> IO CInt
type FileReadMoreCallback = Text -> Int64 -> Ptr () -> IO Bool
dynamic_FileReadMoreCallback :: (HasCallStack, MonadIO m) => FunPtr C_FileReadMoreCallback -> Text -> Int64 -> Ptr () -> m Bool
genClosure_FileReadMoreCallback :: FileReadMoreCallback -> IO Closure
mk_FileReadMoreCallback :: C_FileReadMoreCallback -> IO (FunPtr C_FileReadMoreCallback)
noFileReadMoreCallback :: Maybe FileReadMoreCallback
wrap_FileReadMoreCallback :: Maybe (Ptr (FunPtr C_FileReadMoreCallback)) -> FileReadMoreCallback -> CString -> Int64 -> Ptr () -> IO CInt
type C_IOSchedulerJobFunc = Ptr IOSchedulerJob -> Ptr Cancellable -> Ptr () -> IO CInt
type IOSchedulerJobFunc = IOSchedulerJob -> Maybe Cancellable -> IO Bool
type IOSchedulerJobFunc_WithClosures = IOSchedulerJob -> Maybe Cancellable -> Ptr () -> IO Bool
drop_closures_IOSchedulerJobFunc :: IOSchedulerJobFunc -> IOSchedulerJobFunc_WithClosures
dynamic_IOSchedulerJobFunc :: (HasCallStack, MonadIO m, IsCancellable a) => FunPtr C_IOSchedulerJobFunc -> IOSchedulerJob -> Maybe (a) -> Ptr () -> m Bool
genClosure_IOSchedulerJobFunc :: IOSchedulerJobFunc -> IO Closure
mk_IOSchedulerJobFunc :: C_IOSchedulerJobFunc -> IO (FunPtr C_IOSchedulerJobFunc)
noIOSchedulerJobFunc :: Maybe IOSchedulerJobFunc
noIOSchedulerJobFunc_WithClosures :: Maybe IOSchedulerJobFunc_WithClosures
wrap_IOSchedulerJobFunc :: Maybe (Ptr (FunPtr C_IOSchedulerJobFunc)) -> IOSchedulerJobFunc_WithClosures -> Ptr IOSchedulerJob -> Ptr Cancellable -> Ptr () -> IO CInt
type C_PollableSourceFunc = Ptr Object -> Ptr () -> IO CInt
type PollableSourceFunc = Object -> IO Bool
type PollableSourceFunc_WithClosures = Object -> Ptr () -> IO Bool
drop_closures_PollableSourceFunc :: PollableSourceFunc -> PollableSourceFunc_WithClosures
dynamic_PollableSourceFunc :: (HasCallStack, MonadIO m, IsObject a) => FunPtr C_PollableSourceFunc -> a -> Ptr () -> m Bool
genClosure_PollableSourceFunc :: PollableSourceFunc -> IO Closure
mk_PollableSourceFunc :: C_PollableSourceFunc -> IO (FunPtr C_PollableSourceFunc)
noPollableSourceFunc :: Maybe PollableSourceFunc
noPollableSourceFunc_WithClosures :: Maybe PollableSourceFunc_WithClosures
wrap_PollableSourceFunc :: Maybe (Ptr (FunPtr C_PollableSourceFunc)) -> PollableSourceFunc_WithClosures -> Ptr Object -> Ptr () -> IO CInt
type C_ReallocFunc = Ptr () -> Word64 -> IO (Ptr ())
type ReallocFunc = Ptr () -> Word64 -> IO (Ptr ())
dynamic_ReallocFunc :: (HasCallStack, MonadIO m) => FunPtr C_ReallocFunc -> Ptr () -> Word64 -> m (Ptr ())
genClosure_ReallocFunc :: ReallocFunc -> IO Closure
mk_ReallocFunc :: C_ReallocFunc -> IO (FunPtr C_ReallocFunc)
noReallocFunc :: Maybe ReallocFunc
wrap_ReallocFunc :: Maybe (Ptr (FunPtr C_ReallocFunc)) -> ReallocFunc -> Ptr () -> Word64 -> IO (Ptr ())
type C_SettingsBindGetMapping = Ptr GValue -> Ptr GVariant -> Ptr () -> IO CInt
type SettingsBindGetMapping = GValue -> GVariant -> IO Bool
type SettingsBindGetMapping_WithClosures = GValue -> GVariant -> Ptr () -> IO Bool
drop_closures_SettingsBindGetMapping :: SettingsBindGetMapping -> SettingsBindGetMapping_WithClosures
dynamic_SettingsBindGetMapping :: (HasCallStack, MonadIO m) => FunPtr C_SettingsBindGetMapping -> GValue -> GVariant -> Ptr () -> m Bool
genClosure_SettingsBindGetMapping :: SettingsBindGetMapping -> IO Closure
mk_SettingsBindGetMapping :: C_SettingsBindGetMapping -> IO (FunPtr C_SettingsBindGetMapping)
noSettingsBindGetMapping :: Maybe SettingsBindGetMapping
noSettingsBindGetMapping_WithClosures :: Maybe SettingsBindGetMapping_WithClosures
wrap_SettingsBindGetMapping :: Maybe (Ptr (FunPtr C_SettingsBindGetMapping)) -> SettingsBindGetMapping_WithClosures -> Ptr GValue -> Ptr GVariant -> Ptr () -> IO CInt
type C_SettingsBindSetMapping = Ptr GValue -> Ptr VariantType -> Ptr () -> IO (Ptr GVariant)
type SettingsBindSetMapping = GValue -> VariantType -> IO GVariant
type SettingsBindSetMapping_WithClosures = GValue -> VariantType -> Ptr () -> IO GVariant
drop_closures_SettingsBindSetMapping :: SettingsBindSetMapping -> SettingsBindSetMapping_WithClosures
dynamic_SettingsBindSetMapping :: (HasCallStack, MonadIO m) => FunPtr C_SettingsBindSetMapping -> GValue -> VariantType -> Ptr () -> m GVariant
genClosure_SettingsBindSetMapping :: SettingsBindSetMapping -> IO Closure
mk_SettingsBindSetMapping :: C_SettingsBindSetMapping -> IO (FunPtr C_SettingsBindSetMapping)
noSettingsBindSetMapping :: Maybe SettingsBindSetMapping
noSettingsBindSetMapping_WithClosures :: Maybe SettingsBindSetMapping_WithClosures
wrap_SettingsBindSetMapping :: Maybe (Ptr (FunPtr C_SettingsBindSetMapping)) -> SettingsBindSetMapping_WithClosures -> Ptr GValue -> Ptr VariantType -> Ptr () -> IO (Ptr GVariant)
type C_SettingsGetMapping = Ptr GVariant -> Ptr (Ptr ()) -> Ptr () -> IO CInt
type SettingsGetMapping = GVariant -> IO (Bool, Ptr ())
type SettingsGetMapping_WithClosures = GVariant -> Ptr () -> IO (Bool, Ptr ())
drop_closures_SettingsGetMapping :: SettingsGetMapping -> SettingsGetMapping_WithClosures
dynamic_SettingsGetMapping :: (HasCallStack, MonadIO m) => FunPtr C_SettingsGetMapping -> GVariant -> Ptr () -> m (Bool, Ptr ())
genClosure_SettingsGetMapping :: SettingsGetMapping -> IO Closure
mk_SettingsGetMapping :: C_SettingsGetMapping -> IO (FunPtr C_SettingsGetMapping)
noSettingsGetMapping :: Maybe SettingsGetMapping
noSettingsGetMapping_WithClosures :: Maybe SettingsGetMapping_WithClosures
wrap_SettingsGetMapping :: Maybe (Ptr (FunPtr C_SettingsGetMapping)) -> SettingsGetMapping_WithClosures -> Ptr GVariant -> Ptr (Ptr ()) -> Ptr () -> IO CInt
type C_SimpleAsyncThreadFunc = Ptr SimpleAsyncResult -> Ptr Object -> Ptr Cancellable -> IO ()
type SimpleAsyncThreadFunc = SimpleAsyncResult -> Object -> Maybe Cancellable -> IO ()
dynamic_SimpleAsyncThreadFunc :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a, IsObject b, IsCancellable c) => FunPtr C_SimpleAsyncThreadFunc -> a -> b -> Maybe (c) -> m ()
genClosure_SimpleAsyncThreadFunc :: SimpleAsyncThreadFunc -> IO Closure
mk_SimpleAsyncThreadFunc :: C_SimpleAsyncThreadFunc -> IO (FunPtr C_SimpleAsyncThreadFunc)
noSimpleAsyncThreadFunc :: Maybe SimpleAsyncThreadFunc
wrap_SimpleAsyncThreadFunc :: Maybe (Ptr (FunPtr C_SimpleAsyncThreadFunc)) -> SimpleAsyncThreadFunc -> Ptr SimpleAsyncResult -> Ptr Object -> Ptr Cancellable -> IO ()
type C_SocketSourceFunc = Ptr Socket -> CUInt -> Ptr () -> IO CInt
type SocketSourceFunc = Socket -> [IOCondition] -> IO Bool
type SocketSourceFunc_WithClosures = Socket -> [IOCondition] -> Ptr () -> IO Bool
drop_closures_SocketSourceFunc :: SocketSourceFunc -> SocketSourceFunc_WithClosures
dynamic_SocketSourceFunc :: (HasCallStack, MonadIO m, IsSocket a) => FunPtr C_SocketSourceFunc -> a -> [IOCondition] -> Ptr () -> m Bool
genClosure_SocketSourceFunc :: SocketSourceFunc -> IO Closure
mk_SocketSourceFunc :: C_SocketSourceFunc -> IO (FunPtr C_SocketSourceFunc)
noSocketSourceFunc :: Maybe SocketSourceFunc
noSocketSourceFunc_WithClosures :: Maybe SocketSourceFunc_WithClosures
wrap_SocketSourceFunc :: Maybe (Ptr (FunPtr C_SocketSourceFunc)) -> SocketSourceFunc_WithClosures -> Ptr Socket -> CUInt -> Ptr () -> IO CInt
type C_TaskThreadFunc = Ptr Task -> Ptr Object -> Ptr () -> Ptr Cancellable -> IO ()
type TaskThreadFunc = Task -> Object -> Ptr () -> Maybe Cancellable -> IO ()
dynamic_TaskThreadFunc :: (HasCallStack, MonadIO m, IsTask a, IsObject b, IsCancellable c) => FunPtr C_TaskThreadFunc -> a -> b -> Ptr () -> Maybe (c) -> m ()
genClosure_TaskThreadFunc :: TaskThreadFunc -> IO Closure
mk_TaskThreadFunc :: C_TaskThreadFunc -> IO (FunPtr C_TaskThreadFunc)
noTaskThreadFunc :: Maybe TaskThreadFunc
wrap_TaskThreadFunc :: Maybe (Ptr (FunPtr C_TaskThreadFunc)) -> TaskThreadFunc -> Ptr Task -> Ptr Object -> Ptr () -> Ptr Cancellable -> IO ()
type C_VfsFileLookupFunc = Ptr Vfs -> CString -> Ptr () -> IO (Ptr File)
type VfsFileLookupFunc = Vfs -> Text -> IO File
type VfsFileLookupFunc_WithClosures = Vfs -> Text -> Ptr () -> IO File
drop_closures_VfsFileLookupFunc :: VfsFileLookupFunc -> VfsFileLookupFunc_WithClosures
dynamic_VfsFileLookupFunc :: (HasCallStack, MonadIO m, IsVfs a) => FunPtr C_VfsFileLookupFunc -> a -> Text -> Ptr () -> m File
genClosure_VfsFileLookupFunc :: VfsFileLookupFunc -> IO Closure
mk_VfsFileLookupFunc :: C_VfsFileLookupFunc -> IO (FunPtr C_VfsFileLookupFunc)
noVfsFileLookupFunc :: Maybe VfsFileLookupFunc
noVfsFileLookupFunc_WithClosures :: Maybe VfsFileLookupFunc_WithClosures
wrap_VfsFileLookupFunc :: Maybe (Ptr (FunPtr C_VfsFileLookupFunc)) -> VfsFileLookupFunc_WithClosures -> Ptr Vfs -> CString -> Ptr () -> IO (Ptr File)
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.
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.
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.
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.
busOwnName :: (HasCallStack, MonadIO m) => BusType -> Text -> [BusNameOwnerFlags] -> Maybe (Closure) -> Maybe (Closure) -> Maybe (Closure) -> m Word32
-- | Version of g_bus_own_name_on_connection() using
-- closures instead of callbacks for easier binding in other languages.
busOwnNameOnConnection :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> [BusNameOwnerFlags] -> Maybe (Closure) -> Maybe (Closure) -> m Word32
-- | Stops owning a name.
busUnownName :: (HasCallStack, MonadIO m) => Word32 -> m ()
-- | Stops watching a name.
busUnwatchName :: (HasCallStack, MonadIO m) => Word32 -> m ()
-- | Version of g_bus_watch_name() using closures instead
-- of callbacks for easier binding in other languages.
busWatchName :: (HasCallStack, MonadIO m) => BusType -> Text -> [BusNameWatcherFlags] -> Maybe (Closure) -> Maybe (Closure) -> m Word32
-- | Version of g_bus_watch_name_on_connection() using
-- closures instead of callbacks for easier binding in other languages.
busWatchNameOnConnection :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> [BusNameWatcherFlags] -> Maybe (Closure) -> Maybe (Closure) -> 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.
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.
contentTypeGetGenericIconName :: (HasCallStack, MonadIO m) => Text -> m (Maybe Text)
-- | Gets the icon for a content type.
contentTypeGetIcon :: (HasCallStack, MonadIO m) => Text -> m Icon
-- | 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.
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.
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
-- | Checks if the content type is the generic "unknown" type. On UNIX this
-- is the "application/octet-stream" mimetype, while on win32 it is "*".
contentTypeIsUnknown :: (HasCallStack, MonadIO m) => Text -> m Bool
-- | 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".
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.
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.
--
-- 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.
dbusAddressGetStream :: (HasCallStack, MonadIO m, IsCancellable a) => Text -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
-- | Finishes an operation started with dbusAddressGetStream.
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.
--
-- This is a synchronous failable function. See
-- dbusAddressGetStream for the asynchronous version.
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).
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:
--
--
-- 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
newtype AppInfo
AppInfo :: (ManagedPtr AppInfo) -> AppInfo
noAppInfo :: Maybe AppInfo
class GObject o => IsAppInfo o
toAppInfo :: IsAppInfo o => o -> IO AppInfo
data AppInfoAddSupportsTypeMethodInfo
-- | 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 ()
data AppInfoCanDeleteMethodInfo
-- | Obtains the information whether the AppInfo can be deleted. See
-- appInfoDelete.
appInfoCanDelete :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool
data AppInfoCanRemoveSupportsTypeMethodInfo
-- | 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) => Text -> Maybe (Text) -> [AppInfoCreateFlags] -> m AppInfo
data AppInfoDeleteMethodInfo
-- | 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.
appInfoDelete :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool
data AppInfoDupMethodInfo
-- | Creates a duplicate of a AppInfo.
appInfoDup :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m AppInfo
data AppInfoEqualMethodInfo
-- | Checks if two GAppInfos are equal.
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]
data AppInfoGetCommandlineMethodInfo
-- | Gets the commandline with which the application will be started.
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
data AppInfoGetDescriptionMethodInfo
-- | Gets a human-readable description of an installed application.
appInfoGetDescription :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Text
data AppInfoGetDisplayNameMethodInfo
-- | Gets the display name of the application. The display name is often
-- more descriptive to the user than the name itself.
appInfoGetDisplayName :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Text
data AppInfoGetExecutableMethodInfo
-- | 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.
appInfoGetFallbackForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]
data AppInfoGetIconMethodInfo
-- | Gets the icon for the application.
appInfoGetIcon :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Icon
data AppInfoGetIdMethodInfo
-- | 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
data AppInfoGetNameMethodInfo
-- | 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.
appInfoGetRecommendedForType :: (HasCallStack, MonadIO m) => Text -> m [AppInfo]
data AppInfoGetSupportedTypesMethodInfo
-- | 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.
appInfoGetSupportedTypes :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m [Text]
data AppInfoLaunchMethodInfo
-- | Launches the application. Passes files to the launched
-- application as arguments, using the optional
-- launchContext 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
-- launchContext.
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.
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.
appInfoLaunchDefaultForUriAsync :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsCancellable b) => Text -> a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
-- | Finishes an asynchronous launch-default-for-uri operation.
appInfoLaunchDefaultForUriFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
data AppInfoLaunchUrisMethodInfo
-- | Launches the application. This passes the uris to the
-- launched application as arguments, using the optional
-- launchContext 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 ()
data AppInfoRemoveSupportsTypeMethodInfo
-- | 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.
appInfoResetTypeAssociations :: (HasCallStack, MonadIO m) => Text -> m ()
data AppInfoSetAsDefaultForExtensionMethodInfo
-- | Sets the application as the default handler for the given file
-- extension.
appInfoSetAsDefaultForExtension :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> [Char] -> m ()
data AppInfoSetAsDefaultForTypeMethodInfo
-- | Sets the application as the default handler for a given type.
appInfoSetAsDefaultForType :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> Text -> m ()
data AppInfoSetAsLastUsedForTypeMethodInfo
-- | 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 ()
data AppInfoShouldShowMethodInfo
-- | Checks if the application info should be shown in menus that list
-- available applications.
appInfoShouldShow :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool
data AppInfoSupportsFilesMethodInfo
-- | Checks if the application accepts files as arguments.
appInfoSupportsFiles :: (HasCallStack, MonadIO m, IsAppInfo a) => a -> m Bool
data AppInfoSupportsUrisMethodInfo
-- | 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 GI.Gio.Interfaces.AppInfo.AppInfo
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.AppInfo.AppInfo a) => GI.Gio.Interfaces.AppInfo.IsAppInfo a
instance GI.Gio.Interfaces.AppInfo.IsAppInfo GI.Gio.Interfaces.AppInfo.AppInfo
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.AppInfo.AppInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.AppInfo.AppInfo
instance (info ~ GI.Gio.Interfaces.AppInfo.ResolveAppInfoMethod t GI.Gio.Interfaces.AppInfo.AppInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.AppInfo.AppInfo p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.AppInfo.AppInfo -> p)
instance (info ~ GI.Gio.Interfaces.AppInfo.ResolveAppInfoMethod t GI.Gio.Interfaces.AppInfo.AppInfo, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.AppInfo.AppInfo p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.AppInfo.AppInfo -> p)
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoAddSupportsTypeMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoCanDeleteMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoCanRemoveSupportsTypeMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoDeleteMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.AppInfo.AppInfo, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoDupMethodInfo a signature
instance (signature ~ (b -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a, GI.Gio.Interfaces.AppInfo.IsAppInfo b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoEqualMethodInfo a signature
instance (signature ~ m [GHC.Types.Char], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetCommandlineMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetDescriptionMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetDisplayNameMethodInfo a signature
instance (signature ~ m [GHC.Types.Char], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetExecutableMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetIconMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetIdMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetNameMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoGetSupportedTypesMethodInfo a signature
instance (signature ~ ([b] -> GHC.Base.Maybe c -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a, GI.Gio.Interfaces.File.IsFile b, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoLaunchMethodInfo a signature
instance (signature ~ ([Data.Text.Internal.Text] -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a, GI.Gio.Objects.AppLaunchContext.IsAppLaunchContext b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoLaunchUrisMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoRemoveSupportsTypeMethodInfo a signature
instance (signature ~ ([GHC.Types.Char] -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoSetAsDefaultForExtensionMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoSetAsDefaultForTypeMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoSetAsLastUsedForTypeMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoShouldShowMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoSupportsFilesMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AppInfo.IsAppInfo a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AppInfo.AppInfoSupportsUrisMethodInfo a signature
-- | 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;
-- }
--
module GI.Gio.Interfaces.AsyncInitable
newtype AsyncInitable
AsyncInitable :: (ManagedPtr AsyncInitable) -> AsyncInitable
noAsyncInitable :: Maybe AsyncInitable
class GObject o => IsAsyncInitable o
toAsyncInitable :: IsAsyncInitable o => o -> IO AsyncInitable
data AsyncInitableInitAsyncMethodInfo
-- | 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.
--
-- 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.
--
-- Implementations of this method must be idempotent: i.e. multiple calls
-- to this function with the same argument should return the same
-- results. Only the first call initializes the object; further calls
-- return the result of the first call. This is so that it's safe to
-- implement the singleton pattern in the GObject constructor function.
--
-- 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.
asyncInitableInitAsync :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsCancellable b) => a -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data AsyncInitableInitFinishMethodInfo
-- | Finishes asynchronous initialization and returns the result. See
-- asyncInitableInitAsync.
asyncInitableInitFinish :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsAsyncResult b) => a -> b -> m ()
data AsyncInitableNewFinishMethodInfo
-- | Finishes the async construction for the various g_async_initable_new
-- calls, returning the created object or Nothing on error.
asyncInitableNewFinish :: (HasCallStack, MonadIO m, IsAsyncInitable a, IsAsyncResult b) => a -> b -> m Object
-- | Helper function for constructing AsyncInitable object. This is
-- similar to objectNew 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.
asyncInitableNewvAsync :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Word32 -> Parameter -> Int32 -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.AsyncInitable.AsyncInitable a) => GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable a
instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.AsyncInitable.AsyncInitable
instance (info ~ GI.Gio.Interfaces.AsyncInitable.ResolveAsyncInitableMethod t GI.Gio.Interfaces.AsyncInitable.AsyncInitable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.AsyncInitable.AsyncInitable p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.AsyncInitable.AsyncInitable -> p)
instance (info ~ GI.Gio.Interfaces.AsyncInitable.ResolveAsyncInitableMethod t GI.Gio.Interfaces.AsyncInitable.AsyncInitable, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.AsyncInitable.AsyncInitable p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.AsyncInitable.AsyncInitable -> p)
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AsyncInitable.AsyncInitableInitAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AsyncInitable.AsyncInitableInitFinishMethodInfo a signature
instance (signature ~ (b -> m GI.GObject.Objects.Object.Object), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.AsyncInitable.AsyncInitableNewFinishMethodInfo a signature
-- | 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
newtype Drive
Drive :: (ManagedPtr Drive) -> Drive
noDrive :: Maybe Drive
class GObject o => IsDrive o
toDrive :: IsDrive o => o -> IO Drive
data DriveCanEjectMethodInfo
-- | Checks if a drive can be ejected.
driveCanEject :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveCanPollForMediaMethodInfo
-- | Checks if a drive can be polled for media changes.
driveCanPollForMedia :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveCanStartMethodInfo
-- | Checks if a drive can be started.
driveCanStart :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveCanStartDegradedMethodInfo
-- | Checks if a drive can be started degraded.
driveCanStartDegraded :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveCanStopMethodInfo
-- | Checks if a drive can be stopped.
driveCanStop :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveEjectMethodInfo
-- | 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 ()
data DriveEjectFinishMethodInfo
-- | Finishes ejecting a drive.
-- | Deprecated: (Since version 2.22)Use
-- driveEjectWithOperationFinish instead.
driveEjectFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
data DriveEjectWithOperationMethodInfo
-- | Ejects a drive. This is an asynchronous operation, and is finished by
-- calling driveEjectWithOperationFinish with the
-- drive and AsyncResult data returned in the
-- callback.
driveEjectWithOperation :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe (b) -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
data DriveEjectWithOperationFinishMethodInfo
-- | Finishes ejecting a drive. If any errors occurred during the
-- operation, error will be set to contain the errors and
-- False will be returned.
driveEjectWithOperationFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
data DriveEnumerateIdentifiersMethodInfo
-- | Gets the kinds of identifiers that drive has. Use
-- driveGetIdentifier to obtain the identifiers themselves.
driveEnumerateIdentifiers :: (HasCallStack, MonadIO m, IsDrive a) => a -> m [Text]
data DriveGetIconMethodInfo
-- | Gets the icon for drive.
driveGetIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon
data DriveGetIdentifierMethodInfo
-- | Gets the identifier of the given kind for drive.
driveGetIdentifier :: (HasCallStack, MonadIO m, IsDrive a) => a -> Text -> m Text
data DriveGetNameMethodInfo
-- | Gets the name of drive.
driveGetName :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Text
data DriveGetSortKeyMethodInfo
-- | Gets the sort key for drive, if any.
driveGetSortKey :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Text
data DriveGetStartStopTypeMethodInfo
-- | Gets a hint about how a drive can be started/stopped.
driveGetStartStopType :: (HasCallStack, MonadIO m, IsDrive a) => a -> m DriveStartStopType
data DriveGetSymbolicIconMethodInfo
-- | Gets the icon for drive.
driveGetSymbolicIcon :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Icon
data DriveGetVolumesMethodInfo
-- | 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]
data DriveHasMediaMethodInfo
-- | 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
data DriveHasVolumesMethodInfo
-- | Check if drive has any mountable volumes.
driveHasVolumes :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveIsMediaCheckAutomaticMethodInfo
-- | Checks if drive is capabable of automatically
-- detecting media changes.
driveIsMediaCheckAutomatic :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveIsMediaRemovableMethodInfo
-- | Checks if the drive supports removable media.
driveIsMediaRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DriveIsRemovableMethodInfo
-- | Checks if the Drive and/or its media is considered removable by
-- the user. See driveIsMediaRemovable.
driveIsRemovable :: (HasCallStack, MonadIO m, IsDrive a) => a -> m Bool
data DrivePollForMediaMethodInfo
-- | 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 ()
data DrivePollForMediaFinishMethodInfo
-- | Finishes an operation started with drivePollForMedia on a
-- drive.
drivePollForMediaFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
data DriveStartMethodInfo
-- | 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.
driveStart :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [DriveStartFlags] -> Maybe (b) -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
data DriveStartFinishMethodInfo
-- | Finishes starting a drive.
driveStartFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
data DriveStopMethodInfo
-- | 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.
driveStop :: (HasCallStack, MonadIO m, IsDrive a, IsMountOperation b, IsCancellable c) => a -> [MountUnmountFlags] -> Maybe (b) -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
data DriveStopFinishMethodInfo
-- | Finishes stopping a drive.
driveStopFinish :: (HasCallStack, MonadIO m, IsDrive a, IsAsyncResult b) => a -> b -> m ()
type C_DriveChangedCallback = Ptr () -> Ptr () -> IO ()
type DriveChangedCallback = IO ()
data DriveChangedSignalInfo
afterDriveChanged :: (IsDrive a, MonadIO m) => a -> DriveChangedCallback -> m SignalHandlerId
genClosure_DriveChanged :: DriveChangedCallback -> IO Closure
mk_DriveChangedCallback :: C_DriveChangedCallback -> IO (FunPtr C_DriveChangedCallback)
noDriveChangedCallback :: Maybe DriveChangedCallback
onDriveChanged :: (IsDrive a, MonadIO m) => a -> DriveChangedCallback -> m SignalHandlerId
wrap_DriveChangedCallback :: DriveChangedCallback -> Ptr () -> Ptr () -> IO ()
type C_DriveDisconnectedCallback = Ptr () -> Ptr () -> IO ()
type DriveDisconnectedCallback = IO ()
data DriveDisconnectedSignalInfo
afterDriveDisconnected :: (IsDrive a, MonadIO m) => a -> DriveDisconnectedCallback -> m SignalHandlerId
genClosure_DriveDisconnected :: DriveDisconnectedCallback -> IO Closure
mk_DriveDisconnectedCallback :: C_DriveDisconnectedCallback -> IO (FunPtr C_DriveDisconnectedCallback)
noDriveDisconnectedCallback :: Maybe DriveDisconnectedCallback
onDriveDisconnected :: (IsDrive a, MonadIO m) => a -> DriveDisconnectedCallback -> m SignalHandlerId
wrap_DriveDisconnectedCallback :: DriveDisconnectedCallback -> Ptr () -> Ptr () -> IO ()
type C_DriveEjectButtonCallback = Ptr () -> Ptr () -> IO ()
type DriveEjectButtonCallback = IO ()
data DriveEjectButtonSignalInfo
afterDriveEjectButton :: (IsDrive a, MonadIO m) => a -> DriveEjectButtonCallback -> m SignalHandlerId
genClosure_DriveEjectButton :: DriveEjectButtonCallback -> IO Closure
mk_DriveEjectButtonCallback :: C_DriveEjectButtonCallback -> IO (FunPtr C_DriveEjectButtonCallback)
noDriveEjectButtonCallback :: Maybe DriveEjectButtonCallback
onDriveEjectButton :: (IsDrive a, MonadIO m) => a -> DriveEjectButtonCallback -> m SignalHandlerId
wrap_DriveEjectButtonCallback :: DriveEjectButtonCallback -> Ptr () -> Ptr () -> IO ()
type C_DriveStopButtonCallback = Ptr () -> Ptr () -> IO ()
type DriveStopButtonCallback = IO ()
data DriveStopButtonSignalInfo
afterDriveStopButton :: (IsDrive a, MonadIO m) => a -> DriveStopButtonCallback -> m SignalHandlerId
genClosure_DriveStopButton :: DriveStopButtonCallback -> IO Closure
mk_DriveStopButtonCallback :: C_DriveStopButtonCallback -> IO (FunPtr C_DriveStopButtonCallback)
noDriveStopButtonCallback :: Maybe DriveStopButtonCallback
onDriveStopButton :: (IsDrive a, MonadIO m) => a -> DriveStopButtonCallback -> m SignalHandlerId
wrap_DriveStopButtonCallback :: DriveStopButtonCallback -> Ptr () -> Ptr () -> IO ()
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.Drive.DriveChangedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.Drive.DriveDisconnectedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.Drive.DriveEjectButtonSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.Drive.DriveStopButtonSignalInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Drive.Drive
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.Drive.Drive a) => GI.Gio.Interfaces.Drive.IsDrive a
instance GI.Gio.Interfaces.Drive.IsDrive GI.Gio.Interfaces.Drive.Drive
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.Drive.Drive
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.Drive.Drive
instance (info ~ GI.Gio.Interfaces.Drive.ResolveDriveMethod t GI.Gio.Interfaces.Drive.Drive, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Drive.Drive p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.Drive.Drive -> p)
instance (info ~ GI.Gio.Interfaces.Drive.ResolveDriveMethod t GI.Gio.Interfaces.Drive.Drive, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Drive.Drive p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.Drive.Drive -> p)
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveCanEjectMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveCanPollForMediaMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveCanStartMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveCanStartDegradedMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveCanStopMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.MountUnmountFlags] -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveEjectMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveEjectFinishMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.MountUnmountFlags] -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Objects.MountOperation.IsMountOperation b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveEjectWithOperationMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveEjectWithOperationFinishMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveEnumerateIdentifiersMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveGetIconMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveGetIdentifierMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveGetNameMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveGetSortKeyMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.DriveStartStopType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveGetStartStopTypeMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveGetSymbolicIconMethodInfo a signature
instance (signature ~ m [GI.Gio.Interfaces.Volume.Volume], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveGetVolumesMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveHasMediaMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveHasVolumesMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveIsMediaCheckAutomaticMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveIsMediaRemovableMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveIsRemovableMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DrivePollForMediaMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DrivePollForMediaFinishMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.DriveStartFlags] -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Objects.MountOperation.IsMountOperation b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveStartMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveStartFinishMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.MountUnmountFlags] -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Objects.MountOperation.IsMountOperation b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveStopMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Drive.IsDrive a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Drive.DriveStopFinishMethodInfo a signature
-- | DtlsConnection is the base DTLS connection class type, which
-- wraps a DatagramBased and provides DTLS encryption on top of
-- it. Its subclasses, DtlsClientConnection and
-- DtlsServerConnection, implement client-side and server-side
-- DTLS, respectively.
--
-- For TLS support, see TlsConnection.
--
-- As DTLS is datagram based, DtlsConnection implements
-- DatagramBased, presenting a datagram-socket-like API for the
-- encrypted connection. This operates over a base datagram connection,
-- which is also a DatagramBased
-- (DtlsConnection:base-socket).
--
-- To close a DTLS connection, use dtlsConnectionClose.
--
-- Neither DtlsServerConnection or DtlsClientConnection set
-- the peer address on their base DatagramBased if it is a
-- Socket — it is up to the caller to do that if they wish. If
-- they do not, and socketClose is called on the base socket, the
-- DtlsConnection will not raise a IOErrorEnumNotConnected
-- error on further I/O.
module GI.Gio.Interfaces.DtlsConnection
newtype DtlsConnection
DtlsConnection :: (ManagedPtr DtlsConnection) -> DtlsConnection
noDtlsConnection :: Maybe DtlsConnection
class GObject o => IsDtlsConnection o
toDtlsConnection :: IsDtlsConnection o => o -> IO DtlsConnection
data DtlsConnectionCloseMethodInfo
-- | Close the DTLS connection. This is equivalent to calling
-- dtlsConnectionShutdown to shut down both sides of the
-- connection.
--
-- Closing a DtlsConnection waits for all buffered but
-- untransmitted data to be sent before it completes. It then sends a
-- close_notify DTLS alert to the peer and may wait for a
-- close_notify to be received from the peer. It does not close
-- the underlying DtlsConnection:base-socket; that
-- must be closed separately.
--
-- Once conn is closed, all other operations will return
-- IOErrorEnumClosed. Closing a DtlsConnection multiple
-- times will not return an error.
--
-- GDtlsConnections will be automatically closed when the
-- last reference is dropped, but you might want to call this function to
-- make sure resources are released as early as possible.
--
-- If cancellable is cancelled, the DtlsConnection
-- may be left partially-closed and any pending untransmitted data may be
-- lost. Call dtlsConnectionClose again to complete closing the
-- DtlsConnection.
dtlsConnectionClose :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Maybe (b) -> m ()
data DtlsConnectionCloseAsyncMethodInfo
-- | Asynchronously close the DTLS connection. See
-- dtlsConnectionClose for more information.
dtlsConnectionCloseAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DtlsConnectionCloseFinishMethodInfo
-- | Finish an asynchronous TLS close operation. See
-- dtlsConnectionClose for more information.
dtlsConnectionCloseFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m ()
data DtlsConnectionEmitAcceptCertificateMethodInfo
-- | Used by DtlsConnection implementations to emit the
-- DtlsConnection::accept-certificate signal.
dtlsConnectionEmitAcceptCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsCertificate b) => a -> b -> [TlsCertificateFlags] -> m Bool
data DtlsConnectionGetCertificateMethodInfo
-- | Gets conn's certificate, as set by
-- dtlsConnectionSetCertificate.
dtlsConnectionGetCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsCertificate
data DtlsConnectionGetDatabaseMethodInfo
-- | Gets the certificate database that conn uses to verify
-- peer certificates. See dtlsConnectionSetDatabase.
dtlsConnectionGetDatabase :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsDatabase
data DtlsConnectionGetInteractionMethodInfo
-- | 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.
dtlsConnectionGetInteraction :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsInteraction
data DtlsConnectionGetPeerCertificateMethodInfo
-- | Gets conn's peer's certificate after the handshake has
-- completed. (It is not set during the emission of
-- DtlsConnection::accept-certificate.)
dtlsConnectionGetPeerCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsCertificate
data DtlsConnectionGetPeerCertificateErrorsMethodInfo
-- | Gets the errors associated with validating conn's
-- peer's certificate, after the handshake has completed. (It is not set
-- during the emission of
-- DtlsConnection::accept-certificate.)
dtlsConnectionGetPeerCertificateErrors :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m [TlsCertificateFlags]
data DtlsConnectionGetRehandshakeModeMethodInfo
-- | Gets conn rehandshaking mode. See
-- dtlsConnectionSetRehandshakeMode for details.
dtlsConnectionGetRehandshakeMode :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m TlsRehandshakeMode
data DtlsConnectionGetRequireCloseNotifyMethodInfo
-- | Tests whether or not conn expects a proper TLS close
-- notification when the connection is closed. See
-- dtlsConnectionSetRequireCloseNotify for details.
dtlsConnectionGetRequireCloseNotify :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> m Bool
data DtlsConnectionHandshakeMethodInfo
-- | 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, DtlsConnection
-- will handle this for you automatically when you try to send or receive
-- data on the connection. However, you can call
-- dtlsConnectionHandshake manually if you want to know for sure
-- whether the initial handshake succeeded or failed (as opposed to just
-- immediately trying to write to conn, in which case if
-- it fails, it may not be possible to tell if it failed before or after
-- completing the handshake).
--
-- Likewise, on the server side, although a handshake is necessary at the
-- beginning of the communication, you do not need to call this function
-- explicitly unless you want clearer error reporting. However, you may
-- call dtlsConnectionHandshake later on to renegotiate parameters
-- (encryption methods, etc) with the client.
--
-- DtlsConnection::accept_certificate may be
-- emitted during the handshake.
dtlsConnectionHandshake :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Maybe (b) -> m ()
data DtlsConnectionHandshakeAsyncMethodInfo
-- | Asynchronously performs a TLS handshake on conn. See
-- dtlsConnectionHandshake for more information.
dtlsConnectionHandshakeAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DtlsConnectionHandshakeFinishMethodInfo
-- | Finish an asynchronous TLS handshake operation. See
-- dtlsConnectionHandshake for more information.
dtlsConnectionHandshakeFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m ()
data DtlsConnectionSetCertificateMethodInfo
-- | This sets the certificate that conn will present to
-- its peer during the TLS handshake. For a DtlsServerConnection,
-- it is mandatory to set this, and that will normally be done at
-- construct time.
--
-- For a DtlsClientConnection, this is optional. If a handshake
-- fails with TlsErrorCertificateRequired, that means that the
-- server requires a certificate, and if you try connecting again, you
-- should call this method first. You can call
-- dtlsClientConnectionGetAcceptedCas on the failed connection to
-- get a list of Certificate Authorities that the server will accept
-- certificates from.
--
-- (It is also possible that a server will allow the connection with or
-- without a certificate; in that case, if you don't provide a
-- certificate, you can tell that the server requested one by the fact
-- that dtlsClientConnectionGetAcceptedCas will return
-- non-Nothing.)
dtlsConnectionSetCertificate :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsCertificate b) => a -> b -> m ()
data DtlsConnectionSetDatabaseMethodInfo
-- | Sets the certificate database that is used to verify peer
-- certificates. This is set to the default database by default. See
-- g_dtls_backend_get_default_database(). If set to
-- Nothing, then peer certificate validation will always set the
-- TlsCertificateFlagsUnknownCa error (meaning
-- DtlsConnection::accept-certificate will always
-- be emitted on client-side connections, unless that bit is not set in
-- DtlsClientConnection:validation-flags).
dtlsConnectionSetDatabase :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsDatabase b) => a -> b -> m ()
data DtlsConnectionSetInteractionMethodInfo
-- | 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.
dtlsConnectionSetInteraction :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsTlsInteraction b) => a -> Maybe (b) -> m ()
data DtlsConnectionSetRehandshakeModeMethodInfo
-- | Sets how conn behaves with respect to rehandshaking
-- requests.
--
-- 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.
dtlsConnectionSetRehandshakeMode :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> TlsRehandshakeMode -> m ()
data DtlsConnectionSetRequireCloseNotifyMethodInfo
-- | Sets whether or not conn expects a proper TLS close
-- notification before the connection is closed. If this is True
-- (the default), then conn will expect to receive a TLS
-- close notification from its peer before the connection is closed, and
-- will return a TlsErrorEof error if the connection is closed
-- without proper notification (since this may indicate a network error,
-- or man-in-the-middle attack).
--
-- In some protocols, the application will know whether or not the
-- connection was closed cleanly based on application-level data (because
-- the application-level data includes a length field, or is somehow
-- self-delimiting); in this case, the close notify is redundant and may
-- be omitted. You can use dtlsConnectionSetRequireCloseNotify to
-- tell conn to allow an "unannounced" connection close,
-- in which case the close will show up as a 0-length read, as in a
-- non-TLS DatagramBased, and it is up to the application to check
-- that the data has been fully received.
--
-- Note that this only affects the behavior when the peer closes the
-- connection; when the application calls dtlsConnectionCloseAsync
-- on conn itself, this will send a close notification
-- regardless of the setting of this property. If you explicitly want to
-- do an unclean close, you can close conn's
-- DtlsConnection:base-socket rather than closing
-- conn itself.
dtlsConnectionSetRequireCloseNotify :: (HasCallStack, MonadIO m, IsDtlsConnection a) => a -> Bool -> m ()
data DtlsConnectionShutdownMethodInfo
-- | Shut down part or all of a DTLS connection.
--
-- If shutdownRead is True then the receiving side
-- of the connection is shut down, and further reading is disallowed.
-- Subsequent calls to datagramBasedReceiveMessages will return
-- IOErrorEnumClosed.
--
-- If shutdownWrite is True then the sending side
-- of the connection is shut down, and further writing is disallowed.
-- Subsequent calls to datagramBasedSendMessages will return
-- IOErrorEnumClosed.
--
-- It is allowed for both shutdownRead and
-- shutdownWrite to be TRUE — this is equivalent to
-- calling dtlsConnectionClose.
--
-- If cancellable is cancelled, the DtlsConnection
-- may be left partially-closed and any pending untransmitted data may be
-- lost. Call dtlsConnectionShutdown again to complete closing the
-- DtlsConnection.
dtlsConnectionShutdown :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Bool -> Bool -> Maybe (b) -> m ()
data DtlsConnectionShutdownAsyncMethodInfo
-- | Asynchronously shut down part or all of the DTLS connection. See
-- dtlsConnectionShutdown for more information.
dtlsConnectionShutdownAsync :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsCancellable b) => a -> Bool -> Bool -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DtlsConnectionShutdownFinishMethodInfo
-- | Finish an asynchronous TLS shutdown operation. See
-- dtlsConnectionShutdown for more information.
dtlsConnectionShutdownFinish :: (HasCallStack, MonadIO m, IsDtlsConnection a, IsAsyncResult b) => a -> b -> m ()
data DtlsConnectionBaseSocketPropertyInfo
constructDtlsConnectionBaseSocket :: (IsDtlsConnection o, IsDatagramBased a) => a -> IO (GValueConstruct o)
dtlsConnectionBaseSocket :: AttrLabelProxy "baseSocket"
getDtlsConnectionBaseSocket :: (MonadIO m, IsDtlsConnection o) => o -> m (Maybe DatagramBased)
data DtlsConnectionCertificatePropertyInfo
constructDtlsConnectionCertificate :: (IsDtlsConnection o, IsTlsCertificate a) => a -> IO (GValueConstruct o)
dtlsConnectionCertificate :: AttrLabelProxy "certificate"
getDtlsConnectionCertificate :: (MonadIO m, IsDtlsConnection o) => o -> m TlsCertificate
setDtlsConnectionCertificate :: (MonadIO m, IsDtlsConnection o, IsTlsCertificate a) => o -> a -> m ()
data DtlsConnectionDatabasePropertyInfo
constructDtlsConnectionDatabase :: (IsDtlsConnection o, IsTlsDatabase a) => a -> IO (GValueConstruct o)
dtlsConnectionDatabase :: AttrLabelProxy "database"
getDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o) => o -> m TlsDatabase
setDtlsConnectionDatabase :: (MonadIO m, IsDtlsConnection o, IsTlsDatabase a) => o -> a -> m ()
data DtlsConnectionInteractionPropertyInfo
clearDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o) => o -> m ()
constructDtlsConnectionInteraction :: (IsDtlsConnection o, IsTlsInteraction a) => a -> IO (GValueConstruct o)
dtlsConnectionInteraction :: AttrLabelProxy "interaction"
getDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o) => o -> m TlsInteraction
setDtlsConnectionInteraction :: (MonadIO m, IsDtlsConnection o, IsTlsInteraction a) => o -> a -> m ()
data DtlsConnectionPeerCertificatePropertyInfo
dtlsConnectionPeerCertificate :: AttrLabelProxy "peerCertificate"
getDtlsConnectionPeerCertificate :: (MonadIO m, IsDtlsConnection o) => o -> m TlsCertificate
data DtlsConnectionPeerCertificateErrorsPropertyInfo
dtlsConnectionPeerCertificateErrors :: AttrLabelProxy "peerCertificateErrors"
getDtlsConnectionPeerCertificateErrors :: (MonadIO m, IsDtlsConnection o) => o -> m [TlsCertificateFlags]
data DtlsConnectionRehandshakeModePropertyInfo
constructDtlsConnectionRehandshakeMode :: (IsDtlsConnection o) => TlsRehandshakeMode -> IO (GValueConstruct o)
dtlsConnectionRehandshakeMode :: AttrLabelProxy "rehandshakeMode"
getDtlsConnectionRehandshakeMode :: (MonadIO m, IsDtlsConnection o) => o -> m TlsRehandshakeMode
setDtlsConnectionRehandshakeMode :: (MonadIO m, IsDtlsConnection o) => o -> TlsRehandshakeMode -> m ()
data DtlsConnectionRequireCloseNotifyPropertyInfo
constructDtlsConnectionRequireCloseNotify :: (IsDtlsConnection o) => Bool -> IO (GValueConstruct o)
dtlsConnectionRequireCloseNotify :: AttrLabelProxy "requireCloseNotify"
getDtlsConnectionRequireCloseNotify :: (MonadIO m, IsDtlsConnection o) => o -> m Bool
setDtlsConnectionRequireCloseNotify :: (MonadIO m, IsDtlsConnection o) => o -> Bool -> m ()
type C_DtlsConnectionAcceptCertificateCallback = Ptr () -> Ptr TlsCertificate -> CUInt -> Ptr () -> IO CInt
type DtlsConnectionAcceptCertificateCallback = TlsCertificate -> [TlsCertificateFlags] -> IO Bool
data DtlsConnectionAcceptCertificateSignalInfo
afterDtlsConnectionAcceptCertificate :: (IsDtlsConnection a, MonadIO m) => a -> DtlsConnectionAcceptCertificateCallback -> m SignalHandlerId
genClosure_DtlsConnectionAcceptCertificate :: DtlsConnectionAcceptCertificateCallback -> IO Closure
mk_DtlsConnectionAcceptCertificateCallback :: C_DtlsConnectionAcceptCertificateCallback -> IO (FunPtr C_DtlsConnectionAcceptCertificateCallback)
noDtlsConnectionAcceptCertificateCallback :: Maybe DtlsConnectionAcceptCertificateCallback
onDtlsConnectionAcceptCertificate :: (IsDtlsConnection a, MonadIO m) => a -> DtlsConnectionAcceptCertificateCallback -> m SignalHandlerId
wrap_DtlsConnectionAcceptCertificateCallback :: DtlsConnectionAcceptCertificateCallback -> Ptr () -> Ptr TlsCertificate -> CUInt -> Ptr () -> IO CInt
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionAcceptCertificateSignalInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.DtlsConnection.DtlsConnection a) => GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a
instance GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance GI.Gio.Interfaces.DatagramBased.IsDatagramBased GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionBaseSocketPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionCertificatePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionDatabasePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionInteractionPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionPeerCertificatePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionPeerCertificateErrorsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionRehandshakeModePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionRequireCloseNotifyPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.DtlsConnection.DtlsConnection
instance (info ~ GI.Gio.Interfaces.DtlsConnection.ResolveDtlsConnectionMethod t GI.Gio.Interfaces.DtlsConnection.DtlsConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DtlsConnection.DtlsConnection p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.DtlsConnection.DtlsConnection -> p)
instance (info ~ GI.Gio.Interfaces.DtlsConnection.ResolveDtlsConnectionMethod t GI.Gio.Interfaces.DtlsConnection.DtlsConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.DtlsConnection.DtlsConnection p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.DtlsConnection.DtlsConnection -> p)
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionCloseMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionCloseAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionCloseFinishMethodInfo a signature
instance (signature ~ (b -> [GI.Gio.Flags.TlsCertificateFlags] -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.TlsCertificate.IsTlsCertificate b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionEmitAcceptCertificateMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.TlsCertificate.TlsCertificate, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionGetCertificateMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.TlsDatabase.TlsDatabase, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionGetDatabaseMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.TlsInteraction.TlsInteraction, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionGetInteractionMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.TlsCertificate.TlsCertificate, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionGetPeerCertificateMethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.TlsCertificateFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionGetPeerCertificateErrorsMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.TlsRehandshakeMode, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionGetRehandshakeModeMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionGetRequireCloseNotifyMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionHandshakeMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionHandshakeAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionHandshakeFinishMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.TlsCertificate.IsTlsCertificate b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionSetCertificateMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.TlsDatabase.IsTlsDatabase b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionSetDatabaseMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.TlsInteraction.IsTlsInteraction b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionSetInteractionMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.TlsRehandshakeMode -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionSetRehandshakeModeMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionSetRequireCloseNotifyMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> GHC.Types.Bool -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionShutdownMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> GHC.Types.Bool -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionShutdownAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.DtlsConnection.IsDtlsConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.DtlsConnection.DtlsConnectionShutdownFinishMethodInfo a signature
-- | 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:
--
-- -- 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. volumeGetActivationRoot :: (HasCallStack, MonadIO m, IsVolume a) => a -> m (Maybe File) data VolumeGetDriveMethodInfo -- | Gets the drive for the volume. volumeGetDrive :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Drive data VolumeGetIconMethodInfo -- | Gets the icon for volume. volumeGetIcon :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Icon data VolumeGetIdentifierMethodInfo -- | 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 Text data VolumeGetMountMethodInfo -- | Gets the mount for the volume. volumeGetMount :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Mount data VolumeGetNameMethodInfo -- | Gets the name of volume. volumeGetName :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Text data VolumeGetSortKeyMethodInfo -- | Gets the sort key for volume, if any. volumeGetSortKey :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Text data VolumeGetSymbolicIconMethodInfo -- | Gets the symbolic icon for volume. volumeGetSymbolicIcon :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Icon data VolumeGetUuidMethodInfo -- | 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 Text data VolumeMountMethodInfo -- | 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 () data VolumeMountFinishMethodInfo -- | 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 () data VolumeShouldAutomountMethodInfo -- | Returns whether the volume should be automatically mounted. volumeShouldAutomount :: (HasCallStack, MonadIO m, IsVolume a) => a -> m Bool type C_VolumeChangedCallback = Ptr () -> Ptr () -> IO () type VolumeChangedCallback = IO () data VolumeChangedSignalInfo afterVolumeChanged :: (IsVolume a, MonadIO m) => a -> VolumeChangedCallback -> m SignalHandlerId genClosure_VolumeChanged :: VolumeChangedCallback -> IO Closure mk_VolumeChangedCallback :: C_VolumeChangedCallback -> IO (FunPtr C_VolumeChangedCallback) noVolumeChangedCallback :: Maybe VolumeChangedCallback onVolumeChanged :: (IsVolume a, MonadIO m) => a -> VolumeChangedCallback -> m SignalHandlerId wrap_VolumeChangedCallback :: VolumeChangedCallback -> Ptr () -> Ptr () -> IO () type C_VolumeRemovedCallback = Ptr () -> Ptr () -> IO () type VolumeRemovedCallback = IO () data VolumeRemovedSignalInfo afterVolumeRemoved :: (IsVolume a, MonadIO m) => a -> VolumeRemovedCallback -> m SignalHandlerId genClosure_VolumeRemoved :: VolumeRemovedCallback -> IO Closure mk_VolumeRemovedCallback :: C_VolumeRemovedCallback -> IO (FunPtr C_VolumeRemovedCallback) noVolumeRemovedCallback :: Maybe VolumeRemovedCallback onVolumeRemoved :: (IsVolume a, MonadIO m) => a -> VolumeRemovedCallback -> m SignalHandlerId wrap_VolumeRemovedCallback :: VolumeRemovedCallback -> Ptr () -> Ptr () -> IO () instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.Volume.VolumeChangedSignalInfo instance Data.GI.Base.Signals.SignalInfo GI.Gio.Interfaces.Volume.VolumeRemovedSignalInfo instance Data.GI.Base.BasicTypes.GObject GI.Gio.Interfaces.Volume.Volume instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Interfaces.Volume.Volume a) => GI.Gio.Interfaces.Volume.IsVolume a instance GI.Gio.Interfaces.Volume.IsVolume GI.Gio.Interfaces.Volume.Volume instance GI.GObject.Objects.Object.IsObject GI.Gio.Interfaces.Volume.Volume instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Interfaces.Volume.Volume instance (info ~ GI.Gio.Interfaces.Volume.ResolveVolumeMethod t GI.Gio.Interfaces.Volume.Volume, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Volume.Volume p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Interfaces.Volume.Volume -> p) instance (info ~ GI.Gio.Interfaces.Volume.ResolveVolumeMethod t GI.Gio.Interfaces.Volume.Volume, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Interfaces.Volume.Volume p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Interfaces.Volume.Volume -> p) instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeCanEjectMethodInfo a signature instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeCanMountMethodInfo a signature instance (signature ~ ([GI.Gio.Flags.MountUnmountFlags] -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeEjectMethodInfo a signature instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeEjectFinishMethodInfo a signature instance (signature ~ ([GI.Gio.Flags.MountUnmountFlags] -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a, GI.Gio.Objects.MountOperation.IsMountOperation b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeEjectWithOperationMethodInfo a signature instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeEjectWithOperationFinishMethodInfo a signature instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeEnumerateIdentifiersMethodInfo a signature instance (signature ~ m (GHC.Base.Maybe GI.Gio.Interfaces.File.File), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetActivationRootMethodInfo a signature instance (signature ~ m GI.Gio.Interfaces.Drive.Drive, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetDriveMethodInfo a signature instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetIconMethodInfo a signature instance (signature ~ (Data.Text.Internal.Text -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetIdentifierMethodInfo a signature instance (signature ~ m GI.Gio.Interfaces.Mount.Mount, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetMountMethodInfo a signature instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetNameMethodInfo a signature instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetSortKeyMethodInfo a signature instance (signature ~ m GI.Gio.Interfaces.Icon.Icon, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetSymbolicIconMethodInfo a signature instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeGetUuidMethodInfo a signature instance (signature ~ ([GI.Gio.Flags.MountMountFlags] -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a, GI.Gio.Objects.MountOperation.IsMountOperation b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeMountMethodInfo a signature instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeMountFinishMethodInfo a signature instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Interfaces.Volume.IsVolume a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Interfaces.Volume.VolumeShouldAutomountMethodInfo a signature module GI.Gio.Interfaces -- | 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 newtype BufferedInputStream BufferedInputStream :: (ManagedPtr BufferedInputStream) -> BufferedInputStream class GObject o => IsBufferedInputStream o toBufferedInputStream :: IsBufferedInputStream o => o -> IO BufferedInputStream noBufferedInputStream :: Maybe BufferedInputStream data BufferedInputStreamFillMethodInfo -- | 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 data BufferedInputStreamFillAsyncMethodInfo -- | 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 () data BufferedInputStreamFillFinishMethodInfo -- | Finishes an asynchronous read. bufferedInputStreamFillFinish :: (HasCallStack, MonadIO m, IsBufferedInputStream a, IsAsyncResult b) => a -> b -> m Int64 data BufferedInputStreamGetAvailableMethodInfo -- | Gets the size of the available data within the stream. bufferedInputStreamGetAvailable :: (HasCallStack, MonadIO m, IsBufferedInputStream a) => a -> m Word64 data BufferedInputStreamGetBufferSizeMethodInfo -- | 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 data BufferedInputStreamPeekMethodInfo -- | 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 data BufferedInputStreamPeekBufferMethodInfo -- | 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 data BufferedInputStreamReadByteMethodInfo -- | 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 data BufferedInputStreamSetBufferSizeMethodInfo -- | 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 () data BufferedInputStreamBufferSizePropertyInfo bufferedInputStreamBufferSize :: AttrLabelProxy "bufferSize" constructBufferedInputStreamBufferSize :: (IsBufferedInputStream o) => Word32 -> IO (GValueConstruct o) getBufferedInputStreamBufferSize :: (MonadIO m, IsBufferedInputStream o) => o -> m Word32 setBufferedInputStreamBufferSize :: (MonadIO m, IsBufferedInputStream o) => o -> Word32 -> m () instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.BufferedInputStream.BufferedInputStream a) => GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a instance GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance GI.Gio.Objects.FilterInputStream.IsFilterInputStream GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance (info ~ GI.Gio.Objects.BufferedInputStream.ResolveBufferedInputStreamMethod t GI.Gio.Objects.BufferedInputStream.BufferedInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.BufferedInputStream.BufferedInputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.BufferedInputStream.BufferedInputStream -> p) instance (info ~ GI.Gio.Objects.BufferedInputStream.ResolveBufferedInputStreamMethod t GI.Gio.Objects.BufferedInputStream.BufferedInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.BufferedInputStream.BufferedInputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.BufferedInputStream.BufferedInputStream -> p) instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamBufferSizePropertyInfo instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.BufferedInputStream.BufferedInputStream instance (signature ~ (GHC.Int.Int64 -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamFillMethodInfo a signature instance (signature ~ (GHC.Int.Int64 -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamFillAsyncMethodInfo a signature instance (signature ~ (b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamFillFinishMethodInfo a signature instance (signature ~ m GHC.Word.Word64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamGetAvailableMethodInfo a signature instance (signature ~ m GHC.Word.Word64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamGetBufferSizeMethodInfo a signature instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Word.Word64 -> m GHC.Word.Word64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamPeekMethodInfo a signature instance (signature ~ m Data.ByteString.Internal.ByteString, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamPeekBufferMethodInfo a signature instance (signature ~ (GHC.Base.Maybe b -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamReadByteMethodInfo a signature instance (signature ~ (GHC.Word.Word64 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.BufferedInputStream.BufferedInputStreamSetBufferSizeMethodInfo a signature -- | 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 module GI.Gio.Objects.DBusConnection newtype DBusConnection DBusConnection :: (ManagedPtr DBusConnection) -> DBusConnection class GObject o => IsDBusConnection o toDBusConnection :: IsDBusConnection o => o -> IO DBusConnection noDBusConnection :: Maybe DBusConnection data DBusConnectionAddFilterMethodInfo -- | 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. Similary, 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.) dBusConnectionAddFilter :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> DBusMessageFilterFunction -> m Word32 data DBusConnectionCallMethodInfo -- | 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. -- -- 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.
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 ()
data DBusConnectionCallFinishMethodInfo
-- | Finishes an operation started with dBusConnectionCall.
dBusConnectionCallFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m GVariant
data DBusConnectionCallSyncMethodInfo
-- | 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.
dBusConnectionCallSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe (Text) -> Text -> Text -> Text -> Maybe (GVariant) -> Maybe (VariantType) -> [DBusCallFlags] -> Int32 -> Maybe (b) -> m GVariant
data DBusConnectionCallWithUnixFdListMethodInfo
-- | Like dBusConnectionCall but also takes a UnixFDList
-- object.
--
-- This method is only available on UNIX.
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 ()
data DBusConnectionCallWithUnixFdListFinishMethodInfo
-- | Finishes an operation started with
-- dBusConnectionCallWithUnixFdList.
dBusConnectionCallWithUnixFdListFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m (GVariant, UnixFDList)
data DBusConnectionCallWithUnixFdListSyncMethodInfo
-- | Like dBusConnectionCallSync but also takes and returns
-- UnixFDList objects.
--
-- This method is only available on UNIX.
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)
data DBusConnectionCloseMethodInfo
-- | 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.
dBusConnectionClose :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DBusConnectionCloseFinishMethodInfo
-- | Finishes an operation started with dBusConnectionClose.
dBusConnectionCloseFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m ()
data DBusConnectionCloseSyncMethodInfo
-- | Synchronously closees 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.
dBusConnectionCloseSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe (b) -> m ()
data DBusConnectionEmitSignalMethodInfo
-- | 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.
dBusConnectionEmitSignal :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Maybe (Text) -> Text -> Text -> Text -> Maybe (GVariant) -> m ()
data DBusConnectionExportActionGroupMethodInfo
-- | 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.
dBusConnectionExportActionGroup :: (HasCallStack, MonadIO m, IsDBusConnection a, IsActionGroup b) => a -> Text -> b -> m Word32
data DBusConnectionExportMenuModelMethodInfo
-- | 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.
dBusConnectionExportMenuModel :: (HasCallStack, MonadIO m, IsDBusConnection a, IsMenuModel b) => a -> Text -> b -> m Word32
data DBusConnectionFlushMethodInfo
-- | 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.
dBusConnectionFlush :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DBusConnectionFlushFinishMethodInfo
-- | Finishes an operation started with dBusConnectionFlush.
dBusConnectionFlushFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m ()
data DBusConnectionFlushSyncMethodInfo
-- | 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.
dBusConnectionFlushSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> Maybe (b) -> m ()
data DBusConnectionGetCapabilitiesMethodInfo
-- | Gets the capabilities negotiated with the remote peer
dBusConnectionGetCapabilities :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m [DBusCapabilityFlags]
data DBusConnectionGetExitOnCloseMethodInfo
-- | Gets whether the process is terminated when connection
-- is closed by the remote peer. See
-- DBusConnection:exit-on-close for more details.
dBusConnectionGetExitOnClose :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Bool
data DBusConnectionGetGuidMethodInfo
-- | The GUID of the peer performing the role of server when
-- authenticating. See DBusConnection:guid for
-- more details.
dBusConnectionGetGuid :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Text
data DBusConnectionGetLastSerialMethodInfo
-- | 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.
dBusConnectionGetLastSerial :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Word32
data DBusConnectionGetPeerCredentialsMethodInfo
-- | 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.
dBusConnectionGetPeerCredentials :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m (Maybe Credentials)
data DBusConnectionGetStreamMethodInfo
-- | 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.
dBusConnectionGetStream :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m IOStream
data DBusConnectionGetUniqueNameMethodInfo
-- | 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.
dBusConnectionGetUniqueName :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m Text
data DBusConnectionIsClosedMethodInfo
-- | Gets whether connection is closed.
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.
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.
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.
dBusConnectionNewForAddress :: (HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) => Text -> [DBusConnectionFlags] -> Maybe (a) -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
-- | Finishes an operation started with dBusConnectionNewForAddress.
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.
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.
dBusConnectionNewSync :: (HasCallStack, MonadIO m, IsIOStream a, IsDBusAuthObserver b, IsCancellable c) => a -> Maybe (Text) -> [DBusConnectionFlags] -> Maybe (b) -> Maybe (c) -> m DBusConnection
data DBusConnectionRegisterObjectMethodInfo
-- | Version of g_dbus_connection_register_object() using
-- closures instead of a DBusInterfaceVTable for easier binding in
-- other languages.
dBusConnectionRegisterObject :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> DBusInterfaceInfo -> Maybe (Closure) -> Maybe (Closure) -> Maybe (Closure) -> m Word32
data DBusConnectionRegisterSubtreeMethodInfo
-- | 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.
dBusConnectionRegisterSubtree :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Text -> DBusSubtreeVTable -> [DBusSubtreeFlags] -> Ptr () -> DestroyNotify -> m Word32
data DBusConnectionRemoveFilterMethodInfo
-- | 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.
dBusConnectionRemoveFilter :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
data DBusConnectionSendMessageMethodInfo
-- | 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.
dBusConnectionSendMessage :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) => a -> b -> [DBusSendMessageFlags] -> m (Word32)
data DBusConnectionSendMessageWithReplyMethodInfo
-- | 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.
dBusConnectionSendMessageWithReply :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b, IsCancellable c) => a -> b -> [DBusSendMessageFlags] -> Int32 -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m (Word32)
data DBusConnectionSendMessageWithReplyFinishMethodInfo
-- | 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.
dBusConnectionSendMessageWithReplyFinish :: (HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) => a -> b -> m DBusMessage
data DBusConnectionSendMessageWithReplySyncMethodInfo
-- | 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.
dBusConnectionSendMessageWithReplySync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b, IsCancellable c) => a -> b -> [DBusSendMessageFlags] -> Int32 -> Maybe (c) -> m (DBusMessage, Word32)
data DBusConnectionSetExitOnCloseMethodInfo
-- | 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.
dBusConnectionSetExitOnClose :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Bool -> m ()
data DBusConnectionSignalSubscribeMethodInfo
-- | 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.)
dBusConnectionSignalSubscribe :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Maybe (Text) -> Maybe (Text) -> Maybe (Text) -> Maybe (Text) -> Maybe (Text) -> [DBusSignalFlags] -> DBusSignalCallback -> m Word32
data DBusConnectionSignalUnsubscribeMethodInfo
-- | Unsubscribes from signals.
dBusConnectionSignalUnsubscribe :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
data DBusConnectionStartMessageProcessingMethodInfo
-- | 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.
dBusConnectionStartMessageProcessing :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> m ()
data DBusConnectionUnexportActionGroupMethodInfo
-- | 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.
dBusConnectionUnexportActionGroup :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
data DBusConnectionUnexportMenuModelMethodInfo
-- | 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.
dBusConnectionUnexportMenuModel :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m ()
data DBusConnectionUnregisterObjectMethodInfo
-- | Unregisters an object.
dBusConnectionUnregisterObject :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m Bool
data DBusConnectionUnregisterSubtreeMethodInfo
-- | Unregisters a subtree.
dBusConnectionUnregisterSubtree :: (HasCallStack, MonadIO m, IsDBusConnection a) => a -> Word32 -> m Bool
data DBusConnectionAddressPropertyInfo
constructDBusConnectionAddress :: (IsDBusConnection o) => Text -> IO (GValueConstruct o)
dBusConnectionAddress :: AttrLabelProxy "address"
data DBusConnectionAuthenticationObserverPropertyInfo
constructDBusConnectionAuthenticationObserver :: (IsDBusConnection o, IsDBusAuthObserver a) => a -> IO (GValueConstruct o)
dBusConnectionAuthenticationObserver :: AttrLabelProxy "authenticationObserver"
data DBusConnectionCapabilitiesPropertyInfo
dBusConnectionCapabilities :: AttrLabelProxy "capabilities"
getDBusConnectionCapabilities :: (MonadIO m, IsDBusConnection o) => o -> m [DBusCapabilityFlags]
data DBusConnectionClosedPropertyInfo
dBusConnectionClosed :: AttrLabelProxy "closed"
getDBusConnectionClosed :: (MonadIO m, IsDBusConnection o) => o -> m Bool
data DBusConnectionExitOnClosePropertyInfo
constructDBusConnectionExitOnClose :: (IsDBusConnection o) => Bool -> IO (GValueConstruct o)
dBusConnectionExitOnClose :: AttrLabelProxy "exitOnClose"
getDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> m Bool
setDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> Bool -> m ()
data DBusConnectionFlagsPropertyInfo
constructDBusConnectionFlags :: (IsDBusConnection o) => [DBusConnectionFlags] -> IO (GValueConstruct o)
dBusConnectionFlags :: AttrLabelProxy "flags"
data DBusConnectionGuidPropertyInfo
constructDBusConnectionGuid :: (IsDBusConnection o) => Text -> IO (GValueConstruct o)
dBusConnectionGuid :: AttrLabelProxy "guid"
getDBusConnectionGuid :: (MonadIO m, IsDBusConnection o) => o -> m Text
data DBusConnectionStreamPropertyInfo
constructDBusConnectionStream :: (IsDBusConnection o, IsIOStream a) => a -> IO (GValueConstruct o)
dBusConnectionStream :: AttrLabelProxy "stream"
getDBusConnectionStream :: (MonadIO m, IsDBusConnection o) => o -> m IOStream
data DBusConnectionUniqueNamePropertyInfo
dBusConnectionUniqueName :: AttrLabelProxy "uniqueName"
getDBusConnectionUniqueName :: (MonadIO m, IsDBusConnection o) => o -> m Text
type C_DBusConnectionClosedCallback = Ptr () -> CInt -> Ptr GError -> Ptr () -> IO ()
type DBusConnectionClosedCallback = Bool -> Maybe GError -> IO ()
data DBusConnectionClosedSignalInfo
afterDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> DBusConnectionClosedCallback -> m SignalHandlerId
genClosure_DBusConnectionClosed :: DBusConnectionClosedCallback -> IO Closure
mk_DBusConnectionClosedCallback :: C_DBusConnectionClosedCallback -> IO (FunPtr C_DBusConnectionClosedCallback)
noDBusConnectionClosedCallback :: Maybe DBusConnectionClosedCallback
onDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> DBusConnectionClosedCallback -> m SignalHandlerId
wrap_DBusConnectionClosedCallback :: DBusConnectionClosedCallback -> Ptr () -> CInt -> Ptr GError -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusConnection.DBusConnection
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusConnection.DBusConnection a) => GI.Gio.Objects.DBusConnection.IsDBusConnection a
instance GI.Gio.Objects.DBusConnection.IsDBusConnection GI.Gio.Objects.DBusConnection.DBusConnection
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusConnection.DBusConnection
instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Gio.Objects.DBusConnection.DBusConnection
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Objects.DBusConnection.DBusConnection
instance (info ~ GI.Gio.Objects.DBusConnection.ResolveDBusConnectionMethod t GI.Gio.Objects.DBusConnection.DBusConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusConnection.DBusConnection p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusConnection.DBusConnection -> p)
instance (info ~ GI.Gio.Objects.DBusConnection.ResolveDBusConnectionMethod t GI.Gio.Objects.DBusConnection.DBusConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusConnection.DBusConnection p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusConnection.DBusConnection -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionAddressPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionAuthenticationObserverPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionCapabilitiesPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionClosedPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionExitOnClosePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionFlagsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionGuidPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionStreamPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusConnection.DBusConnectionUniqueNamePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusConnection.DBusConnection
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusConnection.DBusConnectionClosedSignalInfo
instance (signature ~ (GI.Gio.Callbacks.DBusMessageFilterFunction -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionAddFilterMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCallMethodInfo a signature
instance (signature ~ (b -> m Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCallFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> m Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCallSyncMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.UnixFDList.IsUnixFDList b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCallWithUnixFdListMethodInfo a signature
instance (signature ~ (b -> m (Data.GI.Base.BasicTypes.GVariant, GI.Gio.Objects.UnixFDList.UnixFDList)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCallWithUnixFdListFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> GHC.Base.Maybe GI.GLib.Structs.VariantType.VariantType -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> m (Data.GI.Base.BasicTypes.GVariant, GI.Gio.Objects.UnixFDList.UnixFDList)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.UnixFDList.IsUnixFDList b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCallWithUnixFdListSyncMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCloseMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCloseFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionCloseSyncMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionEmitSignalMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> b -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Interfaces.ActionGroup.IsActionGroup b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionExportActionGroupMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> b -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.MenuModel.IsMenuModel b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionExportMenuModelMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionFlushMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionFlushFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionFlushSyncMethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.DBusCapabilityFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionGetCapabilitiesMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionGetExitOnCloseMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionGetGuidMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionGetLastSerialMethodInfo a signature
instance (signature ~ m (GHC.Base.Maybe GI.Gio.Objects.Credentials.Credentials), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionGetPeerCredentialsMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.IOStream.IOStream, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionGetStreamMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionGetUniqueNameMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionIsClosedMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo -> GHC.Base.Maybe Data.GI.Base.Closure.Closure -> GHC.Base.Maybe Data.GI.Base.Closure.Closure -> GHC.Base.Maybe Data.GI.Base.Closure.Closure -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionRegisterObjectMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GI.Gio.Structs.DBusSubtreeVTable.DBusSubtreeVTable -> [GI.Gio.Flags.DBusSubtreeFlags] -> GHC.Ptr.Ptr () -> GI.GLib.Callbacks.DestroyNotify -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionRegisterSubtreeMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionRemoveFilterMethodInfo a signature
instance (signature ~ (b -> [GI.Gio.Flags.DBusSendMessageFlags] -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.DBusMessage.IsDBusMessage b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionSendMessageMethodInfo a signature
instance (signature ~ (b -> [GI.Gio.Flags.DBusSendMessageFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.DBusMessage.IsDBusMessage b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionSendMessageWithReplyMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.DBusMessage.DBusMessage), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionSendMessageWithReplyFinishMethodInfo a signature
instance (signature ~ (b -> [GI.Gio.Flags.DBusSendMessageFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe c -> m (GI.Gio.Objects.DBusMessage.DBusMessage, GHC.Word.Word32)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a, GI.Gio.Objects.DBusMessage.IsDBusMessage b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionSendMessageWithReplySyncMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionSetExitOnCloseMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> GHC.Base.Maybe Data.Text.Internal.Text -> GHC.Base.Maybe Data.Text.Internal.Text -> GHC.Base.Maybe Data.Text.Internal.Text -> GHC.Base.Maybe Data.Text.Internal.Text -> [GI.Gio.Flags.DBusSignalFlags] -> GI.Gio.Callbacks.DBusSignalCallback -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionSignalSubscribeMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionSignalUnsubscribeMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionStartMessageProcessingMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionUnexportActionGroupMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionUnexportMenuModelMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionUnregisterObjectMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m GHC.Types.Bool), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusConnection.IsDBusConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusConnection.DBusConnectionUnregisterSubtreeMethodInfo a signature
-- | 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.
module GI.Gio.Objects.DBusObjectManagerClient
newtype DBusObjectManagerClient
DBusObjectManagerClient :: (ManagedPtr DBusObjectManagerClient) -> DBusObjectManagerClient
class GObject o => IsDBusObjectManagerClient o
toDBusObjectManagerClient :: IsDBusObjectManagerClient o => o -> IO DBusObjectManagerClient
noDBusObjectManagerClient :: Maybe DBusObjectManagerClient
data DBusObjectManagerClientGetConnectionMethodInfo
-- | Gets the DBusConnection used by manager.
dBusObjectManagerClientGetConnection :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m DBusConnection
data DBusObjectManagerClientGetFlagsMethodInfo
-- | Gets the flags that manager was constructed with.
dBusObjectManagerClientGetFlags :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m [DBusObjectManagerClientFlags]
data DBusObjectManagerClientGetNameMethodInfo
-- | Gets the name that manager is for, or Nothing
-- if not a message bus connection.
dBusObjectManagerClientGetName :: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) => a -> m Text
data DBusObjectManagerClientGetNameOwnerMethodInfo
-- | 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.
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.
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.
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.
dBusObjectManagerClientNewForBus :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusObjectManagerClientFlags] -> Text -> Text -> Maybe (DBusProxyTypeFunc) -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
-- | Finishes an operation started with
-- dBusObjectManagerClientNewForBus.
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.
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.
dBusObjectManagerClientNewSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusObjectManagerClientFlags] -> Maybe (Text) -> Text -> Maybe (DBusProxyTypeFunc) -> Maybe (b) -> m DBusObjectManagerClient
data DBusObjectManagerClientBusTypePropertyInfo
constructDBusObjectManagerClientBusType :: (IsDBusObjectManagerClient o) => BusType -> IO (GValueConstruct o)
dBusObjectManagerClientBusType :: AttrLabelProxy "busType"
data DBusObjectManagerClientConnectionPropertyInfo
constructDBusObjectManagerClientConnection :: (IsDBusObjectManagerClient o, IsDBusConnection a) => a -> IO (GValueConstruct o)
dBusObjectManagerClientConnection :: AttrLabelProxy "connection"
getDBusObjectManagerClientConnection :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m DBusConnection
data DBusObjectManagerClientFlagsPropertyInfo
constructDBusObjectManagerClientFlags :: (IsDBusObjectManagerClient o) => [DBusObjectManagerClientFlags] -> IO (GValueConstruct o)
dBusObjectManagerClientFlags :: AttrLabelProxy "flags"
getDBusObjectManagerClientFlags :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m [DBusObjectManagerClientFlags]
data DBusObjectManagerClientGetProxyTypeDestroyNotifyPropertyInfo
constructDBusObjectManagerClientGetProxyTypeDestroyNotify :: (IsDBusObjectManagerClient o) => Ptr () -> IO (GValueConstruct o)
dBusObjectManagerClientGetProxyTypeDestroyNotify :: AttrLabelProxy "getProxyTypeDestroyNotify"
getDBusObjectManagerClientGetProxyTypeDestroyNotify :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ())
data DBusObjectManagerClientGetProxyTypeFuncPropertyInfo
constructDBusObjectManagerClientGetProxyTypeFunc :: (IsDBusObjectManagerClient o) => Ptr () -> IO (GValueConstruct o)
dBusObjectManagerClientGetProxyTypeFunc :: AttrLabelProxy "getProxyTypeFunc"
getDBusObjectManagerClientGetProxyTypeFunc :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ())
data DBusObjectManagerClientGetProxyTypeUserDataPropertyInfo
constructDBusObjectManagerClientGetProxyTypeUserData :: (IsDBusObjectManagerClient o) => Ptr () -> IO (GValueConstruct o)
dBusObjectManagerClientGetProxyTypeUserData :: AttrLabelProxy "getProxyTypeUserData"
getDBusObjectManagerClientGetProxyTypeUserData :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Ptr ())
data DBusObjectManagerClientNamePropertyInfo
constructDBusObjectManagerClientName :: (IsDBusObjectManagerClient o) => Text -> IO (GValueConstruct o)
dBusObjectManagerClientName :: AttrLabelProxy "name"
getDBusObjectManagerClientName :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m Text
data DBusObjectManagerClientNameOwnerPropertyInfo
dBusObjectManagerClientNameOwner :: AttrLabelProxy "nameOwner"
getDBusObjectManagerClientNameOwner :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Maybe Text)
data DBusObjectManagerClientObjectPathPropertyInfo
constructDBusObjectManagerClientObjectPath :: (IsDBusObjectManagerClient o) => Text -> IO (GValueConstruct o)
dBusObjectManagerClientObjectPath :: AttrLabelProxy "objectPath"
getDBusObjectManagerClientObjectPath :: (MonadIO m, IsDBusObjectManagerClient o) => o -> m (Maybe Text)
type C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback = Ptr () -> Ptr DBusObjectProxy -> Ptr DBusProxy -> Ptr GVariant -> Ptr CString -> Ptr () -> IO ()
type DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback = DBusObjectProxy -> DBusProxy -> GVariant -> [Text] -> IO ()
data DBusObjectManagerClientInterfaceProxyPropertiesChangedSignalInfo
afterDBusObjectManagerClientInterfaceProxyPropertiesChanged :: (IsDBusObjectManagerClient a, MonadIO m) => a -> DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> m SignalHandlerId
genClosure_DBusObjectManagerClientInterfaceProxyPropertiesChanged :: DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> IO Closure
mk_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback :: C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> IO (FunPtr C_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback)
noDBusObjectManagerClientInterfaceProxyPropertiesChangedCallback :: Maybe DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback
onDBusObjectManagerClientInterfaceProxyPropertiesChanged :: (IsDBusObjectManagerClient a, MonadIO m) => a -> DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> m SignalHandlerId
wrap_DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback :: DBusObjectManagerClientInterfaceProxyPropertiesChangedCallback -> Ptr () -> Ptr DBusObjectProxy -> Ptr DBusProxy -> Ptr GVariant -> Ptr CString -> Ptr () -> IO ()
type C_DBusObjectManagerClientInterfaceProxySignalCallback = Ptr () -> Ptr DBusObjectProxy -> Ptr DBusProxy -> CString -> CString -> Ptr GVariant -> Ptr () -> IO ()
type DBusObjectManagerClientInterfaceProxySignalCallback = DBusObjectProxy -> DBusProxy -> Text -> Text -> GVariant -> IO ()
data DBusObjectManagerClientInterfaceProxySignalSignalInfo
afterDBusObjectManagerClientInterfaceProxySignal :: (IsDBusObjectManagerClient a, MonadIO m) => a -> DBusObjectManagerClientInterfaceProxySignalCallback -> m SignalHandlerId
genClosure_DBusObjectManagerClientInterfaceProxySignal :: DBusObjectManagerClientInterfaceProxySignalCallback -> IO Closure
mk_DBusObjectManagerClientInterfaceProxySignalCallback :: C_DBusObjectManagerClientInterfaceProxySignalCallback -> IO (FunPtr C_DBusObjectManagerClientInterfaceProxySignalCallback)
noDBusObjectManagerClientInterfaceProxySignalCallback :: Maybe DBusObjectManagerClientInterfaceProxySignalCallback
onDBusObjectManagerClientInterfaceProxySignal :: (IsDBusObjectManagerClient a, MonadIO m) => a -> DBusObjectManagerClientInterfaceProxySignalCallback -> m SignalHandlerId
wrap_DBusObjectManagerClientInterfaceProxySignalCallback :: DBusObjectManagerClientInterfaceProxySignalCallback -> Ptr () -> Ptr DBusObjectProxy -> Ptr DBusProxy -> CString -> CString -> Ptr GVariant -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient a) => GI.Gio.Objects.DBusObjectManagerClient.IsDBusObjectManagerClient a
instance GI.Gio.Objects.DBusObjectManagerClient.IsDBusObjectManagerClient GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance GI.Gio.Interfaces.DBusObjectManager.IsDBusObjectManager GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance (info ~ GI.Gio.Objects.DBusObjectManagerClient.ResolveDBusObjectManagerClientMethod t GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient -> p)
instance (info ~ GI.Gio.Objects.DBusObjectManagerClient.ResolveDBusObjectManagerClientMethod t GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientBusTypePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientConnectionPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientFlagsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientGetProxyTypeDestroyNotifyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientGetProxyTypeFuncPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientGetProxyTypeUserDataPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientNameOwnerPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientObjectPathPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClient
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientInterfaceProxyPropertiesChangedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientInterfaceProxySignalSignalInfo
instance (signature ~ m GI.Gio.Objects.DBusConnection.DBusConnection, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerClient.IsDBusObjectManagerClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientGetConnectionMethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.DBusObjectManagerClientFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerClient.IsDBusObjectManagerClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientGetFlagsMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerClient.IsDBusObjectManagerClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientGetNameMethodInfo a signature
instance (signature ~ m (GHC.Base.Maybe Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusObjectManagerClient.IsDBusObjectManagerClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusObjectManagerClient.DBusObjectManagerClientGetNameOwnerMethodInfo a signature
-- | 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 gets
-- 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.
--
-- If a DBusProxy is used for a well-known name, the owner of the
-- 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
module GI.Gio.Objects.DBusProxy
newtype DBusProxy
DBusProxy :: (ManagedPtr DBusProxy) -> DBusProxy
class GObject o => IsDBusProxy o
toDBusProxy :: IsDBusProxy o => o -> IO DBusProxy
noDBusProxy :: Maybe DBusProxy
data DBusProxyCallMethodInfo
-- | 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.
dBusProxyCall :: (HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) => a -> Text -> Maybe (GVariant) -> [DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DBusProxyCallFinishMethodInfo
-- | Finishes an operation started with dBusProxyCall.
dBusProxyCallFinish :: (HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) => a -> b -> m GVariant
data DBusProxyCallSyncMethodInfo
-- | 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.
dBusProxyCallSync :: (HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) => a -> Text -> Maybe (GVariant) -> [DBusCallFlags] -> Int32 -> Maybe (b) -> m GVariant
data DBusProxyCallWithUnixFdListMethodInfo
-- | Like dBusProxyCall but also takes a UnixFDList object.
--
-- This method is only available on UNIX.
dBusProxyCallWithUnixFdList :: (HasCallStack, MonadIO m, IsDBusProxy a, IsUnixFDList b, IsCancellable c) => a -> Text -> Maybe (GVariant) -> [DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
data DBusProxyCallWithUnixFdListFinishMethodInfo
-- | Finishes an operation started with dBusProxyCallWithUnixFdList.
dBusProxyCallWithUnixFdListFinish :: (HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) => a -> b -> m (GVariant, UnixFDList)
data DBusProxyCallWithUnixFdListSyncMethodInfo
-- | Like dBusProxyCallSync but also takes and returns
-- UnixFDList objects.
--
-- This method is only available on UNIX.
dBusProxyCallWithUnixFdListSync :: (HasCallStack, MonadIO m, IsDBusProxy a, IsUnixFDList b, IsCancellable c) => a -> Text -> Maybe (GVariant) -> [DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (c) -> m (GVariant, UnixFDList)
data DBusProxyGetCachedPropertyMethodInfo
-- | 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.
dBusProxyGetCachedProperty :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Text -> m GVariant
data DBusProxyGetCachedPropertyNamesMethodInfo
-- | Gets the names of all cached properties on proxy.
dBusProxyGetCachedPropertyNames :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m [Text]
data DBusProxyGetConnectionMethodInfo
-- | Gets the connection proxy is for.
dBusProxyGetConnection :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m DBusConnection
data DBusProxyGetDefaultTimeoutMethodInfo
-- | 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.
dBusProxyGetDefaultTimeout :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Int32
data DBusProxyGetFlagsMethodInfo
-- | Gets the flags that proxy was constructed with.
dBusProxyGetFlags :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m [DBusProxyFlags]
data DBusProxyGetInterfaceInfoMethodInfo
-- | Returns the DBusInterfaceInfo, if any, specifying the interface
-- that proxy conforms to. See the
-- DBusProxy:g-interface-info property for more
-- details.
dBusProxyGetInterfaceInfo :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m DBusInterfaceInfo
data DBusProxyGetInterfaceNameMethodInfo
-- | Gets the D-Bus interface name proxy is for.
dBusProxyGetInterfaceName :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Text
data DBusProxyGetNameMethodInfo
-- | Gets the name that proxy was constructed for.
dBusProxyGetName :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Text
data DBusProxyGetNameOwnerMethodInfo
-- | 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.
dBusProxyGetNameOwner :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> m Text
data DBusProxyGetObjectPathMethodInfo
-- | Gets the object path proxy is for.
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 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].
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.
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].
dBusProxyNewForBus :: (HasCallStack, MonadIO m, IsCancellable a) => BusType -> [DBusProxyFlags] -> Maybe (DBusInterfaceInfo) -> Text -> Text -> Text -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
-- | Finishes creating a DBusProxy.
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].
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 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].
dBusProxyNewSync :: (HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) => a -> [DBusProxyFlags] -> Maybe (DBusInterfaceInfo) -> Maybe (Text) -> Text -> Text -> Maybe (b) -> m DBusProxy
data DBusProxySetCachedPropertyMethodInfo
-- | 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).
dBusProxySetCachedProperty :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Text -> Maybe (GVariant) -> m ()
data DBusProxySetDefaultTimeoutMethodInfo
-- | 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.
dBusProxySetDefaultTimeout :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Int32 -> m ()
data DBusProxySetInterfaceInfoMethodInfo
-- | Ensure that interactions with proxy conform to the
-- given interface. See the
-- DBusProxy:g-interface-info property for more
-- details.
dBusProxySetInterfaceInfo :: (HasCallStack, MonadIO m, IsDBusProxy a) => a -> Maybe (DBusInterfaceInfo) -> m ()
data DBusProxyGBusTypePropertyInfo
constructDBusProxyGBusType :: (IsDBusProxy o) => BusType -> IO (GValueConstruct o)
dBusProxyGBusType :: AttrLabelProxy "gBusType"
data DBusProxyGConnectionPropertyInfo
constructDBusProxyGConnection :: (IsDBusProxy o, IsDBusConnection a) => a -> IO (GValueConstruct o)
dBusProxyGConnection :: AttrLabelProxy "gConnection"
getDBusProxyGConnection :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe DBusConnection)
data DBusProxyGDefaultTimeoutPropertyInfo
constructDBusProxyGDefaultTimeout :: (IsDBusProxy o) => Int32 -> IO (GValueConstruct o)
dBusProxyGDefaultTimeout :: AttrLabelProxy "gDefaultTimeout"
getDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> m Int32
setDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> Int32 -> m ()
data DBusProxyGFlagsPropertyInfo
constructDBusProxyGFlags :: (IsDBusProxy o) => [DBusProxyFlags] -> IO (GValueConstruct o)
dBusProxyGFlags :: AttrLabelProxy "gFlags"
getDBusProxyGFlags :: (MonadIO m, IsDBusProxy o) => o -> m [DBusProxyFlags]
data DBusProxyGInterfaceInfoPropertyInfo
clearDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m ()
constructDBusProxyGInterfaceInfo :: (IsDBusProxy o) => DBusInterfaceInfo -> IO (GValueConstruct o)
dBusProxyGInterfaceInfo :: AttrLabelProxy "gInterfaceInfo"
getDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe DBusInterfaceInfo)
setDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> DBusInterfaceInfo -> m ()
data DBusProxyGInterfaceNamePropertyInfo
constructDBusProxyGInterfaceName :: (IsDBusProxy o) => Text -> IO (GValueConstruct o)
dBusProxyGInterfaceName :: AttrLabelProxy "gInterfaceName"
getDBusProxyGInterfaceName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)
data DBusProxyGNamePropertyInfo
constructDBusProxyGName :: (IsDBusProxy o) => Text -> IO (GValueConstruct o)
dBusProxyGName :: AttrLabelProxy "gName"
getDBusProxyGName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)
data DBusProxyGNameOwnerPropertyInfo
dBusProxyGNameOwner :: AttrLabelProxy "gNameOwner"
getDBusProxyGNameOwner :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)
data DBusProxyGObjectPathPropertyInfo
constructDBusProxyGObjectPath :: (IsDBusProxy o) => Text -> IO (GValueConstruct o)
dBusProxyGObjectPath :: AttrLabelProxy "gObjectPath"
getDBusProxyGObjectPath :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Text)
type C_DBusProxyGPropertiesChangedCallback = Ptr () -> Ptr GVariant -> Ptr CString -> Ptr () -> IO ()
type DBusProxyGPropertiesChangedCallback = GVariant -> [Text] -> IO ()
data DBusProxyGPropertiesChangedSignalInfo
afterDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> DBusProxyGPropertiesChangedCallback -> m SignalHandlerId
genClosure_DBusProxyGPropertiesChanged :: DBusProxyGPropertiesChangedCallback -> IO Closure
mk_DBusProxyGPropertiesChangedCallback :: C_DBusProxyGPropertiesChangedCallback -> IO (FunPtr C_DBusProxyGPropertiesChangedCallback)
noDBusProxyGPropertiesChangedCallback :: Maybe DBusProxyGPropertiesChangedCallback
onDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> DBusProxyGPropertiesChangedCallback -> m SignalHandlerId
wrap_DBusProxyGPropertiesChangedCallback :: DBusProxyGPropertiesChangedCallback -> Ptr () -> Ptr GVariant -> Ptr CString -> Ptr () -> IO ()
type C_DBusProxyGSignalCallback = Ptr () -> CString -> CString -> Ptr GVariant -> Ptr () -> IO ()
type DBusProxyGSignalCallback = Maybe Text -> Text -> GVariant -> IO ()
data DBusProxyGSignalSignalInfo
afterDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> DBusProxyGSignalCallback -> m SignalHandlerId
genClosure_DBusProxyGSignal :: DBusProxyGSignalCallback -> IO Closure
mk_DBusProxyGSignalCallback :: C_DBusProxyGSignalCallback -> IO (FunPtr C_DBusProxyGSignalCallback)
noDBusProxyGSignalCallback :: Maybe DBusProxyGSignalCallback
onDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> DBusProxyGSignalCallback -> m SignalHandlerId
wrap_DBusProxyGSignalCallback :: DBusProxyGSignalCallback -> Ptr () -> CString -> CString -> Ptr GVariant -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DBusProxy.DBusProxy
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DBusProxy.DBusProxy a) => GI.Gio.Objects.DBusProxy.IsDBusProxy a
instance GI.Gio.Objects.DBusProxy.IsDBusProxy GI.Gio.Objects.DBusProxy.DBusProxy
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DBusProxy.DBusProxy
instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Gio.Objects.DBusProxy.DBusProxy
instance GI.Gio.Interfaces.DBusInterface.IsDBusInterface GI.Gio.Objects.DBusProxy.DBusProxy
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Objects.DBusProxy.DBusProxy
instance (info ~ GI.Gio.Objects.DBusProxy.ResolveDBusProxyMethod t GI.Gio.Objects.DBusProxy.DBusProxy, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusProxy.DBusProxy p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DBusProxy.DBusProxy -> p)
instance (info ~ GI.Gio.Objects.DBusProxy.ResolveDBusProxyMethod t GI.Gio.Objects.DBusProxy.DBusProxy, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DBusProxy.DBusProxy p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DBusProxy.DBusProxy -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGBusTypePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGConnectionPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGDefaultTimeoutPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGFlagsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGInterfaceInfoPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGInterfaceNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGNamePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGNameOwnerPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DBusProxy.DBusProxyGObjectPathPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DBusProxy.DBusProxy
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusProxy.DBusProxyGPropertiesChangedSignalInfo
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.DBusProxy.DBusProxyGSignalSignalInfo
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyCallMethodInfo a signature
instance (signature ~ (b -> m Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyCallFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> m Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyCallSyncMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a, GI.Gio.Objects.UnixFDList.IsUnixFDList b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyCallWithUnixFdListMethodInfo a signature
instance (signature ~ (b -> m (Data.GI.Base.BasicTypes.GVariant, GI.Gio.Objects.UnixFDList.UnixFDList)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyCallWithUnixFdListFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> [GI.Gio.Flags.DBusCallFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe c -> m (Data.GI.Base.BasicTypes.GVariant, GI.Gio.Objects.UnixFDList.UnixFDList)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a, GI.Gio.Objects.UnixFDList.IsUnixFDList b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyCallWithUnixFdListSyncMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> m Data.GI.Base.BasicTypes.GVariant), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetCachedPropertyMethodInfo a signature
instance (signature ~ m [Data.Text.Internal.Text], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetCachedPropertyNamesMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.DBusConnection.DBusConnection, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetConnectionMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetDefaultTimeoutMethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.DBusProxyFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetFlagsMethodInfo a signature
instance (signature ~ m GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetInterfaceInfoMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetInterfaceNameMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetNameMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetNameOwnerMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxyGetObjectPathMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe Data.GI.Base.BasicTypes.GVariant -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxySetCachedPropertyMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxySetDefaultTimeoutMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe GI.Gio.Structs.DBusInterfaceInfo.DBusInterfaceInfo -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DBusProxy.IsDBusProxy a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DBusProxy.DBusProxySetInterfaceInfoMethodInfo a signature
-- | Data input stream implements InputStream and includes functions
-- for reading structured data directly from a binary input stream.
module GI.Gio.Objects.DataInputStream
newtype DataInputStream
DataInputStream :: (ManagedPtr DataInputStream) -> DataInputStream
class GObject o => IsDataInputStream o
toDataInputStream :: IsDataInputStream o => o -> IO DataInputStream
noDataInputStream :: Maybe DataInputStream
data DataInputStreamGetByteOrderMethodInfo
-- | Gets the byte order for the data input stream.
dataInputStreamGetByteOrder :: (HasCallStack, MonadIO m, IsDataInputStream a) => a -> m DataStreamByteOrder
data DataInputStreamGetNewlineTypeMethodInfo
-- | 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
data DataInputStreamReadByteMethodInfo
-- | Reads an unsigned 8-bit/1-byte value from stream.
dataInputStreamReadByte :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe (b) -> m Word8
data DataInputStreamReadInt16MethodInfo
-- | 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
data DataInputStreamReadInt32MethodInfo
-- | 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
data DataInputStreamReadInt64MethodInfo
-- | 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
data DataInputStreamReadLineMethodInfo
-- | 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)
data DataInputStreamReadLineAsyncMethodInfo
-- | 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.
dataInputStreamReadLineAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DataInputStreamReadLineFinishMethodInfo
-- | Finish an asynchronous call started by
-- dataInputStreamReadLineAsync. Note the warning about string
-- encoding in dataInputStreamReadLine applies here as well.
dataInputStreamReadLineFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Maybe ByteString, Word64)
data DataInputStreamReadLineFinishUtf8MethodInfo
-- | Finish an asynchronous call started by
-- dataInputStreamReadLineAsync.
dataInputStreamReadLineFinishUtf8 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Maybe Text, Word64)
data DataInputStreamReadLineUtf8MethodInfo
-- | 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.
dataInputStreamReadLineUtf8 :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Maybe (b) -> m (Maybe Text, Word64)
data DataInputStreamReadUint16MethodInfo
-- | 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
data DataInputStreamReadUint32MethodInfo
-- | 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
data DataInputStreamReadUint64MethodInfo
-- | 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
data DataInputStreamReadUntilMethodInfo
-- | 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.
dataInputStreamReadUntil :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Maybe (b) -> m (Text, Word64)
data DataInputStreamReadUntilAsyncMethodInfo
-- | 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.
dataInputStreamReadUntilAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DataInputStreamReadUntilFinishMethodInfo
-- | Finish an asynchronous call started by
-- dataInputStreamReadUntilAsync.
dataInputStreamReadUntilFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, Word64)
data DataInputStreamReadUptoMethodInfo
-- | 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.
dataInputStreamReadUpto :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Maybe (b) -> m (Text, Word64)
data DataInputStreamReadUptoAsyncMethodInfo
-- | 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.
dataInputStreamReadUptoAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data DataInputStreamReadUptoFinishMethodInfo
-- | 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.
dataInputStreamReadUptoFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, Word64)
data DataInputStreamSetByteOrderMethodInfo
-- | 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 ()
data DataInputStreamSetNewlineTypeMethodInfo
-- | 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 ()
data DataInputStreamByteOrderPropertyInfo
constructDataInputStreamByteOrder :: (IsDataInputStream o) => DataStreamByteOrder -> IO (GValueConstruct o)
dataInputStreamByteOrder :: AttrLabelProxy "byteOrder"
getDataInputStreamByteOrder :: (MonadIO m, IsDataInputStream o) => o -> m DataStreamByteOrder
setDataInputStreamByteOrder :: (MonadIO m, IsDataInputStream o) => o -> DataStreamByteOrder -> m ()
data DataInputStreamNewlineTypePropertyInfo
constructDataInputStreamNewlineType :: (IsDataInputStream o) => DataStreamNewlineType -> IO (GValueConstruct o)
dataInputStreamNewlineType :: AttrLabelProxy "newlineType"
getDataInputStreamNewlineType :: (MonadIO m, IsDataInputStream o) => o -> m DataStreamNewlineType
setDataInputStreamNewlineType :: (MonadIO m, IsDataInputStream o) => o -> DataStreamNewlineType -> m ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.DataInputStream.DataInputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.DataInputStream.DataInputStream a) => GI.Gio.Objects.DataInputStream.IsDataInputStream a
instance GI.Gio.Objects.DataInputStream.IsDataInputStream GI.Gio.Objects.DataInputStream.DataInputStream
instance GI.Gio.Objects.BufferedInputStream.IsBufferedInputStream GI.Gio.Objects.DataInputStream.DataInputStream
instance GI.Gio.Objects.FilterInputStream.IsFilterInputStream GI.Gio.Objects.DataInputStream.DataInputStream
instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Objects.DataInputStream.DataInputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.DataInputStream.DataInputStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.DataInputStream.DataInputStream
instance (info ~ GI.Gio.Objects.DataInputStream.ResolveDataInputStreamMethod t GI.Gio.Objects.DataInputStream.DataInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DataInputStream.DataInputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.DataInputStream.DataInputStream -> p)
instance (info ~ GI.Gio.Objects.DataInputStream.ResolveDataInputStreamMethod t GI.Gio.Objects.DataInputStream.DataInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.DataInputStream.DataInputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.DataInputStream.DataInputStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DataInputStream.DataInputStreamByteOrderPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.DataInputStream.DataInputStreamNewlineTypePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.DataInputStream.DataInputStream
instance (signature ~ m GI.Gio.Enums.DataStreamByteOrder, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamGetByteOrderMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.DataStreamNewlineType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamGetNewlineTypeMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Word.Word8), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadByteMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Int.Int16), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadInt16MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Int.Int32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadInt32MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadInt64MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m (GHC.Base.Maybe Data.ByteString.Internal.ByteString, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadLineMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadLineAsyncMethodInfo a signature
instance (signature ~ (b -> m (GHC.Base.Maybe Data.ByteString.Internal.ByteString, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadLineFinishMethodInfo a signature
instance (signature ~ (b -> m (GHC.Base.Maybe Data.Text.Internal.Text, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadLineFinishUtf8MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m (GHC.Base.Maybe Data.Text.Internal.Text, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadLineUtf8MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Word.Word16), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUint16MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Word.Word32), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUint32MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Word.Word64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUint64MethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> m (Data.Text.Internal.Text, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUntilMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUntilAsyncMethodInfo a signature
instance (signature ~ (b -> m (Data.Text.Internal.Text, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUntilFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int64 -> GHC.Base.Maybe b -> m (Data.Text.Internal.Text, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUptoMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int64 -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUptoAsyncMethodInfo a signature
instance (signature ~ (b -> m (Data.Text.Internal.Text, GHC.Word.Word64)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamReadUptoFinishMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.DataStreamByteOrder -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamSetByteOrderMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.DataStreamNewlineType -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.DataInputStream.IsDataInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.DataInputStream.DataInputStreamSetNewlineTypeMethodInfo a signature
-- | 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
newtype FileEnumerator
FileEnumerator :: (ManagedPtr FileEnumerator) -> FileEnumerator
class GObject o => IsFileEnumerator o
toFileEnumerator :: IsFileEnumerator o => o -> IO FileEnumerator
noFileEnumerator :: Maybe FileEnumerator
data FileEnumeratorCloseMethodInfo
-- | 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 ()
data FileEnumeratorCloseAsyncMethodInfo
-- | 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 ()
data FileEnumeratorCloseFinishMethodInfo
-- | 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 ()
data FileEnumeratorGetChildMethodInfo
-- | 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); --fileEnumeratorGetChild :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsFileInfo b) => a -> b -> m File data FileEnumeratorGetContainerMethodInfo -- | Get the File container which is being enumerated. fileEnumeratorGetContainer :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> m File data FileEnumeratorHasPendingMethodInfo -- | Checks if the file enumerator has pending operations. fileEnumeratorHasPending :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> m Bool data FileEnumeratorIsClosedMethodInfo -- | Checks if the file enumerator has been closed. fileEnumeratorIsClosed :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> m Bool data FileEnumeratorIterateMethodInfo -- | 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
--
fileEnumeratorIterate :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsCancellable b) => a -> Maybe (b) -> m (FileInfo, File)
data FileEnumeratorNextFileMethodInfo
-- | 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)
data FileEnumeratorNextFilesAsyncMethodInfo
-- | 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 ()
data FileEnumeratorNextFilesFinishMethodInfo
-- | Finishes the asynchronous operation started with
-- fileEnumeratorNextFilesAsync.
fileEnumeratorNextFilesFinish :: (HasCallStack, MonadIO m, IsFileEnumerator a, IsAsyncResult b) => a -> b -> m [FileInfo]
data FileEnumeratorSetPendingMethodInfo
-- | Sets the file enumerator as having pending operations.
fileEnumeratorSetPending :: (HasCallStack, MonadIO m, IsFileEnumerator a) => a -> Bool -> m ()
data FileEnumeratorContainerPropertyInfo
constructFileEnumeratorContainer :: (IsFileEnumerator o, IsFile a) => a -> IO (GValueConstruct o)
fileEnumeratorContainer :: AttrLabelProxy "container"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileEnumerator.FileEnumerator
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.FileEnumerator.FileEnumerator a) => GI.Gio.Objects.FileEnumerator.IsFileEnumerator a
instance GI.Gio.Objects.FileEnumerator.IsFileEnumerator GI.Gio.Objects.FileEnumerator.FileEnumerator
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.FileEnumerator.FileEnumerator
instance (info ~ GI.Gio.Objects.FileEnumerator.ResolveFileEnumeratorMethod t GI.Gio.Objects.FileEnumerator.FileEnumerator, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileEnumerator.FileEnumerator p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.FileEnumerator.FileEnumerator -> p)
instance (info ~ GI.Gio.Objects.FileEnumerator.ResolveFileEnumeratorMethod t GI.Gio.Objects.FileEnumerator.FileEnumerator, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileEnumerator.FileEnumerator p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.FileEnumerator.FileEnumerator -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorContainerPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.FileEnumerator.FileEnumerator
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorCloseMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorCloseAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorCloseFinishMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Interfaces.File.File), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Objects.FileInfo.IsFileInfo b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorGetChildMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.File.File, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorGetContainerMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorHasPendingMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorIsClosedMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m (GI.Gio.Objects.FileInfo.FileInfo, GI.Gio.Interfaces.File.File)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorIterateMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m (GHC.Base.Maybe GI.Gio.Objects.FileInfo.FileInfo)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorNextFileMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorNextFilesAsyncMethodInfo a signature
instance (signature ~ (b -> m [GI.Gio.Objects.FileInfo.FileInfo]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorNextFilesFinishMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileEnumerator.IsFileEnumerator a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileEnumerator.FileEnumeratorSetPendingMethodInfo a signature
-- | 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.
module GI.Gio.Objects.FileIOStream
newtype FileIOStream
FileIOStream :: (ManagedPtr FileIOStream) -> FileIOStream
class GObject o => IsFileIOStream o
toFileIOStream :: IsFileIOStream o => o -> IO FileIOStream
noFileIOStream :: Maybe FileIOStream
data FileIOStreamGetEtagMethodInfo
-- | 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.
fileIOStreamGetEtag :: (HasCallStack, MonadIO m, IsFileIOStream a) => a -> m Text
data FileIOStreamQueryInfoMethodInfo
-- | 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.
fileIOStreamQueryInfo :: (HasCallStack, MonadIO m, IsFileIOStream a, IsCancellable b) => a -> Text -> Maybe (b) -> m FileInfo
data FileIOStreamQueryInfoAsyncMethodInfo
-- | 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.
fileIOStreamQueryInfoAsync :: (HasCallStack, MonadIO m, IsFileIOStream a, IsCancellable b) => a -> Text -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data FileIOStreamQueryInfoFinishMethodInfo
-- | Finalizes the asynchronous query started by
-- fileIOStreamQueryInfoAsync.
fileIOStreamQueryInfoFinish :: (HasCallStack, MonadIO m, IsFileIOStream a, IsAsyncResult b) => a -> b -> m FileInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileIOStream.FileIOStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.FileIOStream.FileIOStream a) => GI.Gio.Objects.FileIOStream.IsFileIOStream a
instance GI.Gio.Objects.FileIOStream.IsFileIOStream GI.Gio.Objects.FileIOStream.FileIOStream
instance GI.Gio.Objects.IOStream.IsIOStream GI.Gio.Objects.FileIOStream.FileIOStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.FileIOStream.FileIOStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.FileIOStream.FileIOStream
instance (info ~ GI.Gio.Objects.FileIOStream.ResolveFileIOStreamMethod t GI.Gio.Objects.FileIOStream.FileIOStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileIOStream.FileIOStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.FileIOStream.FileIOStream -> p)
instance (info ~ GI.Gio.Objects.FileIOStream.ResolveFileIOStreamMethod t GI.Gio.Objects.FileIOStream.FileIOStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileIOStream.FileIOStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.FileIOStream.FileIOStream -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.FileIOStream.FileIOStream
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileIOStream.IsFileIOStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileIOStream.FileIOStreamGetEtagMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> m GI.Gio.Objects.FileInfo.FileInfo), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileIOStream.IsFileIOStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileIOStream.FileIOStreamQueryInfoMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileIOStream.IsFileIOStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileIOStream.FileIOStreamQueryInfoAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.FileInfo.FileInfo), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileIOStream.IsFileIOStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileIOStream.FileIOStreamQueryInfoFinishMethodInfo a signature
-- | 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
newtype FileInputStream
FileInputStream :: (ManagedPtr FileInputStream) -> FileInputStream
class GObject o => IsFileInputStream o
toFileInputStream :: IsFileInputStream o => o -> IO FileInputStream
noFileInputStream :: Maybe FileInputStream
data FileInputStreamQueryInfoMethodInfo
-- | 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
data FileInputStreamQueryInfoAsyncMethodInfo
-- | 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 ()
data FileInputStreamQueryInfoFinishMethodInfo
-- | Finishes an asynchronous info query operation.
fileInputStreamQueryInfoFinish :: (HasCallStack, MonadIO m, IsFileInputStream a, IsAsyncResult b) => a -> b -> m FileInfo
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.FileInputStream.FileInputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.FileInputStream.FileInputStream a) => GI.Gio.Objects.FileInputStream.IsFileInputStream a
instance GI.Gio.Objects.FileInputStream.IsFileInputStream GI.Gio.Objects.FileInputStream.FileInputStream
instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Objects.FileInputStream.FileInputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.FileInputStream.FileInputStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.FileInputStream.FileInputStream
instance (info ~ GI.Gio.Objects.FileInputStream.ResolveFileInputStreamMethod t GI.Gio.Objects.FileInputStream.FileInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileInputStream.FileInputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.FileInputStream.FileInputStream -> p)
instance (info ~ GI.Gio.Objects.FileInputStream.ResolveFileInputStreamMethod t GI.Gio.Objects.FileInputStream.FileInputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileInputStream.FileInputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.FileInputStream.FileInputStream -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.FileInputStream.FileInputStream
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> m GI.Gio.Objects.FileInfo.FileInfo), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInputStream.IsFileInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInputStream.FileInputStreamQueryInfoMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInputStream.IsFileInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInputStream.FileInputStreamQueryInfoAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.FileInfo.FileInfo), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileInputStream.IsFileInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileInputStream.FileInputStreamQueryInfoFinishMethodInfo a signature
-- | 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
newtype FileOutputStream
FileOutputStream :: (ManagedPtr FileOutputStream) -> FileOutputStream
class GObject o => IsFileOutputStream o
toFileOutputStream :: IsFileOutputStream o => o -> IO FileOutputStream
noFileOutputStream :: Maybe FileOutputStream
data FileOutputStreamGetEtagMethodInfo
-- | 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
data FileOutputStreamQueryInfoMethodInfo
-- | 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
data FileOutputStreamQueryInfoAsyncMethodInfo
-- | 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 ()
data FileOutputStreamQueryInfoFinishMethodInfo
-- | 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 GI.Gio.Objects.FileOutputStream.FileOutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.FileOutputStream.FileOutputStream a) => GI.Gio.Objects.FileOutputStream.IsFileOutputStream a
instance GI.Gio.Objects.FileOutputStream.IsFileOutputStream GI.Gio.Objects.FileOutputStream.FileOutputStream
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Objects.FileOutputStream.FileOutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.FileOutputStream.FileOutputStream
instance GI.Gio.Interfaces.Seekable.IsSeekable GI.Gio.Objects.FileOutputStream.FileOutputStream
instance (info ~ GI.Gio.Objects.FileOutputStream.ResolveFileOutputStreamMethod t GI.Gio.Objects.FileOutputStream.FileOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileOutputStream.FileOutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.FileOutputStream.FileOutputStream -> p)
instance (info ~ GI.Gio.Objects.FileOutputStream.ResolveFileOutputStreamMethod t GI.Gio.Objects.FileOutputStream.FileOutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.FileOutputStream.FileOutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.FileOutputStream.FileOutputStream -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.FileOutputStream.FileOutputStream
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileOutputStream.IsFileOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileOutputStream.FileOutputStreamGetEtagMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> m GI.Gio.Objects.FileInfo.FileInfo), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileOutputStream.IsFileOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileOutputStream.FileOutputStreamQueryInfoMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileOutputStream.IsFileOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileOutputStream.FileOutputStreamQueryInfoAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.FileInfo.FileInfo), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.FileOutputStream.IsFileOutputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.FileOutputStream.FileOutputStreamQueryInfoFinishMethodInfo a signature
-- | 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).
module GI.Gio.Objects.IOStream
newtype IOStream
IOStream :: (ManagedPtr IOStream) -> IOStream
class GObject o => IsIOStream o
toIOStream :: IsIOStream o => o -> IO IOStream
noIOStream :: Maybe IOStream
data IOStreamClearPendingMethodInfo
-- | Clears the pending flag on stream.
iOStreamClearPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m ()
data IOStreamCloseMethodInfo
-- | 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.
iOStreamClose :: (HasCallStack, MonadIO m, IsIOStream a, IsCancellable b) => a -> Maybe (b) -> m ()
data IOStreamCloseAsyncMethodInfo
-- | 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.
iOStreamCloseAsync :: (HasCallStack, MonadIO m, IsIOStream a, IsCancellable b) => a -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data IOStreamCloseFinishMethodInfo
-- | Closes a stream.
iOStreamCloseFinish :: (HasCallStack, MonadIO m, IsIOStream a, IsAsyncResult b) => a -> b -> m ()
data IOStreamGetInputStreamMethodInfo
-- | Gets the input stream for this object. This is used for reading.
iOStreamGetInputStream :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m InputStream
data IOStreamGetOutputStreamMethodInfo
-- | Gets the output stream for this object. This is used for writing.
iOStreamGetOutputStream :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m OutputStream
data IOStreamHasPendingMethodInfo
-- | Checks if a stream has pending actions.
iOStreamHasPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m Bool
data IOStreamIsClosedMethodInfo
-- | Checks if a stream is closed.
iOStreamIsClosed :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m Bool
data IOStreamSetPendingMethodInfo
-- | Sets stream to have actions pending. If the pending
-- flag is already set or stream is closed, it will
-- return False and set error.
iOStreamSetPending :: (HasCallStack, MonadIO m, IsIOStream a) => a -> m ()
data IOStreamSpliceAsyncMethodInfo
-- | 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.
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.
iOStreamSpliceFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
data IOStreamClosedPropertyInfo
getIOStreamClosed :: (MonadIO m, IsIOStream o) => o -> m Bool
iOStreamClosed :: AttrLabelProxy "closed"
data IOStreamInputStreamPropertyInfo
getIOStreamInputStream :: (MonadIO m, IsIOStream o) => o -> m InputStream
iOStreamInputStream :: AttrLabelProxy "inputStream"
data IOStreamOutputStreamPropertyInfo
getIOStreamOutputStream :: (MonadIO m, IsIOStream o) => o -> m OutputStream
iOStreamOutputStream :: AttrLabelProxy "outputStream"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.IOStream.IOStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.IOStream.IOStream a) => GI.Gio.Objects.IOStream.IsIOStream a
instance GI.Gio.Objects.IOStream.IsIOStream GI.Gio.Objects.IOStream.IOStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.IOStream.IOStream
instance (info ~ GI.Gio.Objects.IOStream.ResolveIOStreamMethod t GI.Gio.Objects.IOStream.IOStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.IOStream.IOStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.IOStream.IOStream -> p)
instance (info ~ GI.Gio.Objects.IOStream.ResolveIOStreamMethod t GI.Gio.Objects.IOStream.IOStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.IOStream.IOStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.IOStream.IOStream -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.IOStream.IOStreamClosedPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.IOStream.IOStreamInputStreamPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.IOStream.IOStreamOutputStreamPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.IOStream.IOStream
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamClearPendingMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamCloseMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamCloseAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamCloseFinishMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.InputStream.InputStream, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamGetInputStreamMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.OutputStream.OutputStream, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamGetOutputStreamMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamHasPendingMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamIsClosedMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamSetPendingMethodInfo a signature
instance (signature ~ (b -> [GI.Gio.Flags.IOStreamSpliceFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.IOStream.IsIOStream a, GI.Gio.Objects.IOStream.IsIOStream b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.IOStream.IOStreamSpliceAsyncMethodInfo a signature
-- | 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
newtype InputStream
InputStream :: (ManagedPtr InputStream) -> InputStream
class GObject o => IsInputStream o
toInputStream :: IsInputStream o => o -> IO InputStream
noInputStream :: Maybe InputStream
data InputStreamClearPendingMethodInfo
-- | Clears the pending flag on stream.
inputStreamClearPending :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m ()
data InputStreamCloseMethodInfo
-- | 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 ()
data InputStreamCloseAsyncMethodInfo
-- | 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 asyncronous 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 ()
data InputStreamCloseFinishMethodInfo
-- | Finishes closing a stream asynchronously, started from
-- inputStreamCloseAsync.
inputStreamCloseFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m ()
data InputStreamHasPendingMethodInfo
-- | Checks if an input stream has pending actions.
inputStreamHasPending :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m Bool
data InputStreamIsClosedMethodInfo
-- | Checks if an input stream is closed.
inputStreamIsClosed :: (HasCallStack, MonadIO m, IsInputStream a) => a -> m Bool
data InputStreamReadMethodInfo
-- | 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
data InputStreamReadAllMethodInfo
-- | 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)
data InputStreamReadAllAsyncMethodInfo
-- | 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.
inputStreamReadAllAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data InputStreamReadAllFinishMethodInfo
-- | 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.
inputStreamReadAllFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m (Word64)
data InputStreamReadAsyncMethodInfo
-- | 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 asyncronous 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 ()
data InputStreamReadBytesMethodInfo
-- | 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.
inputStreamReadBytes :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Word64 -> Maybe (b) -> m Bytes
data InputStreamReadBytesAsyncMethodInfo
-- | 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.
inputStreamReadBytesAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Word64 -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data InputStreamReadBytesFinishMethodInfo
-- | Finishes an asynchronous stream read-into-Bytes operation.
inputStreamReadBytesFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Bytes
data InputStreamReadFinishMethodInfo
-- | Finishes an asynchronous stream read operation.
inputStreamReadFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Int64
data InputStreamSetPendingMethodInfo
-- | 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 ()
data InputStreamSkipMethodInfo
-- | 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
data InputStreamSkipAsyncMethodInfo
-- | 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 ()
data InputStreamSkipFinishMethodInfo
-- | Finishes a stream skip operation.
inputStreamSkipFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Int64
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.InputStream.InputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.InputStream.InputStream a) => GI.Gio.Objects.InputStream.IsInputStream a
instance GI.Gio.Objects.InputStream.IsInputStream GI.Gio.Objects.InputStream.InputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.InputStream.InputStream
instance (info ~ GI.Gio.Objects.InputStream.ResolveInputStreamMethod t GI.Gio.Objects.InputStream.InputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InputStream.InputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.InputStream.InputStream -> p)
instance (info ~ GI.Gio.Objects.InputStream.ResolveInputStreamMethod t GI.Gio.Objects.InputStream.InputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.InputStream.InputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.InputStream.InputStream -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.InputStream.InputStream
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamClearPendingMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamCloseMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamCloseAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamCloseFinishMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamHasPendingMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamIsClosedMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Word.Word64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadAllMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadAllAsyncMethodInfo a signature
instance (signature ~ (b -> m GHC.Word.Word64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadAllFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.ByteString.Internal.ByteString -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadAsyncMethodInfo a signature
instance (signature ~ (GHC.Word.Word64 -> GHC.Base.Maybe b -> m GI.GLib.Structs.Bytes.Bytes), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadBytesMethodInfo a signature
instance (signature ~ (GHC.Word.Word64 -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadBytesAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.GLib.Structs.Bytes.Bytes), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadBytesFinishMethodInfo a signature
instance (signature ~ (b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamReadFinishMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamSetPendingMethodInfo a signature
instance (signature ~ (GHC.Word.Word64 -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamSkipMethodInfo a signature
instance (signature ~ (GHC.Word.Word64 -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamSkipAsyncMethodInfo a signature
instance (signature ~ (b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.InputStream.IsInputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.InputStream.InputStreamSkipFinishMethodInfo a signature
-- | 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
newtype OutputStream
OutputStream :: (ManagedPtr OutputStream) -> OutputStream
class GObject o => IsOutputStream o
toOutputStream :: IsOutputStream o => o -> IO OutputStream
noOutputStream :: Maybe OutputStream
data OutputStreamClearPendingMethodInfo
-- | Clears the pending flag on stream.
outputStreamClearPending :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m ()
data OutputStreamCloseMethodInfo
-- | 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 ()
data OutputStreamCloseAsyncMethodInfo
-- | 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 asyncronous 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 ()
data OutputStreamCloseFinishMethodInfo
-- | Closes an output stream.
outputStreamCloseFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m ()
data OutputStreamFlushMethodInfo
-- | 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 ()
data OutputStreamFlushAsyncMethodInfo
-- | 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 ()
data OutputStreamFlushFinishMethodInfo
-- | Finishes flushing an output stream.
outputStreamFlushFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m ()
data OutputStreamHasPendingMethodInfo
-- | Checks if an ouput stream has pending actions.
outputStreamHasPending :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m Bool
data OutputStreamIsClosedMethodInfo
-- | Checks if an output stream has already been closed.
outputStreamIsClosed :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m Bool
data OutputStreamIsClosingMethodInfo
-- | 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.
outputStreamIsClosing :: (HasCallStack, MonadIO m, IsOutputStream a) => a -> m Bool
data OutputStreamSetPendingMethodInfo
-- | 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 ()
data OutputStreamSpliceMethodInfo
-- | 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
data OutputStreamSpliceAsyncMethodInfo
-- | 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 ()
data OutputStreamSpliceFinishMethodInfo
-- | Finishes an asynchronous stream splice operation.
outputStreamSpliceFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m Int64
data OutputStreamWriteMethodInfo
-- | 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
data OutputStreamWriteAllMethodInfo
-- | 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)
data OutputStreamWriteAllAsyncMethodInfo
-- | 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.
outputStreamWriteAllAsync :: (HasCallStack, MonadIO m, IsOutputStream a, IsCancellable b) => a -> ByteString -> Int32 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data OutputStreamWriteAllFinishMethodInfo
-- | 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.
outputStreamWriteAllFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m (Word64)
data OutputStreamWriteAsyncMethodInfo
-- | 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 asyncronous 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 ()
data OutputStreamWriteBytesMethodInfo
-- | 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
data OutputStreamWriteBytesAsyncMethodInfo
-- | 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 ()
data OutputStreamWriteBytesFinishMethodInfo
-- | Finishes a stream write-from-Bytes operation.
outputStreamWriteBytesFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m Int64
data OutputStreamWriteFinishMethodInfo
-- | Finishes a stream write operation.
outputStreamWriteFinish :: (HasCallStack, MonadIO m, IsOutputStream a, IsAsyncResult b) => a -> b -> m Int64
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.OutputStream.OutputStream
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.OutputStream.OutputStream a) => GI.Gio.Objects.OutputStream.IsOutputStream a
instance GI.Gio.Objects.OutputStream.IsOutputStream GI.Gio.Objects.OutputStream.OutputStream
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.OutputStream.OutputStream
instance (info ~ GI.Gio.Objects.OutputStream.ResolveOutputStreamMethod t GI.Gio.Objects.OutputStream.OutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.OutputStream.OutputStream p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.OutputStream.OutputStream -> p)
instance (info ~ GI.Gio.Objects.OutputStream.ResolveOutputStreamMethod t GI.Gio.Objects.OutputStream.OutputStream, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.OutputStream.OutputStream p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.OutputStream.OutputStream -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.OutputStream.OutputStream
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamClearPendingMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamCloseMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamCloseAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamCloseFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamFlushMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamFlushAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamFlushFinishMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamHasPendingMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamIsClosedMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamIsClosingMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamSetPendingMethodInfo a signature
instance (signature ~ (b -> [GI.Gio.Flags.OutputStreamSpliceFlags] -> GHC.Base.Maybe c -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.InputStream.IsInputStream b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamSpliceMethodInfo a signature
instance (signature ~ (b -> [GI.Gio.Flags.OutputStreamSpliceFlags] -> GHC.Int.Int32 -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.InputStream.IsInputStream b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamSpliceAsyncMethodInfo a signature
instance (signature ~ (b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamSpliceFinishMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Base.Maybe b -> m GHC.Word.Word64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteAllMethodInfo a signature
instance (signature ~ (Data.ByteString.Internal.ByteString -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteAllAsyncMethodInfo a signature
instance (signature ~ (b -> m GHC.Word.Word64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteAllFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.ByteString.Internal.ByteString -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteAsyncMethodInfo a signature
instance (signature ~ (GI.GLib.Structs.Bytes.Bytes -> GHC.Base.Maybe b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteBytesMethodInfo a signature
instance (signature ~ (GI.GLib.Structs.Bytes.Bytes -> GHC.Int.Int32 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteBytesAsyncMethodInfo a signature
instance (signature ~ (b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteBytesFinishMethodInfo a signature
instance (signature ~ (b -> m GHC.Int.Int64), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.OutputStream.IsOutputStream a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.OutputStream.OutputStreamWriteFinishMethodInfo a signature
-- | 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
newtype Permission
Permission :: (ManagedPtr Permission) -> Permission
class GObject o => IsPermission o
toPermission :: IsPermission o => o -> IO Permission
noPermission :: Maybe Permission
data PermissionAcquireMethodInfo
-- | 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.
permissionAcquire :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe (b) -> m ()
data PermissionAcquireAsyncMethodInfo
-- | Attempts to acquire the permission represented by
-- permission.
--
-- This is the first half of the asynchronous version of
-- permissionAcquire.
permissionAcquireAsync :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data PermissionAcquireFinishMethodInfo
-- | Collects the result of attempting to acquire the permission
-- represented by permission.
--
-- This is the second half of the asynchronous version of
-- permissionAcquire.
permissionAcquireFinish :: (HasCallStack, MonadIO m, IsPermission a, IsAsyncResult b) => a -> b -> m ()
data PermissionGetAllowedMethodInfo
-- | 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.
permissionGetAllowed :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool
data PermissionGetCanAcquireMethodInfo
-- | Gets the value of the 'can-acquire' property. This property is
-- True if it is generally possible to acquire the permission by
-- calling permissionAcquire.
permissionGetCanAcquire :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool
data PermissionGetCanReleaseMethodInfo
-- | Gets the value of the 'can-release' property. This property is
-- True if it is generally possible to release the permission by
-- calling permissionRelease.
permissionGetCanRelease :: (HasCallStack, MonadIO m, IsPermission a) => a -> m Bool
data PermissionImplUpdateMethodInfo
-- | 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.
permissionImplUpdate :: (HasCallStack, MonadIO m, IsPermission a) => a -> Bool -> Bool -> Bool -> m ()
data PermissionReleaseMethodInfo
-- | 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.
permissionRelease :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe (b) -> m ()
data PermissionReleaseAsyncMethodInfo
-- | Attempts to release the permission represented by
-- permission.
--
-- This is the first half of the asynchronous version of
-- permissionRelease.
permissionReleaseAsync :: (HasCallStack, MonadIO m, IsPermission a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data PermissionReleaseFinishMethodInfo
-- | Collects the result of attempting to release the permission
-- represented by permission.
--
-- This is the second half of the asynchronous version of
-- permissionRelease.
permissionReleaseFinish :: (HasCallStack, MonadIO m, IsPermission a, IsAsyncResult b) => a -> b -> m ()
data PermissionAllowedPropertyInfo
getPermissionAllowed :: (MonadIO m, IsPermission o) => o -> m Bool
permissionAllowed :: AttrLabelProxy "allowed"
data PermissionCanAcquirePropertyInfo
getPermissionCanAcquire :: (MonadIO m, IsPermission o) => o -> m Bool
permissionCanAcquire :: AttrLabelProxy "canAcquire"
data PermissionCanReleasePropertyInfo
getPermissionCanRelease :: (MonadIO m, IsPermission o) => o -> m Bool
permissionCanRelease :: AttrLabelProxy "canRelease"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Permission.Permission
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Permission.Permission a) => GI.Gio.Objects.Permission.IsPermission a
instance GI.Gio.Objects.Permission.IsPermission GI.Gio.Objects.Permission.Permission
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Permission.Permission
instance (info ~ GI.Gio.Objects.Permission.ResolvePermissionMethod t GI.Gio.Objects.Permission.Permission, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Permission.Permission p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Permission.Permission -> p)
instance (info ~ GI.Gio.Objects.Permission.ResolvePermissionMethod t GI.Gio.Objects.Permission.Permission, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Permission.Permission p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Permission.Permission -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Permission.PermissionAllowedPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Permission.PermissionCanAcquirePropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Permission.PermissionCanReleasePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Permission.Permission
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionAcquireMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionAcquireAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionAcquireFinishMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionGetAllowedMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionGetCanAcquireMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionGetCanReleaseMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> GHC.Types.Bool -> GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionImplUpdateMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionReleaseMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionReleaseAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Permission.IsPermission a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Permission.PermissionReleaseFinishMethodInfo a signature
-- | 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
newtype Resolver
Resolver :: (ManagedPtr Resolver) -> Resolver
class GObject o => IsResolver o
toResolver :: IsResolver o => o -> IO 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.
resolverGetDefault :: (HasCallStack, MonadIO m) => m Resolver
data ResolverLookupByAddressMethodInfo
-- | 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.
resolverLookupByAddress :: (HasCallStack, MonadIO m, IsResolver a, IsInetAddress b, IsCancellable c) => a -> b -> Maybe (c) -> m Text
data ResolverLookupByAddressAsyncMethodInfo
-- | Begins asynchronously reverse-resolving address to
-- determine its associated hostname, and eventually calls
-- callback, which must call
-- resolverLookupByAddressFinish to get the final result.
resolverLookupByAddressAsync :: (HasCallStack, MonadIO m, IsResolver a, IsInetAddress b, IsCancellable c) => a -> b -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
data ResolverLookupByAddressFinishMethodInfo
-- | 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.
resolverLookupByAddressFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m Text
data ResolverLookupByNameMethodInfo
-- | 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.
resolverLookupByName :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Maybe (b) -> m [InetAddress]
data ResolverLookupByNameAsyncMethodInfo
-- | 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.
resolverLookupByNameAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data ResolverLookupByNameFinishMethodInfo
-- | 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.
resolverLookupByNameFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [InetAddress]
data ResolverLookupRecordsMethodInfo
-- | 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.
resolverLookupRecords :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> ResolverRecordType -> Maybe (b) -> m [GVariant]
data ResolverLookupRecordsAsyncMethodInfo
-- | 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.
resolverLookupRecordsAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> ResolverRecordType -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data ResolverLookupRecordsFinishMethodInfo
-- | 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.
resolverLookupRecordsFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [GVariant]
data ResolverLookupServiceMethodInfo
-- | 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.
resolverLookupService :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Text -> Text -> Maybe (b) -> m [SrvTarget]
data ResolverLookupServiceAsyncMethodInfo
-- | 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.
resolverLookupServiceAsync :: (HasCallStack, MonadIO m, IsResolver a, IsCancellable b) => a -> Text -> Text -> Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data ResolverLookupServiceFinishMethodInfo
-- | 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.
resolverLookupServiceFinish :: (HasCallStack, MonadIO m, IsResolver a, IsAsyncResult b) => a -> b -> m [SrvTarget]
data ResolverSetDefaultMethodInfo
-- | 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.
resolverSetDefault :: (HasCallStack, MonadIO m, IsResolver a) => a -> m ()
type C_ResolverReloadCallback = Ptr () -> Ptr () -> IO ()
type ResolverReloadCallback = IO ()
data ResolverReloadSignalInfo
afterResolverReload :: (IsResolver a, MonadIO m) => a -> ResolverReloadCallback -> m SignalHandlerId
genClosure_ResolverReload :: ResolverReloadCallback -> IO Closure
mk_ResolverReloadCallback :: C_ResolverReloadCallback -> IO (FunPtr C_ResolverReloadCallback)
noResolverReloadCallback :: Maybe ResolverReloadCallback
onResolverReload :: (IsResolver a, MonadIO m) => a -> ResolverReloadCallback -> m SignalHandlerId
wrap_ResolverReloadCallback :: ResolverReloadCallback -> Ptr () -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Resolver.Resolver
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Resolver.Resolver a) => GI.Gio.Objects.Resolver.IsResolver a
instance GI.Gio.Objects.Resolver.IsResolver GI.Gio.Objects.Resolver.Resolver
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Resolver.Resolver
instance (info ~ GI.Gio.Objects.Resolver.ResolveResolverMethod t GI.Gio.Objects.Resolver.Resolver, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Resolver.Resolver p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Resolver.Resolver -> p)
instance (info ~ GI.Gio.Objects.Resolver.ResolveResolverMethod t GI.Gio.Objects.Resolver.Resolver, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Resolver.Resolver p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Resolver.Resolver -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Resolver.Resolver
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.Resolver.ResolverReloadSignalInfo
instance (signature ~ (b -> GHC.Base.Maybe c -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.InetAddress.IsInetAddress b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupByAddressMethodInfo a signature
instance (signature ~ (b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.InetAddress.IsInetAddress b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupByAddressAsyncMethodInfo a signature
instance (signature ~ (b -> m Data.Text.Internal.Text), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupByAddressFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> m [GI.Gio.Objects.InetAddress.InetAddress]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupByNameMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupByNameAsyncMethodInfo a signature
instance (signature ~ (b -> m [GI.Gio.Objects.InetAddress.InetAddress]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupByNameFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GI.Gio.Enums.ResolverRecordType -> GHC.Base.Maybe b -> m [Data.GI.Base.BasicTypes.GVariant]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupRecordsMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GI.Gio.Enums.ResolverRecordType -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupRecordsAsyncMethodInfo a signature
instance (signature ~ (b -> m [Data.GI.Base.BasicTypes.GVariant]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupRecordsFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe b -> m [GI.Gio.Structs.SrvTarget.SrvTarget]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupServiceMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupServiceAsyncMethodInfo a signature
instance (signature ~ (b -> m [GI.Gio.Structs.SrvTarget.SrvTarget]), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverLookupServiceFinishMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Resolver.IsResolver a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Resolver.ResolverSetDefaultMethodInfo a signature
-- | 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 as 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 > >
-- /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
--
--
-- 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
newtype SimpleAsyncResult
SimpleAsyncResult :: (ManagedPtr SimpleAsyncResult) -> SimpleAsyncResult
class GObject o => IsSimpleAsyncResult o
toSimpleAsyncResult :: IsSimpleAsyncResult o => o -> IO SimpleAsyncResult
noSimpleAsyncResult :: Maybe SimpleAsyncResult
data SimpleAsyncResultCompleteMethodInfo
-- | 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 ()
data SimpleAsyncResultCompleteInIdleMethodInfo
-- | 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 ()
data SimpleAsyncResultGetOpResGbooleanMethodInfo
-- | 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
data SimpleAsyncResultGetOpResGssizeMethodInfo
-- | 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.)
-- | 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
data SimpleAsyncResultPropagateErrorMethodInfo
-- | 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 ()
data SimpleAsyncResultSetCheckCancellableMethodInfo
-- | 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.
-- | Deprecated: (Since version 2.46)Use Task instead.
simpleAsyncResultSetCheckCancellable :: (HasCallStack, MonadIO m, IsSimpleAsyncResult a, IsCancellable b) => a -> Maybe (b) -> m ()
data SimpleAsyncResultSetFromErrorMethodInfo
-- | 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 ()
data SimpleAsyncResultSetHandleCancellationMethodInfo
-- | 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 ()
data SimpleAsyncResultSetOpResGbooleanMethodInfo
-- | 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 ()
data SimpleAsyncResultSetOpResGssizeMethodInfo
-- | 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 GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult a) => GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a
instance GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance GI.Gio.Interfaces.AsyncResult.IsAsyncResult GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance (info ~ GI.Gio.Objects.SimpleAsyncResult.ResolveSimpleAsyncResultMethod t GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult -> p)
instance (info ~ GI.Gio.Objects.SimpleAsyncResult.ResolveSimpleAsyncResultMethod t GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResult
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultCompleteMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultCompleteInIdleMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultGetOpResGbooleanMethodInfo a signature
instance (signature ~ m GHC.Int.Int64, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultGetOpResGssizeMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultPropagateErrorMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultSetCheckCancellableMethodInfo a signature
instance (signature ~ (Data.GI.Base.GError.GError -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultSetFromErrorMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultSetHandleCancellationMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultSetOpResGbooleanMethodInfo a signature
instance (signature ~ (GHC.Int.Int64 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SimpleAsyncResult.IsSimpleAsyncResult a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SimpleAsyncResult.SimpleAsyncResultSetOpResGssizeMethodInfo a signature
-- | Enumerator type for objects that contain or generate
-- SocketAddress<!-- -->es.
module GI.Gio.Objects.SocketAddressEnumerator
newtype SocketAddressEnumerator
SocketAddressEnumerator :: (ManagedPtr SocketAddressEnumerator) -> SocketAddressEnumerator
class GObject o => IsSocketAddressEnumerator o
toSocketAddressEnumerator :: IsSocketAddressEnumerator o => o -> IO SocketAddressEnumerator
noSocketAddressEnumerator :: Maybe SocketAddressEnumerator
data SocketAddressEnumeratorNextMethodInfo
-- | 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
data SocketAddressEnumeratorNextAsyncMethodInfo
-- | Asynchronously retrieves the next SocketAddress from
-- enumerator and then calls callback,
-- which must call socketAddressEnumeratorNextFinish to get the
-- result.
socketAddressEnumeratorNextAsync :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SocketAddressEnumeratorNextFinishMethodInfo
-- | 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 GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator a) => GI.Gio.Objects.SocketAddressEnumerator.IsSocketAddressEnumerator a
instance GI.Gio.Objects.SocketAddressEnumerator.IsSocketAddressEnumerator GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance (info ~ GI.Gio.Objects.SocketAddressEnumerator.ResolveSocketAddressEnumeratorMethod t GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator -> p)
instance (info ~ GI.Gio.Objects.SocketAddressEnumerator.ResolveSocketAddressEnumeratorMethod t GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator -> p)
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumerator
instance (signature ~ (GHC.Base.Maybe b -> m GI.Gio.Objects.SocketAddress.SocketAddress), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketAddressEnumerator.IsSocketAddressEnumerator a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumeratorNextMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketAddressEnumerator.IsSocketAddressEnumerator a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumeratorNextAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.SocketAddress.SocketAddress), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketAddressEnumerator.IsSocketAddressEnumerator a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketAddressEnumerator.SocketAddressEnumeratorNextFinishMethodInfo a signature
-- | 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.
module GI.Gio.Objects.SocketClient
newtype SocketClient
SocketClient :: (ManagedPtr SocketClient) -> SocketClient
class GObject o => IsSocketClient o
toSocketClient :: IsSocketClient o => o -> IO SocketClient
noSocketClient :: Maybe SocketClient
data SocketClientAddApplicationProxyMethodInfo
-- | 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 ()
data SocketClientConnectMethodInfo
-- | 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.
socketClientConnect :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe (c) -> m SocketConnection
data SocketClientConnectAsyncMethodInfo
-- | 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.
socketClientConnectAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
data SocketClientConnectFinishMethodInfo
-- | Finishes an async connect operation. See
-- socketClientConnectAsync
socketClientConnectFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
data SocketClientConnectToHostMethodInfo
-- | 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.
socketClientConnectToHost :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe (b) -> m SocketConnection
data SocketClientConnectToHostAsyncMethodInfo
-- | 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.
socketClientConnectToHostAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SocketClientConnectToHostFinishMethodInfo
-- | Finishes an async connect operation. See
-- socketClientConnectToHostAsync
socketClientConnectToHostFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
data SocketClientConnectToServiceMethodInfo
-- | 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
data SocketClientConnectToServiceAsyncMethodInfo
-- | This is the asynchronous version of
-- socketClientConnectToService.
socketClientConnectToServiceAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SocketClientConnectToServiceFinishMethodInfo
-- | Finishes an async connect operation. See
-- socketClientConnectToServiceAsync
socketClientConnectToServiceFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
data SocketClientConnectToUriMethodInfo
-- | 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.
socketClientConnectToUri :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe (b) -> m SocketConnection
data SocketClientConnectToUriAsyncMethodInfo
-- | 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.
socketClientConnectToUriAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SocketClientConnectToUriFinishMethodInfo
-- | Finishes an async connect operation. See
-- socketClientConnectToUriAsync
socketClientConnectToUriFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
data SocketClientGetEnableProxyMethodInfo
-- | Gets the proxy enable state; see socketClientSetEnableProxy
socketClientGetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool
data SocketClientGetFamilyMethodInfo
-- | Gets the socket family of the socket client.
--
-- See socketClientSetFamily for details.
socketClientGetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketFamily
data SocketClientGetLocalAddressMethodInfo
-- | Gets the local address of the socket client.
--
-- See socketClientSetLocalAddress for details.
socketClientGetLocalAddress :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketAddress
data SocketClientGetProtocolMethodInfo
-- | Gets the protocol name type of the socket client.
--
-- See socketClientSetProtocol for details.
socketClientGetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketProtocol
data SocketClientGetProxyResolverMethodInfo
-- | Gets the ProxyResolver being used by client.
-- Normally, this will be the resolver returned by
-- proxyResolverGetDefault, but you can override it with
-- socketClientSetProxyResolver.
socketClientGetProxyResolver :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m ProxyResolver
data SocketClientGetSocketTypeMethodInfo
-- | Gets the socket type of the socket client.
--
-- See socketClientSetSocketType for details.
socketClientGetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketType
data SocketClientGetTimeoutMethodInfo
-- | Gets the I/O timeout time for sockets created by
-- client.
--
-- See socketClientSetTimeout for details.
socketClientGetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Word32
data SocketClientGetTlsMethodInfo
-- | Gets whether client creates TLS connections. See
-- socketClientSetTls for details.
socketClientGetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool
data SocketClientGetTlsValidationFlagsMethodInfo
-- | Gets the TLS validation flags used creating TLS connections via
-- client.
socketClientGetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m [TlsCertificateFlags]
-- | Creates a new SocketClient with the default options.
socketClientNew :: (HasCallStack, MonadIO m) => m SocketClient
data SocketClientSetEnableProxyMethodInfo
-- | 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.
socketClientSetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()
data SocketClientSetFamilyMethodInfo
-- | 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.
socketClientSetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketFamily -> m ()
data SocketClientSetLocalAddressMethodInfo
-- | 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.
socketClientSetLocalAddress :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketAddress b) => a -> Maybe (b) -> m ()
data SocketClientSetProtocolMethodInfo
-- | 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.
socketClientSetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketProtocol -> m ()
data SocketClientSetProxyResolverMethodInfo
-- | 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)
socketClientSetProxyResolver :: (HasCallStack, MonadIO m, IsSocketClient a, IsProxyResolver b) => a -> Maybe (b) -> m ()
data SocketClientSetSocketTypeMethodInfo
-- | 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.
socketClientSetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketType -> m ()
data SocketClientSetTimeoutMethodInfo
-- | 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.
socketClientSetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Word32 -> m ()
data SocketClientSetTlsMethodInfo
-- | 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.
socketClientSetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()
data SocketClientSetTlsValidationFlagsMethodInfo
-- | Sets the TLS validation flags used when creating TLS connections via
-- client. The default value is
-- TlsCertificateFlagsValidateAll.
socketClientSetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> [TlsCertificateFlags] -> m ()
data SocketClientEnableProxyPropertyInfo
constructSocketClientEnableProxy :: (IsSocketClient o) => Bool -> IO (GValueConstruct o)
getSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> m Bool
setSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> Bool -> m ()
socketClientEnableProxy :: AttrLabelProxy "enableProxy"
data SocketClientFamilyPropertyInfo
constructSocketClientFamily :: (IsSocketClient o) => SocketFamily -> IO (GValueConstruct o)
getSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> m SocketFamily
setSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> SocketFamily -> m ()
socketClientFamily :: AttrLabelProxy "family"
data SocketClientLocalAddressPropertyInfo
clearSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m ()
constructSocketClientLocalAddress :: (IsSocketClient o, IsSocketAddress a) => a -> IO (GValueConstruct o)
getSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m SocketAddress
setSocketClientLocalAddress :: (MonadIO m, IsSocketClient o, IsSocketAddress a) => o -> a -> m ()
socketClientLocalAddress :: AttrLabelProxy "localAddress"
data SocketClientProtocolPropertyInfo
constructSocketClientProtocol :: (IsSocketClient o) => SocketProtocol -> IO (GValueConstruct o)
getSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> m SocketProtocol
setSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> SocketProtocol -> m ()
socketClientProtocol :: AttrLabelProxy "protocol"
data SocketClientProxyResolverPropertyInfo
clearSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ()
constructSocketClientProxyResolver :: (IsSocketClient o, IsProxyResolver a) => a -> IO (GValueConstruct o)
getSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ProxyResolver
setSocketClientProxyResolver :: (MonadIO m, IsSocketClient o, IsProxyResolver a) => o -> a -> m ()
socketClientProxyResolver :: AttrLabelProxy "proxyResolver"
data SocketClientTimeoutPropertyInfo
constructSocketClientTimeout :: (IsSocketClient o) => Word32 -> IO (GValueConstruct o)
getSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> m Word32
setSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> Word32 -> m ()
socketClientTimeout :: AttrLabelProxy "timeout"
data SocketClientTlsPropertyInfo
constructSocketClientTls :: (IsSocketClient o) => Bool -> IO (GValueConstruct o)
getSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> m Bool
setSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> Bool -> m ()
socketClientTls :: AttrLabelProxy "tls"
data SocketClientTlsValidationFlagsPropertyInfo
constructSocketClientTlsValidationFlags :: (IsSocketClient o) => [TlsCertificateFlags] -> IO (GValueConstruct o)
getSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> m [TlsCertificateFlags]
setSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> [TlsCertificateFlags] -> m ()
socketClientTlsValidationFlags :: AttrLabelProxy "tlsValidationFlags"
data SocketClientTypePropertyInfo
constructSocketClientType :: (IsSocketClient o) => SocketType -> IO (GValueConstruct o)
getSocketClientType :: (MonadIO m, IsSocketClient o) => o -> m SocketType
setSocketClientType :: (MonadIO m, IsSocketClient o) => o -> SocketType -> m ()
socketClientType :: AttrLabelProxy "type"
type C_SocketClientEventCallback = Ptr () -> CUInt -> Ptr SocketConnectable -> Ptr IOStream -> Ptr () -> IO ()
type SocketClientEventCallback = SocketClientEvent -> SocketConnectable -> Maybe IOStream -> IO ()
data SocketClientEventSignalInfo
afterSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> SocketClientEventCallback -> m SignalHandlerId
genClosure_SocketClientEvent :: SocketClientEventCallback -> IO Closure
mk_SocketClientEventCallback :: C_SocketClientEventCallback -> IO (FunPtr C_SocketClientEventCallback)
noSocketClientEventCallback :: Maybe SocketClientEventCallback
onSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> SocketClientEventCallback -> m SignalHandlerId
wrap_SocketClientEventCallback :: SocketClientEventCallback -> Ptr () -> CUInt -> Ptr SocketConnectable -> Ptr IOStream -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketClient.SocketClient
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SocketClient.SocketClient a) => GI.Gio.Objects.SocketClient.IsSocketClient a
instance GI.Gio.Objects.SocketClient.IsSocketClient GI.Gio.Objects.SocketClient.SocketClient
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SocketClient.SocketClient
instance (info ~ GI.Gio.Objects.SocketClient.ResolveSocketClientMethod t GI.Gio.Objects.SocketClient.SocketClient, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketClient.SocketClient p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SocketClient.SocketClient -> p)
instance (info ~ GI.Gio.Objects.SocketClient.ResolveSocketClientMethod t GI.Gio.Objects.SocketClient.SocketClient, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketClient.SocketClient p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SocketClient.SocketClient -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientEnableProxyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientFamilyPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientLocalAddressPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientProtocolPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientProxyResolverPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientTimeoutPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientTlsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientTlsValidationFlagsPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketClient.SocketClientTypePropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SocketClient.SocketClient
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.SocketClient.SocketClientEventSignalInfo
instance (signature ~ (Data.Text.Internal.Text -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientAddApplicationProxyMethodInfo a signature
instance (signature ~ (b -> GHC.Base.Maybe c -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectMethodInfo a signature
instance (signature ~ (b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Interfaces.SocketConnectable.IsSocketConnectable b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Word.Word16 -> GHC.Base.Maybe b -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToHostMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Word.Word16 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToHostAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToHostFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe b -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToServiceMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> Data.Text.Internal.Text -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToServiceAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToServiceFinishMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Word.Word16 -> GHC.Base.Maybe b -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToUriMethodInfo a signature
instance (signature ~ (Data.Text.Internal.Text -> GHC.Word.Word16 -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToUriAsyncMethodInfo a signature
instance (signature ~ (b -> m GI.Gio.Objects.SocketConnection.SocketConnection), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientConnectToUriFinishMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetEnableProxyMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketFamily, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetFamilyMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.SocketAddress.SocketAddress, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetLocalAddressMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketProtocol, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetProtocolMethodInfo a signature
instance (signature ~ m GI.Gio.Interfaces.ProxyResolver.ProxyResolver, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetProxyResolverMethodInfo a signature
instance (signature ~ m GI.Gio.Enums.SocketType, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetSocketTypeMethodInfo a signature
instance (signature ~ m GHC.Word.Word32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetTimeoutMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetTlsMethodInfo a signature
instance (signature ~ m [GI.Gio.Flags.TlsCertificateFlags], Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientGetTlsValidationFlagsMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetEnableProxyMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.SocketFamily -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetFamilyMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Objects.SocketAddress.IsSocketAddress b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetLocalAddressMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.SocketProtocol -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetProtocolMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a, GI.Gio.Interfaces.ProxyResolver.IsProxyResolver b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetProxyResolverMethodInfo a signature
instance (signature ~ (GI.Gio.Enums.SocketType -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetSocketTypeMethodInfo a signature
instance (signature ~ (GHC.Word.Word32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetTimeoutMethodInfo a signature
instance (signature ~ (GHC.Types.Bool -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetTlsMethodInfo a signature
instance (signature ~ ([GI.Gio.Flags.TlsCertificateFlags] -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketClient.IsSocketClient a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketClient.SocketClientSetTlsValidationFlagsMethodInfo a signature
-- | 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.
module GI.Gio.Objects.SocketConnection
newtype SocketConnection
SocketConnection :: (ManagedPtr SocketConnection) -> SocketConnection
class GObject o => IsSocketConnection o
toSocketConnection :: IsSocketConnection o => o -> IO SocketConnection
noSocketConnection :: Maybe SocketConnection
data SocketConnectionConnectMethodInfo
-- | Connect connection to the specified remote address.
socketConnectionConnect :: (HasCallStack, MonadIO m, IsSocketConnection a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe (c) -> m ()
data SocketConnectionConnectAsyncMethodInfo
-- | 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.
socketConnectionConnectAsync :: (HasCallStack, MonadIO m, IsSocketConnection a, IsSocketAddress b, IsCancellable c) => a -> b -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
data SocketConnectionConnectFinishMethodInfo
-- | Gets the result of a socketConnectionConnectAsync call.
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.
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.
socketConnectionFactoryRegisterType :: (HasCallStack, MonadIO m) => GType -> SocketFamily -> SocketType -> Int32 -> m ()
data SocketConnectionGetLocalAddressMethodInfo
-- | Try to get the local address of a socket connection.
socketConnectionGetLocalAddress :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m SocketAddress
data SocketConnectionGetRemoteAddressMethodInfo
-- | 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)...".
socketConnectionGetRemoteAddress :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m SocketAddress
data SocketConnectionGetSocketMethodInfo
-- | 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.
socketConnectionGetSocket :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m Socket
data SocketConnectionIsConnectedMethodInfo
-- | Checks if connection is connected. This is equivalent
-- to calling socketIsConnected on connection's
-- underlying Socket.
socketConnectionIsConnected :: (HasCallStack, MonadIO m, IsSocketConnection a) => a -> m Bool
data SocketConnectionSocketPropertyInfo
constructSocketConnectionSocket :: (IsSocketConnection o, IsSocket a) => a -> IO (GValueConstruct o)
getSocketConnectionSocket :: (MonadIO m, IsSocketConnection o) => o -> m Socket
socketConnectionSocket :: AttrLabelProxy "socket"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketConnection.SocketConnection
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SocketConnection.SocketConnection a) => GI.Gio.Objects.SocketConnection.IsSocketConnection a
instance GI.Gio.Objects.SocketConnection.IsSocketConnection GI.Gio.Objects.SocketConnection.SocketConnection
instance GI.Gio.Objects.IOStream.IsIOStream GI.Gio.Objects.SocketConnection.SocketConnection
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SocketConnection.SocketConnection
instance (info ~ GI.Gio.Objects.SocketConnection.ResolveSocketConnectionMethod t GI.Gio.Objects.SocketConnection.SocketConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketConnection.SocketConnection p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SocketConnection.SocketConnection -> p)
instance (info ~ GI.Gio.Objects.SocketConnection.ResolveSocketConnectionMethod t GI.Gio.Objects.SocketConnection.SocketConnection, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketConnection.SocketConnection p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SocketConnection.SocketConnection -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketConnection.SocketConnectionSocketPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SocketConnection.SocketConnection
instance (signature ~ (b -> GHC.Base.Maybe c -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketConnection.IsSocketConnection a, GI.Gio.Objects.SocketAddress.IsSocketAddress b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketConnection.SocketConnectionConnectMethodInfo a signature
instance (signature ~ (b -> GHC.Base.Maybe c -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketConnection.IsSocketConnection a, GI.Gio.Objects.SocketAddress.IsSocketAddress b, GI.Gio.Objects.Cancellable.IsCancellable c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketConnection.SocketConnectionConnectAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketConnection.IsSocketConnection a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketConnection.SocketConnectionConnectFinishMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.SocketAddress.SocketAddress, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketConnection.IsSocketConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketConnection.SocketConnectionGetLocalAddressMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.SocketAddress.SocketAddress, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketConnection.IsSocketConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketConnection.SocketConnectionGetRemoteAddressMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.Socket.Socket, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketConnection.IsSocketConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketConnection.SocketConnectionGetSocketMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketConnection.IsSocketConnection a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketConnection.SocketConnectionIsConnectedMethodInfo a signature
-- | 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.
--
-- If you want to implement a network server, also look at
-- SocketService and ThreadedSocketService which are
-- subclass of SocketListener that makes this even easier.
module GI.Gio.Objects.SocketListener
newtype SocketListener
SocketListener :: (ManagedPtr SocketListener) -> SocketListener
class GObject o => IsSocketListener o
toSocketListener :: IsSocketListener o => o -> IO SocketListener
noSocketListener :: Maybe SocketListener
data SocketListenerAcceptMethodInfo
-- | 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.
socketListenerAccept :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe (b) -> m (SocketConnection, Object)
data SocketListenerAcceptAsyncMethodInfo
-- | 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.
socketListenerAcceptAsync :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SocketListenerAcceptFinishMethodInfo
-- | Finishes an async accept operation. See
-- socketListenerAcceptAsync
socketListenerAcceptFinish :: (HasCallStack, MonadIO m, IsSocketListener a, IsAsyncResult b) => a -> b -> m (SocketConnection, Object)
data SocketListenerAcceptSocketMethodInfo
-- | 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.
socketListenerAcceptSocket :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe (b) -> m (Socket, Object)
data SocketListenerAcceptSocketAsyncMethodInfo
-- | 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.
socketListenerAcceptSocketAsync :: (HasCallStack, MonadIO m, IsSocketListener a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SocketListenerAcceptSocketFinishMethodInfo
-- | Finishes an async accept operation. See
-- socketListenerAcceptSocketAsync
socketListenerAcceptSocketFinish :: (HasCallStack, MonadIO m, IsSocketListener a, IsAsyncResult b) => a -> b -> m (Socket, Object)
data SocketListenerAddAddressMethodInfo
-- | 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.
socketListenerAddAddress :: (HasCallStack, MonadIO m, IsSocketListener a, IsSocketAddress b, IsObject c) => a -> b -> SocketType -> SocketProtocol -> Maybe (c) -> m (SocketAddress)
data SocketListenerAddAnyInetPortMethodInfo
-- | 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.
socketListenerAddAnyInetPort :: (HasCallStack, MonadIO m, IsSocketListener a, IsObject b) => a -> Maybe (b) -> m Word16
data SocketListenerAddInetPortMethodInfo
-- | 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.
socketListenerAddInetPort :: (HasCallStack, MonadIO m, IsSocketListener a, IsObject b) => a -> Word16 -> Maybe (b) -> m ()
data SocketListenerAddSocketMethodInfo
-- | 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.
socketListenerAddSocket :: (HasCallStack, MonadIO m, IsSocketListener a, IsSocket b, IsObject c) => a -> b -> Maybe (c) -> m ()
data SocketListenerCloseMethodInfo
-- | Closes all the sockets in the listener.
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.
socketListenerNew :: (HasCallStack, MonadIO m) => m SocketListener
data SocketListenerSetBacklogMethodInfo
-- | Sets the listen backlog on the sockets in the listener.
--
-- See socketSetListenBacklog for details
socketListenerSetBacklog :: (HasCallStack, MonadIO m, IsSocketListener a) => a -> Int32 -> m ()
data SocketListenerListenBacklogPropertyInfo
constructSocketListenerListenBacklog :: (IsSocketListener o) => Int32 -> IO (GValueConstruct o)
getSocketListenerListenBacklog :: (MonadIO m, IsSocketListener o) => o -> m Int32
setSocketListenerListenBacklog :: (MonadIO m, IsSocketListener o) => o -> Int32 -> m ()
socketListenerListenBacklog :: AttrLabelProxy "listenBacklog"
type C_SocketListenerEventCallback = Ptr () -> CUInt -> Ptr Socket -> Ptr () -> IO ()
type SocketListenerEventCallback = SocketListenerEvent -> Socket -> IO ()
data SocketListenerEventSignalInfo
afterSocketListenerEvent :: (IsSocketListener a, MonadIO m) => a -> SocketListenerEventCallback -> m SignalHandlerId
genClosure_SocketListenerEvent :: SocketListenerEventCallback -> IO Closure
mk_SocketListenerEventCallback :: C_SocketListenerEventCallback -> IO (FunPtr C_SocketListenerEventCallback)
noSocketListenerEventCallback :: Maybe SocketListenerEventCallback
onSocketListenerEvent :: (IsSocketListener a, MonadIO m) => a -> SocketListenerEventCallback -> m SignalHandlerId
wrap_SocketListenerEventCallback :: SocketListenerEventCallback -> Ptr () -> CUInt -> Ptr Socket -> Ptr () -> IO ()
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.SocketListener.SocketListener
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.SocketListener.SocketListener a) => GI.Gio.Objects.SocketListener.IsSocketListener a
instance GI.Gio.Objects.SocketListener.IsSocketListener GI.Gio.Objects.SocketListener.SocketListener
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.SocketListener.SocketListener
instance (info ~ GI.Gio.Objects.SocketListener.ResolveSocketListenerMethod t GI.Gio.Objects.SocketListener.SocketListener, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketListener.SocketListener p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.SocketListener.SocketListener -> p)
instance (info ~ GI.Gio.Objects.SocketListener.ResolveSocketListenerMethod t GI.Gio.Objects.SocketListener.SocketListener, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.SocketListener.SocketListener p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.SocketListener.SocketListener -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.SocketListener.SocketListenerListenBacklogPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.SocketListener.SocketListener
instance Data.GI.Base.Signals.SignalInfo GI.Gio.Objects.SocketListener.SocketListenerEventSignalInfo
instance (signature ~ (GHC.Base.Maybe b -> m (GI.Gio.Objects.SocketConnection.SocketConnection, GI.GObject.Objects.Object.Object)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAcceptMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAcceptAsyncMethodInfo a signature
instance (signature ~ (b -> m (GI.Gio.Objects.SocketConnection.SocketConnection, GI.GObject.Objects.Object.Object)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAcceptFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m (GI.Gio.Objects.Socket.Socket, GI.GObject.Objects.Object.Object)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAcceptSocketMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAcceptSocketAsyncMethodInfo a signature
instance (signature ~ (b -> m (GI.Gio.Objects.Socket.Socket, GI.GObject.Objects.Object.Object)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAcceptSocketFinishMethodInfo a signature
instance (signature ~ (b -> GI.Gio.Enums.SocketType -> GI.Gio.Enums.SocketProtocol -> GHC.Base.Maybe c -> m GI.Gio.Objects.SocketAddress.SocketAddress), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Objects.SocketAddress.IsSocketAddress b, GI.GObject.Objects.Object.IsObject c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAddAddressMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m GHC.Word.Word16), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.GObject.Objects.Object.IsObject b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAddAnyInetPortMethodInfo a signature
instance (signature ~ (GHC.Word.Word16 -> GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.GObject.Objects.Object.IsObject b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAddInetPortMethodInfo a signature
instance (signature ~ (b -> GHC.Base.Maybe c -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a, GI.Gio.Objects.Socket.IsSocket b, GI.GObject.Objects.Object.IsObject c) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerAddSocketMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerCloseMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.SocketListener.IsSocketListener a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.SocketListener.SocketListenerSetBacklogMethodInfo a signature
-- | 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).
module GI.Gio.Objects.Subprocess
newtype Subprocess
Subprocess :: (ManagedPtr Subprocess) -> Subprocess
class GObject o => IsSubprocess o
toSubprocess :: IsSubprocess o => o -> IO Subprocess
noSubprocess :: Maybe Subprocess
data SubprocessCommunicateMethodInfo
-- | 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).
subprocessCommunicate :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (Bytes) -> Maybe (b) -> m (Bytes, Bytes)
data SubprocessCommunicateAsyncMethodInfo
-- | Asynchronous version of subprocessCommunicate. Complete
-- invocation with subprocessCommunicateFinish.
subprocessCommunicateAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (Bytes) -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SubprocessCommunicateFinishMethodInfo
-- | Complete an invocation of subprocessCommunicateAsync.
subprocessCommunicateFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m (Bytes, Bytes)
data SubprocessCommunicateUtf8MethodInfo
-- | Like subprocessCommunicate, but validates the output of the
-- process as UTF-8, and returns it as a regular NUL terminated string.
subprocessCommunicateUtf8 :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (Text) -> Maybe (b) -> m (Text, Text)
data SubprocessCommunicateUtf8AsyncMethodInfo
-- | Asynchronous version of subprocessCommunicateUtf8. Complete
-- invocation with subprocessCommunicateUtf8Finish.
subprocessCommunicateUtf8Async :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (Text) -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SubprocessCommunicateUtf8FinishMethodInfo
-- | Complete an invocation of subprocessCommunicateUtf8Async.
subprocessCommunicateUtf8Finish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m (Text, Text)
data SubprocessForceExitMethodInfo
-- | 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.
subprocessForceExit :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m ()
data SubprocessGetExitStatusMethodInfo
-- | 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.
subprocessGetExitStatus :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Int32
data SubprocessGetIdentifierMethodInfo
-- | 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
data SubprocessGetIfExitedMethodInfo
-- | 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.
subprocessGetIfExited :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Bool
data SubprocessGetIfSignaledMethodInfo
-- | 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.
subprocessGetIfSignaled :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Bool
data SubprocessGetStatusMethodInfo
-- | 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.
subprocessGetStatus :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Int32
data SubprocessGetStderrPipeMethodInfo
-- | Gets the InputStream from which to read the stderr output of
-- subprocess.
--
-- The process must have been created with
-- SubprocessFlagsStderrPipe.
subprocessGetStderrPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m InputStream
data SubprocessGetStdinPipeMethodInfo
-- | 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.
subprocessGetStdinPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m OutputStream
data SubprocessGetStdoutPipeMethodInfo
-- | Gets the InputStream from which to read the stdout output of
-- subprocess.
--
-- The process must have been created with
-- SubprocessFlagsStdoutPipe.
subprocessGetStdoutPipe :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m InputStream
data SubprocessGetSuccessfulMethodInfo
-- | 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.
subprocessGetSuccessful :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> m Bool
data SubprocessGetTermSigMethodInfo
-- | 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.
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.
subprocessNew :: (HasCallStack, MonadIO m) => [Text] -> [SubprocessFlags] -> m Subprocess
data SubprocessSendSignalMethodInfo
-- | 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.
subprocessSendSignal :: (HasCallStack, MonadIO m, IsSubprocess a) => a -> Int32 -> m ()
data SubprocessWaitMethodInfo
-- | 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.
subprocessWait :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (b) -> m ()
data SubprocessWaitAsyncMethodInfo
-- | Wait for the subprocess to terminate.
--
-- This is the asynchronous version of subprocessWait.
subprocessWaitAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SubprocessWaitCheckMethodInfo
-- | Combines subprocessWait with spawnCheckExitStatus.
subprocessWaitCheck :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (b) -> m ()
data SubprocessWaitCheckAsyncMethodInfo
-- | Combines subprocessWaitAsync with spawnCheckExitStatus.
--
-- This is the asynchronous version of subprocessWaitCheck.
subprocessWaitCheckAsync :: (HasCallStack, MonadIO m, IsSubprocess a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
data SubprocessWaitCheckFinishMethodInfo
-- | Collects the result of a previous call to
-- subprocessWaitCheckAsync.
subprocessWaitCheckFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m ()
data SubprocessWaitFinishMethodInfo
-- | Collects the result of a previous call to subprocessWaitAsync.
subprocessWaitFinish :: (HasCallStack, MonadIO m, IsSubprocess a, IsAsyncResult b) => a -> b -> m ()
data SubprocessArgvPropertyInfo
constructSubprocessArgv :: (IsSubprocess o) => [Text] -> IO (GValueConstruct o)
subprocessArgv :: AttrLabelProxy "argv"
data SubprocessFlagsPropertyInfo
constructSubprocessFlags :: (IsSubprocess o) => [SubprocessFlags] -> IO (GValueConstruct o)
subprocessFlags :: AttrLabelProxy "flags"
instance Data.GI.Base.BasicTypes.GObject GI.Gio.Objects.Subprocess.Subprocess
instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Gio.Objects.Subprocess.Subprocess a) => GI.Gio.Objects.Subprocess.IsSubprocess a
instance GI.Gio.Objects.Subprocess.IsSubprocess GI.Gio.Objects.Subprocess.Subprocess
instance GI.GObject.Objects.Object.IsObject GI.Gio.Objects.Subprocess.Subprocess
instance GI.Gio.Interfaces.Initable.IsInitable GI.Gio.Objects.Subprocess.Subprocess
instance (info ~ GI.Gio.Objects.Subprocess.ResolveSubprocessMethod t GI.Gio.Objects.Subprocess.Subprocess, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Subprocess.Subprocess p) => Data.GI.Base.Overloading.IsLabelProxy t (GI.Gio.Objects.Subprocess.Subprocess -> p)
instance (info ~ GI.Gio.Objects.Subprocess.ResolveSubprocessMethod t GI.Gio.Objects.Subprocess.Subprocess, Data.GI.Base.Overloading.MethodInfo info GI.Gio.Objects.Subprocess.Subprocess p) => GHC.OverloadedLabels.IsLabel t (GI.Gio.Objects.Subprocess.Subprocess -> p)
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Subprocess.SubprocessArgvPropertyInfo
instance Data.GI.Base.Attributes.AttrInfo GI.Gio.Objects.Subprocess.SubprocessFlagsPropertyInfo
instance Data.GI.Base.Overloading.HasAttributeList GI.Gio.Objects.Subprocess.Subprocess
instance (signature ~ (GHC.Base.Maybe GI.GLib.Structs.Bytes.Bytes -> GHC.Base.Maybe b -> m (GI.GLib.Structs.Bytes.Bytes, GI.GLib.Structs.Bytes.Bytes)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessCommunicateMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe GI.GLib.Structs.Bytes.Bytes -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessCommunicateAsyncMethodInfo a signature
instance (signature ~ (b -> m (GI.GLib.Structs.Bytes.Bytes, GI.GLib.Structs.Bytes.Bytes)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessCommunicateFinishMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> GHC.Base.Maybe b -> m (Data.Text.Internal.Text, Data.Text.Internal.Text)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessCommunicateUtf8MethodInfo a signature
instance (signature ~ (GHC.Base.Maybe Data.Text.Internal.Text -> GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessCommunicateUtf8AsyncMethodInfo a signature
instance (signature ~ (b -> m (Data.Text.Internal.Text, Data.Text.Internal.Text)), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessCommunicateUtf8FinishMethodInfo a signature
instance (signature ~ m (), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessForceExitMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetExitStatusMethodInfo a signature
instance (signature ~ m Data.Text.Internal.Text, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetIdentifierMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetIfExitedMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetIfSignaledMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetStatusMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.InputStream.InputStream, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetStderrPipeMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.OutputStream.OutputStream, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetStdinPipeMethodInfo a signature
instance (signature ~ m GI.Gio.Objects.InputStream.InputStream, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetStdoutPipeMethodInfo a signature
instance (signature ~ m GHC.Types.Bool, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetSuccessfulMethodInfo a signature
instance (signature ~ m GHC.Int.Int32, Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessGetTermSigMethodInfo a signature
instance (signature ~ (GHC.Int.Int32 -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessSendSignalMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessWaitMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessWaitAsyncMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessWaitCheckMethodInfo a signature
instance (signature ~ (GHC.Base.Maybe b -> GHC.Base.Maybe GI.Gio.Callbacks.AsyncReadyCallback -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Objects.Cancellable.IsCancellable b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessWaitCheckAsyncMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessWaitCheckFinishMethodInfo a signature
instance (signature ~ (b -> m ()), Control.Monad.IO.Class.MonadIO m, GI.Gio.Objects.Subprocess.IsSubprocess a, GI.Gio.Interfaces.AsyncResult.IsAsyncResult b) => Data.GI.Base.Overloading.MethodInfo GI.Gio.Objects.Subprocess.SubprocessWaitFinishMethodInfo a signature
-- | 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;
-- }
--
--
--