gi-secret 0.0.5 → 0.0.7
raw patch · 28 files changed
+11163/−10 lines, 28 filesdep ~haskell-gidep ~haskell-gi-basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: haskell-gi, haskell-gi-base
API changes (from Hackage documentation)
- GI.Secret.Objects.Collection: instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Secret.Objects.Collection.Collection a) => GI.Secret.Objects.Collection.IsCollection a
- GI.Secret.Objects.Collection: instance GI.GObject.Objects.Object.IsObject GI.Secret.Objects.Collection.Collection
- GI.Secret.Objects.Collection: instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Secret.Objects.Collection.Collection
- GI.Secret.Objects.Collection: instance GI.Gio.Interfaces.DBusInterface.IsDBusInterface GI.Secret.Objects.Collection.Collection
- GI.Secret.Objects.Collection: instance GI.Gio.Interfaces.Initable.IsInitable GI.Secret.Objects.Collection.Collection
- GI.Secret.Objects.Collection: instance GI.Gio.Objects.DBusProxy.IsDBusProxy GI.Secret.Objects.Collection.Collection
- GI.Secret.Objects.Collection: instance GI.Secret.Objects.Collection.IsCollection GI.Secret.Objects.Collection.Collection
- GI.Secret.Objects.Item: instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Secret.Objects.Item.Item a) => GI.Secret.Objects.Item.IsItem a
- GI.Secret.Objects.Item: instance GI.GObject.Objects.Object.IsObject GI.Secret.Objects.Item.Item
- GI.Secret.Objects.Item: instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Secret.Objects.Item.Item
- GI.Secret.Objects.Item: instance GI.Gio.Interfaces.DBusInterface.IsDBusInterface GI.Secret.Objects.Item.Item
- GI.Secret.Objects.Item: instance GI.Gio.Interfaces.Initable.IsInitable GI.Secret.Objects.Item.Item
- GI.Secret.Objects.Item: instance GI.Gio.Objects.DBusProxy.IsDBusProxy GI.Secret.Objects.Item.Item
- GI.Secret.Objects.Item: instance GI.Secret.Objects.Item.IsItem GI.Secret.Objects.Item.Item
- GI.Secret.Objects.Prompt: instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Secret.Objects.Prompt.Prompt a) => GI.Secret.Objects.Prompt.IsPrompt a
- GI.Secret.Objects.Prompt: instance GI.GObject.Objects.Object.IsObject GI.Secret.Objects.Prompt.Prompt
- GI.Secret.Objects.Prompt: instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Secret.Objects.Prompt.Prompt
- GI.Secret.Objects.Prompt: instance GI.Gio.Interfaces.DBusInterface.IsDBusInterface GI.Secret.Objects.Prompt.Prompt
- GI.Secret.Objects.Prompt: instance GI.Gio.Interfaces.Initable.IsInitable GI.Secret.Objects.Prompt.Prompt
- GI.Secret.Objects.Prompt: instance GI.Gio.Objects.DBusProxy.IsDBusProxy GI.Secret.Objects.Prompt.Prompt
- GI.Secret.Objects.Prompt: instance GI.Secret.Objects.Prompt.IsPrompt GI.Secret.Objects.Prompt.Prompt
- GI.Secret.Objects.Service: instance (Data.GI.Base.BasicTypes.GObject a, Data.GI.Base.Overloading.UnknownAncestorError GI.Secret.Objects.Service.Service a) => GI.Secret.Objects.Service.IsService a
- GI.Secret.Objects.Service: instance GI.GObject.Objects.Object.IsObject GI.Secret.Objects.Service.Service
- GI.Secret.Objects.Service: instance GI.Gio.Interfaces.AsyncInitable.IsAsyncInitable GI.Secret.Objects.Service.Service
- GI.Secret.Objects.Service: instance GI.Gio.Interfaces.DBusInterface.IsDBusInterface GI.Secret.Objects.Service.Service
- GI.Secret.Objects.Service: instance GI.Gio.Interfaces.Initable.IsInitable GI.Secret.Objects.Service.Service
- GI.Secret.Objects.Service: instance GI.Gio.Objects.DBusProxy.IsDBusProxy GI.Secret.Objects.Service.Service
- GI.Secret.Objects.Service: instance GI.Secret.Objects.Service.IsService GI.Secret.Objects.Service.Service
- GI.Secret.Structs.Schema: instance (tag ~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Secret.Structs.Schema.Schema tag
- GI.Secret.Structs.SchemaAttribute: instance (tag ~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Secret.Structs.SchemaAttribute.SchemaAttribute tag
+ GI.Secret.Objects.Collection: instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Secret.Objects.Collection.Collection o) => GI.Secret.Objects.Collection.IsCollection o
+ GI.Secret.Objects.Collection: instance Data.GI.Base.Overloading.HasParentTypes GI.Secret.Objects.Collection.Collection
+ GI.Secret.Objects.Item: instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Secret.Objects.Item.Item o) => GI.Secret.Objects.Item.IsItem o
+ GI.Secret.Objects.Item: instance Data.GI.Base.Overloading.HasParentTypes GI.Secret.Objects.Item.Item
+ GI.Secret.Objects.Prompt: instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Secret.Objects.Prompt.Prompt o) => GI.Secret.Objects.Prompt.IsPrompt o
+ GI.Secret.Objects.Prompt: instance Data.GI.Base.Overloading.HasParentTypes GI.Secret.Objects.Prompt.Prompt
+ GI.Secret.Objects.Service: instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.Secret.Objects.Service.Service o) => GI.Secret.Objects.Service.IsService o
+ GI.Secret.Objects.Service: instance Data.GI.Base.Overloading.HasParentTypes GI.Secret.Objects.Service.Service
+ GI.Secret.Structs.Schema: instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Secret.Structs.Schema.Schema tag
+ GI.Secret.Structs.SchemaAttribute: instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.Secret.Structs.SchemaAttribute.SchemaAttribute tag
- GI.Secret.Functions: passwordClear :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Functions: passwordClear :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Functions: passwordClearSync :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe (a) -> m ()
+ GI.Secret.Functions: passwordClearSync :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe a -> m ()
- GI.Secret.Functions: passwordLookup :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Functions: passwordLookup :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Functions: passwordLookupSync :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe (a) -> m Text
+ GI.Secret.Functions: passwordLookupSync :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe a -> m Text
- GI.Secret.Functions: passwordStore :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe (Text) -> Text -> Text -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Functions: passwordStore :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe Text -> Text -> Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Functions: passwordStoreSync :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe (Text) -> Text -> Text -> Maybe (a) -> m ()
+ GI.Secret.Functions: passwordStoreSync :: (HasCallStack, MonadIO m, IsCancellable a) => Schema -> Map Text Text -> Maybe Text -> Text -> Text -> Maybe a -> m ()
- GI.Secret.Functions: passwordWipe :: (HasCallStack, MonadIO m) => Maybe (Text) -> m ()
+ GI.Secret.Functions: passwordWipe :: (HasCallStack, MonadIO m) => Maybe Text -> m ()
- GI.Secret.Objects.Collection: Collection :: (ManagedPtr Collection) -> Collection
+ GI.Secret.Objects.Collection: Collection :: ManagedPtr Collection -> Collection
- GI.Secret.Objects.Collection: class GObject o => IsCollection o
+ GI.Secret.Objects.Collection: class (GObject o, IsDescendantOf Collection o) => IsCollection o
- GI.Secret.Objects.Collection: collectionCreate :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe (a) -> Text -> Maybe (Text) -> [CollectionCreateFlags] -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Collection: collectionCreate :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe a -> Text -> Maybe Text -> [CollectionCreateFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Collection: collectionCreateSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe (a) -> Text -> Maybe (Text) -> [CollectionCreateFlags] -> Maybe (b) -> m Collection
+ GI.Secret.Objects.Collection: collectionCreateSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe a -> Text -> Maybe Text -> [CollectionCreateFlags] -> Maybe b -> m Collection
- GI.Secret.Objects.Collection: collectionDelete :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Collection: collectionDelete :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Collection: collectionDeleteSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (b) -> m ()
+ GI.Secret.Objects.Collection: collectionDeleteSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe b -> m ()
- GI.Secret.Objects.Collection: collectionForAlias :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe (a) -> Text -> [CollectionFlags] -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Collection: collectionForAlias :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe a -> Text -> [CollectionFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Collection: collectionForAliasSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe (a) -> Text -> [CollectionFlags] -> Maybe (b) -> m Collection
+ GI.Secret.Objects.Collection: collectionForAliasSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => Maybe a -> Text -> [CollectionFlags] -> Maybe b -> m Collection
- GI.Secret.Objects.Collection: collectionLoadItems :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Collection: collectionLoadItems :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Collection: collectionLoadItemsSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (b) -> m ()
+ GI.Secret.Objects.Collection: collectionLoadItemsSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe b -> m ()
- GI.Secret.Objects.Collection: collectionSearch :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> [SearchFlags] -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Collection: collectionSearch :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Collection: collectionSearchSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> [SearchFlags] -> Maybe (b) -> m [Item]
+ GI.Secret.Objects.Collection: collectionSearchSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> m [Item]
- GI.Secret.Objects.Collection: collectionSetLabel :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Collection: collectionSetLabel :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Collection: collectionSetLabelSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Text -> Maybe (b) -> m ()
+ GI.Secret.Objects.Collection: collectionSetLabelSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Text -> Maybe b -> m ()
- GI.Secret.Objects.Collection: constructCollectionCreated :: (IsCollection o) => Word64 -> IO (GValueConstruct o)
+ GI.Secret.Objects.Collection: constructCollectionCreated :: IsCollection o => Word64 -> IO (GValueConstruct o)
- GI.Secret.Objects.Collection: constructCollectionLabel :: (IsCollection o) => Text -> IO (GValueConstruct o)
+ GI.Secret.Objects.Collection: constructCollectionLabel :: IsCollection o => Text -> IO (GValueConstruct o)
- GI.Secret.Objects.Collection: constructCollectionModified :: (IsCollection o) => Word64 -> IO (GValueConstruct o)
+ GI.Secret.Objects.Collection: constructCollectionModified :: IsCollection o => Word64 -> IO (GValueConstruct o)
- GI.Secret.Objects.Item: Item :: (ManagedPtr Item) -> Item
+ GI.Secret.Objects.Item: Item :: ManagedPtr Item -> Item
- GI.Secret.Objects.Item: class GObject o => IsItem o
+ GI.Secret.Objects.Item: class (GObject o, IsDescendantOf Item o) => IsItem o
- GI.Secret.Objects.Item: constructItemCreated :: (IsItem o) => Word64 -> IO (GValueConstruct o)
+ GI.Secret.Objects.Item: constructItemCreated :: IsItem o => Word64 -> IO (GValueConstruct o)
- GI.Secret.Objects.Item: constructItemLabel :: (IsItem o) => Text -> IO (GValueConstruct o)
+ GI.Secret.Objects.Item: constructItemLabel :: IsItem o => Text -> IO (GValueConstruct o)
- GI.Secret.Objects.Item: constructItemModified :: (IsItem o) => Word64 -> IO (GValueConstruct o)
+ GI.Secret.Objects.Item: constructItemModified :: IsItem o => Word64 -> IO (GValueConstruct o)
- GI.Secret.Objects.Item: itemCreate :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Text -> Value -> [ItemCreateFlags] -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Item: itemCreate :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Text -> Value -> [ItemCreateFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Item: itemCreateSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Text -> Value -> [ItemCreateFlags] -> Maybe (b) -> m Item
+ GI.Secret.Objects.Item: itemCreateSync :: (HasCallStack, MonadIO m, IsCollection a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Text -> Value -> [ItemCreateFlags] -> Maybe b -> m Item
- GI.Secret.Objects.Item: itemDelete :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Item: itemDelete :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Item: itemDeleteSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe (b) -> m ()
+ GI.Secret.Objects.Item: itemDeleteSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe b -> m ()
- GI.Secret.Objects.Item: itemGetSchemaName :: (HasCallStack, MonadIO m, IsItem a) => a -> m Text
+ GI.Secret.Objects.Item: itemGetSchemaName :: (HasCallStack, MonadIO m, IsItem a) => a -> m (Maybe Text)
- GI.Secret.Objects.Item: itemLoadSecret :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Item: itemLoadSecret :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Item: itemLoadSecretSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe (b) -> m ()
+ GI.Secret.Objects.Item: itemLoadSecretSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe b -> m ()
- GI.Secret.Objects.Item: itemLoadSecrets :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => [a] -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Item: itemLoadSecrets :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => [a] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Item: itemLoadSecretsSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => [a] -> Maybe (b) -> m ()
+ GI.Secret.Objects.Item: itemLoadSecretsSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => [a] -> Maybe b -> m ()
- GI.Secret.Objects.Item: itemSetAttributes :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Item: itemSetAttributes :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Item: itemSetAttributesSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (b) -> m ()
+ GI.Secret.Objects.Item: itemSetAttributesSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> m ()
- GI.Secret.Objects.Item: itemSetLabel :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Item: itemSetLabel :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Item: itemSetLabelSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Text -> Maybe (b) -> m ()
+ GI.Secret.Objects.Item: itemSetLabelSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Text -> Maybe b -> m ()
- GI.Secret.Objects.Item: itemSetSecret :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Value -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Item: itemSetSecret :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Value -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Item: itemSetSecretSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Value -> Maybe (b) -> m ()
+ GI.Secret.Objects.Item: itemSetSecretSync :: (HasCallStack, MonadIO m, IsItem a, IsCancellable b) => a -> Value -> Maybe b -> m ()
- GI.Secret.Objects.Prompt: Prompt :: (ManagedPtr Prompt) -> Prompt
+ GI.Secret.Objects.Prompt: Prompt :: ManagedPtr Prompt -> Prompt
- GI.Secret.Objects.Prompt: class GObject o => IsPrompt o
+ GI.Secret.Objects.Prompt: class (GObject o, IsDescendantOf Prompt o) => IsPrompt o
- GI.Secret.Objects.Prompt: promptPerform :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe (Text) -> VariantType -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Prompt: promptPerform :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> VariantType -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Prompt: promptPerformSync :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe (Text) -> Maybe (b) -> VariantType -> m GVariant
+ GI.Secret.Objects.Prompt: promptPerformSync :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> Maybe b -> VariantType -> m GVariant
- GI.Secret.Objects.Prompt: promptRun :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe (Text) -> Maybe (b) -> VariantType -> m GVariant
+ GI.Secret.Objects.Prompt: promptRun :: (HasCallStack, MonadIO m, IsPrompt a, IsCancellable b) => a -> Maybe Text -> Maybe b -> VariantType -> m GVariant
- GI.Secret.Objects.Service: Service :: (ManagedPtr Service) -> Service
+ GI.Secret.Objects.Service: Service :: ManagedPtr Service -> Service
- GI.Secret.Objects.Service: class GObject o => IsService o
+ GI.Secret.Objects.Service: class (GObject o, IsDescendantOf Service o) => IsService o
- GI.Secret.Objects.Service: serviceClear :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceClear :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceClearSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (b) -> m ()
+ GI.Secret.Objects.Service: serviceClearSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> m ()
- GI.Secret.Objects.Service: serviceEnsureSession :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceEnsureSession :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceEnsureSessionSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (b) -> m ()
+ GI.Secret.Objects.Service: serviceEnsureSessionSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> m ()
- GI.Secret.Objects.Service: serviceGet :: (HasCallStack, MonadIO m, IsCancellable a) => [ServiceFlags] -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceGet :: (HasCallStack, MonadIO m, IsCancellable a) => [ServiceFlags] -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceGetSync :: (HasCallStack, MonadIO m, IsCancellable a) => [ServiceFlags] -> Maybe (a) -> m Service
+ GI.Secret.Objects.Service: serviceGetSync :: (HasCallStack, MonadIO m, IsCancellable a) => [ServiceFlags] -> Maybe a -> m Service
- GI.Secret.Objects.Service: serviceLoadCollections :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceLoadCollections :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceLoadCollectionsSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (b) -> m ()
+ GI.Secret.Objects.Service: serviceLoadCollectionsSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe b -> m ()
- GI.Secret.Objects.Service: serviceLock :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceLock :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceLockFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m ((Int32, [DBusProxy]))
+ GI.Secret.Objects.Service: serviceLockFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m (Int32, [DBusProxy])
- GI.Secret.Objects.Service: serviceLockSync :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe (c) -> m ((Int32, [DBusProxy]))
+ GI.Secret.Objects.Service: serviceLockSync :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> m (Int32, [DBusProxy])
- GI.Secret.Objects.Service: serviceLookup :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceLookup :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceLookupSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (b) -> m Value
+ GI.Secret.Objects.Service: serviceLookupSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe b -> m Value
- GI.Secret.Objects.Service: serviceOpen :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Maybe (Text) -> [ServiceFlags] -> Maybe (a) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceOpen :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Maybe Text -> [ServiceFlags] -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceOpenSync :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Maybe (Text) -> [ServiceFlags] -> Maybe (a) -> m Service
+ GI.Secret.Objects.Service: serviceOpenSync :: (HasCallStack, MonadIO m, IsCancellable a) => GType -> Maybe Text -> [ServiceFlags] -> Maybe a -> m Service
- GI.Secret.Objects.Service: servicePrompt :: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) => a -> b -> Maybe (VariantType) -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: servicePrompt :: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) => a -> b -> Maybe VariantType -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: servicePromptSync :: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) => a -> b -> Maybe (c) -> VariantType -> m GVariant
+ GI.Secret.Objects.Service: servicePromptSync :: (HasCallStack, MonadIO m, IsService a, IsPrompt b, IsCancellable c) => a -> b -> Maybe c -> VariantType -> m GVariant
- GI.Secret.Objects.Service: serviceSearch :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> [SearchFlags] -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceSearch :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceSearchSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> [SearchFlags] -> Maybe (b) -> m [Item]
+ GI.Secret.Objects.Service: serviceSearchSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe b -> m [Item]
- GI.Secret.Objects.Service: serviceSetAlias :: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) => a -> Text -> Maybe (b) -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceSetAlias :: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) => a -> Text -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceSetAliasSync :: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) => a -> Text -> Maybe (b) -> Maybe (c) -> m ()
+ GI.Secret.Objects.Service: serviceSetAliasSync :: (HasCallStack, MonadIO m, IsService a, IsCollection b, IsCancellable c) => a -> Text -> Maybe b -> Maybe c -> m ()
- GI.Secret.Objects.Service: serviceStore :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (Text) -> Text -> Value -> Maybe (b) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceStore :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Value -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceStoreSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe (Schema) -> Map Text Text -> Maybe (Text) -> Text -> Value -> Maybe (b) -> m ()
+ GI.Secret.Objects.Service: serviceStoreSync :: (HasCallStack, MonadIO m, IsService a, IsCancellable b) => a -> Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Value -> Maybe b -> m ()
- GI.Secret.Objects.Service: serviceUnlock :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe (c) -> Maybe (AsyncReadyCallback) -> m ()
+ GI.Secret.Objects.Service: serviceUnlock :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- GI.Secret.Objects.Service: serviceUnlockFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m ((Int32, [DBusProxy]))
+ GI.Secret.Objects.Service: serviceUnlockFinish :: (HasCallStack, MonadIO m, IsService a, IsAsyncResult b) => a -> b -> m (Int32, [DBusProxy])
- GI.Secret.Objects.Service: serviceUnlockSync :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe (c) -> m ((Int32, [DBusProxy]))
+ GI.Secret.Objects.Service: serviceUnlockSync :: (HasCallStack, MonadIO m, IsService a, IsDBusProxy b, IsCancellable c) => a -> [b] -> Maybe c -> m (Int32, [DBusProxy])
- GI.Secret.Structs.Schema: Schema :: (ManagedPtr Schema) -> Schema
+ GI.Secret.Structs.Schema: Schema :: ManagedPtr Schema -> Schema
- GI.Secret.Structs.SchemaAttribute: SchemaAttribute :: (ManagedPtr SchemaAttribute) -> SchemaAttribute
+ GI.Secret.Structs.SchemaAttribute: SchemaAttribute :: ManagedPtr SchemaAttribute -> SchemaAttribute
- GI.Secret.Structs.Value: Value :: (ManagedPtr Value) -> Value
+ GI.Secret.Structs.Value: Value :: ManagedPtr Value -> Value
Files
- ChangeLog.md +8/−0
- GI/Secret.hs +56/−0
- GI/Secret/Constants.hs +54/−0
- GI/Secret/Enums.hs +167/−0
- GI/Secret/Enums.hs-boot +30/−0
- GI/Secret/Flags.hs +309/−0
- GI/Secret/Flags.hs-boot +45/−0
- GI/Secret/Functions.hs +709/−0
- GI/Secret/Objects.hs +47/−0
- GI/Secret/Objects/Collection.hs +2068/−0
- GI/Secret/Objects/Collection.hs-boot +104/−0
- GI/Secret/Objects/Item.hs +2359/−0
- GI/Secret/Objects/Item.hs-boot +119/−0
- GI/Secret/Objects/Prompt.hs +476/−0
- GI/Secret/Objects/Prompt.hs-boot +41/−0
- GI/Secret/Objects/Service.hs +3256/−0
- GI/Secret/Objects/Service.hs-boot +146/−0
- GI/Secret/Structs.hs +45/−0
- GI/Secret/Structs/Schema.hs +347/−0
- GI/Secret/Structs/Schema.hs-boot +32/−0
- GI/Secret/Structs/SchemaAttribute.hs +221/−0
- GI/Secret/Structs/SchemaAttribute.hs-boot +26/−0
- GI/Secret/Structs/Value.hs +418/−0
- GI/Secret/Structs/Value.hs-boot +41/−0
- LICENSE +14/−0
- README.md +1/−1
- gi-secret.cabal +23/−8
- stack.yaml +1/−1
ChangeLog.md view
@@ -1,3 +1,11 @@+### 0.0.7+++ Update to haskell-gi(-base) 0.22++### 0.0.6+++ Update stack version to 12.10+ ### 0.0.5 + Remove enable-overloading flags, and use instead explicit CPP checks for 'haskell-gi-overloading-1.0', see [how to disable overloading](https://github.com/haskell-gi/haskell-gi/wiki/Overloading\#disabling-overloading).
+ GI/Secret.hs view
@@ -0,0 +1,56 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret+ ( module GI.Secret.Constants ,+ module GI.Secret.Enums ,+ module GI.Secret.Flags ,+ module GI.Secret.Functions ,+ module GI.Secret.Objects ,+ module GI.Secret.Structs ,++++ module Data.GI.Base ,+++ ) where++import GI.Secret.Constants+import GI.Secret.Enums+import GI.Secret.Flags+import GI.Secret.Functions+import GI.Secret.Objects+import GI.Secret.Structs++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL+++import Data.GI.Base+
+ GI/Secret/Constants.hs view
@@ -0,0 +1,54 @@+{-# LANGUAGE PatternSynonyms, ScopedTypeVariables, ViewPatterns #-}+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Constants+ ( + pattern COLLECTION_SESSION ,+ pattern COLLECTION_DEFAULT ,++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL+++{- |+An alias to the session collection, which will be cleared when the user ends+the session. This can be passed to @/secret_password_store()/@,+'GI.Secret.Objects.Collection.collectionForAlias' or similar functions.+-}+pattern COLLECTION_SESSION = "session" :: T.Text++{- |+An alias to the default collection. This can be passed to @/secret_password_store()/@+'GI.Secret.Objects.Collection.collectionForAlias'.+-}+pattern COLLECTION_DEFAULT = "default" :: T.Text++
+ GI/Secret/Enums.hs view
@@ -0,0 +1,167 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Enums+ ( ++ -- * Enumerations+-- ** Error #enum:Error#++ Error(..) ,+++-- ** SchemaAttributeType #enum:SchemaAttributeType#++ SchemaAttributeType(..) ,+++-- ** SchemaType #enum:SchemaType#++ SchemaType(..) ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL+++-- Enum SchemaType+{- |+Different types of schemas for storing secrets, intended for use with+'GI.Secret.Functions.getSchema'.++/Since: 0.18.6/+-}+data SchemaType = + SchemaTypeNote+ {- ^+ Personal passwords; see @/SECRET_SCHEMA_NOTE/@+ -}+ | SchemaTypeCompatNetwork+ {- ^+ Network passwords from older+ libgnome-keyring storage; see @/SECRET_SCHEMA_COMPAT_NETWORK/@+ -}+ | AnotherSchemaType Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum SchemaType where+ fromEnum SchemaTypeNote = 0+ fromEnum SchemaTypeCompatNetwork = 1+ fromEnum (AnotherSchemaType k) = k++ toEnum 0 = SchemaTypeNote+ toEnum 1 = SchemaTypeCompatNetwork+ toEnum k = AnotherSchemaType k++instance P.Ord SchemaType where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++-- Enum SchemaAttributeType+{- |+The type of an attribute in a 'GI.Secret.Structs.Schema.Schema'. Attributes are stored as strings+in the Secret Service, and the attribute types simply define standard ways+to store integer and boolean values as strings.+-}+data SchemaAttributeType = + SchemaAttributeTypeString+ {- ^+ a utf-8 string attribute+ -}+ | SchemaAttributeTypeInteger+ {- ^+ an integer attribute, stored as a decimal+ -}+ | SchemaAttributeTypeBoolean+ {- ^+ a boolean attribute, stored as \'true\' or \'false\'+ -}+ | AnotherSchemaAttributeType Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum SchemaAttributeType where+ fromEnum SchemaAttributeTypeString = 0+ fromEnum SchemaAttributeTypeInteger = 1+ fromEnum SchemaAttributeTypeBoolean = 2+ fromEnum (AnotherSchemaAttributeType k) = k++ toEnum 0 = SchemaAttributeTypeString+ toEnum 1 = SchemaAttributeTypeInteger+ toEnum 2 = SchemaAttributeTypeBoolean+ toEnum k = AnotherSchemaAttributeType k++instance P.Ord SchemaAttributeType where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++-- Enum Error+{- |+/No description available in the introspection data./+-}+data Error = + ErrorProtocol+ {- ^+ /No description available in the introspection data./+ -}+ | ErrorIsLocked+ {- ^+ /No description available in the introspection data./+ -}+ | ErrorNoSuchObject+ {- ^+ /No description available in the introspection data./+ -}+ | ErrorAlreadyExists+ {- ^+ /No description available in the introspection data./+ -}+ | AnotherError Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum Error where+ fromEnum ErrorProtocol = 1+ fromEnum ErrorIsLocked = 2+ fromEnum ErrorNoSuchObject = 3+ fromEnum ErrorAlreadyExists = 4+ fromEnum (AnotherError k) = k++ toEnum 1 = ErrorProtocol+ toEnum 2 = ErrorIsLocked+ toEnum 3 = ErrorNoSuchObject+ toEnum 4 = ErrorAlreadyExists+ toEnum k = AnotherError k++instance P.Ord Error where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++
+ GI/Secret/Enums.hs-boot view
@@ -0,0 +1,30 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Enums where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++data SchemaType+instance P.Enum SchemaType where+data SchemaAttributeType+instance P.Enum SchemaAttributeType where+data Error+instance P.Enum Error where
+ GI/Secret/Flags.hs view
@@ -0,0 +1,309 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Flags+ ( ++ -- * Flags+-- ** CollectionCreateFlags #flag:CollectionCreateFlags#++ CollectionCreateFlags(..) ,+++-- ** CollectionFlags #flag:CollectionFlags#++ CollectionFlags(..) ,+++-- ** ItemCreateFlags #flag:ItemCreateFlags#++ ItemCreateFlags(..) ,+++-- ** ItemFlags #flag:ItemFlags#++ ItemFlags(..) ,+++-- ** SchemaFlags #flag:SchemaFlags#++ SchemaFlags(..) ,+++-- ** SearchFlags #flag:SearchFlags#++ SearchFlags(..) ,+++-- ** ServiceFlags #flag:ServiceFlags#++ ServiceFlags(..) ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL+++-- Flags ServiceFlags+{- |+Flags which determine which parts of the 'GI.Secret.Objects.Service.Service' proxy are initialized+during a 'GI.Secret.Objects.Service.serviceGet' or 'GI.Secret.Objects.Service.serviceOpen' operation.+-}+data ServiceFlags = + ServiceFlagsNone+ {- ^+ no flags for initializing the 'GI.Secret.Objects.Service.Service'+ -}+ | ServiceFlagsOpenSession+ {- ^+ establish a session for transfer of secrets+ while initializing the 'GI.Secret.Objects.Service.Service'+ -}+ | ServiceFlagsLoadCollections+ {- ^+ load collections while initializing the+ 'GI.Secret.Objects.Service.Service'+ -}+ | AnotherServiceFlags Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum ServiceFlags where+ fromEnum ServiceFlagsNone = 0+ fromEnum ServiceFlagsOpenSession = 2+ fromEnum ServiceFlagsLoadCollections = 4+ fromEnum (AnotherServiceFlags k) = k++ toEnum 0 = ServiceFlagsNone+ toEnum 2 = ServiceFlagsOpenSession+ toEnum 4 = ServiceFlagsLoadCollections+ toEnum k = AnotherServiceFlags k++instance P.Ord ServiceFlags where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++instance IsGFlag ServiceFlags++-- Flags SearchFlags+{- |+Various flags to be used with 'GI.Secret.Objects.Service.serviceSearch' and 'GI.Secret.Objects.Service.serviceSearchSync'.+-}+data SearchFlags = + SearchFlagsNone+ {- ^+ no flags+ -}+ | SearchFlagsAll+ {- ^+ all the items matching the search will be returned, instead of just the first one+ -}+ | SearchFlagsUnlock+ {- ^+ unlock locked items while searching+ -}+ | SearchFlagsLoadSecrets+ {- ^+ while searching load secrets for items that are not locked+ -}+ | AnotherSearchFlags Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum SearchFlags where+ fromEnum SearchFlagsNone = 0+ fromEnum SearchFlagsAll = 2+ fromEnum SearchFlagsUnlock = 4+ fromEnum SearchFlagsLoadSecrets = 8+ fromEnum (AnotherSearchFlags k) = k++ toEnum 0 = SearchFlagsNone+ toEnum 2 = SearchFlagsAll+ toEnum 4 = SearchFlagsUnlock+ toEnum 8 = SearchFlagsLoadSecrets+ toEnum k = AnotherSearchFlags k++instance P.Ord SearchFlags where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++instance IsGFlag SearchFlags++-- Flags SchemaFlags+{- |+Flags for a 'GI.Secret.Structs.Schema.Schema' definition.+-}+data SchemaFlags = + SchemaFlagsNone+ {- ^+ no flags for the schema+ -}+ | SchemaFlagsDontMatchName+ {- ^+ don\'t match the schema name when looking up or+ removing passwords+ -}+ | AnotherSchemaFlags Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum SchemaFlags where+ fromEnum SchemaFlagsNone = 0+ fromEnum SchemaFlagsDontMatchName = 2+ fromEnum (AnotherSchemaFlags k) = k++ toEnum 0 = SchemaFlagsNone+ toEnum 2 = SchemaFlagsDontMatchName+ toEnum k = AnotherSchemaFlags k++instance P.Ord SchemaFlags where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++instance IsGFlag SchemaFlags++-- Flags ItemFlags+{- |+Flags which determine which parts of the 'GI.Secret.Objects.Item.Item' proxy are initialized.+-}+data ItemFlags = + ItemFlagsNone+ {- ^+ no flags+ -}+ | ItemFlagsLoadSecret+ {- ^+ a secret has been (or should be) loaded for 'GI.Secret.Objects.Item.Item'+ -}+ | AnotherItemFlags Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum ItemFlags where+ fromEnum ItemFlagsNone = 0+ fromEnum ItemFlagsLoadSecret = 2+ fromEnum (AnotherItemFlags k) = k++ toEnum 0 = ItemFlagsNone+ toEnum 2 = ItemFlagsLoadSecret+ toEnum k = AnotherItemFlags k++instance P.Ord ItemFlags where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++instance IsGFlag ItemFlags++-- Flags ItemCreateFlags+{- |+Flags for 'GI.Secret.Objects.Item.itemCreate'.+-}+data ItemCreateFlags = + ItemCreateFlagsNone+ {- ^+ no flags+ -}+ | ItemCreateFlagsReplace+ {- ^+ replace an item with the same attributes.+ -}+ | AnotherItemCreateFlags Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum ItemCreateFlags where+ fromEnum ItemCreateFlagsNone = 0+ fromEnum ItemCreateFlagsReplace = 2+ fromEnum (AnotherItemCreateFlags k) = k++ toEnum 0 = ItemCreateFlagsNone+ toEnum 2 = ItemCreateFlagsReplace+ toEnum k = AnotherItemCreateFlags k++instance P.Ord ItemCreateFlags where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++instance IsGFlag ItemCreateFlags++-- Flags CollectionFlags+{- |+Flags which determine which parts of the 'GI.Secret.Objects.Collection.Collection' proxy are initialized.+-}+data CollectionFlags = + CollectionFlagsNone+ {- ^+ no flags+ -}+ | CollectionFlagsLoadItems+ {- ^+ items have or should be loaded+ -}+ | AnotherCollectionFlags Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum CollectionFlags where+ fromEnum CollectionFlagsNone = 0+ fromEnum CollectionFlagsLoadItems = 2+ fromEnum (AnotherCollectionFlags k) = k++ toEnum 0 = CollectionFlagsNone+ toEnum 2 = CollectionFlagsLoadItems+ toEnum k = AnotherCollectionFlags k++instance P.Ord CollectionFlags where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++instance IsGFlag CollectionFlags++-- Flags CollectionCreateFlags+{- |+Flags for 'GI.Secret.Objects.Collection.collectionCreate'.+-}+data CollectionCreateFlags = + CollectionCreateFlagsCollectionCreateNone+ {- ^+ no flags+ -}+ | AnotherCollectionCreateFlags Int+ -- ^ Catch-all for unknown values+ deriving (Show, Eq)++instance P.Enum CollectionCreateFlags where+ fromEnum CollectionCreateFlagsCollectionCreateNone = 0+ fromEnum (AnotherCollectionCreateFlags k) = k++ toEnum 0 = CollectionCreateFlagsCollectionCreateNone+ toEnum k = AnotherCollectionCreateFlags k++instance P.Ord CollectionCreateFlags where+ compare a b = P.compare (P.fromEnum a) (P.fromEnum b)++instance IsGFlag CollectionCreateFlags++
+ GI/Secret/Flags.hs-boot view
@@ -0,0 +1,45 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Flags where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++data ServiceFlags+instance P.Enum ServiceFlags where+instance IsGFlag ServiceFlags+data SearchFlags+instance P.Enum SearchFlags where+instance IsGFlag SearchFlags+data SchemaFlags+instance P.Enum SchemaFlags where+instance IsGFlag SchemaFlags+data ItemFlags+instance P.Enum ItemFlags where+instance IsGFlag ItemFlags+data ItemCreateFlags+instance P.Enum ItemCreateFlags where+instance IsGFlag ItemCreateFlags+data CollectionFlags+instance P.Enum CollectionFlags where+instance IsGFlag CollectionFlags+data CollectionCreateFlags+instance P.Enum CollectionCreateFlags where+instance IsGFlag CollectionCreateFlags
+ GI/Secret/Functions.hs view
@@ -0,0 +1,709 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Functions+ ( ++ -- * Methods+-- ** errorGetQuark #method:errorGetQuark#++ errorGetQuark ,+++-- ** getSchema #method:getSchema#++ getSchema ,+++-- ** passwordClear #method:passwordClear#++ passwordClear ,+++-- ** passwordClearFinish #method:passwordClearFinish#++ passwordClearFinish ,+++-- ** passwordClearSync #method:passwordClearSync#++ passwordClearSync ,+++-- ** passwordLookup #method:passwordLookup#++ passwordLookup ,+++-- ** passwordLookupFinish #method:passwordLookupFinish#++ passwordLookupFinish ,+++-- ** passwordLookupSync #method:passwordLookupSync#++ passwordLookupSync ,+++-- ** passwordStore #method:passwordStore#++ passwordStore ,+++-- ** passwordStoreFinish #method:passwordStoreFinish#++ passwordStoreFinish ,+++-- ** passwordStoreSync #method:passwordStoreSync#++ passwordStoreSync ,+++-- ** passwordWipe #method:passwordWipe#++ passwordWipe ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import qualified GI.Gio.Callbacks as Gio.Callbacks+import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult+import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable+import {-# SOURCE #-} qualified GI.Secret.Enums as Secret.Enums+import {-# SOURCE #-} qualified GI.Secret.Structs.Schema as Secret.Schema++-- function secret_password_wipe+-- Args : [Arg {argCName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "password to clear", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_password_wipe" secret_password_wipe :: + CString -> -- password : TBasicType TUTF8+ IO ()++{- |+Clear the memory used by a password.+-}+passwordWipe ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Maybe (T.Text)+ {- ^ /@password@/: password to clear -}+ -> m ()+passwordWipe password = liftIO $ do+ maybePassword <- case password of+ Nothing -> return nullPtr+ Just jPassword -> do+ jPassword' <- textToCString jPassword+ return jPassword'+ secret_password_wipe maybePassword+ freeMem maybePassword+ return ()+++-- function secret_password_storev_sync+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema for attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collection", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a collection alias, or D-Bus object path of the collection where to store the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the null-terminated password to store", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_password_storev_sync" secret_password_storev_sync :: + Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CString -> -- collection : TBasicType TUTF8+ CString -> -- label : TBasicType TUTF8+ CString -> -- password : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Store a password in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If the attributes match a secret item already stored in the collection, then+the item will be updated with these new values.++If /@collection@/ is 'Nothing', then the default collection will be+used. Use 'GI.Secret.Constants.COLLECTION_SESSION' to store the password in the session+collection, which doesn\'t get stored across login sessions.++This method may block indefinitely and should not be used in user interface+threads.+-}+passwordStoreSync ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ Secret.Schema.Schema+ {- ^ /@schema@/: the schema for attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (T.Text)+ {- ^ /@collection@/: a collection alias, or D-Bus object path of the collection where to store the secret -}+ -> T.Text+ {- ^ /@label@/: label for the secret -}+ -> T.Text+ {- ^ /@password@/: the null-terminated password to store -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+passwordStoreSync schema attributes collection label password cancellable = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCollection <- case collection of+ Nothing -> return nullPtr+ Just jCollection -> do+ jCollection' <- textToCString jCollection+ return jCollection'+ label' <- textToCString label+ password' <- textToCString password+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_password_storev_sync schema' attributes'''''' maybeCollection label' password' maybeCancellable+ touchManagedPtr schema+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ freeMem maybeCollection+ freeMem label'+ freeMem password'+ return ()+ ) (do+ unrefGHashTable attributes''''''+ freeMem maybeCollection+ freeMem label'+ freeMem password'+ )+++-- function secret_password_store_finish+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_password_store_finish" secret_password_store_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Finish asynchronous operation to store a password in the secret service.+-}+passwordStoreFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+passwordStoreFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_password_store_finish result_'+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )+++-- function secret_password_storev+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema for attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collection", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a collection alias, or D-Bus object path of the collection where to store the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the null-terminated password to store", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 7, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_password_storev" secret_password_storev :: + Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CString -> -- collection : TBasicType TUTF8+ CString -> -- label : TBasicType TUTF8+ CString -> -- password : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Store a password in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If the attributes match a secret item already stored in the collection, then+the item will be updated with these new values.++If /@collection@/ is 'Nothing', then the default collection will be+used. Use 'GI.Secret.Constants.COLLECTION_SESSION' to store the password in the session+collection, which doesn\'t get stored across login sessions.++This method will return immediately and complete asynchronously.+-}+passwordStore ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ Secret.Schema.Schema+ {- ^ /@schema@/: the schema for attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (T.Text)+ {- ^ /@collection@/: a collection alias, or D-Bus object path of the collection where to store the secret -}+ -> T.Text+ {- ^ /@label@/: label for the secret -}+ -> T.Text+ {- ^ /@password@/: the null-terminated password to store -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+passwordStore schema attributes collection label password cancellable callback = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCollection <- case collection of+ Nothing -> return nullPtr+ Just jCollection -> do+ jCollection' <- textToCString jCollection+ return jCollection'+ label' <- textToCString label+ password' <- textToCString password+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_password_storev schema' attributes'''''' maybeCollection label' password' maybeCancellable maybeCallback userData+ touchManagedPtr schema+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ freeMem maybeCollection+ freeMem label'+ freeMem password'+ return ()+++-- function secret_password_lookupv_sync+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema for attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : True+-- Skip return : False++foreign import ccall "secret_password_lookupv_sync" secret_password_lookupv_sync :: + Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CString++{- |+Lookup a password in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If no secret is found then 'Nothing' is returned.++This method may block indefinitely and should not be used in user interface+threads.+-}+passwordLookupSync ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ Secret.Schema.Schema+ {- ^ /@schema@/: the schema for attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m T.Text+ {- ^ __Returns:__ a new password string which should be freed with+ @/secret_password_free()/@ or may be freed with 'GI.GLib.Functions.free' when done /(Can throw 'Data.GI.Base.GError.GError')/ -}+passwordLookupSync schema attributes cancellable = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_password_lookupv_sync schema' attributes'''''' maybeCancellable+ checkUnexpectedReturnNULL "passwordLookupSync" result+ result' <- cstringToText result+ freeMem result+ touchManagedPtr schema+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return result'+ ) (do+ unrefGHashTable attributes''''''+ )+++-- function secret_password_lookup_finish+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : True+-- Skip return : False++foreign import ccall "secret_password_lookup_finish" secret_password_lookup_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CString++{- |+Finish an asynchronous operation to lookup a password in the secret service.+-}+passwordLookupFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m T.Text+ {- ^ __Returns:__ a new password string which should be freed with+ @/secret_password_free()/@ or may be freed with 'GI.GLib.Functions.free' when done /(Can throw 'Data.GI.Base.GError.GError')/ -}+passwordLookupFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_password_lookup_finish result_'+ checkUnexpectedReturnNULL "passwordLookupFinish" result+ result' <- cstringToText result+ freeMem result+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )+++-- function secret_password_lookupv+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema for attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_password_lookupv" secret_password_lookupv :: + Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Lookup a password in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If no secret is found then 'Nothing' is returned.++This method will return immediately and complete asynchronously.+-}+passwordLookup ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ Secret.Schema.Schema+ {- ^ /@schema@/: the schema for attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+passwordLookup schema attributes cancellable callback = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_password_lookupv schema' attributes'''''' maybeCancellable maybeCallback userData+ touchManagedPtr schema+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()+++-- function secret_password_clearv_sync+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_password_clearv_sync" secret_password_clearv_sync :: + Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Remove unlocked matching passwords from the secret service.++The /@attributes@/ should be a set of key and value string pairs.++All unlocked items that match the attributes will be deleted.++This method may block indefinitely and should not be used in user interface+threads.+-}+passwordClearSync ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ Secret.Schema.Schema+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+passwordClearSync schema attributes cancellable = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_password_clearv_sync schema' attributes'''''' maybeCancellable+ touchManagedPtr schema+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()+ ) (do+ unrefGHashTable attributes''''''+ )+++-- function secret_password_clear_finish+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_password_clear_finish" secret_password_clear_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Finish an asynchronous operation to remove passwords from the secret+service.+-}+passwordClearFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+passwordClearFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_password_clear_finish result_'+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )+++-- function secret_password_clearv+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_password_clearv" secret_password_clearv :: + Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Remove unlocked matching passwords from the secret service.++The /@attributes@/ should be a set of key and value string pairs.++All unlocked items that match the attributes will be deleted.++This method will return immediately and complete asynchronously.+-}+passwordClear ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ Secret.Schema.Schema+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+passwordClear schema attributes cancellable callback = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_password_clearv schema' attributes'''''' maybeCancellable maybeCallback userData+ touchManagedPtr schema+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()+++-- function secret_get_schema+-- Args : [Arg {argCName = "type", argType = TInterface (Name {namespace = "Secret", name = "SchemaType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "type of schema to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Schema"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_get_schema" secret_get_schema :: + CUInt -> -- type : TInterface (Name {namespace = "Secret", name = "SchemaType"})+ IO (Ptr Secret.Schema.Schema)++{- |+Get a secret storage schema of the given /@type@/.++C code may access the schemas (such as @/SECRET_SCHEMA_NOTE/@) directly, but+language bindings cannot, and must use this accessor.++/Since: 0.18.6/+-}+getSchema ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Secret.Enums.SchemaType+ {- ^ /@type@/: type of schema to get -}+ -> m Secret.Schema.Schema+ {- ^ __Returns:__ schema type -}+getSchema type_ = liftIO $ do+ let type_' = (fromIntegral . fromEnum) type_+ result <- secret_get_schema type_'+ checkUnexpectedReturnNULL "getSchema" result+ result' <- (newBoxed Secret.Schema.Schema) result+ return result'+++-- function secret_error_get_quark+-- Args : []+-- Lengths : []+-- returnType : Just (TBasicType TUInt32)+-- throws : False+-- Skip return : False++foreign import ccall "secret_error_get_quark" secret_error_get_quark :: + IO Word32++{- |+/No description available in the introspection data./+-}+errorGetQuark ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ m Word32+errorGetQuark = liftIO $ do+ result <- secret_error_get_quark+ return result+++
+ GI/Secret/Objects.hs view
@@ -0,0 +1,47 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Objects+ ( module GI.Secret.Objects.Collection ,+ module GI.Secret.Objects.Item ,+ module GI.Secret.Objects.Prompt ,+ module GI.Secret.Objects.Service ,+++ ) where++import GI.Secret.Objects.Collection+import GI.Secret.Objects.Item+import GI.Secret.Objects.Prompt+import GI.Secret.Objects.Service++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL+++
+ GI/Secret/Objects/Collection.hs view
@@ -0,0 +1,2068 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)++A proxy object representing a collection of secrets in the Secret Service.+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Objects.Collection+ ( ++-- * Exported types+ Collection(..) ,+ IsCollection ,+ toCollection ,+ noCollection ,+++ -- * Methods+-- ** create #method:create#++ collectionCreate ,+++-- ** createFinish #method:createFinish#++ collectionCreateFinish ,+++-- ** createSync #method:createSync#++ collectionCreateSync ,+++-- ** delete #method:delete#++#if ENABLE_OVERLOADING+ CollectionDeleteMethodInfo ,+#endif+ collectionDelete ,+++-- ** deleteFinish #method:deleteFinish#++#if ENABLE_OVERLOADING+ CollectionDeleteFinishMethodInfo ,+#endif+ collectionDeleteFinish ,+++-- ** deleteSync #method:deleteSync#++#if ENABLE_OVERLOADING+ CollectionDeleteSyncMethodInfo ,+#endif+ collectionDeleteSync ,+++-- ** forAlias #method:forAlias#++ collectionForAlias ,+++-- ** forAliasFinish #method:forAliasFinish#++ collectionForAliasFinish ,+++-- ** forAliasSync #method:forAliasSync#++ collectionForAliasSync ,+++-- ** getCreated #method:getCreated#++#if ENABLE_OVERLOADING+ CollectionGetCreatedMethodInfo ,+#endif+ collectionGetCreated ,+++-- ** getFlags #method:getFlags#++#if ENABLE_OVERLOADING+ CollectionGetFlagsMethodInfo ,+#endif+ collectionGetFlags ,+++-- ** getItems #method:getItems#++#if ENABLE_OVERLOADING+ CollectionGetItemsMethodInfo ,+#endif+ collectionGetItems ,+++-- ** getLabel #method:getLabel#++#if ENABLE_OVERLOADING+ CollectionGetLabelMethodInfo ,+#endif+ collectionGetLabel ,+++-- ** getLocked #method:getLocked#++#if ENABLE_OVERLOADING+ CollectionGetLockedMethodInfo ,+#endif+ collectionGetLocked ,+++-- ** getModified #method:getModified#++#if ENABLE_OVERLOADING+ CollectionGetModifiedMethodInfo ,+#endif+ collectionGetModified ,+++-- ** getService #method:getService#++#if ENABLE_OVERLOADING+ CollectionGetServiceMethodInfo ,+#endif+ collectionGetService ,+++-- ** loadItems #method:loadItems#++#if ENABLE_OVERLOADING+ CollectionLoadItemsMethodInfo ,+#endif+ collectionLoadItems ,+++-- ** loadItemsFinish #method:loadItemsFinish#++#if ENABLE_OVERLOADING+ CollectionLoadItemsFinishMethodInfo ,+#endif+ collectionLoadItemsFinish ,+++-- ** loadItemsSync #method:loadItemsSync#++#if ENABLE_OVERLOADING+ CollectionLoadItemsSyncMethodInfo ,+#endif+ collectionLoadItemsSync ,+++-- ** refresh #method:refresh#++#if ENABLE_OVERLOADING+ CollectionRefreshMethodInfo ,+#endif+ collectionRefresh ,+++-- ** search #method:search#++#if ENABLE_OVERLOADING+ CollectionSearchMethodInfo ,+#endif+ collectionSearch ,+++-- ** searchFinish #method:searchFinish#++#if ENABLE_OVERLOADING+ CollectionSearchFinishMethodInfo ,+#endif+ collectionSearchFinish ,+++-- ** searchSync #method:searchSync#++#if ENABLE_OVERLOADING+ CollectionSearchSyncMethodInfo ,+#endif+ collectionSearchSync ,+++-- ** setLabel #method:setLabel#++#if ENABLE_OVERLOADING+ CollectionSetLabelMethodInfo ,+#endif+ collectionSetLabel ,+++-- ** setLabelFinish #method:setLabelFinish#++#if ENABLE_OVERLOADING+ CollectionSetLabelFinishMethodInfo ,+#endif+ collectionSetLabelFinish ,+++-- ** setLabelSync #method:setLabelSync#++#if ENABLE_OVERLOADING+ CollectionSetLabelSyncMethodInfo ,+#endif+ collectionSetLabelSync ,+++++ -- * Properties+-- ** created #attr:created#+{- | The date and time (in seconds since the UNIX epoch) that this+collection was created.+-}+#if ENABLE_OVERLOADING+ CollectionCreatedPropertyInfo ,+#endif+#if ENABLE_OVERLOADING+ collectionCreated ,+#endif+ constructCollectionCreated ,+ getCollectionCreated ,+ setCollectionCreated ,+++-- ** label #attr:label#+{- | The human readable label for the collection.++Setting this property will result in the label of the collection being+set asynchronously. To properly track the changing of the label use the+'GI.Secret.Objects.Collection.collectionSetLabel' function.+-}+#if ENABLE_OVERLOADING+ CollectionLabelPropertyInfo ,+#endif+ clearCollectionLabel ,+#if ENABLE_OVERLOADING+ collectionLabel ,+#endif+ constructCollectionLabel ,+ getCollectionLabel ,+ setCollectionLabel ,+++-- ** locked #attr:locked#+{- | Whether the collection is locked or not.++To lock or unlock a collection use the 'GI.Secret.Objects.Service.serviceLock' or+'GI.Secret.Objects.Service.serviceUnlock' functions.+-}+#if ENABLE_OVERLOADING+ CollectionLockedPropertyInfo ,+#endif+#if ENABLE_OVERLOADING+ collectionLocked ,+#endif+ getCollectionLocked ,+++-- ** modified #attr:modified#+{- | The date and time (in seconds since the UNIX epoch) that this+collection was last modified.+-}+#if ENABLE_OVERLOADING+ CollectionModifiedPropertyInfo ,+#endif+#if ENABLE_OVERLOADING+ collectionModified ,+#endif+ constructCollectionModified ,+ getCollectionModified ,+ setCollectionModified ,+++-- ** service #attr:service#+{- | The 'GI.Secret.Objects.Service.Service' object that this collection is associated with and+uses to interact with the actual D-Bus Secret Service.+-}+#if ENABLE_OVERLOADING+ CollectionServicePropertyInfo ,+#endif+#if ENABLE_OVERLOADING+ collectionService ,+#endif+ constructCollectionService ,+ getCollectionService ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import qualified GI.GObject.Objects.Object as GObject.Object+import qualified GI.Gio.Callbacks as Gio.Callbacks+import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable+import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult+import qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface+import qualified GI.Gio.Interfaces.Initable as Gio.Initable+import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable+import qualified GI.Gio.Objects.DBusProxy as Gio.DBusProxy+import {-# SOURCE #-} qualified GI.Secret.Flags as Secret.Flags+import {-# SOURCE #-} qualified GI.Secret.Objects.Item as Secret.Item+import {-# SOURCE #-} qualified GI.Secret.Objects.Service as Secret.Service+import {-# SOURCE #-} qualified GI.Secret.Structs.Schema as Secret.Schema++-- | Memory-managed wrapper type.+newtype Collection = Collection (ManagedPtr Collection)+foreign import ccall "secret_collection_get_type"+ c_secret_collection_get_type :: IO GType++instance GObject Collection where+ gobjectType = c_secret_collection_get_type+ ++-- | Type class for types which can be safely cast to `Collection`, for instance with `toCollection`.+class (GObject o, O.IsDescendantOf Collection o) => IsCollection o+instance (GObject o, O.IsDescendantOf Collection o) => IsCollection o++instance O.HasParentTypes Collection+type instance O.ParentTypes Collection = '[Gio.DBusProxy.DBusProxy, GObject.Object.Object, Gio.AsyncInitable.AsyncInitable, Gio.DBusInterface.DBusInterface, Gio.Initable.Initable]++-- | Cast to `Collection`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.+toCollection :: (MonadIO m, IsCollection o) => o -> m Collection+toCollection = liftIO . unsafeCastTo Collection++-- | A convenience alias for `Nothing` :: `Maybe` `Collection`.+noCollection :: Maybe Collection+noCollection = Nothing++#if ENABLE_OVERLOADING+type family ResolveCollectionMethod (t :: Symbol) (o :: *) :: * where+ ResolveCollectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo+ ResolveCollectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo+ ResolveCollectionMethod "call" o = Gio.DBusProxy.DBusProxyCallMethodInfo+ ResolveCollectionMethod "callFinish" o = Gio.DBusProxy.DBusProxyCallFinishMethodInfo+ ResolveCollectionMethod "callSync" o = Gio.DBusProxy.DBusProxyCallSyncMethodInfo+ ResolveCollectionMethod "callWithUnixFdList" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListMethodInfo+ ResolveCollectionMethod "callWithUnixFdListFinish" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListFinishMethodInfo+ ResolveCollectionMethod "callWithUnixFdListSync" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListSyncMethodInfo+ ResolveCollectionMethod "delete" o = CollectionDeleteMethodInfo+ ResolveCollectionMethod "deleteFinish" o = CollectionDeleteFinishMethodInfo+ ResolveCollectionMethod "deleteSync" o = CollectionDeleteSyncMethodInfo+ ResolveCollectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo+ ResolveCollectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo+ ResolveCollectionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo+ ResolveCollectionMethod "init" o = Gio.Initable.InitableInitMethodInfo+ ResolveCollectionMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo+ ResolveCollectionMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo+ ResolveCollectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo+ ResolveCollectionMethod "loadItems" o = CollectionLoadItemsMethodInfo+ ResolveCollectionMethod "loadItemsFinish" o = CollectionLoadItemsFinishMethodInfo+ ResolveCollectionMethod "loadItemsSync" o = CollectionLoadItemsSyncMethodInfo+ ResolveCollectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo+ ResolveCollectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo+ ResolveCollectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo+ ResolveCollectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo+ ResolveCollectionMethod "refresh" o = CollectionRefreshMethodInfo+ ResolveCollectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo+ ResolveCollectionMethod "search" o = CollectionSearchMethodInfo+ ResolveCollectionMethod "searchFinish" o = CollectionSearchFinishMethodInfo+ ResolveCollectionMethod "searchSync" o = CollectionSearchSyncMethodInfo+ ResolveCollectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo+ ResolveCollectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo+ ResolveCollectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo+ ResolveCollectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo+ ResolveCollectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo+ ResolveCollectionMethod "getCachedProperty" o = Gio.DBusProxy.DBusProxyGetCachedPropertyMethodInfo+ ResolveCollectionMethod "getCachedPropertyNames" o = Gio.DBusProxy.DBusProxyGetCachedPropertyNamesMethodInfo+ ResolveCollectionMethod "getConnection" o = Gio.DBusProxy.DBusProxyGetConnectionMethodInfo+ ResolveCollectionMethod "getCreated" o = CollectionGetCreatedMethodInfo+ ResolveCollectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo+ ResolveCollectionMethod "getDefaultTimeout" o = Gio.DBusProxy.DBusProxyGetDefaultTimeoutMethodInfo+ ResolveCollectionMethod "getFlags" o = CollectionGetFlagsMethodInfo+ ResolveCollectionMethod "getInfo" o = Gio.DBusInterface.DBusInterfaceGetInfoMethodInfo+ ResolveCollectionMethod "getInterfaceInfo" o = Gio.DBusProxy.DBusProxyGetInterfaceInfoMethodInfo+ ResolveCollectionMethod "getInterfaceName" o = Gio.DBusProxy.DBusProxyGetInterfaceNameMethodInfo+ ResolveCollectionMethod "getItems" o = CollectionGetItemsMethodInfo+ ResolveCollectionMethod "getLabel" o = CollectionGetLabelMethodInfo+ ResolveCollectionMethod "getLocked" o = CollectionGetLockedMethodInfo+ ResolveCollectionMethod "getModified" o = CollectionGetModifiedMethodInfo+ ResolveCollectionMethod "getName" o = Gio.DBusProxy.DBusProxyGetNameMethodInfo+ ResolveCollectionMethod "getNameOwner" o = Gio.DBusProxy.DBusProxyGetNameOwnerMethodInfo+ ResolveCollectionMethod "getObject" o = Gio.DBusInterface.DBusInterfaceGetObjectMethodInfo+ ResolveCollectionMethod "getObjectPath" o = Gio.DBusProxy.DBusProxyGetObjectPathMethodInfo+ ResolveCollectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo+ ResolveCollectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo+ ResolveCollectionMethod "getService" o = CollectionGetServiceMethodInfo+ ResolveCollectionMethod "setCachedProperty" o = Gio.DBusProxy.DBusProxySetCachedPropertyMethodInfo+ ResolveCollectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo+ ResolveCollectionMethod "setDefaultTimeout" o = Gio.DBusProxy.DBusProxySetDefaultTimeoutMethodInfo+ ResolveCollectionMethod "setInterfaceInfo" o = Gio.DBusProxy.DBusProxySetInterfaceInfoMethodInfo+ ResolveCollectionMethod "setLabel" o = CollectionSetLabelMethodInfo+ ResolveCollectionMethod "setLabelFinish" o = CollectionSetLabelFinishMethodInfo+ ResolveCollectionMethod "setLabelSync" o = CollectionSetLabelSyncMethodInfo+ ResolveCollectionMethod "setObject" o = Gio.DBusInterface.DBusInterfaceSetObjectMethodInfo+ ResolveCollectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo+ ResolveCollectionMethod l o = O.MethodResolutionFailed l o++instance (info ~ ResolveCollectionMethod t Collection, O.MethodInfo info Collection p) => OL.IsLabel t (Collection -> p) where+#if MIN_VERSION_base(4,10,0)+ fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#else+ fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#endif++#endif++-- VVV Prop "created"+ -- Type: TBasicType TUInt64+ -- Flags: [PropertyReadable,PropertyWritable]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@created@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' collection #created+@+-}+getCollectionCreated :: (MonadIO m, IsCollection o) => o -> m Word64+getCollectionCreated obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "created"++{- |+Set the value of the “@created@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' collection [ #created 'Data.GI.Base.Attributes.:=' value ]+@+-}+setCollectionCreated :: (MonadIO m, IsCollection o) => o -> Word64 -> m ()+setCollectionCreated obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "created" val++{- |+Construct a `GValueConstruct` with valid value for the “@created@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructCollectionCreated :: (IsCollection o) => Word64 -> IO (GValueConstruct o)+constructCollectionCreated val = B.Properties.constructObjectPropertyUInt64 "created" val++#if ENABLE_OVERLOADING+data CollectionCreatedPropertyInfo+instance AttrInfo CollectionCreatedPropertyInfo where+ type AttrAllowedOps CollectionCreatedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]+ type AttrSetTypeConstraint CollectionCreatedPropertyInfo = (~) Word64+ type AttrBaseTypeConstraint CollectionCreatedPropertyInfo = IsCollection+ type AttrGetType CollectionCreatedPropertyInfo = Word64+ type AttrLabel CollectionCreatedPropertyInfo = "created"+ type AttrOrigin CollectionCreatedPropertyInfo = Collection+ attrGet _ = getCollectionCreated+ attrSet _ = setCollectionCreated+ attrConstruct _ = constructCollectionCreated+ attrClear _ = undefined+#endif++-- VVV Prop "label"+ -- Type: TBasicType TUTF8+ -- Flags: [PropertyReadable,PropertyWritable]+ -- Nullable: (Nothing,Nothing)++{- |+Get the value of the “@label@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' collection #label+@+-}+getCollectionLabel :: (MonadIO m, IsCollection o) => o -> m (Maybe T.Text)+getCollectionLabel obj = liftIO $ B.Properties.getObjectPropertyString obj "label"++{- |+Set the value of the “@label@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' collection [ #label 'Data.GI.Base.Attributes.:=' value ]+@+-}+setCollectionLabel :: (MonadIO m, IsCollection o) => o -> T.Text -> m ()+setCollectionLabel obj val = liftIO $ B.Properties.setObjectPropertyString obj "label" (Just val)++{- |+Construct a `GValueConstruct` with valid value for the “@label@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructCollectionLabel :: (IsCollection o) => T.Text -> IO (GValueConstruct o)+constructCollectionLabel val = B.Properties.constructObjectPropertyString "label" (Just val)++{- |+Set the value of the “@label@” property to `Nothing`.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.clear' #label+@+-}+clearCollectionLabel :: (MonadIO m, IsCollection o) => o -> m ()+clearCollectionLabel obj = liftIO $ B.Properties.setObjectPropertyString obj "label" (Nothing :: Maybe T.Text)++#if ENABLE_OVERLOADING+data CollectionLabelPropertyInfo+instance AttrInfo CollectionLabelPropertyInfo where+ type AttrAllowedOps CollectionLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]+ type AttrSetTypeConstraint CollectionLabelPropertyInfo = (~) T.Text+ type AttrBaseTypeConstraint CollectionLabelPropertyInfo = IsCollection+ type AttrGetType CollectionLabelPropertyInfo = (Maybe T.Text)+ type AttrLabel CollectionLabelPropertyInfo = "label"+ type AttrOrigin CollectionLabelPropertyInfo = Collection+ attrGet _ = getCollectionLabel+ attrSet _ = setCollectionLabel+ attrConstruct _ = constructCollectionLabel+ attrClear _ = clearCollectionLabel+#endif++-- VVV Prop "locked"+ -- Type: TBasicType TBoolean+ -- Flags: [PropertyReadable]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@locked@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' collection #locked+@+-}+getCollectionLocked :: (MonadIO m, IsCollection o) => o -> m Bool+getCollectionLocked obj = liftIO $ B.Properties.getObjectPropertyBool obj "locked"++#if ENABLE_OVERLOADING+data CollectionLockedPropertyInfo+instance AttrInfo CollectionLockedPropertyInfo where+ type AttrAllowedOps CollectionLockedPropertyInfo = '[ 'AttrGet]+ type AttrSetTypeConstraint CollectionLockedPropertyInfo = (~) ()+ type AttrBaseTypeConstraint CollectionLockedPropertyInfo = IsCollection+ type AttrGetType CollectionLockedPropertyInfo = Bool+ type AttrLabel CollectionLockedPropertyInfo = "locked"+ type AttrOrigin CollectionLockedPropertyInfo = Collection+ attrGet _ = getCollectionLocked+ attrSet _ = undefined+ attrConstruct _ = undefined+ attrClear _ = undefined+#endif++-- VVV Prop "modified"+ -- Type: TBasicType TUInt64+ -- Flags: [PropertyReadable,PropertyWritable]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@modified@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' collection #modified+@+-}+getCollectionModified :: (MonadIO m, IsCollection o) => o -> m Word64+getCollectionModified obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "modified"++{- |+Set the value of the “@modified@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' collection [ #modified 'Data.GI.Base.Attributes.:=' value ]+@+-}+setCollectionModified :: (MonadIO m, IsCollection o) => o -> Word64 -> m ()+setCollectionModified obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "modified" val++{- |+Construct a `GValueConstruct` with valid value for the “@modified@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructCollectionModified :: (IsCollection o) => Word64 -> IO (GValueConstruct o)+constructCollectionModified val = B.Properties.constructObjectPropertyUInt64 "modified" val++#if ENABLE_OVERLOADING+data CollectionModifiedPropertyInfo+instance AttrInfo CollectionModifiedPropertyInfo where+ type AttrAllowedOps CollectionModifiedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]+ type AttrSetTypeConstraint CollectionModifiedPropertyInfo = (~) Word64+ type AttrBaseTypeConstraint CollectionModifiedPropertyInfo = IsCollection+ type AttrGetType CollectionModifiedPropertyInfo = Word64+ type AttrLabel CollectionModifiedPropertyInfo = "modified"+ type AttrOrigin CollectionModifiedPropertyInfo = Collection+ attrGet _ = getCollectionModified+ attrSet _ = setCollectionModified+ attrConstruct _ = constructCollectionModified+ attrClear _ = undefined+#endif++-- VVV Prop "service"+ -- Type: TInterface (Name {namespace = "Secret", name = "Service"})+ -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@service@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' collection #service+@+-}+getCollectionService :: (MonadIO m, IsCollection o) => o -> m Secret.Service.Service+getCollectionService obj = liftIO $ checkUnexpectedNothing "getCollectionService" $ B.Properties.getObjectPropertyObject obj "service" Secret.Service.Service++{- |+Construct a `GValueConstruct` with valid value for the “@service@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructCollectionService :: (IsCollection o, Secret.Service.IsService a) => a -> IO (GValueConstruct o)+constructCollectionService val = B.Properties.constructObjectPropertyObject "service" (Just val)++#if ENABLE_OVERLOADING+data CollectionServicePropertyInfo+instance AttrInfo CollectionServicePropertyInfo where+ type AttrAllowedOps CollectionServicePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]+ type AttrSetTypeConstraint CollectionServicePropertyInfo = Secret.Service.IsService+ type AttrBaseTypeConstraint CollectionServicePropertyInfo = IsCollection+ type AttrGetType CollectionServicePropertyInfo = Secret.Service.Service+ type AttrLabel CollectionServicePropertyInfo = "service"+ type AttrOrigin CollectionServicePropertyInfo = Collection+ attrGet _ = getCollectionService+ attrSet _ = undefined+ attrConstruct _ = constructCollectionService+ attrClear _ = undefined+#endif++#if ENABLE_OVERLOADING+instance O.HasAttributeList Collection+type instance O.AttributeList Collection = CollectionAttributeList+type CollectionAttributeList = ('[ '("created", CollectionCreatedPropertyInfo), '("gBusType", Gio.DBusProxy.DBusProxyGBusTypePropertyInfo), '("gConnection", Gio.DBusProxy.DBusProxyGConnectionPropertyInfo), '("gDefaultTimeout", Gio.DBusProxy.DBusProxyGDefaultTimeoutPropertyInfo), '("gFlags", Gio.DBusProxy.DBusProxyGFlagsPropertyInfo), '("gInterfaceInfo", Gio.DBusProxy.DBusProxyGInterfaceInfoPropertyInfo), '("gInterfaceName", Gio.DBusProxy.DBusProxyGInterfaceNamePropertyInfo), '("gName", Gio.DBusProxy.DBusProxyGNamePropertyInfo), '("gNameOwner", Gio.DBusProxy.DBusProxyGNameOwnerPropertyInfo), '("gObjectPath", Gio.DBusProxy.DBusProxyGObjectPathPropertyInfo), '("label", CollectionLabelPropertyInfo), '("locked", CollectionLockedPropertyInfo), '("modified", CollectionModifiedPropertyInfo), '("service", CollectionServicePropertyInfo)] :: [(Symbol, *)])+#endif++#if ENABLE_OVERLOADING+collectionCreated :: AttrLabelProxy "created"+collectionCreated = AttrLabelProxy++collectionLabel :: AttrLabelProxy "label"+collectionLabel = AttrLabelProxy++collectionLocked :: AttrLabelProxy "locked"+collectionLocked = AttrLabelProxy++collectionModified :: AttrLabelProxy "modified"+collectionModified = AttrLabelProxy++collectionService :: AttrLabelProxy "service"+collectionService = AttrLabelProxy++#endif++#if ENABLE_OVERLOADING+type instance O.SignalList Collection = CollectionSignalList+type CollectionSignalList = ('[ '("gPropertiesChanged", Gio.DBusProxy.DBusProxyGPropertiesChangedSignalInfo), '("gSignal", Gio.DBusProxy.DBusProxyGSignalSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])++#endif++-- method Collection::delete+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_delete" secret_collection_delete :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Delete this collection.++This method returns immediately and completes asynchronously. The secret+service may prompt the user. 'GI.Secret.Objects.Service.servicePrompt' will be used to handle+any prompts that show up.+-}+collectionDelete ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a collection -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+collectionDelete self cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_collection_delete self' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data CollectionDeleteMethodInfo+instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionDeleteMethodInfo a signature where+ overloadedMethod _ = collectionDelete++#endif++-- method Collection::delete_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_delete_finish" secret_collection_delete_finish :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete operation to delete this collection.+-}+collectionDeleteFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: a collection -}+ -> b+ {- ^ /@result@/: asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionDeleteFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_collection_delete_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data CollectionDeleteFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo CollectionDeleteFinishMethodInfo a signature where+ overloadedMethod _ = collectionDeleteFinish++#endif++-- method Collection::delete_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_delete_sync" secret_collection_delete_sync :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Delete this collection.++This method may block indefinitely and should not be used in user+interface threads. The secret service may prompt the user.+'GI.Secret.Objects.Service.servicePrompt' will be used to handle any prompts that show up.+-}+collectionDeleteSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a collection -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionDeleteSync self cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_collection_delete_sync self' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data CollectionDeleteSyncMethodInfo+instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionDeleteSyncMethodInfo a signature where+ overloadedMethod _ = collectionDeleteSync++#endif++-- method Collection::get_created+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUInt64)+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_get_created" secret_collection_get_created :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO Word64++{- |+Get the created date and time of the collection. The return value is+the number of seconds since the unix epoch, January 1st 1970.+-}+collectionGetCreated ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: a collection -}+ -> m Word64+ {- ^ __Returns:__ the created date and time -}+collectionGetCreated self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_collection_get_created self'+ touchManagedPtr self+ return result++#if ENABLE_OVERLOADING+data CollectionGetCreatedMethodInfo+instance (signature ~ (m Word64), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetCreatedMethodInfo a signature where+ overloadedMethod _ = collectionGetCreated++#endif++-- method Collection::get_flags+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret collection proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "CollectionFlags"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_get_flags" secret_collection_get_flags :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO CUInt++{- |+Get the flags representing what features of the 'GI.Secret.Objects.Collection.Collection' proxy+have been initialized.++Use 'GI.Secret.Objects.Collection.collectionLoadItems' to initialize further features+and change the flags.+-}+collectionGetFlags ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: the secret collection proxy -}+ -> m [Secret.Flags.CollectionFlags]+ {- ^ __Returns:__ the flags for features initialized -}+collectionGetFlags self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_collection_get_flags self'+ let result' = wordToGFlags result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data CollectionGetFlagsMethodInfo+instance (signature ~ (m [Secret.Flags.CollectionFlags]), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetFlagsMethodInfo a signature where+ overloadedMethod _ = collectionGetFlags++#endif++-- method Collection::get_items+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TGList (TInterface (Name {namespace = "Secret", name = "Item"})))+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_get_items" secret_collection_get_items :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO (Ptr (GList (Ptr Secret.Item.Item)))++{- |+Get the list of items in this collection.+-}+collectionGetItems ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: a collection -}+ -> m [Secret.Item.Item]+ {- ^ __Returns:__ a list of items,+when done, the list should be freed with g_list_free, and each item should+be released with 'GI.GObject.Objects.Object.objectUnref' -}+collectionGetItems self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_collection_get_items self'+ result' <- unpackGList result+ result'' <- mapM (wrapObject Secret.Item.Item) result'+ g_list_free result+ touchManagedPtr self+ return result''++#if ENABLE_OVERLOADING+data CollectionGetItemsMethodInfo+instance (signature ~ (m [Secret.Item.Item]), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetItemsMethodInfo a signature where+ overloadedMethod _ = collectionGetItems++#endif++-- method Collection::get_label+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_get_label" secret_collection_get_label :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO CString++{- |+Get the label of this collection.+-}+collectionGetLabel ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: a collection -}+ -> m T.Text+ {- ^ __Returns:__ the label, which should be freed with 'GI.GLib.Functions.free' -}+collectionGetLabel self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_collection_get_label self'+ checkUnexpectedReturnNULL "collectionGetLabel" result+ result' <- cstringToText result+ freeMem result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data CollectionGetLabelMethodInfo+instance (signature ~ (m T.Text), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetLabelMethodInfo a signature where+ overloadedMethod _ = collectionGetLabel++#endif++-- method Collection::get_locked+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_get_locked" secret_collection_get_locked :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO CInt++{- |+Get whether the collection is locked or not.++Use 'GI.Secret.Objects.Service.serviceLock' or 'GI.Secret.Objects.Service.serviceUnlock' to lock or unlock the+collection.+-}+collectionGetLocked ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: a collection -}+ -> m Bool+ {- ^ __Returns:__ whether the collection is locked or not -}+collectionGetLocked self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_collection_get_locked self'+ let result' = (/= 0) result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data CollectionGetLockedMethodInfo+instance (signature ~ (m Bool), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetLockedMethodInfo a signature where+ overloadedMethod _ = collectionGetLocked++#endif++-- method Collection::get_modified+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUInt64)+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_get_modified" secret_collection_get_modified :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO Word64++{- |+Get the modified date and time of the collection. The return value is+the number of seconds since the unix epoch, January 1st 1970.+-}+collectionGetModified ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: a collection -}+ -> m Word64+ {- ^ __Returns:__ the modified date and time -}+collectionGetModified self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_collection_get_modified self'+ touchManagedPtr self+ return result++#if ENABLE_OVERLOADING+data CollectionGetModifiedMethodInfo+instance (signature ~ (m Word64), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetModifiedMethodInfo a signature where+ overloadedMethod _ = collectionGetModified++#endif++-- method Collection::get_service+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Service"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_get_service" secret_collection_get_service :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO (Ptr Secret.Service.Service)++{- |+Get the Secret Service object that this collection was created with.+-}+collectionGetService ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: a collection -}+ -> m Secret.Service.Service+ {- ^ __Returns:__ the Secret Service object -}+collectionGetService self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_collection_get_service self'+ checkUnexpectedReturnNULL "collectionGetService" result+ result' <- (newObject Secret.Service.Service) result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data CollectionGetServiceMethodInfo+instance (signature ~ (m Secret.Service.Service), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetServiceMethodInfo a signature where+ overloadedMethod _ = collectionGetService++#endif++-- method Collection::load_items+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_load_items" secret_collection_load_items :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Ensure that the 'GI.Secret.Objects.Collection.Collection' proxy has loaded all the items present+in the Secret Service. This affects the result of+'GI.Secret.Objects.Collection.collectionGetItems'.++For collections returned from 'GI.Secret.Objects.Service.serviceGetCollections' the items+will have already been loaded.++This method will return immediately and complete asynchronously.+-}+collectionLoadItems ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: the secret collection -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+collectionLoadItems self cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_collection_load_items self' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data CollectionLoadItemsMethodInfo+instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionLoadItemsMethodInfo a signature where+ overloadedMethod _ = collectionLoadItems++#endif++-- method Collection::load_items_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_load_items_finish" secret_collection_load_items_finish :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete an asynchronous operation to ensure that the 'GI.Secret.Objects.Collection.Collection' proxy+has loaded all the items present in the Secret Service.+-}+collectionLoadItemsFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: the secret collection -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionLoadItemsFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_collection_load_items_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data CollectionLoadItemsFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo CollectionLoadItemsFinishMethodInfo a signature where+ overloadedMethod _ = collectionLoadItemsFinish++#endif++-- method Collection::load_items_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_load_items_sync" secret_collection_load_items_sync :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Ensure that the 'GI.Secret.Objects.Collection.Collection' proxy has loaded all the items present+in the Secret Service. This affects the result of+'GI.Secret.Objects.Collection.collectionGetItems'.++For collections returned from 'GI.Secret.Objects.Service.serviceGetCollections' the items+will have already been loaded.++This method may block indefinitely and should not be used in user interface+threads.+-}+collectionLoadItemsSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: the secret collection -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionLoadItemsSync self cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_collection_load_items_sync self' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data CollectionLoadItemsSyncMethodInfo+instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionLoadItemsSyncMethodInfo a signature where+ overloadedMethod _ = collectionLoadItemsSync++#endif++-- method Collection::refresh+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_refresh" secret_collection_refresh :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ IO ()++{- |+Refresh the properties on this collection. This fires off a request to+refresh, and the properties will be updated later.++Calling this method is not normally necessary, as the secret service+will notify the client when properties change.+-}+collectionRefresh ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>+ a+ {- ^ /@self@/: the collection -}+ -> m ()+collectionRefresh self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ secret_collection_refresh self'+ touchManagedPtr self+ return ()++#if ENABLE_OVERLOADING+data CollectionRefreshMethodInfo+instance (signature ~ (m ()), MonadIO m, IsCollection a) => O.MethodInfo CollectionRefreshMethodInfo a signature where+ overloadedMethod _ = collectionRefresh++#endif++-- method Collection::search+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a secret collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search for items matching these attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "SearchFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search option flags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 6, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_search" secret_collection_search :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "SearchFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Search for items matching the /@attributes@/ in the /@collection@/.+The /@attributes@/ should be a table of string keys and string values.++If 'GI.Secret.Flags.SearchFlagsAll' is set in /@flags@/, then all the items matching the+search will be returned. Otherwise only the first item will be returned.+This is almost always the unlocked item that was most recently stored.++If 'GI.Secret.Flags.SearchFlagsUnlock' is set in /@flags@/, then items will be unlocked+if necessary. In either case, locked and unlocked items will match the+search and be returned. If the unlock fails, the search does not fail.++If 'GI.Secret.Flags.SearchFlagsLoadSecrets' is set in /@flags@/, then the items will have+their secret values loaded and available via 'GI.Secret.Objects.Item.itemGetSecret'.++This function returns immediately and completes asynchronously.+-}+collectionSearch ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a secret collection -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: search for items matching these attributes -}+ -> [Secret.Flags.SearchFlags]+ {- ^ /@flags@/: search option flags -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+collectionSearch self schema attributes flags cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_collection_search self' maybeSchema attributes'''''' flags' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()++#if ENABLE_OVERLOADING+data CollectionSearchMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> [Secret.Flags.SearchFlags] -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionSearchMethodInfo a signature where+ overloadedMethod _ = collectionSearch++#endif++-- method Collection::search_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TGList (TInterface (Name {namespace = "Secret", name = "Item"})))+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_search_finish" secret_collection_search_finish :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr (GList (Ptr Secret.Item.Item)))++{- |+Complete asynchronous operation to search for items in a collection.+-}+collectionSearchFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: the secret collection -}+ -> b+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m [Secret.Item.Item]+ {- ^ __Returns:__ + a list of items that matched the search /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionSearchFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_collection_search_finish self' result_'+ result' <- unpackGList result+ result'' <- mapM (wrapObject Secret.Item.Item) result'+ g_list_free result+ touchManagedPtr self+ touchManagedPtr result_+ return result''+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data CollectionSearchFinishMethodInfo+instance (signature ~ (b -> m [Secret.Item.Item]), MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo CollectionSearchFinishMethodInfo a signature where+ overloadedMethod _ = collectionSearchFinish++#endif++-- method Collection::search_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a secret collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search for items matching these attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "SearchFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search option flags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TGList (TInterface (Name {namespace = "Secret", name = "Item"})))+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_search_sync" secret_collection_search_sync :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "SearchFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr (GList (Ptr Secret.Item.Item)))++{- |+Search for items matching the /@attributes@/ in the /@collection@/.+The /@attributes@/ should be a table of string keys and string values.++If 'GI.Secret.Flags.SearchFlagsAll' is set in /@flags@/, then all the items matching the+search will be returned. Otherwise only the first item will be returned.+This is almost always the unlocked item that was most recently stored.++If 'GI.Secret.Flags.SearchFlagsUnlock' is set in /@flags@/, then items will be unlocked+if necessary. In either case, locked and unlocked items will match the+search and be returned. If the unlock fails, the search does not fail.++If 'GI.Secret.Flags.SearchFlagsLoadSecrets' is set in /@flags@/, then the items will have+their secret values loaded and available via 'GI.Secret.Objects.Item.itemGetSecret'.++This function may block indefinitely. Use the asynchronous version+in user interface threads.+-}+collectionSearchSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a secret collection -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: search for items matching these attributes -}+ -> [Secret.Flags.SearchFlags]+ {- ^ /@flags@/: search option flags -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m [Secret.Item.Item]+ {- ^ __Returns:__ + a list of items that matched the search /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionSearchSync self schema attributes flags cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_collection_search_sync self' maybeSchema attributes'''''' flags' maybeCancellable+ result' <- unpackGList result+ result'' <- mapM (wrapObject Secret.Item.Item) result'+ g_list_free result+ touchManagedPtr self+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return result''+ ) (do+ unrefGHashTable attributes''''''+ )++#if ENABLE_OVERLOADING+data CollectionSearchSyncMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> [Secret.Flags.SearchFlags] -> Maybe (b) -> m [Secret.Item.Item]), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionSearchSyncMethodInfo a signature where+ overloadedMethod _ = collectionSearchSync++#endif++-- method Collection::set_label+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new label", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_set_label" secret_collection_set_label :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ CString -> -- label : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Set the label of this collection.++This function returns immediately and completes asynchronously.+-}+collectionSetLabel ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a collection -}+ -> T.Text+ {- ^ /@label@/: a new label -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+collectionSetLabel self label cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ label' <- textToCString label+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_collection_set_label self' label' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ freeMem label'+ return ()++#if ENABLE_OVERLOADING+data CollectionSetLabelMethodInfo+instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionSetLabelMethodInfo a signature where+ overloadedMethod _ = collectionSetLabel++#endif++-- method Collection::set_label_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_set_label_finish" secret_collection_set_label_finish :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete asynchronous operation to set the label of this collection.+-}+collectionSetLabelFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: a collection -}+ -> b+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionSetLabelFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_collection_set_label_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data CollectionSetLabelFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo CollectionSetLabelFinishMethodInfo a signature where+ overloadedMethod _ = collectionSetLabelFinish++#endif++-- method Collection::set_label_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new label", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_set_label_sync" secret_collection_set_label_sync :: + Ptr Collection -> -- self : TInterface (Name {namespace = "Secret", name = "Collection"})+ CString -> -- label : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Set the label of this collection.++This function may block indefinitely. Use the asynchronous version+in user interface threads.+-}+collectionSetLabelSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a collection -}+ -> T.Text+ {- ^ /@label@/: a new label -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionSetLabelSync self label cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ label' <- textToCString label+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_collection_set_label_sync self' label' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ freeMem label'+ return ()+ ) (do+ freeMem label'+ )++#if ENABLE_OVERLOADING+data CollectionSetLabelSyncMethodInfo+instance (signature ~ (T.Text -> Maybe (b) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionSetLabelSyncMethodInfo a signature where+ overloadedMethod _ = collectionSetLabelSync++#endif++-- method Collection::create+-- method type : MemberFunction+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a secret service object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the new collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "alias to assign to the collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "CollectionCreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "currently unused", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 6, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_create" secret_collection_create :: + Ptr Secret.Service.Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ CString -> -- label : TBasicType TUTF8+ CString -> -- alias : TBasicType TUTF8+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "CollectionCreateFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Create a new collection in the secret service.++This method returns immediately and completes asynchronously. The secret+service may prompt the user. 'GI.Secret.Objects.Service.servicePrompt' will be used to handle+any prompts that are required.++An /@alias@/ is a well-known tag for a collection, such as \'default\' (ie: the+default collection to store items in). This allows other applications to+easily identify and share a collection. If you specify an /@alias@/, and a+collection with that alias already exists, then a new collection will not+be created. The previous one will be returned instead.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.+-}+collectionCreate ::+ (B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>+ Maybe (a)+ {- ^ /@service@/: a secret service object -}+ -> T.Text+ {- ^ /@label@/: label for the new collection -}+ -> Maybe (T.Text)+ {- ^ /@alias@/: alias to assign to the collection -}+ -> [Secret.Flags.CollectionCreateFlags]+ {- ^ /@flags@/: currently unused -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+collectionCreate service label alias flags cancellable callback = liftIO $ do+ maybeService <- case service of+ Nothing -> return nullPtr+ Just jService -> do+ jService' <- unsafeManagedPtrCastPtr jService+ return jService'+ label' <- textToCString label+ maybeAlias <- case alias of+ Nothing -> return nullPtr+ Just jAlias -> do+ jAlias' <- textToCString jAlias+ return jAlias'+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_collection_create maybeService label' maybeAlias flags' maybeCancellable maybeCallback userData+ whenJust service touchManagedPtr+ whenJust cancellable touchManagedPtr+ freeMem label'+ freeMem maybeAlias+ return ()++#if ENABLE_OVERLOADING+#endif++-- method Collection::create_finish+-- method type : MemberFunction+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Collection"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_create_finish" secret_collection_create_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Collection)++{- |+Finish operation to create a new collection in the secret service.+-}+collectionCreateFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m Collection+ {- ^ __Returns:__ the new collection, which should be unreferenced+ with 'GI.GObject.Objects.Object.objectUnref' /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionCreateFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_collection_create_finish result_'+ checkUnexpectedReturnNULL "collectionCreateFinish" result+ result' <- (wrapObject Collection) result+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+#endif++-- method Collection::create_sync+-- method type : MemberFunction+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a secret service object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the new collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "alias to assign to the collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "CollectionCreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "currently unused", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Collection"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_create_sync" secret_collection_create_sync :: + Ptr Secret.Service.Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ CString -> -- label : TBasicType TUTF8+ CString -> -- alias : TBasicType TUTF8+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "CollectionCreateFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Collection)++{- |+Create a new collection in the secret service.++This method may block indefinitely and should not be used in user interface+threads. The secret service may prompt the user. 'GI.Secret.Objects.Service.servicePrompt'+will be used to handle any prompts that are required.++An /@alias@/ is a well-known tag for a collection, such as \'default\' (ie: the+default collection to store items in). This allows other applications to+easily identify and share a collection. If you specify an /@alias@/, and a+collection with that alias already exists, then a new collection will not+be created. The previous one will be returned instead.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.+-}+collectionCreateSync ::+ (B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>+ Maybe (a)+ {- ^ /@service@/: a secret service object -}+ -> T.Text+ {- ^ /@label@/: label for the new collection -}+ -> Maybe (T.Text)+ {- ^ /@alias@/: alias to assign to the collection -}+ -> [Secret.Flags.CollectionCreateFlags]+ {- ^ /@flags@/: currently unused -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m Collection+ {- ^ __Returns:__ the new collection, which should be unreferenced+ with 'GI.GObject.Objects.Object.objectUnref' /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionCreateSync service label alias flags cancellable = liftIO $ do+ maybeService <- case service of+ Nothing -> return nullPtr+ Just jService -> do+ jService' <- unsafeManagedPtrCastPtr jService+ return jService'+ label' <- textToCString label+ maybeAlias <- case alias of+ Nothing -> return nullPtr+ Just jAlias -> do+ jAlias' <- textToCString jAlias+ return jAlias'+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_collection_create_sync maybeService label' maybeAlias flags' maybeCancellable+ checkUnexpectedReturnNULL "collectionCreateSync" result+ result' <- (wrapObject Collection) result+ whenJust service touchManagedPtr+ whenJust cancellable touchManagedPtr+ freeMem label'+ freeMem maybeAlias+ return result'+ ) (do+ freeMem label'+ freeMem maybeAlias+ )++#if ENABLE_OVERLOADING+#endif++-- method Collection::for_alias+-- method type : MemberFunction+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a secret service object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the alias to lookup", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "CollectionFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "options for the collection initialization", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_collection_for_alias" secret_collection_for_alias :: + Ptr Secret.Service.Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ CString -> -- alias : TBasicType TUTF8+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "CollectionFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Lookup which collection is assigned to this alias. Aliases help determine+well known collections, such as \'default\'.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method will return immediately and complete asynchronously.+-}+collectionForAlias ::+ (B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>+ Maybe (a)+ {- ^ /@service@/: a secret service object -}+ -> T.Text+ {- ^ /@alias@/: the alias to lookup -}+ -> [Secret.Flags.CollectionFlags]+ {- ^ /@flags@/: options for the collection initialization -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+collectionForAlias service alias flags cancellable callback = liftIO $ do+ maybeService <- case service of+ Nothing -> return nullPtr+ Just jService -> do+ jService' <- unsafeManagedPtrCastPtr jService+ return jService'+ alias' <- textToCString alias+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_collection_for_alias maybeService alias' flags' maybeCancellable maybeCallback userData+ whenJust service touchManagedPtr+ whenJust cancellable touchManagedPtr+ freeMem alias'+ return ()++#if ENABLE_OVERLOADING+#endif++-- method Collection::for_alias_finish+-- method type : MemberFunction+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Collection"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_for_alias_finish" secret_collection_for_alias_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Collection)++{- |+Finish an asynchronous operation to lookup which collection is assigned+to an alias.+-}+collectionForAliasFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m Collection+ {- ^ __Returns:__ the collection, or 'Nothing' if none assigned to the alias /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionForAliasFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_collection_for_alias_finish result_'+ checkUnexpectedReturnNULL "collectionForAliasFinish" result+ result' <- (wrapObject Collection) result+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+#endif++-- method Collection::for_alias_sync+-- method type : MemberFunction+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a secret service object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the alias to lookup", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "CollectionFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "options for the collection initialization", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Collection"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_collection_for_alias_sync" secret_collection_for_alias_sync :: + Ptr Secret.Service.Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ CString -> -- alias : TBasicType TUTF8+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "CollectionFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Collection)++{- |+Lookup which collection is assigned to this alias. Aliases help determine+well known collections, such as \'default\'.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block and should not be used in user interface threads.+-}+collectionForAliasSync ::+ (B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>+ Maybe (a)+ {- ^ /@service@/: a secret service object -}+ -> T.Text+ {- ^ /@alias@/: the alias to lookup -}+ -> [Secret.Flags.CollectionFlags]+ {- ^ /@flags@/: options for the collection initialization -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m Collection+ {- ^ __Returns:__ the collection, or 'Nothing' if none assigned to the alias /(Can throw 'Data.GI.Base.GError.GError')/ -}+collectionForAliasSync service alias flags cancellable = liftIO $ do+ maybeService <- case service of+ Nothing -> return nullPtr+ Just jService -> do+ jService' <- unsafeManagedPtrCastPtr jService+ return jService'+ alias' <- textToCString alias+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_collection_for_alias_sync maybeService alias' flags' maybeCancellable+ checkUnexpectedReturnNULL "collectionForAliasSync" result+ result' <- (wrapObject Collection) result+ whenJust service touchManagedPtr+ whenJust cancellable touchManagedPtr+ freeMem alias'+ return result'+ ) (do+ freeMem alias'+ )++#if ENABLE_OVERLOADING+#endif++
+ GI/Secret/Objects/Collection.hs-boot view
@@ -0,0 +1,104 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Objects.Collection where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++newtype Collection = Collection (ManagedPtr Collection)+instance GObject Collection where+class (GObject o, O.IsDescendantOf Collection o) => IsCollection o+instance (GObject o, O.IsDescendantOf Collection o) => IsCollection o+instance O.HasParentTypes Collection+#if ENABLE_OVERLOADING+data CollectionCreatedPropertyInfo+#endif+#if ENABLE_OVERLOADING+data CollectionLabelPropertyInfo+#endif+#if ENABLE_OVERLOADING+data CollectionLockedPropertyInfo+#endif+#if ENABLE_OVERLOADING+data CollectionModifiedPropertyInfo+#endif+#if ENABLE_OVERLOADING+data CollectionServicePropertyInfo+#endif+#if ENABLE_OVERLOADING+data CollectionDeleteMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionDeleteFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionDeleteSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionGetCreatedMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionGetFlagsMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionGetItemsMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionGetLabelMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionGetLockedMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionGetModifiedMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionGetServiceMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionLoadItemsMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionLoadItemsFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionLoadItemsSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionRefreshMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionSearchMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionSearchFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionSearchSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionSetLabelMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionSetLabelFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data CollectionSetLabelSyncMethodInfo+#endif
+ GI/Secret/Objects/Item.hs view
@@ -0,0 +1,2359 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)++A proxy object representing a secret item in the Secret Service.+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Objects.Item+ ( ++-- * Exported types+ Item(..) ,+ IsItem ,+ toItem ,+ noItem ,+++ -- * Methods+-- ** create #method:create#++ itemCreate ,+++-- ** createFinish #method:createFinish#++ itemCreateFinish ,+++-- ** createSync #method:createSync#++ itemCreateSync ,+++-- ** delete #method:delete#++#if ENABLE_OVERLOADING+ ItemDeleteMethodInfo ,+#endif+ itemDelete ,+++-- ** deleteFinish #method:deleteFinish#++#if ENABLE_OVERLOADING+ ItemDeleteFinishMethodInfo ,+#endif+ itemDeleteFinish ,+++-- ** deleteSync #method:deleteSync#++#if ENABLE_OVERLOADING+ ItemDeleteSyncMethodInfo ,+#endif+ itemDeleteSync ,+++-- ** getAttributes #method:getAttributes#++#if ENABLE_OVERLOADING+ ItemGetAttributesMethodInfo ,+#endif+ itemGetAttributes ,+++-- ** getCreated #method:getCreated#++#if ENABLE_OVERLOADING+ ItemGetCreatedMethodInfo ,+#endif+ itemGetCreated ,+++-- ** getFlags #method:getFlags#++#if ENABLE_OVERLOADING+ ItemGetFlagsMethodInfo ,+#endif+ itemGetFlags ,+++-- ** getLabel #method:getLabel#++#if ENABLE_OVERLOADING+ ItemGetLabelMethodInfo ,+#endif+ itemGetLabel ,+++-- ** getLocked #method:getLocked#++#if ENABLE_OVERLOADING+ ItemGetLockedMethodInfo ,+#endif+ itemGetLocked ,+++-- ** getModified #method:getModified#++#if ENABLE_OVERLOADING+ ItemGetModifiedMethodInfo ,+#endif+ itemGetModified ,+++-- ** getSchemaName #method:getSchemaName#++#if ENABLE_OVERLOADING+ ItemGetSchemaNameMethodInfo ,+#endif+ itemGetSchemaName ,+++-- ** getSecret #method:getSecret#++#if ENABLE_OVERLOADING+ ItemGetSecretMethodInfo ,+#endif+ itemGetSecret ,+++-- ** getService #method:getService#++#if ENABLE_OVERLOADING+ ItemGetServiceMethodInfo ,+#endif+ itemGetService ,+++-- ** loadSecret #method:loadSecret#++#if ENABLE_OVERLOADING+ ItemLoadSecretMethodInfo ,+#endif+ itemLoadSecret ,+++-- ** loadSecretFinish #method:loadSecretFinish#++#if ENABLE_OVERLOADING+ ItemLoadSecretFinishMethodInfo ,+#endif+ itemLoadSecretFinish ,+++-- ** loadSecretSync #method:loadSecretSync#++#if ENABLE_OVERLOADING+ ItemLoadSecretSyncMethodInfo ,+#endif+ itemLoadSecretSync ,+++-- ** loadSecrets #method:loadSecrets#++ itemLoadSecrets ,+++-- ** loadSecretsFinish #method:loadSecretsFinish#++ itemLoadSecretsFinish ,+++-- ** loadSecretsSync #method:loadSecretsSync#++ itemLoadSecretsSync ,+++-- ** refresh #method:refresh#++#if ENABLE_OVERLOADING+ ItemRefreshMethodInfo ,+#endif+ itemRefresh ,+++-- ** setAttributes #method:setAttributes#++#if ENABLE_OVERLOADING+ ItemSetAttributesMethodInfo ,+#endif+ itemSetAttributes ,+++-- ** setAttributesFinish #method:setAttributesFinish#++#if ENABLE_OVERLOADING+ ItemSetAttributesFinishMethodInfo ,+#endif+ itemSetAttributesFinish ,+++-- ** setAttributesSync #method:setAttributesSync#++#if ENABLE_OVERLOADING+ ItemSetAttributesSyncMethodInfo ,+#endif+ itemSetAttributesSync ,+++-- ** setLabel #method:setLabel#++#if ENABLE_OVERLOADING+ ItemSetLabelMethodInfo ,+#endif+ itemSetLabel ,+++-- ** setLabelFinish #method:setLabelFinish#++#if ENABLE_OVERLOADING+ ItemSetLabelFinishMethodInfo ,+#endif+ itemSetLabelFinish ,+++-- ** setLabelSync #method:setLabelSync#++#if ENABLE_OVERLOADING+ ItemSetLabelSyncMethodInfo ,+#endif+ itemSetLabelSync ,+++-- ** setSecret #method:setSecret#++#if ENABLE_OVERLOADING+ ItemSetSecretMethodInfo ,+#endif+ itemSetSecret ,+++-- ** setSecretFinish #method:setSecretFinish#++#if ENABLE_OVERLOADING+ ItemSetSecretFinishMethodInfo ,+#endif+ itemSetSecretFinish ,+++-- ** setSecretSync #method:setSecretSync#++#if ENABLE_OVERLOADING+ ItemSetSecretSyncMethodInfo ,+#endif+ itemSetSecretSync ,+++++ -- * Properties+-- ** attributes #attr:attributes#++#if ENABLE_OVERLOADING+ ItemAttributesPropertyInfo ,+#endif+#if ENABLE_OVERLOADING+ itemAttributes ,+#endif+++-- ** created #attr:created#+{- | The date and time (in seconds since the UNIX epoch) that this+item was created.+-}+#if ENABLE_OVERLOADING+ ItemCreatedPropertyInfo ,+#endif+ constructItemCreated ,+ getItemCreated ,+#if ENABLE_OVERLOADING+ itemCreated ,+#endif+ setItemCreated ,+++-- ** label #attr:label#+{- | The human readable label for the item.++Setting this property will result in the label of the item being+set asynchronously. To properly track the changing of the label use the+'GI.Secret.Objects.Item.itemSetLabel' function.+-}+#if ENABLE_OVERLOADING+ ItemLabelPropertyInfo ,+#endif+ clearItemLabel ,+ constructItemLabel ,+ getItemLabel ,+#if ENABLE_OVERLOADING+ itemLabel ,+#endif+ setItemLabel ,+++-- ** locked #attr:locked#+{- | Whether the item is locked or not. An item may not be independently+lockable separate from other items in its collection.++To lock or unlock a item use the 'GI.Secret.Objects.Service.serviceLock' or+'GI.Secret.Objects.Service.serviceUnlock' functions.+-}+#if ENABLE_OVERLOADING+ ItemLockedPropertyInfo ,+#endif+ getItemLocked ,+#if ENABLE_OVERLOADING+ itemLocked ,+#endif+++-- ** modified #attr:modified#+{- | The date and time (in seconds since the UNIX epoch) that this+item was last modified.+-}+#if ENABLE_OVERLOADING+ ItemModifiedPropertyInfo ,+#endif+ constructItemModified ,+ getItemModified ,+#if ENABLE_OVERLOADING+ itemModified ,+#endif+ setItemModified ,+++-- ** service #attr:service#+{- | The 'GI.Secret.Objects.Service.Service' object that this item is associated with and+uses to interact with the actual D-Bus Secret Service.+-}+#if ENABLE_OVERLOADING+ ItemServicePropertyInfo ,+#endif+ constructItemService ,+ getItemService ,+#if ENABLE_OVERLOADING+ itemService ,+#endif+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import qualified GI.GObject.Objects.Object as GObject.Object+import qualified GI.Gio.Callbacks as Gio.Callbacks+import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable+import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult+import qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface+import qualified GI.Gio.Interfaces.Initable as Gio.Initable+import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable+import qualified GI.Gio.Objects.DBusProxy as Gio.DBusProxy+import {-# SOURCE #-} qualified GI.Secret.Flags as Secret.Flags+import {-# SOURCE #-} qualified GI.Secret.Objects.Collection as Secret.Collection+import {-# SOURCE #-} qualified GI.Secret.Objects.Service as Secret.Service+import {-# SOURCE #-} qualified GI.Secret.Structs.Schema as Secret.Schema+import {-# SOURCE #-} qualified GI.Secret.Structs.Value as Secret.Value++-- | Memory-managed wrapper type.+newtype Item = Item (ManagedPtr Item)+foreign import ccall "secret_item_get_type"+ c_secret_item_get_type :: IO GType++instance GObject Item where+ gobjectType = c_secret_item_get_type+ ++-- | Type class for types which can be safely cast to `Item`, for instance with `toItem`.+class (GObject o, O.IsDescendantOf Item o) => IsItem o+instance (GObject o, O.IsDescendantOf Item o) => IsItem o++instance O.HasParentTypes Item+type instance O.ParentTypes Item = '[Gio.DBusProxy.DBusProxy, GObject.Object.Object, Gio.AsyncInitable.AsyncInitable, Gio.DBusInterface.DBusInterface, Gio.Initable.Initable]++-- | Cast to `Item`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.+toItem :: (MonadIO m, IsItem o) => o -> m Item+toItem = liftIO . unsafeCastTo Item++-- | A convenience alias for `Nothing` :: `Maybe` `Item`.+noItem :: Maybe Item+noItem = Nothing++#if ENABLE_OVERLOADING+type family ResolveItemMethod (t :: Symbol) (o :: *) :: * where+ ResolveItemMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo+ ResolveItemMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo+ ResolveItemMethod "call" o = Gio.DBusProxy.DBusProxyCallMethodInfo+ ResolveItemMethod "callFinish" o = Gio.DBusProxy.DBusProxyCallFinishMethodInfo+ ResolveItemMethod "callSync" o = Gio.DBusProxy.DBusProxyCallSyncMethodInfo+ ResolveItemMethod "callWithUnixFdList" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListMethodInfo+ ResolveItemMethod "callWithUnixFdListFinish" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListFinishMethodInfo+ ResolveItemMethod "callWithUnixFdListSync" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListSyncMethodInfo+ ResolveItemMethod "delete" o = ItemDeleteMethodInfo+ ResolveItemMethod "deleteFinish" o = ItemDeleteFinishMethodInfo+ ResolveItemMethod "deleteSync" o = ItemDeleteSyncMethodInfo+ ResolveItemMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo+ ResolveItemMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo+ ResolveItemMethod "getv" o = GObject.Object.ObjectGetvMethodInfo+ ResolveItemMethod "init" o = Gio.Initable.InitableInitMethodInfo+ ResolveItemMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo+ ResolveItemMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo+ ResolveItemMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo+ ResolveItemMethod "loadSecret" o = ItemLoadSecretMethodInfo+ ResolveItemMethod "loadSecretFinish" o = ItemLoadSecretFinishMethodInfo+ ResolveItemMethod "loadSecretSync" o = ItemLoadSecretSyncMethodInfo+ ResolveItemMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo+ ResolveItemMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo+ ResolveItemMethod "ref" o = GObject.Object.ObjectRefMethodInfo+ ResolveItemMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo+ ResolveItemMethod "refresh" o = ItemRefreshMethodInfo+ ResolveItemMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo+ ResolveItemMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo+ ResolveItemMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo+ ResolveItemMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo+ ResolveItemMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo+ ResolveItemMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo+ ResolveItemMethod "getAttributes" o = ItemGetAttributesMethodInfo+ ResolveItemMethod "getCachedProperty" o = Gio.DBusProxy.DBusProxyGetCachedPropertyMethodInfo+ ResolveItemMethod "getCachedPropertyNames" o = Gio.DBusProxy.DBusProxyGetCachedPropertyNamesMethodInfo+ ResolveItemMethod "getConnection" o = Gio.DBusProxy.DBusProxyGetConnectionMethodInfo+ ResolveItemMethod "getCreated" o = ItemGetCreatedMethodInfo+ ResolveItemMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo+ ResolveItemMethod "getDefaultTimeout" o = Gio.DBusProxy.DBusProxyGetDefaultTimeoutMethodInfo+ ResolveItemMethod "getFlags" o = ItemGetFlagsMethodInfo+ ResolveItemMethod "getInfo" o = Gio.DBusInterface.DBusInterfaceGetInfoMethodInfo+ ResolveItemMethod "getInterfaceInfo" o = Gio.DBusProxy.DBusProxyGetInterfaceInfoMethodInfo+ ResolveItemMethod "getInterfaceName" o = Gio.DBusProxy.DBusProxyGetInterfaceNameMethodInfo+ ResolveItemMethod "getLabel" o = ItemGetLabelMethodInfo+ ResolveItemMethod "getLocked" o = ItemGetLockedMethodInfo+ ResolveItemMethod "getModified" o = ItemGetModifiedMethodInfo+ ResolveItemMethod "getName" o = Gio.DBusProxy.DBusProxyGetNameMethodInfo+ ResolveItemMethod "getNameOwner" o = Gio.DBusProxy.DBusProxyGetNameOwnerMethodInfo+ ResolveItemMethod "getObject" o = Gio.DBusInterface.DBusInterfaceGetObjectMethodInfo+ ResolveItemMethod "getObjectPath" o = Gio.DBusProxy.DBusProxyGetObjectPathMethodInfo+ ResolveItemMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo+ ResolveItemMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo+ ResolveItemMethod "getSchemaName" o = ItemGetSchemaNameMethodInfo+ ResolveItemMethod "getSecret" o = ItemGetSecretMethodInfo+ ResolveItemMethod "getService" o = ItemGetServiceMethodInfo+ ResolveItemMethod "setAttributes" o = ItemSetAttributesMethodInfo+ ResolveItemMethod "setAttributesFinish" o = ItemSetAttributesFinishMethodInfo+ ResolveItemMethod "setAttributesSync" o = ItemSetAttributesSyncMethodInfo+ ResolveItemMethod "setCachedProperty" o = Gio.DBusProxy.DBusProxySetCachedPropertyMethodInfo+ ResolveItemMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo+ ResolveItemMethod "setDefaultTimeout" o = Gio.DBusProxy.DBusProxySetDefaultTimeoutMethodInfo+ ResolveItemMethod "setInterfaceInfo" o = Gio.DBusProxy.DBusProxySetInterfaceInfoMethodInfo+ ResolveItemMethod "setLabel" o = ItemSetLabelMethodInfo+ ResolveItemMethod "setLabelFinish" o = ItemSetLabelFinishMethodInfo+ ResolveItemMethod "setLabelSync" o = ItemSetLabelSyncMethodInfo+ ResolveItemMethod "setObject" o = Gio.DBusInterface.DBusInterfaceSetObjectMethodInfo+ ResolveItemMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo+ ResolveItemMethod "setSecret" o = ItemSetSecretMethodInfo+ ResolveItemMethod "setSecretFinish" o = ItemSetSecretFinishMethodInfo+ ResolveItemMethod "setSecretSync" o = ItemSetSecretSyncMethodInfo+ ResolveItemMethod l o = O.MethodResolutionFailed l o++instance (info ~ ResolveItemMethod t Item, O.MethodInfo info Item p) => OL.IsLabel t (Item -> p) where+#if MIN_VERSION_base(4,10,0)+ fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#else+ fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#endif++#endif++-- XXX Generation of property "attributes" of object "Item" failed: Not implemented: "Property ItemAttributes has unsupported transfer type TransferEverything"+#if ENABLE_OVERLOADING+-- XXX Placeholder+data ItemAttributesPropertyInfo+instance AttrInfo ItemAttributesPropertyInfo where+ type AttrAllowedOps ItemAttributesPropertyInfo = '[]+ type AttrSetTypeConstraint ItemAttributesPropertyInfo = (~) ()+ type AttrBaseTypeConstraint ItemAttributesPropertyInfo = (~) ()+ type AttrGetType ItemAttributesPropertyInfo = ()+ type AttrLabel ItemAttributesPropertyInfo = ""+ type AttrOrigin ItemAttributesPropertyInfo = Item+ attrGet = undefined+ attrSet = undefined+ attrConstruct = undefined+ attrClear = undefined+#endif++-- VVV Prop "created"+ -- Type: TBasicType TUInt64+ -- Flags: [PropertyReadable,PropertyWritable]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@created@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' item #created+@+-}+getItemCreated :: (MonadIO m, IsItem o) => o -> m Word64+getItemCreated obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "created"++{- |+Set the value of the “@created@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' item [ #created 'Data.GI.Base.Attributes.:=' value ]+@+-}+setItemCreated :: (MonadIO m, IsItem o) => o -> Word64 -> m ()+setItemCreated obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "created" val++{- |+Construct a `GValueConstruct` with valid value for the “@created@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructItemCreated :: (IsItem o) => Word64 -> IO (GValueConstruct o)+constructItemCreated val = B.Properties.constructObjectPropertyUInt64 "created" val++#if ENABLE_OVERLOADING+data ItemCreatedPropertyInfo+instance AttrInfo ItemCreatedPropertyInfo where+ type AttrAllowedOps ItemCreatedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]+ type AttrSetTypeConstraint ItemCreatedPropertyInfo = (~) Word64+ type AttrBaseTypeConstraint ItemCreatedPropertyInfo = IsItem+ type AttrGetType ItemCreatedPropertyInfo = Word64+ type AttrLabel ItemCreatedPropertyInfo = "created"+ type AttrOrigin ItemCreatedPropertyInfo = Item+ attrGet _ = getItemCreated+ attrSet _ = setItemCreated+ attrConstruct _ = constructItemCreated+ attrClear _ = undefined+#endif++-- VVV Prop "label"+ -- Type: TBasicType TUTF8+ -- Flags: [PropertyReadable,PropertyWritable]+ -- Nullable: (Nothing,Nothing)++{- |+Get the value of the “@label@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' item #label+@+-}+getItemLabel :: (MonadIO m, IsItem o) => o -> m (Maybe T.Text)+getItemLabel obj = liftIO $ B.Properties.getObjectPropertyString obj "label"++{- |+Set the value of the “@label@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' item [ #label 'Data.GI.Base.Attributes.:=' value ]+@+-}+setItemLabel :: (MonadIO m, IsItem o) => o -> T.Text -> m ()+setItemLabel obj val = liftIO $ B.Properties.setObjectPropertyString obj "label" (Just val)++{- |+Construct a `GValueConstruct` with valid value for the “@label@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructItemLabel :: (IsItem o) => T.Text -> IO (GValueConstruct o)+constructItemLabel val = B.Properties.constructObjectPropertyString "label" (Just val)++{- |+Set the value of the “@label@” property to `Nothing`.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.clear' #label+@+-}+clearItemLabel :: (MonadIO m, IsItem o) => o -> m ()+clearItemLabel obj = liftIO $ B.Properties.setObjectPropertyString obj "label" (Nothing :: Maybe T.Text)++#if ENABLE_OVERLOADING+data ItemLabelPropertyInfo+instance AttrInfo ItemLabelPropertyInfo where+ type AttrAllowedOps ItemLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]+ type AttrSetTypeConstraint ItemLabelPropertyInfo = (~) T.Text+ type AttrBaseTypeConstraint ItemLabelPropertyInfo = IsItem+ type AttrGetType ItemLabelPropertyInfo = (Maybe T.Text)+ type AttrLabel ItemLabelPropertyInfo = "label"+ type AttrOrigin ItemLabelPropertyInfo = Item+ attrGet _ = getItemLabel+ attrSet _ = setItemLabel+ attrConstruct _ = constructItemLabel+ attrClear _ = clearItemLabel+#endif++-- VVV Prop "locked"+ -- Type: TBasicType TBoolean+ -- Flags: [PropertyReadable]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@locked@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' item #locked+@+-}+getItemLocked :: (MonadIO m, IsItem o) => o -> m Bool+getItemLocked obj = liftIO $ B.Properties.getObjectPropertyBool obj "locked"++#if ENABLE_OVERLOADING+data ItemLockedPropertyInfo+instance AttrInfo ItemLockedPropertyInfo where+ type AttrAllowedOps ItemLockedPropertyInfo = '[ 'AttrGet]+ type AttrSetTypeConstraint ItemLockedPropertyInfo = (~) ()+ type AttrBaseTypeConstraint ItemLockedPropertyInfo = IsItem+ type AttrGetType ItemLockedPropertyInfo = Bool+ type AttrLabel ItemLockedPropertyInfo = "locked"+ type AttrOrigin ItemLockedPropertyInfo = Item+ attrGet _ = getItemLocked+ attrSet _ = undefined+ attrConstruct _ = undefined+ attrClear _ = undefined+#endif++-- VVV Prop "modified"+ -- Type: TBasicType TUInt64+ -- Flags: [PropertyReadable,PropertyWritable]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@modified@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' item #modified+@+-}+getItemModified :: (MonadIO m, IsItem o) => o -> m Word64+getItemModified obj = liftIO $ B.Properties.getObjectPropertyUInt64 obj "modified"++{- |+Set the value of the “@modified@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' item [ #modified 'Data.GI.Base.Attributes.:=' value ]+@+-}+setItemModified :: (MonadIO m, IsItem o) => o -> Word64 -> m ()+setItemModified obj val = liftIO $ B.Properties.setObjectPropertyUInt64 obj "modified" val++{- |+Construct a `GValueConstruct` with valid value for the “@modified@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructItemModified :: (IsItem o) => Word64 -> IO (GValueConstruct o)+constructItemModified val = B.Properties.constructObjectPropertyUInt64 "modified" val++#if ENABLE_OVERLOADING+data ItemModifiedPropertyInfo+instance AttrInfo ItemModifiedPropertyInfo where+ type AttrAllowedOps ItemModifiedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]+ type AttrSetTypeConstraint ItemModifiedPropertyInfo = (~) Word64+ type AttrBaseTypeConstraint ItemModifiedPropertyInfo = IsItem+ type AttrGetType ItemModifiedPropertyInfo = Word64+ type AttrLabel ItemModifiedPropertyInfo = "modified"+ type AttrOrigin ItemModifiedPropertyInfo = Item+ attrGet _ = getItemModified+ attrSet _ = setItemModified+ attrConstruct _ = constructItemModified+ attrClear _ = undefined+#endif++-- VVV Prop "service"+ -- Type: TInterface (Name {namespace = "Secret", name = "Service"})+ -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]+ -- Nullable: (Just False,Nothing)++{- |+Get the value of the “@service@” property.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' item #service+@+-}+getItemService :: (MonadIO m, IsItem o) => o -> m Secret.Service.Service+getItemService obj = liftIO $ checkUnexpectedNothing "getItemService" $ B.Properties.getObjectPropertyObject obj "service" Secret.Service.Service++{- |+Construct a `GValueConstruct` with valid value for the “@service@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.+-}+constructItemService :: (IsItem o, Secret.Service.IsService a) => a -> IO (GValueConstruct o)+constructItemService val = B.Properties.constructObjectPropertyObject "service" (Just val)++#if ENABLE_OVERLOADING+data ItemServicePropertyInfo+instance AttrInfo ItemServicePropertyInfo where+ type AttrAllowedOps ItemServicePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]+ type AttrSetTypeConstraint ItemServicePropertyInfo = Secret.Service.IsService+ type AttrBaseTypeConstraint ItemServicePropertyInfo = IsItem+ type AttrGetType ItemServicePropertyInfo = Secret.Service.Service+ type AttrLabel ItemServicePropertyInfo = "service"+ type AttrOrigin ItemServicePropertyInfo = Item+ attrGet _ = getItemService+ attrSet _ = undefined+ attrConstruct _ = constructItemService+ attrClear _ = undefined+#endif++#if ENABLE_OVERLOADING+instance O.HasAttributeList Item+type instance O.AttributeList Item = ItemAttributeList+type ItemAttributeList = ('[ '("attributes", ItemAttributesPropertyInfo), '("created", ItemCreatedPropertyInfo), '("gBusType", Gio.DBusProxy.DBusProxyGBusTypePropertyInfo), '("gConnection", Gio.DBusProxy.DBusProxyGConnectionPropertyInfo), '("gDefaultTimeout", Gio.DBusProxy.DBusProxyGDefaultTimeoutPropertyInfo), '("gFlags", Gio.DBusProxy.DBusProxyGFlagsPropertyInfo), '("gInterfaceInfo", Gio.DBusProxy.DBusProxyGInterfaceInfoPropertyInfo), '("gInterfaceName", Gio.DBusProxy.DBusProxyGInterfaceNamePropertyInfo), '("gName", Gio.DBusProxy.DBusProxyGNamePropertyInfo), '("gNameOwner", Gio.DBusProxy.DBusProxyGNameOwnerPropertyInfo), '("gObjectPath", Gio.DBusProxy.DBusProxyGObjectPathPropertyInfo), '("label", ItemLabelPropertyInfo), '("locked", ItemLockedPropertyInfo), '("modified", ItemModifiedPropertyInfo), '("service", ItemServicePropertyInfo)] :: [(Symbol, *)])+#endif++#if ENABLE_OVERLOADING+itemAttributes :: AttrLabelProxy "attributes"+itemAttributes = AttrLabelProxy++itemCreated :: AttrLabelProxy "created"+itemCreated = AttrLabelProxy++itemLabel :: AttrLabelProxy "label"+itemLabel = AttrLabelProxy++itemLocked :: AttrLabelProxy "locked"+itemLocked = AttrLabelProxy++itemModified :: AttrLabelProxy "modified"+itemModified = AttrLabelProxy++itemService :: AttrLabelProxy "service"+itemService = AttrLabelProxy++#endif++#if ENABLE_OVERLOADING+type instance O.SignalList Item = ItemSignalList+type ItemSignalList = ('[ '("gPropertiesChanged", Gio.DBusProxy.DBusProxyGPropertiesChangedSignalInfo), '("gSignal", Gio.DBusProxy.DBusProxyGSignalSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])++#endif++-- method Item::delete+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_delete" secret_item_delete :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Delete this item.++This method returns immediately and completes asynchronously. The secret+service may prompt the user. 'GI.Secret.Objects.Service.servicePrompt' will be used to handle+any prompts that show up.+-}+itemDelete ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+itemDelete self cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_item_delete self' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data ItemDeleteMethodInfo+instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemDeleteMethodInfo a signature where+ overloadedMethod _ = itemDelete++#endif++-- method Item::delete_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_delete_finish" secret_item_delete_finish :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete asynchronous operation to delete the secret item.+-}+itemDeleteFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: an item -}+ -> b+ {- ^ /@result@/: asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemDeleteFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_item_delete_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemDeleteFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ItemDeleteFinishMethodInfo a signature where+ overloadedMethod _ = itemDeleteFinish++#endif++-- method Item::delete_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_delete_sync" secret_item_delete_sync :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Delete this secret item.++This method may block indefinitely and should not be used in user+interface threads. The secret service may prompt the user.+'GI.Secret.Objects.Service.servicePrompt' will be used to handle any prompts that show up.+-}+itemDeleteSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemDeleteSync self cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_item_delete_sync self' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemDeleteSyncMethodInfo+instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemDeleteSyncMethodInfo a signature where+ overloadedMethod _ = itemDeleteSync++#endif++-- method Item::get_attributes+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TGHash (TBasicType TUTF8) (TBasicType TUTF8))+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_attributes" secret_item_get_attributes :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO (Ptr (GHashTable CString CString))++{- |+Set the attributes of this item.++The /@attributes@/ are a mapping of string keys to string values.+Attributes are used to search for items. Attributes are not stored+or transferred securely by the secret service.++Do not modify the attributes returned by this method. Use+'GI.Secret.Objects.Item.itemSetAttributes' instead.+-}+itemGetAttributes ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m (Map.Map T.Text T.Text)+ {- ^ __Returns:__ a new reference+ to the attributes, which should not be modified, and+ released with 'GI.GLib.Functions.hashTableUnref' -}+itemGetAttributes self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_attributes self'+ checkUnexpectedReturnNULL "itemGetAttributes" result+ result' <- unpackGHashTable result+ let result'' = mapFirst cstringUnpackPtr result'+ result''' <- mapFirstA cstringToText result''+ let result'''' = mapSecond cstringUnpackPtr result'''+ result''''' <- mapSecondA cstringToText result''''+ let result'''''' = Map.fromList result'''''+ unrefGHashTable result+ touchManagedPtr self+ return result''''''++#if ENABLE_OVERLOADING+data ItemGetAttributesMethodInfo+instance (signature ~ (m (Map.Map T.Text T.Text)), MonadIO m, IsItem a) => O.MethodInfo ItemGetAttributesMethodInfo a signature where+ overloadedMethod _ = itemGetAttributes++#endif++-- method Item::get_created+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUInt64)+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_created" secret_item_get_created :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO Word64++{- |+Get the created date and time of the item. The return value is+the number of seconds since the unix epoch, January 1st 1970.+-}+itemGetCreated ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m Word64+ {- ^ __Returns:__ the created date and time -}+itemGetCreated self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_created self'+ touchManagedPtr self+ return result++#if ENABLE_OVERLOADING+data ItemGetCreatedMethodInfo+instance (signature ~ (m Word64), MonadIO m, IsItem a) => O.MethodInfo ItemGetCreatedMethodInfo a signature where+ overloadedMethod _ = itemGetCreated++#endif++-- method Item::get_flags+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret item proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "ItemFlags"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_flags" secret_item_get_flags :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO CUInt++{- |+Get the flags representing what features of the 'GI.Secret.Objects.Item.Item' proxy+have been initialized.++Use 'GI.Secret.Objects.Item.itemLoadSecret' to initialize further features+and change the flags.+-}+itemGetFlags ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: the secret item proxy -}+ -> m [Secret.Flags.ItemFlags]+ {- ^ __Returns:__ the flags for features initialized -}+itemGetFlags self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_flags self'+ let result' = wordToGFlags result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data ItemGetFlagsMethodInfo+instance (signature ~ (m [Secret.Flags.ItemFlags]), MonadIO m, IsItem a) => O.MethodInfo ItemGetFlagsMethodInfo a signature where+ overloadedMethod _ = itemGetFlags++#endif++-- method Item::get_label+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_label" secret_item_get_label :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO CString++{- |+Get the label of this item.+-}+itemGetLabel ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m T.Text+ {- ^ __Returns:__ the label, which should be freed with 'GI.GLib.Functions.free' -}+itemGetLabel self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_label self'+ checkUnexpectedReturnNULL "itemGetLabel" result+ result' <- cstringToText result+ freeMem result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data ItemGetLabelMethodInfo+instance (signature ~ (m T.Text), MonadIO m, IsItem a) => O.MethodInfo ItemGetLabelMethodInfo a signature where+ overloadedMethod _ = itemGetLabel++#endif++-- method Item::get_locked+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_locked" secret_item_get_locked :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO CInt++{- |+Get whether the item is locked or not.++Depending on the secret service an item may not be able to be locked+independently from the collection that it is in.+-}+itemGetLocked ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m Bool+ {- ^ __Returns:__ whether the item is locked or not -}+itemGetLocked self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_locked self'+ let result' = (/= 0) result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data ItemGetLockedMethodInfo+instance (signature ~ (m Bool), MonadIO m, IsItem a) => O.MethodInfo ItemGetLockedMethodInfo a signature where+ overloadedMethod _ = itemGetLocked++#endif++-- method Item::get_modified+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUInt64)+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_modified" secret_item_get_modified :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO Word64++{- |+Get the modified date and time of the item. The return value is+the number of seconds since the unix epoch, January 1st 1970.+-}+itemGetModified ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m Word64+ {- ^ __Returns:__ the modified date and time -}+itemGetModified self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_modified self'+ touchManagedPtr self+ return result++#if ENABLE_OVERLOADING+data ItemGetModifiedMethodInfo+instance (signature ~ (m Word64), MonadIO m, IsItem a) => O.MethodInfo ItemGetModifiedMethodInfo a signature where+ overloadedMethod _ = itemGetModified++#endif++-- method Item::get_schema_name+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_schema_name" secret_item_get_schema_name :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO CString++{- |+Gets the name of the schema that this item was stored with. This is also+available at the \<literal>xdg:schema\<\/literal> attribute.+-}+itemGetSchemaName ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m (Maybe T.Text)+ {- ^ __Returns:__ the schema name -}+itemGetSchemaName self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_schema_name self'+ maybeResult <- convertIfNonNull result $ \result' -> do+ result'' <- cstringToText result'+ freeMem result'+ return result''+ touchManagedPtr self+ return maybeResult++#if ENABLE_OVERLOADING+data ItemGetSchemaNameMethodInfo+instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsItem a) => O.MethodInfo ItemGetSchemaNameMethodInfo a signature where+ overloadedMethod _ = itemGetSchemaName++#endif++-- method Item::get_secret+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Value"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_secret" secret_item_get_secret :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO (Ptr Secret.Value.Value)++{- |+Get the secret value of this item. If this item is locked or the secret+has not yet been loaded then this will return 'Nothing'.++To load the secret call the 'GI.Secret.Objects.Item.itemLoadSecret' method.+-}+itemGetSecret ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m (Maybe Secret.Value.Value)+ {- ^ __Returns:__ the secret value which should be+ released with 'GI.Secret.Structs.Value.valueUnref', or 'Nothing' -}+itemGetSecret self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_secret self'+ maybeResult <- convertIfNonNull result $ \result' -> do+ result'' <- (wrapBoxed Secret.Value.Value) result'+ return result''+ touchManagedPtr self+ return maybeResult++#if ENABLE_OVERLOADING+data ItemGetSecretMethodInfo+instance (signature ~ (m (Maybe Secret.Value.Value)), MonadIO m, IsItem a) => O.MethodInfo ItemGetSecretMethodInfo a signature where+ overloadedMethod _ = itemGetSecret++#endif++-- method Item::get_service+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Service"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_get_service" secret_item_get_service :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO (Ptr Secret.Service.Service)++{- |+Get the Secret Service object that this item was created with.+-}+itemGetService ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: an item -}+ -> m Secret.Service.Service+ {- ^ __Returns:__ the Secret Service object -}+itemGetService self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_item_get_service self'+ checkUnexpectedReturnNULL "itemGetService" result+ result' <- (newObject Secret.Service.Service) result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data ItemGetServiceMethodInfo+instance (signature ~ (m Secret.Service.Service), MonadIO m, IsItem a) => O.MethodInfo ItemGetServiceMethodInfo a signature where+ overloadedMethod _ = itemGetService++#endif++-- method Item::load_secret+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_load_secret" secret_item_load_secret :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Load the secret value of this item.++Each item has a single secret which might be a password or some+other secret binary value.++This function will fail if the secret item is locked.++This function returns immediately and completes asynchronously.+-}+itemLoadSecret ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item proxy -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+itemLoadSecret self cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_item_load_secret self' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data ItemLoadSecretMethodInfo+instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemLoadSecretMethodInfo a signature where+ overloadedMethod _ = itemLoadSecret++#endif++-- method Item::load_secret_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_load_secret_finish" secret_item_load_secret_finish :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete asynchronous operation to load the secret value of this item.++The newly loaded secret value can be accessed by calling+'GI.Secret.Objects.Item.itemGetSecret'.+-}+itemLoadSecretFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: an item proxy -}+ -> b+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemLoadSecretFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_item_load_secret_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemLoadSecretFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ItemLoadSecretFinishMethodInfo a signature where+ overloadedMethod _ = itemLoadSecretFinish++#endif++-- method Item::load_secret_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_load_secret_sync" secret_item_load_secret_sync :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Load the secret value of this item.++Each item has a single secret which might be a password or some+other secret binary value.++This function may block indefinitely. Use the asynchronous version+in user interface threads.+-}+itemLoadSecretSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemLoadSecretSync self cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_item_load_secret_sync self' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemLoadSecretSyncMethodInfo+instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemLoadSecretSyncMethodInfo a signature where+ overloadedMethod _ = itemLoadSecretSync++#endif++-- method Item::refresh+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the collection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_refresh" secret_item_refresh :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ IO ()++{- |+Refresh the properties on this item. This fires off a request to+refresh, and the properties will be updated later.++Calling this method is not normally necessary, as the secret service+will notify the client when properties change.+-}+itemRefresh ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a) =>+ a+ {- ^ /@self@/: the collection -}+ -> m ()+itemRefresh self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ secret_item_refresh self'+ touchManagedPtr self+ return ()++#if ENABLE_OVERLOADING+data ItemRefreshMethodInfo+instance (signature ~ (m ()), MonadIO m, IsItem a) => O.MethodInfo ItemRefreshMethodInfo a signature where+ overloadedMethod _ = itemRefresh++#endif++-- method Item::set_attributes+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new set of attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the asynchronous operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_set_attributes" secret_item_set_attributes :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Set the attributes of this item.++The /@attributes@/ are a mapping of string keys to string values.+Attributes are used to search for items. Attributes are not stored+or transferred securely by the secret service.++This function returns immediately and completes asynchronously.+-}+itemSetAttributes ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: a new set of attributes -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the asynchronous operation completes -}+ -> m ()+itemSetAttributes self schema attributes cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_item_set_attributes self' maybeSchema attributes'''''' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()++#if ENABLE_OVERLOADING+data ItemSetAttributesMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemSetAttributesMethodInfo a signature where+ overloadedMethod _ = itemSetAttributes++#endif++-- method Item::set_attributes_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_set_attributes_finish" secret_item_set_attributes_finish :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete operation to set the attributes of this item.+-}+itemSetAttributesFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: an item -}+ -> b+ {- ^ /@result@/: asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemSetAttributesFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_item_set_attributes_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemSetAttributesFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ItemSetAttributesFinishMethodInfo a signature where+ overloadedMethod _ = itemSetAttributesFinish++#endif++-- method Item::set_attributes_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new set of attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_set_attributes_sync" secret_item_set_attributes_sync :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Set the attributes of this item.++The /@attributes@/ are a mapping of string keys to string values.+Attributes are used to search for items. Attributes are not stored+or transferred securely by the secret service.++This function may block indefinitely. Use the asynchronous version+in user interface threads.+-}+itemSetAttributesSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: a new set of attributes -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemSetAttributesSync self schema attributes cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_item_set_attributes_sync self' maybeSchema attributes'''''' maybeCancellable+ touchManagedPtr self+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()+ ) (do+ unrefGHashTable attributes''''''+ )++#if ENABLE_OVERLOADING+data ItemSetAttributesSyncMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (b) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemSetAttributesSyncMethodInfo a signature where+ overloadedMethod _ = itemSetAttributesSync++#endif++-- method Item::set_label+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new label", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_set_label" secret_item_set_label :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ CString -> -- label : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Set the label of this item.++This function returns immediately and completes asynchronously.+-}+itemSetLabel ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> T.Text+ {- ^ /@label@/: a new label -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+itemSetLabel self label cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ label' <- textToCString label+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_item_set_label self' label' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ freeMem label'+ return ()++#if ENABLE_OVERLOADING+data ItemSetLabelMethodInfo+instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemSetLabelMethodInfo a signature where+ overloadedMethod _ = itemSetLabel++#endif++-- method Item::set_label_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_set_label_finish" secret_item_set_label_finish :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete asynchronous operation to set the label of this collection.+-}+itemSetLabelFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: an item -}+ -> b+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemSetLabelFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_item_set_label_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemSetLabelFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ItemSetLabelFinishMethodInfo a signature where+ overloadedMethod _ = itemSetLabelFinish++#endif++-- method Item::set_label_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new label", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_set_label_sync" secret_item_set_label_sync :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ CString -> -- label : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Set the label of this item.++This function may block indefinitely. Use the asynchronous version+in user interface threads.+-}+itemSetLabelSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> T.Text+ {- ^ /@label@/: a new label -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemSetLabelSync self label cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ label' <- textToCString label+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_item_set_label_sync self' label' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ freeMem label'+ return ()+ ) (do+ freeMem label'+ )++#if ENABLE_OVERLOADING+data ItemSetLabelSyncMethodInfo+instance (signature ~ (T.Text -> Maybe (b) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemSetLabelSyncMethodInfo a signature where+ overloadedMethod _ = itemSetLabelSync++#endif++-- method Item::set_secret+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new secret value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_set_secret" secret_item_set_secret :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Secret.Value.Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Set the secret value of this item.++Each item has a single secret which might be a password or some+other secret binary value.++This function returns immediately and completes asynchronously.+-}+itemSetSecret ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> Secret.Value.Value+ {- ^ /@value@/: a new secret value -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+itemSetSecret self value cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ value' <- unsafeManagedPtrGetPtr value+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_item_set_secret self' value' maybeCancellable maybeCallback userData+ touchManagedPtr self+ touchManagedPtr value+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data ItemSetSecretMethodInfo+instance (signature ~ (Secret.Value.Value -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemSetSecretMethodInfo a signature where+ overloadedMethod _ = itemSetSecret++#endif++-- method Item::set_secret_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_set_secret_finish" secret_item_set_secret_finish :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete asynchronous operation to set the secret value of this item.+-}+itemSetSecretFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: an item -}+ -> b+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemSetSecretFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_item_set_secret_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemSetSecretFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsItem a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ItemSetSecretFinishMethodInfo a signature where+ overloadedMethod _ = itemSetSecretFinish++#endif++-- method Item::set_secret_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Item"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a new secret value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_set_secret_sync" secret_item_set_secret_sync :: + Ptr Item -> -- self : TInterface (Name {namespace = "Secret", name = "Item"})+ Ptr Secret.Value.Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Set the secret value of this item.++Each item has a single secret which might be a password or some+other secret binary value.++This function may block indefinitely. Use the asynchronous version+in user interface threads.+-}+itemSetSecretSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: an item -}+ -> Secret.Value.Value+ {- ^ /@value@/: a new secret value -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemSetSecretSync self value cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ value' <- unsafeManagedPtrGetPtr value+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_item_set_secret_sync self' value' maybeCancellable+ touchManagedPtr self+ touchManagedPtr value+ whenJust cancellable touchManagedPtr+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ItemSetSecretSyncMethodInfo+instance (signature ~ (Secret.Value.Value -> Maybe (b) -> m ()), MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ItemSetSecretSyncMethodInfo a signature where+ overloadedMethod _ = itemSetSecretSync++#endif++-- method Item::create+-- method type : MemberFunction+-- Args : [Arg {argCName = "collection", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a secret collection to create this item in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "attributes for the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "secret value for the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "ItemCreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "flags for the creation of the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_create" secret_item_create :: + Ptr Secret.Collection.Collection -> -- collection : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CString -> -- label : TBasicType TUTF8+ Ptr Secret.Value.Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "ItemCreateFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Create a new item in the secret service.++If the /@flags@/ contains 'GI.Secret.Flags.ItemCreateFlagsReplace', then the secret+service will search for an item matching the /@attributes@/, and update that item+instead of creating a new one.++This method may block indefinitely and should not be used in user interface+threads. The secret service may prompt the user. 'GI.Secret.Objects.Service.servicePrompt'+will be used to handle any prompts that are required.+-}+itemCreate ::+ (B.CallStack.HasCallStack, MonadIO m, Secret.Collection.IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@collection@/: a secret collection to create this item in -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: attributes for the new item -}+ -> T.Text+ {- ^ /@label@/: label for the new item -}+ -> Secret.Value.Value+ {- ^ /@value@/: secret value for the new item -}+ -> [Secret.Flags.ItemCreateFlags]+ {- ^ /@flags@/: flags for the creation of the new item -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+itemCreate collection schema attributes label value flags cancellable callback = liftIO $ do+ collection' <- unsafeManagedPtrCastPtr collection+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ label' <- textToCString label+ value' <- unsafeManagedPtrGetPtr value+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_item_create collection' maybeSchema attributes'''''' label' value' flags' maybeCancellable maybeCallback userData+ touchManagedPtr collection+ whenJust schema touchManagedPtr+ touchManagedPtr value+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ freeMem label'+ return ()++#if ENABLE_OVERLOADING+#endif++-- method Item::create_finish+-- method type : MemberFunction+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Item"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_create_finish" secret_item_create_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Item)++{- |+Finish operation to create a new item in the secret service.+-}+itemCreateFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m Item+ {- ^ __Returns:__ the new item, which should be unreferenced+ with 'GI.GObject.Objects.Object.objectUnref' /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemCreateFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_item_create_finish result_'+ checkUnexpectedReturnNULL "itemCreateFinish" result+ result' <- (wrapObject Item) result+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+#endif++-- method Item::create_sync+-- method type : MemberFunction+-- Args : [Arg {argCName = "collection", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a secret collection to create this item in", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "attributes for the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "secret value for the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "ItemCreateFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "flags for the creation of the new item", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Item"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_create_sync" secret_item_create_sync :: + Ptr Secret.Collection.Collection -> -- collection : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CString -> -- label : TBasicType TUTF8+ Ptr Secret.Value.Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "ItemCreateFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Item)++{- |+Create a new item in the secret service.++If the /@flags@/ contains 'GI.Secret.Flags.ItemCreateFlagsReplace', then the secret+service will search for an item matching the /@attributes@/, and update that item+instead of creating a new one.++This method may block indefinitely and should not be used in user interface+threads. The secret service may prompt the user. 'GI.Secret.Objects.Service.servicePrompt'+will be used to handle any prompts that are required.+-}+itemCreateSync ::+ (B.CallStack.HasCallStack, MonadIO m, Secret.Collection.IsCollection a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@collection@/: a secret collection to create this item in -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: attributes for the new item -}+ -> T.Text+ {- ^ /@label@/: label for the new item -}+ -> Secret.Value.Value+ {- ^ /@value@/: secret value for the new item -}+ -> [Secret.Flags.ItemCreateFlags]+ {- ^ /@flags@/: flags for the creation of the new item -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m Item+ {- ^ __Returns:__ the new item, which should be unreferenced+ with 'GI.GObject.Objects.Object.objectUnref' /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemCreateSync collection schema attributes label value flags cancellable = liftIO $ do+ collection' <- unsafeManagedPtrCastPtr collection+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ label' <- textToCString label+ value' <- unsafeManagedPtrGetPtr value+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_item_create_sync collection' maybeSchema attributes'''''' label' value' flags' maybeCancellable+ checkUnexpectedReturnNULL "itemCreateSync" result+ result' <- (wrapObject Item) result+ touchManagedPtr collection+ whenJust schema touchManagedPtr+ touchManagedPtr value+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ freeMem label'+ return result'+ ) (do+ unrefGHashTable attributes''''''+ freeMem label'+ )++#if ENABLE_OVERLOADING+#endif++-- method Item::load_secrets+-- method type : MemberFunction+-- Args : [Arg {argCName = "items", argType = TGList (TInterface (Name {namespace = "Secret", name = "Item"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the items to retrieve secrets for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_item_load_secrets" secret_item_load_secrets :: + Ptr (GList (Ptr Item)) -> -- items : TGList (TInterface (Name {namespace = "Secret", name = "Item"}))+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Load the secret values for a secret item stored in the service.++The /@items@/ must all have the same SecretItem::service property.++This function returns immediately and completes asynchronously.+-}+itemLoadSecrets ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ [a]+ {- ^ /@items@/: the items to retrieve secrets for -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+itemLoadSecrets items cancellable callback = liftIO $ do+ items' <- mapM unsafeManagedPtrCastPtr items+ items'' <- packGList items'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_item_load_secrets items'' maybeCancellable maybeCallback userData+ mapM_ touchManagedPtr items+ whenJust cancellable touchManagedPtr+ g_list_free items''+ return ()++#if ENABLE_OVERLOADING+#endif++-- method Item::load_secrets_finish+-- method type : MemberFunction+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_load_secrets_finish" secret_item_load_secrets_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete asynchronous operation to load the secret values for+secret items stored in the service.++Items that are locked will not have their secrets loaded.+-}+itemLoadSecretsFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemLoadSecretsFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_item_load_secrets_finish result_'+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+#endif++-- method Item::load_secrets_sync+-- method type : MemberFunction+-- Args : [Arg {argCName = "items", argType = TGList (TInterface (Name {namespace = "Secret", name = "Item"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the items to retrieve secrets for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_item_load_secrets_sync" secret_item_load_secrets_sync :: + Ptr (GList (Ptr Item)) -> -- items : TGList (TInterface (Name {namespace = "Secret", name = "Item"}))+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Load the secret values for a secret item stored in the service.++The /@items@/ must all have the same SecretItem::service property.++This method may block indefinitely and should not be used in user interface+threads.++Items that are locked will not have their secrets loaded.+-}+itemLoadSecretsSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsItem a, Gio.Cancellable.IsCancellable b) =>+ [a]+ {- ^ /@items@/: the items to retrieve secrets for -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+itemLoadSecretsSync items cancellable = liftIO $ do+ items' <- mapM unsafeManagedPtrCastPtr items+ items'' <- packGList items'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_item_load_secrets_sync items'' maybeCancellable+ mapM_ touchManagedPtr items+ whenJust cancellable touchManagedPtr+ g_list_free items''+ return ()+ ) (do+ g_list_free items''+ )++#if ENABLE_OVERLOADING+#endif++
+ GI/Secret/Objects/Item.hs-boot view
@@ -0,0 +1,119 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Objects.Item where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++newtype Item = Item (ManagedPtr Item)+instance GObject Item where+class (GObject o, O.IsDescendantOf Item o) => IsItem o+instance (GObject o, O.IsDescendantOf Item o) => IsItem o+instance O.HasParentTypes Item+#if ENABLE_OVERLOADING+data ItemCreatedPropertyInfo+#endif+#if ENABLE_OVERLOADING+data ItemLabelPropertyInfo+#endif+#if ENABLE_OVERLOADING+data ItemLockedPropertyInfo+#endif+#if ENABLE_OVERLOADING+data ItemModifiedPropertyInfo+#endif+#if ENABLE_OVERLOADING+data ItemServicePropertyInfo+#endif+#if ENABLE_OVERLOADING+data ItemDeleteMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemDeleteFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemDeleteSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetAttributesMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetCreatedMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetFlagsMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetLabelMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetLockedMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetModifiedMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetSchemaNameMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetSecretMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemGetServiceMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemLoadSecretMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemLoadSecretFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemLoadSecretSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemRefreshMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetAttributesMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetAttributesFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetAttributesSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetLabelMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetLabelFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetLabelSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetSecretMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetSecretFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ItemSetSecretSyncMethodInfo+#endif
+ GI/Secret/Objects/Prompt.hs view
@@ -0,0 +1,476 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)++A proxy object representing a prompt that the Secret Service will display+to the user.+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Objects.Prompt+ ( ++-- * Exported types+ Prompt(..) ,+ IsPrompt ,+ toPrompt ,+ noPrompt ,+++ -- * Methods+-- ** perform #method:perform#++#if ENABLE_OVERLOADING+ PromptPerformMethodInfo ,+#endif+ promptPerform ,+++-- ** performFinish #method:performFinish#++#if ENABLE_OVERLOADING+ PromptPerformFinishMethodInfo ,+#endif+ promptPerformFinish ,+++-- ** performSync #method:performSync#++#if ENABLE_OVERLOADING+ PromptPerformSyncMethodInfo ,+#endif+ promptPerformSync ,+++-- ** run #method:run#++#if ENABLE_OVERLOADING+ PromptRunMethodInfo ,+#endif+ promptRun ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import qualified GI.GLib.Structs.VariantType as GLib.VariantType+import qualified GI.GObject.Objects.Object as GObject.Object+import qualified GI.Gio.Callbacks as Gio.Callbacks+import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable+import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult+import qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface+import qualified GI.Gio.Interfaces.Initable as Gio.Initable+import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable+import qualified GI.Gio.Objects.DBusProxy as Gio.DBusProxy++-- | Memory-managed wrapper type.+newtype Prompt = Prompt (ManagedPtr Prompt)+foreign import ccall "secret_prompt_get_type"+ c_secret_prompt_get_type :: IO GType++instance GObject Prompt where+ gobjectType = c_secret_prompt_get_type+ ++-- | Type class for types which can be safely cast to `Prompt`, for instance with `toPrompt`.+class (GObject o, O.IsDescendantOf Prompt o) => IsPrompt o+instance (GObject o, O.IsDescendantOf Prompt o) => IsPrompt o++instance O.HasParentTypes Prompt+type instance O.ParentTypes Prompt = '[Gio.DBusProxy.DBusProxy, GObject.Object.Object, Gio.AsyncInitable.AsyncInitable, Gio.DBusInterface.DBusInterface, Gio.Initable.Initable]++-- | Cast to `Prompt`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.+toPrompt :: (MonadIO m, IsPrompt o) => o -> m Prompt+toPrompt = liftIO . unsafeCastTo Prompt++-- | A convenience alias for `Nothing` :: `Maybe` `Prompt`.+noPrompt :: Maybe Prompt+noPrompt = Nothing++#if ENABLE_OVERLOADING+type family ResolvePromptMethod (t :: Symbol) (o :: *) :: * where+ ResolvePromptMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo+ ResolvePromptMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo+ ResolvePromptMethod "call" o = Gio.DBusProxy.DBusProxyCallMethodInfo+ ResolvePromptMethod "callFinish" o = Gio.DBusProxy.DBusProxyCallFinishMethodInfo+ ResolvePromptMethod "callSync" o = Gio.DBusProxy.DBusProxyCallSyncMethodInfo+ ResolvePromptMethod "callWithUnixFdList" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListMethodInfo+ ResolvePromptMethod "callWithUnixFdListFinish" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListFinishMethodInfo+ ResolvePromptMethod "callWithUnixFdListSync" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListSyncMethodInfo+ ResolvePromptMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo+ ResolvePromptMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo+ ResolvePromptMethod "getv" o = GObject.Object.ObjectGetvMethodInfo+ ResolvePromptMethod "init" o = Gio.Initable.InitableInitMethodInfo+ ResolvePromptMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo+ ResolvePromptMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo+ ResolvePromptMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo+ ResolvePromptMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo+ ResolvePromptMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo+ ResolvePromptMethod "perform" o = PromptPerformMethodInfo+ ResolvePromptMethod "performFinish" o = PromptPerformFinishMethodInfo+ ResolvePromptMethod "performSync" o = PromptPerformSyncMethodInfo+ ResolvePromptMethod "ref" o = GObject.Object.ObjectRefMethodInfo+ ResolvePromptMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo+ ResolvePromptMethod "run" o = PromptRunMethodInfo+ ResolvePromptMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo+ ResolvePromptMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo+ ResolvePromptMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo+ ResolvePromptMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo+ ResolvePromptMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo+ ResolvePromptMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo+ ResolvePromptMethod "getCachedProperty" o = Gio.DBusProxy.DBusProxyGetCachedPropertyMethodInfo+ ResolvePromptMethod "getCachedPropertyNames" o = Gio.DBusProxy.DBusProxyGetCachedPropertyNamesMethodInfo+ ResolvePromptMethod "getConnection" o = Gio.DBusProxy.DBusProxyGetConnectionMethodInfo+ ResolvePromptMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo+ ResolvePromptMethod "getDefaultTimeout" o = Gio.DBusProxy.DBusProxyGetDefaultTimeoutMethodInfo+ ResolvePromptMethod "getFlags" o = Gio.DBusProxy.DBusProxyGetFlagsMethodInfo+ ResolvePromptMethod "getInfo" o = Gio.DBusInterface.DBusInterfaceGetInfoMethodInfo+ ResolvePromptMethod "getInterfaceInfo" o = Gio.DBusProxy.DBusProxyGetInterfaceInfoMethodInfo+ ResolvePromptMethod "getInterfaceName" o = Gio.DBusProxy.DBusProxyGetInterfaceNameMethodInfo+ ResolvePromptMethod "getName" o = Gio.DBusProxy.DBusProxyGetNameMethodInfo+ ResolvePromptMethod "getNameOwner" o = Gio.DBusProxy.DBusProxyGetNameOwnerMethodInfo+ ResolvePromptMethod "getObject" o = Gio.DBusInterface.DBusInterfaceGetObjectMethodInfo+ ResolvePromptMethod "getObjectPath" o = Gio.DBusProxy.DBusProxyGetObjectPathMethodInfo+ ResolvePromptMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo+ ResolvePromptMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo+ ResolvePromptMethod "setCachedProperty" o = Gio.DBusProxy.DBusProxySetCachedPropertyMethodInfo+ ResolvePromptMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo+ ResolvePromptMethod "setDefaultTimeout" o = Gio.DBusProxy.DBusProxySetDefaultTimeoutMethodInfo+ ResolvePromptMethod "setInterfaceInfo" o = Gio.DBusProxy.DBusProxySetInterfaceInfoMethodInfo+ ResolvePromptMethod "setObject" o = Gio.DBusInterface.DBusInterfaceSetObjectMethodInfo+ ResolvePromptMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo+ ResolvePromptMethod l o = O.MethodResolutionFailed l o++instance (info ~ ResolvePromptMethod t Prompt, O.MethodInfo info Prompt p) => OL.IsLabel t (Prompt -> p) where+#if MIN_VERSION_base(4,10,0)+ fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#else+ fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#endif++#endif++#if ENABLE_OVERLOADING+instance O.HasAttributeList Prompt+type instance O.AttributeList Prompt = PromptAttributeList+type PromptAttributeList = ('[ '("gBusType", Gio.DBusProxy.DBusProxyGBusTypePropertyInfo), '("gConnection", Gio.DBusProxy.DBusProxyGConnectionPropertyInfo), '("gDefaultTimeout", Gio.DBusProxy.DBusProxyGDefaultTimeoutPropertyInfo), '("gFlags", Gio.DBusProxy.DBusProxyGFlagsPropertyInfo), '("gInterfaceInfo", Gio.DBusProxy.DBusProxyGInterfaceInfoPropertyInfo), '("gInterfaceName", Gio.DBusProxy.DBusProxyGInterfaceNamePropertyInfo), '("gName", Gio.DBusProxy.DBusProxyGNamePropertyInfo), '("gNameOwner", Gio.DBusProxy.DBusProxyGNameOwnerPropertyInfo), '("gObjectPath", Gio.DBusProxy.DBusProxyGObjectPathPropertyInfo)] :: [(Symbol, *)])+#endif++#if ENABLE_OVERLOADING+#endif++#if ENABLE_OVERLOADING+type instance O.SignalList Prompt = PromptSignalList+type PromptSignalList = ('[ '("gPropertiesChanged", Gio.DBusProxy.DBusProxyGPropertiesChangedSignalInfo), '("gSignal", Gio.DBusProxy.DBusProxyGSignalSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])++#endif++-- method Prompt::perform+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Prompt"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a prompt", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "window_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "string form of XWindow id for parent window to be transient for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_type", argType = TInterface (Name {namespace = "GLib", name = "VariantType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the variant type of the prompt result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_prompt_perform" secret_prompt_perform :: + Ptr Prompt -> -- self : TInterface (Name {namespace = "Secret", name = "Prompt"})+ CString -> -- window_id : TBasicType TUTF8+ Ptr GLib.VariantType.VariantType -> -- return_type : TInterface (Name {namespace = "GLib", name = "VariantType"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Runs a prompt and performs the prompting. Returns 'True' if the prompt+was completed and not dismissed.++If /@windowId@/ is non-null then it is used as an XWindow id on Linux. The API+expects this id to be converted to a string using the \<literal>@/d/@\<\/literal>+printf format. The Secret Service can make its prompt transient for the window+with this id. In some Secret Service implementations this is not possible, so+the behavior depending on this should degrade gracefully.++This method will return immediately and complete asynchronously.+-}+promptPerform ::+ (B.CallStack.HasCallStack, MonadIO m, IsPrompt a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a prompt -}+ -> Maybe (T.Text)+ {- ^ /@windowId@/: string form of XWindow id for parent window to be transient for -}+ -> GLib.VariantType.VariantType+ {- ^ /@returnType@/: the variant type of the prompt result -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+promptPerform self windowId returnType cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeWindowId <- case windowId of+ Nothing -> return nullPtr+ Just jWindowId -> do+ jWindowId' <- textToCString jWindowId+ return jWindowId'+ returnType' <- unsafeManagedPtrGetPtr returnType+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_prompt_perform self' maybeWindowId returnType' maybeCancellable maybeCallback userData+ touchManagedPtr self+ touchManagedPtr returnType+ whenJust cancellable touchManagedPtr+ freeMem maybeWindowId+ return ()++#if ENABLE_OVERLOADING+data PromptPerformMethodInfo+instance (signature ~ (Maybe (T.Text) -> GLib.VariantType.VariantType -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsPrompt a, Gio.Cancellable.IsCancellable b) => O.MethodInfo PromptPerformMethodInfo a signature where+ overloadedMethod _ = promptPerform++#endif++-- method Prompt::perform_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Prompt"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a prompt", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just TVariant+-- throws : True+-- Skip return : False++foreign import ccall "secret_prompt_perform_finish" secret_prompt_perform_finish :: + Ptr Prompt -> -- self : TInterface (Name {namespace = "Secret", name = "Prompt"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr GVariant)++{- |+Complete asynchronous operation to run a prompt and perform the prompting.++Returns a variant result if the prompt was completed and not dismissed. The+type of result depends on the action the prompt is completing, and is+defined in the Secret Service DBus API specification.+-}+promptPerformFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsPrompt a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: a prompt -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m GVariant+ {- ^ __Returns:__ 'Nothing' if the prompt was dismissed or an error occurred,+ a variant result if the prompt was successful /(Can throw 'Data.GI.Base.GError.GError')/ -}+promptPerformFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_prompt_perform_finish self' result_'+ checkUnexpectedReturnNULL "promptPerformFinish" result+ result' <- B.GVariant.wrapGVariantPtr result+ touchManagedPtr self+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data PromptPerformFinishMethodInfo+instance (signature ~ (b -> m GVariant), MonadIO m, IsPrompt a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo PromptPerformFinishMethodInfo a signature where+ overloadedMethod _ = promptPerformFinish++#endif++-- method Prompt::perform_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Prompt"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a prompt", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "window_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "string form of XWindow id for parent window to be transient for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_type", argType = TInterface (Name {namespace = "GLib", name = "VariantType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the variant type of the prompt result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just TVariant+-- throws : True+-- Skip return : False++foreign import ccall "secret_prompt_perform_sync" secret_prompt_perform_sync :: + Ptr Prompt -> -- self : TInterface (Name {namespace = "Secret", name = "Prompt"})+ CString -> -- window_id : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr GLib.VariantType.VariantType -> -- return_type : TInterface (Name {namespace = "GLib", name = "VariantType"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr GVariant)++{- |+Runs a prompt and performs the prompting. Returns a variant result if the+prompt was completed and not dismissed. The type of result depends on the+action the prompt is completing, and is defined in the Secret Service DBus+API specification.++If /@windowId@/ is non-null then it is used as an XWindow id on Linux. The API+expects this id to be converted to a string using the \<literal>@/d/@\<\/literal>+printf format. The Secret Service can make its prompt transient for the window+with this id. In some Secret Service implementations this is not possible,+so the behavior depending on this should degrade gracefully.++This method may block indefinitely and should not be used in user interface+threads.+-}+promptPerformSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsPrompt a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a prompt -}+ -> Maybe (T.Text)+ {- ^ /@windowId@/: string form of XWindow id for parent window to be transient for -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> GLib.VariantType.VariantType+ {- ^ /@returnType@/: the variant type of the prompt result -}+ -> m GVariant+ {- ^ __Returns:__ 'Nothing' if the prompt was dismissed or an error occurred /(Can throw 'Data.GI.Base.GError.GError')/ -}+promptPerformSync self windowId cancellable returnType = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeWindowId <- case windowId of+ Nothing -> return nullPtr+ Just jWindowId -> do+ jWindowId' <- textToCString jWindowId+ return jWindowId'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ returnType' <- unsafeManagedPtrGetPtr returnType+ onException (do+ result <- propagateGError $ secret_prompt_perform_sync self' maybeWindowId maybeCancellable returnType'+ checkUnexpectedReturnNULL "promptPerformSync" result+ result' <- B.GVariant.wrapGVariantPtr result+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ touchManagedPtr returnType+ freeMem maybeWindowId+ return result'+ ) (do+ freeMem maybeWindowId+ )++#if ENABLE_OVERLOADING+data PromptPerformSyncMethodInfo+instance (signature ~ (Maybe (T.Text) -> Maybe (b) -> GLib.VariantType.VariantType -> m GVariant), MonadIO m, IsPrompt a, Gio.Cancellable.IsCancellable b) => O.MethodInfo PromptPerformSyncMethodInfo a signature where+ overloadedMethod _ = promptPerformSync++#endif++-- method Prompt::run+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Prompt"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a prompt", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "window_id", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "string form of XWindow id for parent window to be transient for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_type", argType = TInterface (Name {namespace = "GLib", name = "VariantType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the variant type of the prompt result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just TVariant+-- throws : True+-- Skip return : False++foreign import ccall "secret_prompt_run" secret_prompt_run :: + Ptr Prompt -> -- self : TInterface (Name {namespace = "Secret", name = "Prompt"})+ CString -> -- window_id : TBasicType TUTF8+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr GLib.VariantType.VariantType -> -- return_type : TInterface (Name {namespace = "GLib", name = "VariantType"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr GVariant)++{- |+Runs a prompt and performs the prompting. Returns a variant result if the+prompt was completed and not dismissed. The type of result depends on the+action the prompt is completing, and is defined in the Secret Service DBus+API specification.++If /@windowId@/ is non-null then it is used as an XWindow id on Linux. The API+expects this id to be converted to a string using the \<literal>@/d/@\<\/literal>+printf format. The Secret Service can make its prompt transient for the window+with this id. In some Secret Service implementations this is not possible, so+the behavior depending on this should degrade gracefully.++This runs the dialog in a recursive mainloop. When run from a user interface+thread, this means the user interface will remain responsive. Care should be+taken that appropriate user interface actions are disabled while running the+prompt.+-}+promptRun ::+ (B.CallStack.HasCallStack, MonadIO m, IsPrompt a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: a prompt -}+ -> Maybe (T.Text)+ {- ^ /@windowId@/: string form of XWindow id for parent window to be transient for -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> GLib.VariantType.VariantType+ {- ^ /@returnType@/: the variant type of the prompt result -}+ -> m GVariant+ {- ^ __Returns:__ 'Nothing' if the prompt was dismissed or an error occurred /(Can throw 'Data.GI.Base.GError.GError')/ -}+promptRun self windowId cancellable returnType = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeWindowId <- case windowId of+ Nothing -> return nullPtr+ Just jWindowId -> do+ jWindowId' <- textToCString jWindowId+ return jWindowId'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ returnType' <- unsafeManagedPtrGetPtr returnType+ onException (do+ result <- propagateGError $ secret_prompt_run self' maybeWindowId maybeCancellable returnType'+ checkUnexpectedReturnNULL "promptRun" result+ result' <- B.GVariant.wrapGVariantPtr result+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ touchManagedPtr returnType+ freeMem maybeWindowId+ return result'+ ) (do+ freeMem maybeWindowId+ )++#if ENABLE_OVERLOADING+data PromptRunMethodInfo+instance (signature ~ (Maybe (T.Text) -> Maybe (b) -> GLib.VariantType.VariantType -> m GVariant), MonadIO m, IsPrompt a, Gio.Cancellable.IsCancellable b) => O.MethodInfo PromptRunMethodInfo a signature where+ overloadedMethod _ = promptRun++#endif++
+ GI/Secret/Objects/Prompt.hs-boot view
@@ -0,0 +1,41 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Objects.Prompt where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++newtype Prompt = Prompt (ManagedPtr Prompt)+instance GObject Prompt where+class (GObject o, O.IsDescendantOf Prompt o) => IsPrompt o+instance (GObject o, O.IsDescendantOf Prompt o) => IsPrompt o+instance O.HasParentTypes Prompt+#if ENABLE_OVERLOADING+data PromptPerformMethodInfo+#endif+#if ENABLE_OVERLOADING+data PromptPerformFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data PromptPerformSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data PromptRunMethodInfo+#endif
+ GI/Secret/Objects/Service.hs view
@@ -0,0 +1,3256 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)++A proxy object representing the Secret Service.+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Objects.Service+ ( +#if ENABLE_OVERLOADING+ ServiceCreateItemDbusPathSyncMethodInfo ,+#endif++-- * Exported types+ Service(..) ,+ IsService ,+ toService ,+ noService ,+++ -- * Methods+-- ** clear #method:clear#++#if ENABLE_OVERLOADING+ ServiceClearMethodInfo ,+#endif+ serviceClear ,+++-- ** clearFinish #method:clearFinish#++#if ENABLE_OVERLOADING+ ServiceClearFinishMethodInfo ,+#endif+ serviceClearFinish ,+++-- ** clearSync #method:clearSync#++#if ENABLE_OVERLOADING+ ServiceClearSyncMethodInfo ,+#endif+ serviceClearSync ,+++-- ** decodeDbusSecret #method:decodeDbusSecret#++#if ENABLE_OVERLOADING+ ServiceDecodeDbusSecretMethodInfo ,+#endif+ serviceDecodeDbusSecret ,+++-- ** disconnect #method:disconnect#++ serviceDisconnect ,+++-- ** encodeDbusSecret #method:encodeDbusSecret#++#if ENABLE_OVERLOADING+ ServiceEncodeDbusSecretMethodInfo ,+#endif+ serviceEncodeDbusSecret ,+++-- ** ensureSession #method:ensureSession#++#if ENABLE_OVERLOADING+ ServiceEnsureSessionMethodInfo ,+#endif+ serviceEnsureSession ,+++-- ** ensureSessionFinish #method:ensureSessionFinish#++#if ENABLE_OVERLOADING+ ServiceEnsureSessionFinishMethodInfo ,+#endif+ serviceEnsureSessionFinish ,+++-- ** ensureSessionSync #method:ensureSessionSync#++#if ENABLE_OVERLOADING+ ServiceEnsureSessionSyncMethodInfo ,+#endif+ serviceEnsureSessionSync ,+++-- ** get #method:get#++ serviceGet ,+++-- ** getCollectionGtype #method:getCollectionGtype#++#if ENABLE_OVERLOADING+ ServiceGetCollectionGtypeMethodInfo ,+#endif+ serviceGetCollectionGtype ,+++-- ** getCollections #method:getCollections#++#if ENABLE_OVERLOADING+ ServiceGetCollectionsMethodInfo ,+#endif+ serviceGetCollections ,+++-- ** getFinish #method:getFinish#++ serviceGetFinish ,+++-- ** getFlags #method:getFlags#++#if ENABLE_OVERLOADING+ ServiceGetFlagsMethodInfo ,+#endif+ serviceGetFlags ,+++-- ** getItemGtype #method:getItemGtype#++#if ENABLE_OVERLOADING+ ServiceGetItemGtypeMethodInfo ,+#endif+ serviceGetItemGtype ,+++-- ** getSessionAlgorithms #method:getSessionAlgorithms#++#if ENABLE_OVERLOADING+ ServiceGetSessionAlgorithmsMethodInfo ,+#endif+ serviceGetSessionAlgorithms ,+++-- ** getSessionDbusPath #method:getSessionDbusPath#++#if ENABLE_OVERLOADING+ ServiceGetSessionDbusPathMethodInfo ,+#endif+ serviceGetSessionDbusPath ,+++-- ** getSync #method:getSync#++ serviceGetSync ,+++-- ** loadCollections #method:loadCollections#++#if ENABLE_OVERLOADING+ ServiceLoadCollectionsMethodInfo ,+#endif+ serviceLoadCollections ,+++-- ** loadCollectionsFinish #method:loadCollectionsFinish#++#if ENABLE_OVERLOADING+ ServiceLoadCollectionsFinishMethodInfo ,+#endif+ serviceLoadCollectionsFinish ,+++-- ** loadCollectionsSync #method:loadCollectionsSync#++#if ENABLE_OVERLOADING+ ServiceLoadCollectionsSyncMethodInfo ,+#endif+ serviceLoadCollectionsSync ,+++-- ** lock #method:lock#++#if ENABLE_OVERLOADING+ ServiceLockMethodInfo ,+#endif+ serviceLock ,+++-- ** lockFinish #method:lockFinish#++#if ENABLE_OVERLOADING+ ServiceLockFinishMethodInfo ,+#endif+ serviceLockFinish ,+++-- ** lockSync #method:lockSync#++#if ENABLE_OVERLOADING+ ServiceLockSyncMethodInfo ,+#endif+ serviceLockSync ,+++-- ** lookup #method:lookup#++#if ENABLE_OVERLOADING+ ServiceLookupMethodInfo ,+#endif+ serviceLookup ,+++-- ** lookupFinish #method:lookupFinish#++#if ENABLE_OVERLOADING+ ServiceLookupFinishMethodInfo ,+#endif+ serviceLookupFinish ,+++-- ** lookupSync #method:lookupSync#++#if ENABLE_OVERLOADING+ ServiceLookupSyncMethodInfo ,+#endif+ serviceLookupSync ,+++-- ** open #method:open#++ serviceOpen ,+++-- ** openFinish #method:openFinish#++ serviceOpenFinish ,+++-- ** openSync #method:openSync#++ serviceOpenSync ,+++-- ** prompt #method:prompt#++#if ENABLE_OVERLOADING+ ServicePromptMethodInfo ,+#endif+ servicePrompt ,+++-- ** promptFinish #method:promptFinish#++#if ENABLE_OVERLOADING+ ServicePromptFinishMethodInfo ,+#endif+ servicePromptFinish ,+++-- ** promptSync #method:promptSync#++#if ENABLE_OVERLOADING+ ServicePromptSyncMethodInfo ,+#endif+ servicePromptSync ,+++-- ** search #method:search#++#if ENABLE_OVERLOADING+ ServiceSearchMethodInfo ,+#endif+ serviceSearch ,+++-- ** searchFinish #method:searchFinish#++#if ENABLE_OVERLOADING+ ServiceSearchFinishMethodInfo ,+#endif+ serviceSearchFinish ,+++-- ** searchSync #method:searchSync#++#if ENABLE_OVERLOADING+ ServiceSearchSyncMethodInfo ,+#endif+ serviceSearchSync ,+++-- ** setAlias #method:setAlias#++#if ENABLE_OVERLOADING+ ServiceSetAliasMethodInfo ,+#endif+ serviceSetAlias ,+++-- ** setAliasFinish #method:setAliasFinish#++#if ENABLE_OVERLOADING+ ServiceSetAliasFinishMethodInfo ,+#endif+ serviceSetAliasFinish ,+++-- ** setAliasSync #method:setAliasSync#++#if ENABLE_OVERLOADING+ ServiceSetAliasSyncMethodInfo ,+#endif+ serviceSetAliasSync ,+++-- ** store #method:store#++#if ENABLE_OVERLOADING+ ServiceStoreMethodInfo ,+#endif+ serviceStore ,+++-- ** storeFinish #method:storeFinish#++#if ENABLE_OVERLOADING+ ServiceStoreFinishMethodInfo ,+#endif+ serviceStoreFinish ,+++-- ** storeSync #method:storeSync#++#if ENABLE_OVERLOADING+ ServiceStoreSyncMethodInfo ,+#endif+ serviceStoreSync ,+++-- ** unlock #method:unlock#++#if ENABLE_OVERLOADING+ ServiceUnlockMethodInfo ,+#endif+ serviceUnlock ,+++-- ** unlockFinish #method:unlockFinish#++#if ENABLE_OVERLOADING+ ServiceUnlockFinishMethodInfo ,+#endif+ serviceUnlockFinish ,+++-- ** unlockSync #method:unlockSync#++#if ENABLE_OVERLOADING+ ServiceUnlockSyncMethodInfo ,+#endif+ serviceUnlockSync ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import qualified GI.GLib.Structs.VariantType as GLib.VariantType+import qualified GI.GObject.Objects.Object as GObject.Object+import qualified GI.Gio.Callbacks as Gio.Callbacks+import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable+import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult+import qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface+import qualified GI.Gio.Interfaces.Initable as Gio.Initable+import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable+import qualified GI.Gio.Objects.DBusProxy as Gio.DBusProxy+import {-# SOURCE #-} qualified GI.Secret.Flags as Secret.Flags+import {-# SOURCE #-} qualified GI.Secret.Objects.Collection as Secret.Collection+import {-# SOURCE #-} qualified GI.Secret.Objects.Item as Secret.Item+import {-# SOURCE #-} qualified GI.Secret.Objects.Prompt as Secret.Prompt+import {-# SOURCE #-} qualified GI.Secret.Structs.Schema as Secret.Schema+import {-# SOURCE #-} qualified GI.Secret.Structs.Value as Secret.Value++-- | Memory-managed wrapper type.+newtype Service = Service (ManagedPtr Service)+foreign import ccall "secret_service_get_type"+ c_secret_service_get_type :: IO GType++instance GObject Service where+ gobjectType = c_secret_service_get_type+ ++-- | Type class for types which can be safely cast to `Service`, for instance with `toService`.+class (GObject o, O.IsDescendantOf Service o) => IsService o+instance (GObject o, O.IsDescendantOf Service o) => IsService o++instance O.HasParentTypes Service+type instance O.ParentTypes Service = '[Gio.DBusProxy.DBusProxy, GObject.Object.Object, Gio.AsyncInitable.AsyncInitable, Gio.DBusInterface.DBusInterface, Gio.Initable.Initable]++-- | Cast to `Service`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.+toService :: (MonadIO m, IsService o) => o -> m Service+toService = liftIO . unsafeCastTo Service++-- | A convenience alias for `Nothing` :: `Maybe` `Service`.+noService :: Maybe Service+noService = Nothing++#if ENABLE_OVERLOADING+type family ResolveServiceMethod (t :: Symbol) (o :: *) :: * where+ ResolveServiceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo+ ResolveServiceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo+ ResolveServiceMethod "call" o = Gio.DBusProxy.DBusProxyCallMethodInfo+ ResolveServiceMethod "callFinish" o = Gio.DBusProxy.DBusProxyCallFinishMethodInfo+ ResolveServiceMethod "callSync" o = Gio.DBusProxy.DBusProxyCallSyncMethodInfo+ ResolveServiceMethod "callWithUnixFdList" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListMethodInfo+ ResolveServiceMethod "callWithUnixFdListFinish" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListFinishMethodInfo+ ResolveServiceMethod "callWithUnixFdListSync" o = Gio.DBusProxy.DBusProxyCallWithUnixFdListSyncMethodInfo+ ResolveServiceMethod "clear" o = ServiceClearMethodInfo+ ResolveServiceMethod "clearFinish" o = ServiceClearFinishMethodInfo+ ResolveServiceMethod "clearSync" o = ServiceClearSyncMethodInfo+ ResolveServiceMethod "createItemDbusPathSync" o = ServiceCreateItemDbusPathSyncMethodInfo+ ResolveServiceMethod "decodeDbusSecret" o = ServiceDecodeDbusSecretMethodInfo+ ResolveServiceMethod "encodeDbusSecret" o = ServiceEncodeDbusSecretMethodInfo+ ResolveServiceMethod "ensureSession" o = ServiceEnsureSessionMethodInfo+ ResolveServiceMethod "ensureSessionFinish" o = ServiceEnsureSessionFinishMethodInfo+ ResolveServiceMethod "ensureSessionSync" o = ServiceEnsureSessionSyncMethodInfo+ ResolveServiceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo+ ResolveServiceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo+ ResolveServiceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo+ ResolveServiceMethod "init" o = Gio.Initable.InitableInitMethodInfo+ ResolveServiceMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo+ ResolveServiceMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo+ ResolveServiceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo+ ResolveServiceMethod "loadCollections" o = ServiceLoadCollectionsMethodInfo+ ResolveServiceMethod "loadCollectionsFinish" o = ServiceLoadCollectionsFinishMethodInfo+ ResolveServiceMethod "loadCollectionsSync" o = ServiceLoadCollectionsSyncMethodInfo+ ResolveServiceMethod "lock" o = ServiceLockMethodInfo+ ResolveServiceMethod "lockFinish" o = ServiceLockFinishMethodInfo+ ResolveServiceMethod "lockSync" o = ServiceLockSyncMethodInfo+ ResolveServiceMethod "lookup" o = ServiceLookupMethodInfo+ ResolveServiceMethod "lookupFinish" o = ServiceLookupFinishMethodInfo+ ResolveServiceMethod "lookupSync" o = ServiceLookupSyncMethodInfo+ ResolveServiceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo+ ResolveServiceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo+ ResolveServiceMethod "prompt" o = ServicePromptMethodInfo+ ResolveServiceMethod "promptFinish" o = ServicePromptFinishMethodInfo+ ResolveServiceMethod "promptSync" o = ServicePromptSyncMethodInfo+ ResolveServiceMethod "ref" o = GObject.Object.ObjectRefMethodInfo+ ResolveServiceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo+ ResolveServiceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo+ ResolveServiceMethod "search" o = ServiceSearchMethodInfo+ ResolveServiceMethod "searchFinish" o = ServiceSearchFinishMethodInfo+ ResolveServiceMethod "searchSync" o = ServiceSearchSyncMethodInfo+ ResolveServiceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo+ ResolveServiceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo+ ResolveServiceMethod "store" o = ServiceStoreMethodInfo+ ResolveServiceMethod "storeFinish" o = ServiceStoreFinishMethodInfo+ ResolveServiceMethod "storeSync" o = ServiceStoreSyncMethodInfo+ ResolveServiceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo+ ResolveServiceMethod "unlock" o = ServiceUnlockMethodInfo+ ResolveServiceMethod "unlockFinish" o = ServiceUnlockFinishMethodInfo+ ResolveServiceMethod "unlockSync" o = ServiceUnlockSyncMethodInfo+ ResolveServiceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo+ ResolveServiceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo+ ResolveServiceMethod "getCachedProperty" o = Gio.DBusProxy.DBusProxyGetCachedPropertyMethodInfo+ ResolveServiceMethod "getCachedPropertyNames" o = Gio.DBusProxy.DBusProxyGetCachedPropertyNamesMethodInfo+ ResolveServiceMethod "getCollectionGtype" o = ServiceGetCollectionGtypeMethodInfo+ ResolveServiceMethod "getCollections" o = ServiceGetCollectionsMethodInfo+ ResolveServiceMethod "getConnection" o = Gio.DBusProxy.DBusProxyGetConnectionMethodInfo+ ResolveServiceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo+ ResolveServiceMethod "getDefaultTimeout" o = Gio.DBusProxy.DBusProxyGetDefaultTimeoutMethodInfo+ ResolveServiceMethod "getFlags" o = ServiceGetFlagsMethodInfo+ ResolveServiceMethod "getInfo" o = Gio.DBusInterface.DBusInterfaceGetInfoMethodInfo+ ResolveServiceMethod "getInterfaceInfo" o = Gio.DBusProxy.DBusProxyGetInterfaceInfoMethodInfo+ ResolveServiceMethod "getInterfaceName" o = Gio.DBusProxy.DBusProxyGetInterfaceNameMethodInfo+ ResolveServiceMethod "getItemGtype" o = ServiceGetItemGtypeMethodInfo+ ResolveServiceMethod "getName" o = Gio.DBusProxy.DBusProxyGetNameMethodInfo+ ResolveServiceMethod "getNameOwner" o = Gio.DBusProxy.DBusProxyGetNameOwnerMethodInfo+ ResolveServiceMethod "getObject" o = Gio.DBusInterface.DBusInterfaceGetObjectMethodInfo+ ResolveServiceMethod "getObjectPath" o = Gio.DBusProxy.DBusProxyGetObjectPathMethodInfo+ ResolveServiceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo+ ResolveServiceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo+ ResolveServiceMethod "getSessionAlgorithms" o = ServiceGetSessionAlgorithmsMethodInfo+ ResolveServiceMethod "getSessionDbusPath" o = ServiceGetSessionDbusPathMethodInfo+ ResolveServiceMethod "setAlias" o = ServiceSetAliasMethodInfo+ ResolveServiceMethod "setAliasFinish" o = ServiceSetAliasFinishMethodInfo+ ResolveServiceMethod "setAliasSync" o = ServiceSetAliasSyncMethodInfo+ ResolveServiceMethod "setCachedProperty" o = Gio.DBusProxy.DBusProxySetCachedPropertyMethodInfo+ ResolveServiceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo+ ResolveServiceMethod "setDefaultTimeout" o = Gio.DBusProxy.DBusProxySetDefaultTimeoutMethodInfo+ ResolveServiceMethod "setInterfaceInfo" o = Gio.DBusProxy.DBusProxySetInterfaceInfoMethodInfo+ ResolveServiceMethod "setObject" o = Gio.DBusInterface.DBusInterfaceSetObjectMethodInfo+ ResolveServiceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo+ ResolveServiceMethod l o = O.MethodResolutionFailed l o++instance (info ~ ResolveServiceMethod t Service, O.MethodInfo info Service p) => OL.IsLabel t (Service -> p) where+#if MIN_VERSION_base(4,10,0)+ fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#else+ fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#endif++#endif++#if ENABLE_OVERLOADING+instance O.HasAttributeList Service+type instance O.AttributeList Service = ServiceAttributeList+type ServiceAttributeList = ('[ '("gBusType", Gio.DBusProxy.DBusProxyGBusTypePropertyInfo), '("gConnection", Gio.DBusProxy.DBusProxyGConnectionPropertyInfo), '("gDefaultTimeout", Gio.DBusProxy.DBusProxyGDefaultTimeoutPropertyInfo), '("gFlags", Gio.DBusProxy.DBusProxyGFlagsPropertyInfo), '("gInterfaceInfo", Gio.DBusProxy.DBusProxyGInterfaceInfoPropertyInfo), '("gInterfaceName", Gio.DBusProxy.DBusProxyGInterfaceNamePropertyInfo), '("gName", Gio.DBusProxy.DBusProxyGNamePropertyInfo), '("gNameOwner", Gio.DBusProxy.DBusProxyGNameOwnerPropertyInfo), '("gObjectPath", Gio.DBusProxy.DBusProxyGObjectPathPropertyInfo)] :: [(Symbol, *)])+#endif++#if ENABLE_OVERLOADING+#endif++#if ENABLE_OVERLOADING+type instance O.SignalList Service = ServiceSignalList+type ServiceSignalList = ('[ '("gPropertiesChanged", Gio.DBusProxy.DBusProxyGPropertiesChangedSignalInfo), '("gSignal", Gio.DBusProxy.DBusProxyGSignalSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])++#endif++-- method Service::clear+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_clear" secret_service_clear :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Remove unlocked items which match the attributes from the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method will return immediately and complete asynchronously.+-}+serviceClear ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceClear service schema attributes cancellable callback = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_clear service' maybeSchema attributes'''''' maybeCancellable maybeCallback userData+ touchManagedPtr service+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()++#if ENABLE_OVERLOADING+data ServiceClearMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceClearMethodInfo a signature where+ overloadedMethod _ = serviceClear++#endif++-- method Service::clear_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_clear_finish" secret_service_clear_finish :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Finish asynchronous operation to remove items from the secret+service.+-}+serviceClearFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceClearFinish service result_ = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_service_clear_finish service' result_'+ touchManagedPtr service+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceClearFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceClearFinishMethodInfo a signature where+ overloadedMethod _ = serviceClearFinish++#endif++-- method Service::clear_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_clear_sync" secret_service_clear_sync :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Remove unlocked items which match the attributes from the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user interface+threads.+-}+serviceClearSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceClearSync service schema attributes cancellable = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_service_clear_sync service' maybeSchema attributes'''''' maybeCancellable+ touchManagedPtr service+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()+ ) (do+ unrefGHashTable attributes''''''+ )++#if ENABLE_OVERLOADING+data ServiceClearSyncMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (b) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceClearSyncMethodInfo a signature where+ overloadedMethod _ = serviceClearSync++#endif++-- XXX Could not generate method Service::create_item_dbus_path_sync+-- Error was : Not implemented: "GHashTable element of type TVariant unsupported."+#if ENABLE_OVERLOADING+-- XXX: Dummy instance, since code generation failed.+-- Please file a bug at http://github.com/haskell-gi/haskell-gi.+data ServiceCreateItemDbusPathSyncMethodInfo+instance (p ~ (), o ~ O.MethodResolutionFailed "createItemDbusPathSync" Service) => O.MethodInfo ServiceCreateItemDbusPathSyncMethodInfo o p where+ overloadedMethod _ = undefined+#endif++-- method Service::decode_dbus_secret+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the encoded secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Value"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_decode_dbus_secret" secret_service_decode_dbus_secret :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr GVariant -> -- value : TVariant+ IO (Ptr Secret.Value.Value)++{- |+Decode a 'GI.Secret.Structs.Value.Value' into GVariant received with the Secret Service+DBus API.++The GVariant should have a \<literal>(oayays)\<\/literal> signature.++A session must have already been established by the 'GI.Secret.Objects.Service.Service', and+the encoded secret must be valid for that session.+-}+serviceDecodeDbusSecret ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@service@/: the service -}+ -> GVariant+ {- ^ /@value@/: the encoded secret -}+ -> m Secret.Value.Value+ {- ^ __Returns:__ the decoded secret value -}+serviceDecodeDbusSecret service value = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ value' <- unsafeManagedPtrGetPtr value+ result <- secret_service_decode_dbus_secret service' value'+ checkUnexpectedReturnNULL "serviceDecodeDbusSecret" result+ result' <- (wrapBoxed Secret.Value.Value) result+ touchManagedPtr service+ touchManagedPtr value+ return result'++#if ENABLE_OVERLOADING+data ServiceDecodeDbusSecretMethodInfo+instance (signature ~ (GVariant -> m Secret.Value.Value), MonadIO m, IsService a) => O.MethodInfo ServiceDecodeDbusSecretMethodInfo a signature where+ overloadedMethod _ = serviceDecodeDbusSecret++#endif++-- method Service::encode_dbus_secret+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just TVariant+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_encode_dbus_secret" secret_service_encode_dbus_secret :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Value.Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ IO (Ptr GVariant)++{- |+Encodes a 'GI.Secret.Structs.Value.Value' into GVariant for use with the Secret Service+DBus API.++The resulting GVariant will have a \<literal>(oayays)\<\/literal> signature.++A session must have already been established by the 'GI.Secret.Objects.Service.Service'.+-}+serviceEncodeDbusSecret ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@service@/: the service -}+ -> Secret.Value.Value+ {- ^ /@value@/: the secret value -}+ -> m GVariant+ {- ^ __Returns:__ the encoded secret -}+serviceEncodeDbusSecret service value = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ value' <- unsafeManagedPtrGetPtr value+ result <- secret_service_encode_dbus_secret service' value'+ checkUnexpectedReturnNULL "serviceEncodeDbusSecret" result+ result' <- B.GVariant.newGVariantFromPtr result+ touchManagedPtr service+ touchManagedPtr value+ return result'++#if ENABLE_OVERLOADING+data ServiceEncodeDbusSecretMethodInfo+instance (signature ~ (Secret.Value.Value -> m GVariant), MonadIO m, IsService a) => O.MethodInfo ServiceEncodeDbusSecretMethodInfo a signature where+ overloadedMethod _ = serviceEncodeDbusSecret++#endif++-- method Service::ensure_session+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_ensure_session" secret_service_ensure_session :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Ensure that the 'GI.Secret.Objects.Service.Service' proxy has established a session with the+Secret Service. This session is used to transfer secrets.++It is not normally necessary to call this method, as the session is+established as necessary. You can also pass the 'GI.Secret.Flags.ServiceFlagsOpenSession'+to 'GI.Secret.Objects.Service.serviceGet' in order to ensure that a session has been established+by the time you get the 'GI.Secret.Objects.Service.Service' proxy.++This method will return immediately and complete asynchronously.+-}+serviceEnsureSession ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: the secret service -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceEnsureSession self cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_ensure_session self' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data ServiceEnsureSessionMethodInfo+instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceEnsureSessionMethodInfo a signature where+ overloadedMethod _ = serviceEnsureSession++#endif++-- method Service::ensure_session_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_ensure_session_finish" secret_service_ensure_session_finish :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Finish an asynchronous operation to ensure that the 'GI.Secret.Objects.Service.Service' proxy+has established a session with the Secret Service.+-}+serviceEnsureSessionFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: the secret service -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceEnsureSessionFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_service_ensure_session_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceEnsureSessionFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceEnsureSessionFinishMethodInfo a signature where+ overloadedMethod _ = serviceEnsureSessionFinish++#endif++-- method Service::ensure_session_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_ensure_session_sync" secret_service_ensure_session_sync :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Ensure that the 'GI.Secret.Objects.Service.Service' proxy has established a session with the+Secret Service. This session is used to transfer secrets.++It is not normally necessary to call this method, as the session is+established as necessary. You can also pass the 'GI.Secret.Flags.ServiceFlagsOpenSession'+to 'GI.Secret.Objects.Service.serviceGetSync' in order to ensure that a session has been+established by the time you get the 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user interface+threads.+-}+serviceEnsureSessionSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: the secret service -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceEnsureSessionSync self cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_service_ensure_session_sync self' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceEnsureSessionSyncMethodInfo+instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceEnsureSessionSyncMethodInfo a signature where+ overloadedMethod _ = serviceEnsureSessionSync++#endif++-- method Service::get_collection_gtype+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TGType)+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_get_collection_gtype" secret_service_get_collection_gtype :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ IO CGType++{- |+Get the GObject type for collections instantiated by this service.+This will always be either 'GI.Secret.Objects.Collection.Collection' or derived from it.+-}+serviceGetCollectionGtype ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@self@/: the secret service -}+ -> m GType+ {- ^ __Returns:__ the gobject type for collections -}+serviceGetCollectionGtype self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_service_get_collection_gtype self'+ let result' = GType result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data ServiceGetCollectionGtypeMethodInfo+instance (signature ~ (m GType), MonadIO m, IsService a) => O.MethodInfo ServiceGetCollectionGtypeMethodInfo a signature where+ overloadedMethod _ = serviceGetCollectionGtype++#endif++-- method Service::get_collections+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TGList (TInterface (Name {namespace = "Secret", name = "Collection"})))+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_get_collections" secret_service_get_collections :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ IO (Ptr (GList (Ptr Secret.Collection.Collection)))++{- |+Get a list of 'GI.Secret.Objects.Collection.Collection' objects representing all the collections+in the secret service.++If the 'GI.Secret.Flags.ServiceFlagsLoadCollections' flag was not specified when+initializing 'GI.Secret.Objects.Service.Service' proxy object, then this method will return+'Nothing'. Use 'GI.Secret.Objects.Service.serviceLoadCollections' to load the collections.+-}+serviceGetCollections ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@self@/: the secret service proxy -}+ -> m [Secret.Collection.Collection]+ {- ^ __Returns:__ a+ list of the collections in the secret service -}+serviceGetCollections self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_service_get_collections self'+ result' <- unpackGList result+ result'' <- mapM (wrapObject Secret.Collection.Collection) result'+ g_list_free result+ touchManagedPtr self+ return result''++#if ENABLE_OVERLOADING+data ServiceGetCollectionsMethodInfo+instance (signature ~ (m [Secret.Collection.Collection]), MonadIO m, IsService a) => O.MethodInfo ServiceGetCollectionsMethodInfo a signature where+ overloadedMethod _ = serviceGetCollections++#endif++-- method Service::get_flags+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "ServiceFlags"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_get_flags" secret_service_get_flags :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ IO CUInt++{- |+Get the flags representing what features of the 'GI.Secret.Objects.Service.Service' proxy+have been initialized.++Use 'GI.Secret.Objects.Service.serviceEnsureSession' or 'GI.Secret.Objects.Service.serviceLoadCollections'+to initialize further features and change the flags.+-}+serviceGetFlags ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@self@/: the secret service proxy -}+ -> m [Secret.Flags.ServiceFlags]+ {- ^ __Returns:__ the flags for features initialized -}+serviceGetFlags self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_service_get_flags self'+ let result' = wordToGFlags result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data ServiceGetFlagsMethodInfo+instance (signature ~ (m [Secret.Flags.ServiceFlags]), MonadIO m, IsService a) => O.MethodInfo ServiceGetFlagsMethodInfo a signature where+ overloadedMethod _ = serviceGetFlags++#endif++-- method Service::get_item_gtype+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TGType)+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_get_item_gtype" secret_service_get_item_gtype :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ IO CGType++{- |+Get the GObject type for items instantiated by this service.+This will always be either 'GI.Secret.Objects.Item.Item' or derived from it.+-}+serviceGetItemGtype ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@self@/: the service -}+ -> m GType+ {- ^ __Returns:__ the gobject type for items -}+serviceGetItemGtype self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_service_get_item_gtype self'+ let result' = GType result+ touchManagedPtr self+ return result'++#if ENABLE_OVERLOADING+data ServiceGetItemGtypeMethodInfo+instance (signature ~ (m GType), MonadIO m, IsService a) => O.MethodInfo ServiceGetItemGtypeMethodInfo a signature where+ overloadedMethod _ = serviceGetItemGtype++#endif++-- method Service::get_session_algorithms+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_get_session_algorithms" secret_service_get_session_algorithms :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ IO CString++{- |+Get the set of algorithms being used to transfer secrets between this+secret service proxy and the Secret Service itself.++This will be 'Nothing' if no session has been established. Use+'GI.Secret.Objects.Service.serviceEnsureSession' to establish a session.+-}+serviceGetSessionAlgorithms ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@self@/: the secret service proxy -}+ -> m (Maybe T.Text)+ {- ^ __Returns:__ a string representing the algorithms for transferring+ secrets -}+serviceGetSessionAlgorithms self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_service_get_session_algorithms self'+ maybeResult <- convertIfNonNull result $ \result' -> do+ result'' <- cstringToText result'+ return result''+ touchManagedPtr self+ return maybeResult++#if ENABLE_OVERLOADING+data ServiceGetSessionAlgorithmsMethodInfo+instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsService a) => O.MethodInfo ServiceGetSessionAlgorithmsMethodInfo a signature where+ overloadedMethod _ = serviceGetSessionAlgorithms++#endif++-- method Service::get_session_dbus_path+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service proxy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_get_session_dbus_path" secret_service_get_session_dbus_path :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ IO CString++{- |+Get the D-Bus object path of the session object being used to transfer+secrets between this secret service proxy and the Secret Service itself.++This will be 'Nothing' if no session has been established. Use+'GI.Secret.Objects.Service.serviceEnsureSession' to establish a session.+-}+serviceGetSessionDbusPath ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a) =>+ a+ {- ^ /@self@/: the secret service proxy -}+ -> m (Maybe T.Text)+ {- ^ __Returns:__ a string representing the D-Bus object path of the+ session -}+serviceGetSessionDbusPath self = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result <- secret_service_get_session_dbus_path self'+ maybeResult <- convertIfNonNull result $ \result' -> do+ result'' <- cstringToText result'+ return result''+ touchManagedPtr self+ return maybeResult++#if ENABLE_OVERLOADING+data ServiceGetSessionDbusPathMethodInfo+instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsService a) => O.MethodInfo ServiceGetSessionDbusPathMethodInfo a signature where+ overloadedMethod _ = serviceGetSessionDbusPath++#endif++-- method Service::load_collections+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_load_collections" secret_service_load_collections :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Ensure that the 'GI.Secret.Objects.Service.Service' proxy has loaded all the collections present+in the Secret Service. This affects the result of+'GI.Secret.Objects.Service.serviceGetCollections'.++You can also pass the 'GI.Secret.Flags.ServiceFlagsLoadCollections' to+'GI.Secret.Objects.Service.serviceGetSync' in order to ensure that the collections have been+loaded by the time you get the 'GI.Secret.Objects.Service.Service' proxy.++This method will return immediately and complete asynchronously.+-}+serviceLoadCollections ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: the secret service -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceLoadCollections self cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_load_collections self' maybeCancellable maybeCallback userData+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data ServiceLoadCollectionsMethodInfo+instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceLoadCollectionsMethodInfo a signature where+ overloadedMethod _ = serviceLoadCollections++#endif++-- method Service::load_collections_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_load_collections_finish" secret_service_load_collections_finish :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Complete an asynchronous operation to ensure that the 'GI.Secret.Objects.Service.Service' proxy+has loaded all the collections present in the Secret Service.+-}+serviceLoadCollectionsFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: the secret service -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceLoadCollectionsFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_service_load_collections_finish self' result_'+ touchManagedPtr self+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceLoadCollectionsFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceLoadCollectionsFinishMethodInfo a signature where+ overloadedMethod _ = serviceLoadCollectionsFinish++#endif++-- method Service::load_collections_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_load_collections_sync" secret_service_load_collections_sync :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Ensure that the 'GI.Secret.Objects.Service.Service' proxy has loaded all the collections present+in the Secret Service. This affects the result of+'GI.Secret.Objects.Service.serviceGetCollections'.++You can also pass the 'GI.Secret.Flags.ServiceFlagsLoadCollections' to+'GI.Secret.Objects.Service.serviceGetSync' in order to ensure that the collections have been+loaded by the time you get the 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user interface+threads.+-}+serviceLoadCollectionsSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@self@/: the secret service -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceLoadCollectionsSync self cancellable = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_service_load_collections_sync self' maybeCancellable+ touchManagedPtr self+ whenJust cancellable touchManagedPtr+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceLoadCollectionsSyncMethodInfo+instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceLoadCollectionsSyncMethodInfo a signature where+ overloadedMethod _ = serviceLoadCollectionsSync++#endif++-- method Service::lock+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "objects", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the items or collections to lock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_lock" secret_service_lock :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr (GList (Ptr Gio.DBusProxy.DBusProxy)) -> -- objects : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Lock items or collections in the secret service.++The secret service may not be able to lock items individually, and may+lock an entire collection instead.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method returns immediately and completes asynchronously. The secret+service may prompt the user. 'GI.Secret.Objects.Service.servicePrompt' will be used to handle+any prompts that show up.+-}+serviceLock ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@service@/: the secret service -}+ -> [b]+ {- ^ /@objects@/: the items or collections to lock -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceLock service objects cancellable callback = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ objects' <- mapM unsafeManagedPtrCastPtr objects+ objects'' <- packGList objects'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_lock service' objects'' maybeCancellable maybeCallback userData+ touchManagedPtr service+ mapM_ touchManagedPtr objects+ whenJust cancellable touchManagedPtr+ g_list_free objects''+ return ()++#if ENABLE_OVERLOADING+data ServiceLockMethodInfo+instance (signature ~ ([b] -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServiceLockMethodInfo a signature where+ overloadedMethod _ = serviceLock++#endif++-- method Service::lock_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "locked", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to place list of items or collections that were locked", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]+-- Lengths : []+-- returnType : Just (TBasicType TInt)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_lock_finish" secret_service_lock_finish :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))) -> -- locked : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr (Ptr GError) -> -- error+ IO Int32++{- |+Complete asynchronous operation to lock items or collections in the secret+service.++The secret service may not be able to lock items individually, and may+lock an entire collection instead.+-}+serviceLockFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> b+ {- ^ /@result@/: asynchronous result passed to the callback -}+ -> m ((Int32, [Gio.DBusProxy.DBusProxy]))+ {- ^ __Returns:__ the number of items or collections that were locked /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceLockFinish service result_ = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ result_' <- unsafeManagedPtrCastPtr result_+ locked <- allocMem :: IO (Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))))+ onException (do+ result <- propagateGError $ secret_service_lock_finish service' result_' locked+ locked' <- peek locked+ locked'' <- unpackGList locked'+ locked''' <- mapM (wrapObject Gio.DBusProxy.DBusProxy) locked''+ g_list_free locked'+ touchManagedPtr service+ touchManagedPtr result_+ freeMem locked+ return (result, locked''')+ ) (do+ freeMem locked+ )++#if ENABLE_OVERLOADING+data ServiceLockFinishMethodInfo+instance (signature ~ (b -> m ((Int32, [Gio.DBusProxy.DBusProxy]))), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceLockFinishMethodInfo a signature where+ overloadedMethod _ = serviceLockFinish++#endif++-- method Service::lock_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "objects", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the items or collections to lock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "locked", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to place list of items or collections that were locked", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]+-- Lengths : []+-- returnType : Just (TBasicType TInt)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_lock_sync" secret_service_lock_sync :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr (GList (Ptr Gio.DBusProxy.DBusProxy)) -> -- objects : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))) -> -- locked : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr (Ptr GError) -> -- error+ IO Int32++{- |+Lock items or collections in the secret service.++The secret service may not be able to lock items individually, and may+lock an entire collection instead.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user+interface threads. The secret service may prompt the user.+'GI.Secret.Objects.Service.servicePrompt' will be used to handle any prompts that show up.+-}+serviceLockSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@service@/: the secret service -}+ -> [b]+ {- ^ /@objects@/: the items or collections to lock -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ((Int32, [Gio.DBusProxy.DBusProxy]))+ {- ^ __Returns:__ the number of items or collections that were locked /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceLockSync service objects cancellable = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ objects' <- mapM unsafeManagedPtrCastPtr objects+ objects'' <- packGList objects'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ locked <- allocMem :: IO (Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))))+ onException (do+ result <- propagateGError $ secret_service_lock_sync service' objects'' maybeCancellable locked+ locked' <- peek locked+ locked'' <- unpackGList locked'+ locked''' <- mapM (wrapObject Gio.DBusProxy.DBusProxy) locked''+ g_list_free locked'+ touchManagedPtr service+ mapM_ touchManagedPtr objects+ whenJust cancellable touchManagedPtr+ g_list_free objects''+ freeMem locked+ return (result, locked''')+ ) (do+ g_list_free objects''+ freeMem locked+ )++#if ENABLE_OVERLOADING+data ServiceLockSyncMethodInfo+instance (signature ~ ([b] -> Maybe (c) -> m ((Int32, [Gio.DBusProxy.DBusProxy]))), MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServiceLockSyncMethodInfo a signature where+ overloadedMethod _ = serviceLockSync++#endif++-- method Service::lookup+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_lookup" secret_service_lookup :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Lookup a secret value in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method will return immediately and complete asynchronously.+-}+serviceLookup ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceLookup service schema attributes cancellable callback = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_lookup service' maybeSchema attributes'''''' maybeCancellable maybeCallback userData+ touchManagedPtr service+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()++#if ENABLE_OVERLOADING+data ServiceLookupMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceLookupMethodInfo a signature where+ overloadedMethod _ = serviceLookup++#endif++-- method Service::lookup_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Value"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_lookup_finish" secret_service_lookup_finish :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Secret.Value.Value)++{- |+Finish asynchronous operation to lookup a secret value in the secret service.++If no secret is found then 'Nothing' is returned.+-}+serviceLookupFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m Secret.Value.Value+ {- ^ __Returns:__ a newly allocated 'GI.Secret.Structs.Value.Value', which should be+ released with 'GI.Secret.Structs.Value.valueUnref', or 'Nothing' if no secret found /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceLookupFinish service result_ = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_service_lookup_finish service' result_'+ checkUnexpectedReturnNULL "serviceLookupFinish" result+ result' <- (wrapBoxed Secret.Value.Value) result+ touchManagedPtr service+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceLookupFinishMethodInfo+instance (signature ~ (b -> m Secret.Value.Value), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceLookupFinishMethodInfo a signature where+ overloadedMethod _ = serviceLookupFinish++#endif++-- method Service::lookup_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Value"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_lookup_sync" secret_service_lookup_sync :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Secret.Value.Value)++{- |+Lookup a secret value in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user interface+threads.+-}+serviceLookupSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m Secret.Value.Value+ {- ^ __Returns:__ a newly allocated 'GI.Secret.Structs.Value.Value', which should be+ released with 'GI.Secret.Structs.Value.valueUnref', or 'Nothing' if no secret found /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceLookupSync service schema attributes cancellable = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_service_lookup_sync service' maybeSchema attributes'''''' maybeCancellable+ checkUnexpectedReturnNULL "serviceLookupSync" result+ result' <- (wrapBoxed Secret.Value.Value) result+ touchManagedPtr service+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return result'+ ) (do+ unrefGHashTable attributes''''''+ )++#if ENABLE_OVERLOADING+data ServiceLookupSyncMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (b) -> m Secret.Value.Value), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceLookupSyncMethodInfo a signature where+ overloadedMethod _ = serviceLookupSync++#endif++-- method Service::prompt+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "prompt", argType = TInterface (Name {namespace = "Secret", name = "Prompt"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the prompt", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_type", argType = TInterface (Name {namespace = "GLib", name = "VariantType"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the variant type of the prompt result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_prompt" secret_service_prompt :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Prompt.Prompt -> -- prompt : TInterface (Name {namespace = "Secret", name = "Prompt"})+ Ptr GLib.VariantType.VariantType -> -- return_type : TInterface (Name {namespace = "GLib", name = "VariantType"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Perform prompting for a 'GI.Secret.Objects.Prompt.Prompt'.++This function is called by other parts of this library to handle prompts+for the various actions that can require prompting.++Override the 'GI.Secret.Structs.ServiceClass.ServiceClass' \<literal>prompt_async\<\/literal> virtual method+to change the behavior of the prompting. The default behavior is to simply+run 'GI.Secret.Objects.Prompt.promptPerform' on the prompt.+-}+servicePrompt ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Secret.Prompt.IsPrompt b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@self@/: the secret service -}+ -> b+ {- ^ /@prompt@/: the prompt -}+ -> Maybe (GLib.VariantType.VariantType)+ {- ^ /@returnType@/: the variant type of the prompt result -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+servicePrompt self prompt returnType cancellable callback = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ prompt' <- unsafeManagedPtrCastPtr prompt+ maybeReturnType <- case returnType of+ Nothing -> return nullPtr+ Just jReturnType -> do+ jReturnType' <- unsafeManagedPtrGetPtr jReturnType+ return jReturnType'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_prompt self' prompt' maybeReturnType maybeCancellable maybeCallback userData+ touchManagedPtr self+ touchManagedPtr prompt+ whenJust returnType touchManagedPtr+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+data ServicePromptMethodInfo+instance (signature ~ (b -> Maybe (GLib.VariantType.VariantType) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Secret.Prompt.IsPrompt b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServicePromptMethodInfo a signature where+ overloadedMethod _ = servicePrompt++#endif++-- method Service::prompt_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just TVariant+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_prompt_finish" secret_service_prompt_finish :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr GVariant)++{- |+Complete asynchronous operation to perform prompting for a 'GI.Secret.Objects.Prompt.Prompt'.++Returns a variant result if the prompt was completed and not dismissed. The+type of result depends on the action the prompt is completing, and is defined+in the Secret Service DBus API specification.+-}+servicePromptFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@self@/: the secret service -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m GVariant+ {- ^ __Returns:__ 'Nothing' if the prompt was dismissed or an error occurred,+ a variant result if the prompt was successful /(Can throw 'Data.GI.Base.GError.GError')/ -}+servicePromptFinish self result_ = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_service_prompt_finish self' result_'+ checkUnexpectedReturnNULL "servicePromptFinish" result+ result' <- B.GVariant.wrapGVariantPtr result+ touchManagedPtr self+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServicePromptFinishMethodInfo+instance (signature ~ (b -> m GVariant), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServicePromptFinishMethodInfo a signature where+ overloadedMethod _ = servicePromptFinish++#endif++-- method Service::prompt_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "prompt", argType = TInterface (Name {namespace = "Secret", name = "Prompt"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the prompt", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "return_type", argType = TInterface (Name {namespace = "GLib", name = "VariantType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the variant type of the prompt result", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just TVariant+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_prompt_sync" secret_service_prompt_sync :: + Ptr Service -> -- self : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Prompt.Prompt -> -- prompt : TInterface (Name {namespace = "Secret", name = "Prompt"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr GLib.VariantType.VariantType -> -- return_type : TInterface (Name {namespace = "GLib", name = "VariantType"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr GVariant)++{- |+Perform prompting for a 'GI.Secret.Objects.Prompt.Prompt'.++Runs a prompt and performs the prompting. Returns a variant result if the+prompt was completed and not dismissed. The type of result depends on the+action the prompt is completing, and is defined in the Secret Service DBus+API specification.++This function is called by other parts of this library to handle prompts+for the various actions that can require prompting.++Override the 'GI.Secret.Structs.ServiceClass.ServiceClass' \<literal>prompt_sync\<\/literal> virtual method+to change the behavior of the prompting. The default behavior is to simply+run 'GI.Secret.Objects.Prompt.promptPerformSync' on the prompt with a 'Nothing' \<literal>window_id\<\/literal>.+-}+servicePromptSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Secret.Prompt.IsPrompt b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@self@/: the secret service -}+ -> b+ {- ^ /@prompt@/: the prompt -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> GLib.VariantType.VariantType+ {- ^ /@returnType@/: the variant type of the prompt result -}+ -> m GVariant+ {- ^ __Returns:__ 'Nothing' if the prompt was dismissed or an error occurred,+ a variant result if the prompt was successful /(Can throw 'Data.GI.Base.GError.GError')/ -}+servicePromptSync self prompt cancellable returnType = liftIO $ do+ self' <- unsafeManagedPtrCastPtr self+ prompt' <- unsafeManagedPtrCastPtr prompt+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ returnType' <- unsafeManagedPtrGetPtr returnType+ onException (do+ result <- propagateGError $ secret_service_prompt_sync self' prompt' maybeCancellable returnType'+ checkUnexpectedReturnNULL "servicePromptSync" result+ result' <- B.GVariant.wrapGVariantPtr result+ touchManagedPtr self+ touchManagedPtr prompt+ whenJust cancellable touchManagedPtr+ touchManagedPtr returnType+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServicePromptSyncMethodInfo+instance (signature ~ (b -> Maybe (c) -> GLib.VariantType.VariantType -> m GVariant), MonadIO m, IsService a, Secret.Prompt.IsPrompt b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServicePromptSyncMethodInfo a signature where+ overloadedMethod _ = servicePromptSync++#endif++-- method Service::search+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search for items matching these attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "SearchFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search option flags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 6, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_search" secret_service_search :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "SearchFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Search for items matching the /@attributes@/. All collections are searched.+The /@attributes@/ should be a table of string keys and string values.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++If 'GI.Secret.Flags.SearchFlagsAll' is set in /@flags@/, then all the items matching the+search will be returned. Otherwise only the first item will be returned.+This is almost always the unlocked item that was most recently stored.++If 'GI.Secret.Flags.SearchFlagsUnlock' is set in /@flags@/, then items will be unlocked+if necessary. In either case, locked and unlocked items will match the+search and be returned. If the unlock fails, the search does not fail.++If 'GI.Secret.Flags.SearchFlagsLoadSecrets' is set in /@flags@/, then the items will have+their secret values loaded and available via 'GI.Secret.Objects.Item.itemGetSecret'.++This function returns immediately and completes asynchronously.+-}+serviceSearch ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: search for items matching these attributes -}+ -> [Secret.Flags.SearchFlags]+ {- ^ /@flags@/: search option flags -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceSearch service schema attributes flags cancellable callback = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_search service' maybeSchema attributes'''''' flags' maybeCancellable maybeCallback userData+ touchManagedPtr service+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return ()++#if ENABLE_OVERLOADING+data ServiceSearchMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> [Secret.Flags.SearchFlags] -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceSearchMethodInfo a signature where+ overloadedMethod _ = serviceSearch++#endif++-- method Service::search_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TGList (TInterface (Name {namespace = "Secret", name = "Item"})))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_search_finish" secret_service_search_finish :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr (GList (Ptr Secret.Item.Item)))++{- |+Complete asynchronous operation to search for items.+-}+serviceSearchFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> b+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m [Secret.Item.Item]+ {- ^ __Returns:__ + a list of items that matched the search /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceSearchFinish service result_ = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_service_search_finish service' result_'+ result' <- unpackGList result+ result'' <- mapM (wrapObject Secret.Item.Item) result'+ g_list_free result+ touchManagedPtr service+ touchManagedPtr result_+ return result''+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceSearchFinishMethodInfo+instance (signature ~ (b -> m [Secret.Item.Item]), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceSearchFinishMethodInfo a signature where+ overloadedMethod _ = serviceSearchFinish++#endif++-- method Service::search_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search for items matching these attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "SearchFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "search option flags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TGList (TInterface (Name {namespace = "Secret", name = "Item"})))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_search_sync" secret_service_search_sync :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "SearchFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr (GList (Ptr Secret.Item.Item)))++{- |+Search for items matching the /@attributes@/. All collections are searched.+The /@attributes@/ should be a table of string keys and string values.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++If 'GI.Secret.Flags.SearchFlagsAll' is set in /@flags@/, then all the items matching the+search will be returned. Otherwise only the first item will be returned.+This is almost always the unlocked item that was most recently stored.++If 'GI.Secret.Flags.SearchFlagsUnlock' is set in /@flags@/, then items will be unlocked+if necessary. In either case, locked and unlocked items will match the+search and be returned. If the unlock fails, the search does not fail.++If 'GI.Secret.Flags.SearchFlagsLoadSecrets' is set in /@flags@/, then the items\' secret+values will be loaded for any unlocked items. Loaded item secret values+are available via 'GI.Secret.Objects.Item.itemGetSecret'. If the load of a secret values+fail, then the++This function may block indefinitely. Use the asynchronous version+in user interface threads.+-}+serviceSearchSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: search for items matching these attributes -}+ -> [Secret.Flags.SearchFlags]+ {- ^ /@flags@/: search option flags -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m [Secret.Item.Item]+ {- ^ __Returns:__ + a list of items that matched the search /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceSearchSync service schema attributes flags cancellable = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_service_search_sync service' maybeSchema attributes'''''' flags' maybeCancellable+ result' <- unpackGList result+ result'' <- mapM (wrapObject Secret.Item.Item) result'+ g_list_free result+ touchManagedPtr service+ whenJust schema touchManagedPtr+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ return result''+ ) (do+ unrefGHashTable attributes''''''+ )++#if ENABLE_OVERLOADING+data ServiceSearchSyncMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> [Secret.Flags.SearchFlags] -> Maybe (b) -> m [Secret.Item.Item]), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceSearchSyncMethodInfo a signature where+ overloadedMethod _ = serviceSearchSync++#endif++-- method Service::set_alias+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a secret service object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the alias to assign the collection to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collection", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the collection to assign to the alias", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_set_alias" secret_service_set_alias :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ CString -> -- alias : TBasicType TUTF8+ Ptr Secret.Collection.Collection -> -- collection : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Assign a collection to this alias. Aliases help determine+well known collections, such as \'default\'.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method will return immediately and complete asynchronously.+-}+serviceSetAlias ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Secret.Collection.IsCollection b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@service@/: a secret service object -}+ -> T.Text+ {- ^ /@alias@/: the alias to assign the collection to -}+ -> Maybe (b)+ {- ^ /@collection@/: the collection to assign to the alias -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceSetAlias service alias collection cancellable callback = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ alias' <- textToCString alias+ maybeCollection <- case collection of+ Nothing -> return nullPtr+ Just jCollection -> do+ jCollection' <- unsafeManagedPtrCastPtr jCollection+ return jCollection'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_set_alias service' alias' maybeCollection maybeCancellable maybeCallback userData+ touchManagedPtr service+ whenJust collection touchManagedPtr+ whenJust cancellable touchManagedPtr+ freeMem alias'+ return ()++#if ENABLE_OVERLOADING+data ServiceSetAliasMethodInfo+instance (signature ~ (T.Text -> Maybe (b) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Secret.Collection.IsCollection b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServiceSetAliasMethodInfo a signature where+ overloadedMethod _ = serviceSetAlias++#endif++-- method Service::set_alias_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a secret service object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_set_alias_finish" secret_service_set_alias_finish :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Finish an asynchronous operation to assign a collection to an alias.+-}+serviceSetAliasFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@service@/: a secret service object -}+ -> b+ {- ^ /@result@/: asynchronous result passed to callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceSetAliasFinish service result_ = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_service_set_alias_finish service' result_'+ touchManagedPtr service+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceSetAliasFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceSetAliasFinishMethodInfo a signature where+ overloadedMethod _ = serviceSetAliasFinish++#endif++-- method Service::set_alias_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a secret service object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alias", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the alias to assign the collection to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collection", argType = TInterface (Name {namespace = "Secret", name = "Collection"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the collection to assign to the alias", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_set_alias_sync" secret_service_set_alias_sync :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ CString -> -- alias : TBasicType TUTF8+ Ptr Secret.Collection.Collection -> -- collection : TInterface (Name {namespace = "Secret", name = "Collection"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Assign a collection to this alias. Aliases help determine+well known collections, such as \'default\'.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block and should not be used in user interface threads.+-}+serviceSetAliasSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Secret.Collection.IsCollection b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@service@/: a secret service object -}+ -> T.Text+ {- ^ /@alias@/: the alias to assign the collection to -}+ -> Maybe (b)+ {- ^ /@collection@/: the collection to assign to the alias -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceSetAliasSync service alias collection cancellable = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ alias' <- textToCString alias+ maybeCollection <- case collection of+ Nothing -> return nullPtr+ Just jCollection -> do+ jCollection' <- unsafeManagedPtrCastPtr jCollection+ return jCollection'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_service_set_alias_sync service' alias' maybeCollection maybeCancellable+ touchManagedPtr service+ whenJust collection touchManagedPtr+ whenJust cancellable touchManagedPtr+ freeMem alias'+ return ()+ ) (do+ freeMem alias'+ )++#if ENABLE_OVERLOADING+data ServiceSetAliasSyncMethodInfo+instance (signature ~ (T.Text -> Maybe (b) -> Maybe (c) -> m ()), MonadIO m, IsService a, Secret.Collection.IsCollection b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServiceSetAliasSyncMethodInfo a signature where+ overloadedMethod _ = serviceSetAliasSync++#endif++-- method Service::store+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema to use to check attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collection", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a collection alias, or D-Bus object path of the collection where to store the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 8, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_store" secret_service_store :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CString -> -- collection : TBasicType TUTF8+ CString -> -- label : TBasicType TUTF8+ Ptr Secret.Value.Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Store a secret value in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If the attributes match a secret item already stored in the collection, then+the item will be updated with these new values.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++If /@collection@/ is not specified, then the default collection will be+used. Use 'GI.Secret.Constants.COLLECTION_SESSION' to store the password in the session+collection, which doesn\'t get stored across login sessions.++This method will return immediately and complete asynchronously.+-}+serviceStore ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema to use to check attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (T.Text)+ {- ^ /@collection@/: a collection alias, or D-Bus object path of the collection where to store the secret -}+ -> T.Text+ {- ^ /@label@/: label for the secret -}+ -> Secret.Value.Value+ {- ^ /@value@/: the secret value -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceStore service schema attributes collection label value cancellable callback = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCollection <- case collection of+ Nothing -> return nullPtr+ Just jCollection -> do+ jCollection' <- textToCString jCollection+ return jCollection'+ label' <- textToCString label+ value' <- unsafeManagedPtrGetPtr value+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_store service' maybeSchema attributes'''''' maybeCollection label' value' maybeCancellable maybeCallback userData+ touchManagedPtr service+ whenJust schema touchManagedPtr+ touchManagedPtr value+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ freeMem maybeCollection+ freeMem label'+ return ()++#if ENABLE_OVERLOADING+data ServiceStoreMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (T.Text) -> T.Text -> Secret.Value.Value -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceStoreMethodInfo a signature where+ overloadedMethod _ = serviceStore++#endif++-- method Service::store_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_store_finish" secret_service_store_finish :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Finish asynchronous operation to store a secret value in the secret service.+-}+serviceStoreFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> b+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceStoreFinish service result_ = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ _ <- propagateGError $ secret_service_store_finish service' result_'+ touchManagedPtr service+ touchManagedPtr result_+ return ()+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+data ServiceStoreFinishMethodInfo+instance (signature ~ (b -> m ()), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceStoreFinishMethodInfo a signature where+ overloadedMethod _ = serviceStoreFinish++#endif++-- method Service::store_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the schema for the attributes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attributes", argType = TGHash (TBasicType TUTF8) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute keys and values", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "collection", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a collection alias, or D-Bus object path of the collection where to store the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "label for the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TBoolean)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_store_sync" secret_service_store_sync :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Secret.Schema.Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ Ptr (GHashTable CString CString) -> -- attributes : TGHash (TBasicType TUTF8) (TBasicType TUTF8)+ CString -> -- collection : TBasicType TUTF8+ CString -> -- label : TBasicType TUTF8+ Ptr Secret.Value.Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO CInt++{- |+Store a secret value in the secret service.++The /@attributes@/ should be a set of key and value string pairs.++If the attributes match a secret item already stored in the collection, then+the item will be updated with these new values.++If /@collection@/ is 'Nothing', then the default collection will be+used. Use 'GI.Secret.Constants.COLLECTION_SESSION' to store the password in the session+collection, which doesn\'t get stored across login sessions.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user interface+threads.+-}+serviceStoreSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> Maybe (Secret.Schema.Schema)+ {- ^ /@schema@/: the schema for the attributes -}+ -> Map.Map T.Text T.Text+ {- ^ /@attributes@/: the attribute keys and values -}+ -> Maybe (T.Text)+ {- ^ /@collection@/: a collection alias, or D-Bus object path of the collection where to store the secret -}+ -> T.Text+ {- ^ /@label@/: label for the secret -}+ -> Secret.Value.Value+ {- ^ /@value@/: the secret value -}+ -> Maybe (b)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ()+ {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceStoreSync service schema attributes collection label value cancellable = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ maybeSchema <- case schema of+ Nothing -> return nullPtr+ Just jSchema -> do+ jSchema' <- unsafeManagedPtrGetPtr jSchema+ return jSchema'+ let attributes' = Map.toList attributes+ attributes'' <- mapFirstA textToCString attributes'+ attributes''' <- mapSecondA textToCString attributes''+ let attributes'''' = mapFirst cstringPackPtr attributes'''+ let attributes''''' = mapSecond cstringPackPtr attributes''''+ attributes'''''' <- packGHashTable gStrHash gStrEqual (Just ptr_to_g_free) (Just ptr_to_g_free) attributes'''''+ maybeCollection <- case collection of+ Nothing -> return nullPtr+ Just jCollection -> do+ jCollection' <- textToCString jCollection+ return jCollection'+ label' <- textToCString label+ value' <- unsafeManagedPtrGetPtr value+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ _ <- propagateGError $ secret_service_store_sync service' maybeSchema attributes'''''' maybeCollection label' value' maybeCancellable+ touchManagedPtr service+ whenJust schema touchManagedPtr+ touchManagedPtr value+ whenJust cancellable touchManagedPtr+ unrefGHashTable attributes''''''+ freeMem maybeCollection+ freeMem label'+ return ()+ ) (do+ unrefGHashTable attributes''''''+ freeMem maybeCollection+ freeMem label'+ )++#if ENABLE_OVERLOADING+data ServiceStoreSyncMethodInfo+instance (signature ~ (Maybe (Secret.Schema.Schema) -> Map.Map T.Text T.Text -> Maybe (T.Text) -> T.Text -> Secret.Value.Value -> Maybe (b) -> m ()), MonadIO m, IsService a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ServiceStoreSyncMethodInfo a signature where+ overloadedMethod _ = serviceStoreSync++#endif++-- method Service::unlock+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "objects", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the items or collections to unlock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to pass to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_unlock" secret_service_unlock :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr (GList (Ptr Gio.DBusProxy.DBusProxy)) -> -- objects : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Unlock items or collections in the secret service.++The secret service may not be able to unlock items individually, and may+unlock an entire collection instead.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGet' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user+interface threads. The secret service may prompt the user.+'GI.Secret.Objects.Service.servicePrompt' will be used to handle any prompts that show up.+-}+serviceUnlock ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@service@/: the secret service -}+ -> [b]+ {- ^ /@objects@/: the items or collections to unlock -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceUnlock service objects cancellable callback = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ objects' <- mapM unsafeManagedPtrCastPtr objects+ objects'' <- packGList objects'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_unlock service' objects'' maybeCancellable maybeCallback userData+ touchManagedPtr service+ mapM_ touchManagedPtr objects+ whenJust cancellable touchManagedPtr+ g_list_free objects''+ return ()++#if ENABLE_OVERLOADING+data ServiceUnlockMethodInfo+instance (signature ~ ([b] -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServiceUnlockMethodInfo a signature where+ overloadedMethod _ = serviceUnlock++#endif++-- method Service::unlock_finish+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "unlocked", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to place list of items or collections that were unlocked", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]+-- Lengths : []+-- returnType : Just (TBasicType TInt)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_unlock_finish" secret_service_unlock_finish :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))) -> -- unlocked : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr (Ptr GError) -> -- error+ IO Int32++{- |+Complete asynchronous operation to unlock items or collections in the secret+service.++The secret service may not be able to unlock items individually, and may+unlock an entire collection instead.+-}+serviceUnlockFinish ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) =>+ a+ {- ^ /@service@/: the secret service -}+ -> b+ {- ^ /@result@/: asynchronous result passed to the callback -}+ -> m ((Int32, [Gio.DBusProxy.DBusProxy]))+ {- ^ __Returns:__ the number of items or collections that were unlocked /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceUnlockFinish service result_ = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ result_' <- unsafeManagedPtrCastPtr result_+ unlocked <- allocMem :: IO (Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))))+ onException (do+ result <- propagateGError $ secret_service_unlock_finish service' result_' unlocked+ unlocked' <- peek unlocked+ unlocked'' <- unpackGList unlocked'+ unlocked''' <- mapM (wrapObject Gio.DBusProxy.DBusProxy) unlocked''+ g_list_free unlocked'+ touchManagedPtr service+ touchManagedPtr result_+ freeMem unlocked+ return (result, unlocked''')+ ) (do+ freeMem unlocked+ )++#if ENABLE_OVERLOADING+data ServiceUnlockFinishMethodInfo+instance (signature ~ (b -> m ((Int32, [Gio.DBusProxy.DBusProxy]))), MonadIO m, IsService a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ServiceUnlockFinishMethodInfo a signature where+ overloadedMethod _ = serviceUnlockFinish++#endif++-- method Service::unlock_sync+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "service", argType = TInterface (Name {namespace = "Secret", name = "Service"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "objects", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the items or collections to unlock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "unlocked", argType = TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"})), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "\n location to place list of items or collections that were unlocked", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]+-- Lengths : []+-- returnType : Just (TBasicType TInt)+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_unlock_sync" secret_service_unlock_sync :: + Ptr Service -> -- service : TInterface (Name {namespace = "Secret", name = "Service"})+ Ptr (GList (Ptr Gio.DBusProxy.DBusProxy)) -> -- objects : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))) -> -- unlocked : TGList (TInterface (Name {namespace = "Gio", name = "DBusProxy"}))+ Ptr (Ptr GError) -> -- error+ IO Int32++{- |+Unlock items or collections in the secret service.++The secret service may not be able to unlock items individually, and may+unlock an entire collection instead.++If /@service@/ is NULL, then 'GI.Secret.Objects.Service.serviceGetSync' will be called to get+the default 'GI.Secret.Objects.Service.Service' proxy.++This method may block indefinitely and should not be used in user+interface threads. The secret service may prompt the user.+'GI.Secret.Objects.Service.servicePrompt' will be used to handle any prompts that show up.+-}+serviceUnlockSync ::+ (B.CallStack.HasCallStack, MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) =>+ a+ {- ^ /@service@/: the secret service -}+ -> [b]+ {- ^ /@objects@/: the items or collections to unlock -}+ -> Maybe (c)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m ((Int32, [Gio.DBusProxy.DBusProxy]))+ {- ^ __Returns:__ the number of items or collections that were unlocked /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceUnlockSync service objects cancellable = liftIO $ do+ service' <- unsafeManagedPtrCastPtr service+ objects' <- mapM unsafeManagedPtrCastPtr objects+ objects'' <- packGList objects'+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ unlocked <- allocMem :: IO (Ptr (Ptr (GList (Ptr Gio.DBusProxy.DBusProxy))))+ onException (do+ result <- propagateGError $ secret_service_unlock_sync service' objects'' maybeCancellable unlocked+ unlocked' <- peek unlocked+ unlocked'' <- unpackGList unlocked'+ unlocked''' <- mapM (wrapObject Gio.DBusProxy.DBusProxy) unlocked''+ g_list_free unlocked'+ touchManagedPtr service+ mapM_ touchManagedPtr objects+ whenJust cancellable touchManagedPtr+ g_list_free objects''+ freeMem unlocked+ return (result, unlocked''')+ ) (do+ g_list_free objects''+ freeMem unlocked+ )++#if ENABLE_OVERLOADING+data ServiceUnlockSyncMethodInfo+instance (signature ~ ([b] -> Maybe (c) -> m ((Int32, [Gio.DBusProxy.DBusProxy]))), MonadIO m, IsService a, Gio.DBusProxy.IsDBusProxy b, Gio.Cancellable.IsCancellable c) => O.MethodInfo ServiceUnlockSyncMethodInfo a signature where+ overloadedMethod _ = serviceUnlockSync++#endif++-- method Service::disconnect+-- method type : MemberFunction+-- Args : []+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_disconnect" secret_service_disconnect :: + IO ()++{- |+Disconnect the default 'GI.Secret.Objects.Service.Service' proxy returned by 'GI.Secret.Objects.Service.serviceGet'+and 'GI.Secret.Objects.Service.serviceGetSync'.++It is not necessary to call this function, but you may choose to do so at+program exit. It is useful for testing that memory is not leaked.++This function is safe to call at any time. But if other objects in this+library are still referenced, then this will not result in all memory+being freed.+-}+serviceDisconnect ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ m ()+serviceDisconnect = liftIO $ do+ secret_service_disconnect+ return ()++#if ENABLE_OVERLOADING+#endif++-- method Service::get+-- method type : MemberFunction+-- Args : [Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "ServiceFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "flags for which service functionality to ensure is initialized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_get" secret_service_get :: + CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "ServiceFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Get a 'GI.Secret.Objects.Service.Service' proxy for the Secret Service. If such a proxy object+already exists, then the same proxy is returned.++If /@flags@/ contains any flags of which parts of the secret service to+ensure are initialized, then those will be initialized before completing.++This method will return immediately and complete asynchronously.+-}+serviceGet ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ [Secret.Flags.ServiceFlags]+ {- ^ /@flags@/: flags for which service functionality to ensure is initialized -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceGet flags cancellable callback = liftIO $ do+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_get flags' maybeCancellable maybeCallback userData+ whenJust cancellable touchManagedPtr+ return ()++#if ENABLE_OVERLOADING+#endif++-- method Service::get_finish+-- method type : MemberFunction+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Service"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_get_finish" secret_service_get_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Service)++{- |+Complete an asynchronous operation to get a 'GI.Secret.Objects.Service.Service' proxy for the+Secret Service.+-}+serviceGetFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m Service+ {- ^ __Returns:__ a new reference to a 'GI.Secret.Objects.Service.Service' proxy, which+ should be released with 'GI.GObject.Objects.Object.objectUnref'. /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceGetFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_service_get_finish result_'+ checkUnexpectedReturnNULL "serviceGetFinish" result+ result' <- (wrapObject Service) result+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+#endif++-- method Service::get_sync+-- method type : MemberFunction+-- Args : [Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "ServiceFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "flags for which service functionality to ensure is initialized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Service"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_get_sync" secret_service_get_sync :: + CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "ServiceFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Service)++{- |+Get a 'GI.Secret.Objects.Service.Service' proxy for the Secret Service. If such a proxy object+already exists, then the same proxy is returned.++If /@flags@/ contains any flags of which parts of the secret service to+ensure are initialized, then those will be initialized before returning.++This method may block indefinitely and should not be used in user interface+threads.+-}+serviceGetSync ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ [Secret.Flags.ServiceFlags]+ {- ^ /@flags@/: flags for which service functionality to ensure is initialized -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m Service+ {- ^ __Returns:__ a new reference to a 'GI.Secret.Objects.Service.Service' proxy, which+ should be released with 'GI.GObject.Objects.Object.objectUnref'. /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceGetSync flags cancellable = liftIO $ do+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_service_get_sync flags' maybeCancellable+ checkUnexpectedReturnNULL "serviceGetSync" result+ result' <- (wrapObject Service) result+ whenJust cancellable touchManagedPtr+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+#endif++-- method Service::open+-- method type : MemberFunction+-- Args : [Arg {argCName = "service_gtype", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the GType of the new secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "service_bus_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the D-Bus service name of the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "ServiceFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "flags for which service functionality to ensure is initialized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "called when the operation completes", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "user_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "data to be passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_service_open" secret_service_open :: + CGType -> -- service_gtype : TBasicType TGType+ CString -> -- service_bus_name : TBasicType TUTF8+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "ServiceFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})+ Ptr () -> -- user_data : TBasicType TPtr+ IO ()++{- |+Create a new 'GI.Secret.Objects.Service.Service' proxy for the Secret Service.++This function is rarely used, see 'GI.Secret.Objects.Service.serviceGet' instead.++The /@serviceGtype@/ argument should be set to @/SECRET_TYPE_SERVICE/@ or a the type+of a derived class.++If /@flags@/ contains any flags of which parts of the secret service to+ensure are initialized, then those will be initialized before returning.++If /@serviceBusName@/ is 'Nothing' then the default is used.++This method will return immediately and complete asynchronously.+-}+serviceOpen ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ GType+ {- ^ /@serviceGtype@/: the GType of the new secret service -}+ -> Maybe (T.Text)+ {- ^ /@serviceBusName@/: the D-Bus service name of the secret service -}+ -> [Secret.Flags.ServiceFlags]+ {- ^ /@flags@/: flags for which service functionality to ensure is initialized -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> Maybe (Gio.Callbacks.AsyncReadyCallback)+ {- ^ /@callback@/: called when the operation completes -}+ -> m ()+serviceOpen serviceGtype serviceBusName flags cancellable callback = liftIO $ do+ let serviceGtype' = gtypeToCGType serviceGtype+ maybeServiceBusName <- case serviceBusName of+ Nothing -> return nullPtr+ Just jServiceBusName -> do+ jServiceBusName' <- textToCString jServiceBusName+ return jServiceBusName'+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ maybeCallback <- case callback of+ Nothing -> return (castPtrToFunPtr nullPtr)+ Just jCallback -> do+ ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))+ jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))+ poke ptrcallback jCallback'+ return jCallback'+ let userData = nullPtr+ secret_service_open serviceGtype' maybeServiceBusName flags' maybeCancellable maybeCallback userData+ whenJust cancellable touchManagedPtr+ freeMem maybeServiceBusName+ return ()++#if ENABLE_OVERLOADING+#endif++-- method Service::open_finish+-- method type : MemberFunction+-- Args : [Arg {argCName = "result", argType = TInterface (Name {namespace = "Gio", name = "AsyncResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the asynchronous result passed to the callback", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Service"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_open_finish" secret_service_open_finish :: + Ptr Gio.AsyncResult.AsyncResult -> -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Service)++{- |+Complete an asynchronous operation to create a new 'GI.Secret.Objects.Service.Service' proxy for+the Secret Service.+-}+serviceOpenFinish ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>+ a+ {- ^ /@result@/: the asynchronous result passed to the callback -}+ -> m Service+ {- ^ __Returns:__ a new reference to a 'GI.Secret.Objects.Service.Service' proxy, which+ should be released with 'GI.GObject.Objects.Object.objectUnref'. /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceOpenFinish result_ = liftIO $ do+ result_' <- unsafeManagedPtrCastPtr result_+ onException (do+ result <- propagateGError $ secret_service_open_finish result_'+ checkUnexpectedReturnNULL "serviceOpenFinish" result+ result' <- (wrapObject Service) result+ touchManagedPtr result_+ return result'+ ) (do+ return ()+ )++#if ENABLE_OVERLOADING+#endif++-- method Service::open_sync+-- method type : MemberFunction+-- Args : [Arg {argCName = "service_gtype", argType = TBasicType TGType, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the GType of the new secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "service_bus_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "the D-Bus service name of the secret service", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Secret", name = "ServiceFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "flags for which service functionality to ensure is initialized", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cancellable", argType = TInterface (Name {namespace = "Gio", name = "Cancellable"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "optional cancellation object", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Service"}))+-- throws : True+-- Skip return : False++foreign import ccall "secret_service_open_sync" secret_service_open_sync :: + CGType -> -- service_gtype : TBasicType TGType+ CString -> -- service_bus_name : TBasicType TUTF8+ CUInt -> -- flags : TInterface (Name {namespace = "Secret", name = "ServiceFlags"})+ Ptr Gio.Cancellable.Cancellable -> -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})+ Ptr (Ptr GError) -> -- error+ IO (Ptr Service)++{- |+Create a new 'GI.Secret.Objects.Service.Service' proxy for the Secret Service.++This function is rarely used, see 'GI.Secret.Objects.Service.serviceGetSync' instead.++The /@serviceGtype@/ argument should be set to @/SECRET_TYPE_SERVICE/@ or a the+type of a derived class.++If /@flags@/ contains any flags of which parts of the secret service to+ensure are initialized, then those will be initialized before returning.++If /@serviceBusName@/ is 'Nothing' then the default is used.++This method may block indefinitely and should not be used in user interface+threads.+-}+serviceOpenSync ::+ (B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>+ GType+ {- ^ /@serviceGtype@/: the GType of the new secret service -}+ -> Maybe (T.Text)+ {- ^ /@serviceBusName@/: the D-Bus service name of the secret service -}+ -> [Secret.Flags.ServiceFlags]+ {- ^ /@flags@/: flags for which service functionality to ensure is initialized -}+ -> Maybe (a)+ {- ^ /@cancellable@/: optional cancellation object -}+ -> m Service+ {- ^ __Returns:__ a new reference to a 'GI.Secret.Objects.Service.Service' proxy, which+ should be released with 'GI.GObject.Objects.Object.objectUnref'. /(Can throw 'Data.GI.Base.GError.GError')/ -}+serviceOpenSync serviceGtype serviceBusName flags cancellable = liftIO $ do+ let serviceGtype' = gtypeToCGType serviceGtype+ maybeServiceBusName <- case serviceBusName of+ Nothing -> return nullPtr+ Just jServiceBusName -> do+ jServiceBusName' <- textToCString jServiceBusName+ return jServiceBusName'+ let flags' = gflagsToWord flags+ maybeCancellable <- case cancellable of+ Nothing -> return nullPtr+ Just jCancellable -> do+ jCancellable' <- unsafeManagedPtrCastPtr jCancellable+ return jCancellable'+ onException (do+ result <- propagateGError $ secret_service_open_sync serviceGtype' maybeServiceBusName flags' maybeCancellable+ checkUnexpectedReturnNULL "serviceOpenSync" result+ result' <- (wrapObject Service) result+ whenJust cancellable touchManagedPtr+ freeMem maybeServiceBusName+ return result'+ ) (do+ freeMem maybeServiceBusName+ )++#if ENABLE_OVERLOADING+#endif++
+ GI/Secret/Objects/Service.hs-boot view
@@ -0,0 +1,146 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Objects.Service where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++newtype Service = Service (ManagedPtr Service)+instance GObject Service where+class (GObject o, O.IsDescendantOf Service o) => IsService o+instance (GObject o, O.IsDescendantOf Service o) => IsService o+instance O.HasParentTypes Service+#if ENABLE_OVERLOADING+data ServiceClearMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceClearFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceClearSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceCreateItemDbusPathSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceDecodeDbusSecretMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceEncodeDbusSecretMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceEnsureSessionMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceEnsureSessionFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceEnsureSessionSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceGetCollectionGtypeMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceGetCollectionsMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceGetFlagsMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceGetItemGtypeMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceGetSessionAlgorithmsMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceGetSessionDbusPathMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLoadCollectionsMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLoadCollectionsFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLoadCollectionsSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLockMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLockFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLockSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLookupMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLookupFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceLookupSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServicePromptMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServicePromptFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServicePromptSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceSearchMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceSearchFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceSearchSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceSetAliasMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceSetAliasFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceSetAliasSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceStoreMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceStoreFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceStoreSyncMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceUnlockMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceUnlockFinishMethodInfo+#endif+#if ENABLE_OVERLOADING+data ServiceUnlockSyncMethodInfo+#endif
+ GI/Secret/Structs.hs view
@@ -0,0 +1,45 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Structs+ ( module GI.Secret.Structs.Schema ,+ module GI.Secret.Structs.SchemaAttribute,+ module GI.Secret.Structs.Value ,+++ ) where++import GI.Secret.Structs.Schema+import GI.Secret.Structs.SchemaAttribute+import GI.Secret.Structs.Value++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL+++
+ GI/Secret/Structs/Schema.hs view
@@ -0,0 +1,347 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)++Represents a set of attributes that are stored with an item. These schemas+are used for interoperability between various services storing the same types+of items.++Each schema has a name like \"org.gnome.keyring.NetworkPassword\", and defines+a set of attributes, and types (string, integer, boolean) for those attributes.++Attributes are stored as strings in the Secret Service, and the attribute+types simply define standard ways to store integer and boolean values as strings.+Attributes are represented in libsecret via a 'GI.GLib.Structs.HashTable.HashTable' with string keys and+values. Even for values that defined as an integer or boolean in the schema,+the attribute values in the 'GI.GLib.Structs.HashTable.HashTable' are strings. Boolean values are stored+as the strings \'true\' and \'false\'. Integer values are stored in decimal, with+a preceding negative sign for negative integers.++Schemas are handled entirely on the client side by this library. The name of the+schema is automatically stored as an attribute on the item.++Normally when looking up passwords only those with matching schema names are+returned. If the schema /@flags@/ contain the 'GI.Secret.Flags.SchemaFlagsDontMatchName' flag,+then lookups will not check that the schema name matches that on the item, only+the schema\'s attributes are matched. This is useful when you are looking up items+that are not stored by the libsecret library. Other libraries such as libgnome-keyring+don\'t store the schema name.+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Structs.Schema+ ( ++-- * Exported types+ Schema(..) ,+ newZeroSchema ,+ noSchema ,+++ -- * Methods+-- ** ref #method:ref#++#if ENABLE_OVERLOADING+ SchemaRefMethodInfo ,+#endif+ schemaRef ,+++-- ** unref #method:unref#++#if ENABLE_OVERLOADING+ SchemaUnrefMethodInfo ,+#endif+ schemaUnref ,+++++ -- * Properties+-- ** flags #attr:flags#+{- | flags for the schema+-}+ getSchemaFlags ,+#if ENABLE_OVERLOADING+ schema_flags ,+#endif+ setSchemaFlags ,+++-- ** name #attr:name#+{- | the dotted name of the schema+-}+ clearSchemaName ,+ getSchemaName ,+#if ENABLE_OVERLOADING+ schema_name ,+#endif+ setSchemaName ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import {-# SOURCE #-} qualified GI.Secret.Flags as Secret.Flags++-- | Memory-managed wrapper type.+newtype Schema = Schema (ManagedPtr Schema)+foreign import ccall "secret_schema_get_type" c_secret_schema_get_type :: + IO GType++instance BoxedObject Schema where+ boxedType _ = c_secret_schema_get_type++-- | Construct a `Schema` struct initialized to zero.+newZeroSchema :: MonadIO m => m Schema+newZeroSchema = liftIO $ callocBoxedBytes 592 >>= wrapBoxed Schema++instance tag ~ 'AttrSet => Constructible Schema tag where+ new _ attrs = do+ o <- newZeroSchema+ GI.Attributes.set o attrs+ return o+++-- | A convenience alias for `Nothing` :: `Maybe` `Schema`.+noSchema :: Maybe Schema+noSchema = Nothing++{- |+Get the value of the “@name@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' schema #name+@+-}+getSchemaName :: MonadIO m => Schema -> m (Maybe T.Text)+getSchemaName s = liftIO $ withManagedPtr s $ \ptr -> do+ val <- peek (ptr `plusPtr` 0) :: IO CString+ result <- SP.convertIfNonNull val $ \val' -> do+ val'' <- cstringToText val'+ return val''+ return result++{- |+Set the value of the “@name@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' schema [ #name 'Data.GI.Base.Attributes.:=' value ]+@+-}+setSchemaName :: MonadIO m => Schema -> CString -> m ()+setSchemaName s val = liftIO $ withManagedPtr s $ \ptr -> do+ poke (ptr `plusPtr` 0) (val :: CString)++{- |+Set the value of the “@name@” field to `Nothing`.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.clear' #name+@+-}+clearSchemaName :: MonadIO m => Schema -> m ()+clearSchemaName s = liftIO $ withManagedPtr s $ \ptr -> do+ poke (ptr `plusPtr` 0) (FP.nullPtr :: CString)++#if ENABLE_OVERLOADING+data SchemaNameFieldInfo+instance AttrInfo SchemaNameFieldInfo where+ type AttrAllowedOps SchemaNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]+ type AttrSetTypeConstraint SchemaNameFieldInfo = (~) CString+ type AttrBaseTypeConstraint SchemaNameFieldInfo = (~) Schema+ type AttrGetType SchemaNameFieldInfo = Maybe T.Text+ type AttrLabel SchemaNameFieldInfo = "name"+ type AttrOrigin SchemaNameFieldInfo = Schema+ attrGet _ = getSchemaName+ attrSet _ = setSchemaName+ attrConstruct = undefined+ attrClear _ = clearSchemaName++schema_name :: AttrLabelProxy "name"+schema_name = AttrLabelProxy++#endif+++{- |+Get the value of the “@flags@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' schema #flags+@+-}+getSchemaFlags :: MonadIO m => Schema -> m [Secret.Flags.SchemaFlags]+getSchemaFlags s = liftIO $ withManagedPtr s $ \ptr -> do+ val <- peek (ptr `plusPtr` 8) :: IO CUInt+ let val' = wordToGFlags val+ return val'++{- |+Set the value of the “@flags@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' schema [ #flags 'Data.GI.Base.Attributes.:=' value ]+@+-}+setSchemaFlags :: MonadIO m => Schema -> [Secret.Flags.SchemaFlags] -> m ()+setSchemaFlags s val = liftIO $ withManagedPtr s $ \ptr -> do+ let val' = gflagsToWord val+ poke (ptr `plusPtr` 8) (val' :: CUInt)++#if ENABLE_OVERLOADING+data SchemaFlagsFieldInfo+instance AttrInfo SchemaFlagsFieldInfo where+ type AttrAllowedOps SchemaFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]+ type AttrSetTypeConstraint SchemaFlagsFieldInfo = (~) [Secret.Flags.SchemaFlags]+ type AttrBaseTypeConstraint SchemaFlagsFieldInfo = (~) Schema+ type AttrGetType SchemaFlagsFieldInfo = [Secret.Flags.SchemaFlags]+ type AttrLabel SchemaFlagsFieldInfo = "flags"+ type AttrOrigin SchemaFlagsFieldInfo = Schema+ attrGet _ = getSchemaFlags+ attrSet _ = setSchemaFlags+ attrConstruct = undefined+ attrClear _ = undefined++schema_flags :: AttrLabelProxy "flags"+schema_flags = AttrLabelProxy++#endif+++-- XXX Skipped attribute for "Schema:attributes" :: Not implemented: "Don't know how to unpack C array of type TCArray False 32 (-1) (TInterface (Name {namespace = \"Secret\", name = \"SchemaAttribute\"}))"++#if ENABLE_OVERLOADING+instance O.HasAttributeList Schema+type instance O.AttributeList Schema = SchemaAttributeList+type SchemaAttributeList = ('[ '("name", SchemaNameFieldInfo), '("flags", SchemaFlagsFieldInfo)] :: [(Symbol, *)])+#endif++-- XXX Could not generate method Schema::new+-- Error was : Not implemented: "GHashTable element of type TInterface (Name {namespace = \"Secret\", name = \"SchemaAttributeType\"}) unsupported."+-- method Schema::ref+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema to reference", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Schema"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_schema_ref" secret_schema_ref :: + Ptr Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ IO (Ptr Schema)++{- |+Adds a reference to the 'GI.Secret.Structs.Schema.Schema'.++It is not normally necessary to call this function from C code, and is+mainly present for the sake of bindings. If the /@schema@/ was statically+allocated, then this function will copy the schema.+-}+schemaRef ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Schema+ {- ^ /@schema@/: the schema to reference -}+ -> m Schema+ {- ^ __Returns:__ the referenced schema, which should be later+ unreferenced with 'GI.Secret.Structs.Schema.schemaUnref' -}+schemaRef schema = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ result <- secret_schema_ref schema'+ checkUnexpectedReturnNULL "schemaRef" result+ result' <- (wrapBoxed Schema) result+ touchManagedPtr schema+ return result'++#if ENABLE_OVERLOADING+data SchemaRefMethodInfo+instance (signature ~ (m Schema), MonadIO m) => O.MethodInfo SchemaRefMethodInfo Schema signature where+ overloadedMethod _ = schemaRef++#endif++-- method Schema::unref+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "schema", argType = TInterface (Name {namespace = "Secret", name = "Schema"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the schema to reference", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_schema_unref" secret_schema_unref :: + Ptr Schema -> -- schema : TInterface (Name {namespace = "Secret", name = "Schema"})+ IO ()++{- |+Releases a reference to the 'GI.Secret.Structs.Schema.Schema'. If the last reference is+released then the schema will be freed.++It is not normally necessary to call this function from C code, and is+mainly present for the sake of bindings. It is an error to call this for+a /@schema@/ that was statically allocated.+-}+schemaUnref ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Schema+ {- ^ /@schema@/: the schema to reference -}+ -> m ()+schemaUnref schema = liftIO $ do+ schema' <- unsafeManagedPtrGetPtr schema+ secret_schema_unref schema'+ touchManagedPtr schema+ return ()++#if ENABLE_OVERLOADING+data SchemaUnrefMethodInfo+instance (signature ~ (m ()), MonadIO m) => O.MethodInfo SchemaUnrefMethodInfo Schema signature where+ overloadedMethod _ = schemaUnref++#endif++#if ENABLE_OVERLOADING+type family ResolveSchemaMethod (t :: Symbol) (o :: *) :: * where+ ResolveSchemaMethod "ref" o = SchemaRefMethodInfo+ ResolveSchemaMethod "unref" o = SchemaUnrefMethodInfo+ ResolveSchemaMethod l o = O.MethodResolutionFailed l o++instance (info ~ ResolveSchemaMethod t Schema, O.MethodInfo info Schema p) => OL.IsLabel t (Schema -> p) where+#if MIN_VERSION_base(4,10,0)+ fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#else+ fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#endif++#endif++
+ GI/Secret/Structs/Schema.hs-boot view
@@ -0,0 +1,32 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Structs.Schema where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++newtype Schema = Schema (ManagedPtr Schema)+instance BoxedObject Schema where+#if ENABLE_OVERLOADING+data SchemaRefMethodInfo+#endif+#if ENABLE_OVERLOADING+data SchemaUnrefMethodInfo+#endif
+ GI/Secret/Structs/SchemaAttribute.hs view
@@ -0,0 +1,221 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)++An attribute in a 'GI.Secret.Structs.Schema.Schema'.+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Structs.SchemaAttribute+ ( ++-- * Exported types+ SchemaAttribute(..) ,+ newZeroSchemaAttribute ,+ noSchemaAttribute ,+++ -- * Properties+-- ** name #attr:name#+{- | name of the attribute+-}+ clearSchemaAttributeName ,+ getSchemaAttributeName ,+#if ENABLE_OVERLOADING+ schemaAttribute_name ,+#endif+ setSchemaAttributeName ,+++-- ** type #attr:type#+{- | the type of the attribute+-}+ getSchemaAttributeType ,+#if ENABLE_OVERLOADING+ schemaAttribute_type ,+#endif+ setSchemaAttributeType ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import {-# SOURCE #-} qualified GI.Secret.Enums as Secret.Enums++-- | Memory-managed wrapper type.+newtype SchemaAttribute = SchemaAttribute (ManagedPtr SchemaAttribute)+foreign import ccall "secret_schema_attribute_get_type" c_secret_schema_attribute_get_type :: + IO GType++instance BoxedObject SchemaAttribute where+ boxedType _ = c_secret_schema_attribute_get_type++-- | Construct a `SchemaAttribute` struct initialized to zero.+newZeroSchemaAttribute :: MonadIO m => m SchemaAttribute+newZeroSchemaAttribute = liftIO $ callocBoxedBytes 16 >>= wrapBoxed SchemaAttribute++instance tag ~ 'AttrSet => Constructible SchemaAttribute tag where+ new _ attrs = do+ o <- newZeroSchemaAttribute+ GI.Attributes.set o attrs+ return o+++-- | A convenience alias for `Nothing` :: `Maybe` `SchemaAttribute`.+noSchemaAttribute :: Maybe SchemaAttribute+noSchemaAttribute = Nothing++{- |+Get the value of the “@name@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' schemaAttribute #name+@+-}+getSchemaAttributeName :: MonadIO m => SchemaAttribute -> m (Maybe T.Text)+getSchemaAttributeName s = liftIO $ withManagedPtr s $ \ptr -> do+ val <- peek (ptr `plusPtr` 0) :: IO CString+ result <- SP.convertIfNonNull val $ \val' -> do+ val'' <- cstringToText val'+ return val''+ return result++{- |+Set the value of the “@name@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' schemaAttribute [ #name 'Data.GI.Base.Attributes.:=' value ]+@+-}+setSchemaAttributeName :: MonadIO m => SchemaAttribute -> CString -> m ()+setSchemaAttributeName s val = liftIO $ withManagedPtr s $ \ptr -> do+ poke (ptr `plusPtr` 0) (val :: CString)++{- |+Set the value of the “@name@” field to `Nothing`.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.clear' #name+@+-}+clearSchemaAttributeName :: MonadIO m => SchemaAttribute -> m ()+clearSchemaAttributeName s = liftIO $ withManagedPtr s $ \ptr -> do+ poke (ptr `plusPtr` 0) (FP.nullPtr :: CString)++#if ENABLE_OVERLOADING+data SchemaAttributeNameFieldInfo+instance AttrInfo SchemaAttributeNameFieldInfo where+ type AttrAllowedOps SchemaAttributeNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]+ type AttrSetTypeConstraint SchemaAttributeNameFieldInfo = (~) CString+ type AttrBaseTypeConstraint SchemaAttributeNameFieldInfo = (~) SchemaAttribute+ type AttrGetType SchemaAttributeNameFieldInfo = Maybe T.Text+ type AttrLabel SchemaAttributeNameFieldInfo = "name"+ type AttrOrigin SchemaAttributeNameFieldInfo = SchemaAttribute+ attrGet _ = getSchemaAttributeName+ attrSet _ = setSchemaAttributeName+ attrConstruct = undefined+ attrClear _ = clearSchemaAttributeName++schemaAttribute_name :: AttrLabelProxy "name"+schemaAttribute_name = AttrLabelProxy++#endif+++{- |+Get the value of the “@type@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.get' schemaAttribute #type+@+-}+getSchemaAttributeType :: MonadIO m => SchemaAttribute -> m Secret.Enums.SchemaAttributeType+getSchemaAttributeType s = liftIO $ withManagedPtr s $ \ptr -> do+ val <- peek (ptr `plusPtr` 8) :: IO CUInt+ let val' = (toEnum . fromIntegral) val+ return val'++{- |+Set the value of the “@type@” field.+When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to++@+'Data.GI.Base.Attributes.set' schemaAttribute [ #type 'Data.GI.Base.Attributes.:=' value ]+@+-}+setSchemaAttributeType :: MonadIO m => SchemaAttribute -> Secret.Enums.SchemaAttributeType -> m ()+setSchemaAttributeType s val = liftIO $ withManagedPtr s $ \ptr -> do+ let val' = (fromIntegral . fromEnum) val+ poke (ptr `plusPtr` 8) (val' :: CUInt)++#if ENABLE_OVERLOADING+data SchemaAttributeTypeFieldInfo+instance AttrInfo SchemaAttributeTypeFieldInfo where+ type AttrAllowedOps SchemaAttributeTypeFieldInfo = '[ 'AttrSet, 'AttrGet]+ type AttrSetTypeConstraint SchemaAttributeTypeFieldInfo = (~) Secret.Enums.SchemaAttributeType+ type AttrBaseTypeConstraint SchemaAttributeTypeFieldInfo = (~) SchemaAttribute+ type AttrGetType SchemaAttributeTypeFieldInfo = Secret.Enums.SchemaAttributeType+ type AttrLabel SchemaAttributeTypeFieldInfo = "type"+ type AttrOrigin SchemaAttributeTypeFieldInfo = SchemaAttribute+ attrGet _ = getSchemaAttributeType+ attrSet _ = setSchemaAttributeType+ attrConstruct = undefined+ attrClear _ = undefined++schemaAttribute_type :: AttrLabelProxy "type"+schemaAttribute_type = AttrLabelProxy++#endif++++#if ENABLE_OVERLOADING+instance O.HasAttributeList SchemaAttribute+type instance O.AttributeList SchemaAttribute = SchemaAttributeAttributeList+type SchemaAttributeAttributeList = ('[ '("name", SchemaAttributeNameFieldInfo), '("type", SchemaAttributeTypeFieldInfo)] :: [(Symbol, *)])+#endif++#if ENABLE_OVERLOADING+type family ResolveSchemaAttributeMethod (t :: Symbol) (o :: *) :: * where+ ResolveSchemaAttributeMethod l o = O.MethodResolutionFailed l o++instance (info ~ ResolveSchemaAttributeMethod t SchemaAttribute, O.MethodInfo info SchemaAttribute p) => OL.IsLabel t (SchemaAttribute -> p) where+#if MIN_VERSION_base(4,10,0)+ fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#else+ fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#endif++#endif++
+ GI/Secret/Structs/SchemaAttribute.hs-boot view
@@ -0,0 +1,26 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Structs.SchemaAttribute where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++newtype SchemaAttribute = SchemaAttribute (ManagedPtr SchemaAttribute)+instance BoxedObject SchemaAttribute where
+ GI/Secret/Structs/Value.hs view
@@ -0,0 +1,418 @@+++{- |+Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte+License : LGPL-2.1+Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)++A secret value, like a password or other binary secret.+-}++#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))++module GI.Secret.Structs.Value+ ( ++-- * Exported types+ Value(..) ,+ noValue ,+++ -- * Methods+-- ** get #method:get#++#if ENABLE_OVERLOADING+ ValueGetMethodInfo ,+#endif+ valueGet ,+++-- ** getContentType #method:getContentType#++#if ENABLE_OVERLOADING+ ValueGetContentTypeMethodInfo ,+#endif+ valueGetContentType ,+++-- ** getText #method:getText#++#if ENABLE_OVERLOADING+ ValueGetTextMethodInfo ,+#endif+ valueGetText ,+++-- ** new #method:new#++ valueNew ,+++-- ** newFull #method:newFull#++ valueNewFull ,+++-- ** ref #method:ref#++#if ENABLE_OVERLOADING+ ValueRefMethodInfo ,+#endif+ valueRef ,+++-- ** unref #method:unref#++#if ENABLE_OVERLOADING+ ValueUnrefMethodInfo ,+#endif+ valueUnref ,+++++ ) where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++import qualified GI.GLib.Callbacks as GLib.Callbacks++-- | Memory-managed wrapper type.+newtype Value = Value (ManagedPtr Value)+foreign import ccall "secret_value_get_type" c_secret_value_get_type :: + IO GType++instance BoxedObject Value where+ boxedType _ = c_secret_value_get_type++-- | A convenience alias for `Nothing` :: `Maybe` `Value`.+noValue :: Maybe Value+noValue = Nothing+++#if ENABLE_OVERLOADING+instance O.HasAttributeList Value+type instance O.AttributeList Value = ValueAttributeList+type ValueAttributeList = ('[ ] :: [(Symbol, *)])+#endif++-- method Value::new+-- method type : Constructor+-- Args : [Arg {argCName = "secret", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length of the data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the content type of the data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Value"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_value_new" secret_value_new :: + CString -> -- secret : TBasicType TUTF8+ Int64 -> -- length : TBasicType TInt64+ CString -> -- content_type : TBasicType TUTF8+ IO (Ptr Value)++{- |+Create a 'GI.Secret.Structs.Value.Value' for the secret data passed in. The secret data is+copied into non-pageable \'secure\' memory.++If the length is less than zero, then /@secret@/ is assumed to be+null-terminated.+-}+valueNew ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ T.Text+ {- ^ /@secret@/: the secret data -}+ -> Int64+ {- ^ /@length@/: the length of the data -}+ -> T.Text+ {- ^ /@contentType@/: the content type of the data -}+ -> m Value+ {- ^ __Returns:__ the new 'GI.Secret.Structs.Value.Value' -}+valueNew secret length_ contentType = liftIO $ do+ secret' <- textToCString secret+ contentType' <- textToCString contentType+ result <- secret_value_new secret' length_ contentType'+ checkUnexpectedReturnNULL "valueNew" result+ result' <- (wrapBoxed Value) result+ freeMem secret'+ freeMem contentType'+ return result'++#if ENABLE_OVERLOADING+#endif++-- method Value::new_full+-- method type : Constructor+-- Args : [Arg {argCName = "secret", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the secret data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length of the data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "content_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the content type of the data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "destroy", argType = TInterface (Name {namespace = "GLib", name = "DestroyNotify"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "function to call to free the secret data", sinceVersion = Nothing}, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Value"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_value_new_full" secret_value_new_full :: + CString -> -- secret : TBasicType TUTF8+ Int64 -> -- length : TBasicType TInt64+ CString -> -- content_type : TBasicType TUTF8+ FunPtr GLib.Callbacks.C_DestroyNotify -> -- destroy : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})+ IO (Ptr Value)++{- |+Create a 'GI.Secret.Structs.Value.Value' for the secret data passed in. The secret data is+not copied, and will later be freed with the /@destroy@/ function.++If the length is less than zero, then /@secret@/ is assumed to be+null-terminated.+-}+valueNewFull ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ T.Text+ {- ^ /@secret@/: the secret data -}+ -> Int64+ {- ^ /@length@/: the length of the data -}+ -> T.Text+ {- ^ /@contentType@/: the content type of the data -}+ -> GLib.Callbacks.DestroyNotify+ {- ^ /@destroy@/: function to call to free the secret data -}+ -> m Value+ {- ^ __Returns:__ the new 'GI.Secret.Structs.Value.Value' -}+valueNewFull secret length_ contentType destroy = liftIO $ do+ secret' <- textToCString secret+ contentType' <- textToCString contentType+ ptrdestroy <- callocMem :: IO (Ptr (FunPtr GLib.Callbacks.C_DestroyNotify))+ destroy' <- GLib.Callbacks.mk_DestroyNotify (GLib.Callbacks.wrap_DestroyNotify (Just ptrdestroy) destroy)+ poke ptrdestroy destroy'+ result <- secret_value_new_full secret' length_ contentType' destroy'+ checkUnexpectedReturnNULL "valueNewFull" result+ result' <- (wrapBoxed Value) result+ freeMem secret'+ freeMem contentType'+ return result'++#if ENABLE_OVERLOADING+#endif++-- method Value::get+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length of the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]+-- Lengths : [Arg {argCName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the length of the secret", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]+-- returnType : Just (TCArray False (-1) 1 (TBasicType TUInt8))+-- throws : False+-- Skip return : False++foreign import ccall "secret_value_get" secret_value_get :: + Ptr Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ Ptr Word64 -> -- length : TBasicType TUInt64+ IO (Ptr Word8)++{- |+Get the secret data in the 'GI.Secret.Structs.Value.Value'. The value is not necessarily+null-terminated unless it was created with 'GI.Secret.Structs.Value.valueNew' or a+null-terminated string was passed to 'GI.Secret.Structs.Value.valueNewFull'.+-}+valueGet ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Value+ {- ^ /@value@/: the value -}+ -> m ByteString+ {- ^ __Returns:__ the secret data -}+valueGet value = liftIO $ do+ value' <- unsafeManagedPtrGetPtr value+ length_ <- allocMem :: IO (Ptr Word64)+ result <- secret_value_get value' length_+ length_' <- peek length_+ checkUnexpectedReturnNULL "valueGet" result+ result' <- (unpackByteStringWithLength length_') result+ touchManagedPtr value+ freeMem length_+ return result'++#if ENABLE_OVERLOADING+data ValueGetMethodInfo+instance (signature ~ (m ByteString), MonadIO m) => O.MethodInfo ValueGetMethodInfo Value signature where+ overloadedMethod _ = valueGet++#endif++-- method Value::get_content_type+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : False+-- Skip return : False++foreign import ccall "secret_value_get_content_type" secret_value_get_content_type :: + Ptr Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ IO CString++{- |+Get the content type of the secret value, such as+\<literal>text\/plain\<\/literal>.+-}+valueGetContentType ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Value+ {- ^ /@value@/: the value -}+ -> m T.Text+ {- ^ __Returns:__ the content type -}+valueGetContentType value = liftIO $ do+ value' <- unsafeManagedPtrGetPtr value+ result <- secret_value_get_content_type value'+ checkUnexpectedReturnNULL "valueGetContentType" result+ result' <- cstringToText result+ touchManagedPtr value+ return result'++#if ENABLE_OVERLOADING+data ValueGetContentTypeMethodInfo+instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo ValueGetContentTypeMethodInfo Value signature where+ overloadedMethod _ = valueGetContentType++#endif++-- method Value::get_text+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TBasicType TUTF8)+-- throws : False+-- Skip return : False++foreign import ccall "secret_value_get_text" secret_value_get_text :: + Ptr Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ IO CString++{- |+Get the secret data in the 'GI.Secret.Structs.Value.Value' if it contains a textual+value. The content type must be \<literal>text\/plain\<\/literal>.+-}+valueGetText ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Value+ {- ^ /@value@/: the value -}+ -> m (Maybe T.Text)+ {- ^ __Returns:__ the content type -}+valueGetText value = liftIO $ do+ value' <- unsafeManagedPtrGetPtr value+ result <- secret_value_get_text value'+ maybeResult <- convertIfNonNull result $ \result' -> do+ result'' <- cstringToText result'+ return result''+ touchManagedPtr value+ return maybeResult++#if ENABLE_OVERLOADING+data ValueGetTextMethodInfo+instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.MethodInfo ValueGetTextMethodInfo Value signature where+ overloadedMethod _ = valueGetText++#endif++-- method Value::ref+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "value to reference", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Just (TInterface (Name {namespace = "Secret", name = "Value"}))+-- throws : False+-- Skip return : False++foreign import ccall "secret_value_ref" secret_value_ref :: + Ptr Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ IO (Ptr Value)++{- |+Add another reference to the 'GI.Secret.Structs.Value.Value'. For each reference+'GI.Secret.Structs.Value.valueUnref' should be called to unreference the value.+-}+valueRef ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Value+ {- ^ /@value@/: value to reference -}+ -> m Value+ {- ^ __Returns:__ the value -}+valueRef value = liftIO $ do+ value' <- unsafeManagedPtrGetPtr value+ result <- secret_value_ref value'+ checkUnexpectedReturnNULL "valueRef" result+ result' <- (wrapBoxed Value) result+ touchManagedPtr value+ return result'++#if ENABLE_OVERLOADING+data ValueRefMethodInfo+instance (signature ~ (m Value), MonadIO m) => O.MethodInfo ValueRefMethodInfo Value signature where+ overloadedMethod _ = valueRef++#endif++-- method Value::unref+-- method type : OrdinaryMethod+-- Args : [Arg {argCName = "value", argType = TInterface (Name {namespace = "Secret", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "value to unreference", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]+-- Lengths : []+-- returnType : Nothing+-- throws : False+-- Skip return : False++foreign import ccall "secret_value_unref" secret_value_unref :: + Ptr Value -> -- value : TInterface (Name {namespace = "Secret", name = "Value"})+ IO ()++{- |+Unreference a 'GI.Secret.Structs.Value.Value'. When the last reference is gone, then+the value will be freed.+-}+valueUnref ::+ (B.CallStack.HasCallStack, MonadIO m) =>+ Value+ {- ^ /@value@/: value to unreference -}+ -> m ()+valueUnref value = liftIO $ do+ value' <- unsafeManagedPtrGetPtr value+ secret_value_unref value'+ touchManagedPtr value+ return ()++#if ENABLE_OVERLOADING+data ValueUnrefMethodInfo+instance (signature ~ (m ()), MonadIO m) => O.MethodInfo ValueUnrefMethodInfo Value signature where+ overloadedMethod _ = valueUnref++#endif++#if ENABLE_OVERLOADING+type family ResolveValueMethod (t :: Symbol) (o :: *) :: * where+ ResolveValueMethod "get" o = ValueGetMethodInfo+ ResolveValueMethod "ref" o = ValueRefMethodInfo+ ResolveValueMethod "unref" o = ValueUnrefMethodInfo+ ResolveValueMethod "getContentType" o = ValueGetContentTypeMethodInfo+ ResolveValueMethod "getText" o = ValueGetTextMethodInfo+ ResolveValueMethod l o = O.MethodResolutionFailed l o++instance (info ~ ResolveValueMethod t Value, O.MethodInfo info Value p) => OL.IsLabel t (Value -> p) where+#if MIN_VERSION_base(4,10,0)+ fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#else+ fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)+#endif++#endif++
+ GI/Secret/Structs/Value.hs-boot view
@@ -0,0 +1,41 @@+#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \+ && !defined(__HADDOCK_VERSION__))+module GI.Secret.Structs.Value where++import Data.GI.Base.ShortPrelude+import qualified Data.GI.Base.ShortPrelude as SP+import qualified Data.GI.Base.Overloading as O+import qualified Prelude as P++import qualified Data.GI.Base.Attributes as GI.Attributes+import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr+import qualified Data.GI.Base.GClosure as B.GClosure+import qualified Data.GI.Base.GError as B.GError+import qualified Data.GI.Base.GVariant as B.GVariant+import qualified Data.GI.Base.GValue as B.GValue+import qualified Data.GI.Base.GParamSpec as B.GParamSpec+import qualified Data.GI.Base.CallStack as B.CallStack+import qualified Data.GI.Base.Properties as B.Properties+import qualified Data.Text as T+import qualified Data.ByteString.Char8 as B+import qualified Data.Map as Map+import qualified Foreign.Ptr as FP+import qualified GHC.OverloadedLabels as OL++newtype Value = Value (ManagedPtr Value)+instance BoxedObject Value where+#if ENABLE_OVERLOADING+data ValueGetMethodInfo+#endif+#if ENABLE_OVERLOADING+data ValueGetContentTypeMethodInfo+#endif+#if ENABLE_OVERLOADING+data ValueGetTextMethodInfo+#endif+#if ENABLE_OVERLOADING+data ValueRefMethodInfo+#endif+#if ENABLE_OVERLOADING+data ValueUnrefMethodInfo+#endif
LICENSE view
@@ -1,3 +1,17 @@+The gi-secret library and included works are provided under the terms of the+GNU Library General Public License (LGPL) version 2.1 with the following+exception:++Static linking of applications or any other source to the gi-secret library+does not constitute a modified or derivative work and does not require+the author(s) to provide source code for said work, to link against the+shared gi-secret libraries, or to link their applications against a+user-supplied version of gi-secret. If you link applications to a modified+version of gi-secret, then the changes to gi-secret must be provided under the+terms of the LGPL.++----------------------------------------------------------------------------+ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999
README.md view
@@ -1,6 +1,6 @@ # Documentation Autogenerated documentation for this package can be found at -[https://hackage.haskell.org/package/gi-secret-0.0.5/docs/GI-Secret.html](https://hackage.haskell.org/package/gi-secret-0.0.5/docs/GI-Secret.html)+[https://hackage.haskell.org/package/gi-secret-0.0.7/docs/GI-Secret.html](https://hackage.haskell.org/package/gi-secret-0.0.7/docs/GI-Secret.html) For general documentation on using [haskell-gi](https://github.com/haskell-gi/haskell-gi) based bindings, see [the project page](https://github.com/haskell-gi/haskell-gi) or [the Wiki](https://github.com/haskell-gi/haskell-gi/wiki).
gi-secret.cabal view
@@ -1,33 +1,33 @@ name: gi-secret-version: 0.0.5+version: 0.0.7 synopsis: Libsecret bindings description: Bindings for Libsecret, autogenerated by haskell-gi. homepage: https://github.com/haskell-gi/haskell-gi license: LGPL-2.1 license-file: LICENSE author: Will Thompson, Iñaki García Etxebarria and Jonas Platte-maintainer: Iñaki García Etxebarria (garetxe@gmail.com)+maintainer: Iñaki García Etxebarria (inaki@blueleaf.cc) category: Bindings build-type: Custom-cabal-version: >= 1.24+cabal-version: 1.24 extra-source-files: README.md ChangeLog.md stack.yaml custom-setup- setup-depends: base >= 4.7 && < 5,+ setup-depends: base >= 4.9 && < 5, Cabal >= 1.24,- haskell-gi == 0.21.*+ haskell-gi >= 0.21.0 && < 0.23 library default-language: Haskell2010- default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts+ default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts, UndecidableSuperClasses other-extensions: PatternSynonyms, ViewPatterns ghc-options: -fno-warn-unused-imports -fno-warn-warnings-deprecations pkgconfig-depends: libsecret-1 >= 0.14 && < 1 build-depends: base >= 4.7 && <5,- haskell-gi-base == 0.21.*,- haskell-gi == 0.21.*,+ haskell-gi-base >= 0.21.0 && < 0.23,+ haskell-gi >= 0.21.0 && < 0.23, haskell-gi-overloading < 1.1, gi-gio == 2.0.*, gi-gobject == 2.0.*,@@ -41,3 +41,18 @@ -- see https://ghc.haskell.org/trac/ghc/ticket/14382 if impl(ghc == 8.2.*) build-depends: haskell-gi-overloading == 0.0++ exposed-modules: GI.Secret,+ GI.Secret.Constants,+ GI.Secret.Enums,+ GI.Secret.Flags,+ GI.Secret.Functions,+ GI.Secret.Objects,+ GI.Secret.Objects.Collection,+ GI.Secret.Objects.Item,+ GI.Secret.Objects.Prompt,+ GI.Secret.Objects.Service,+ GI.Secret.Structs,+ GI.Secret.Structs.Schema,+ GI.Secret.Structs.SchemaAttribute,+ GI.Secret.Structs.Value
stack.yaml view
@@ -1,3 +1,3 @@ packages: - '.'-resolver: lts-9.21+resolver: lts-13.7