module GI.Secret.Objects.Collection
(
Collection(..) ,
IsCollection ,
toCollection ,
noCollection ,
collectionCreate ,
collectionCreateFinish ,
collectionCreateSync ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionDeleteMethodInfo ,
#endif
collectionDelete ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionDeleteFinishMethodInfo ,
#endif
collectionDeleteFinish ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionDeleteSyncMethodInfo ,
#endif
collectionDeleteSync ,
collectionForAlias ,
collectionForAliasFinish ,
collectionForAliasSync ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionGetCreatedMethodInfo ,
#endif
collectionGetCreated ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionGetFlagsMethodInfo ,
#endif
collectionGetFlags ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionGetItemsMethodInfo ,
#endif
collectionGetItems ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionGetLabelMethodInfo ,
#endif
collectionGetLabel ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionGetLockedMethodInfo ,
#endif
collectionGetLocked ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionGetModifiedMethodInfo ,
#endif
collectionGetModified ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionGetServiceMethodInfo ,
#endif
collectionGetService ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionLoadItemsMethodInfo ,
#endif
collectionLoadItems ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionLoadItemsFinishMethodInfo ,
#endif
collectionLoadItemsFinish ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionLoadItemsSyncMethodInfo ,
#endif
collectionLoadItemsSync ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionRefreshMethodInfo ,
#endif
collectionRefresh ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionSearchMethodInfo ,
#endif
collectionSearch ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionSearchFinishMethodInfo ,
#endif
collectionSearchFinish ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionSearchSyncMethodInfo ,
#endif
collectionSearchSync ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionSetLabelMethodInfo ,
#endif
collectionSetLabel ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionSetLabelFinishMethodInfo ,
#endif
collectionSetLabelFinish ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionSetLabelSyncMethodInfo ,
#endif
collectionSetLabelSync ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionCreatedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
collectionCreated ,
#endif
constructCollectionCreated ,
getCollectionCreated ,
setCollectionCreated ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionLabelPropertyInfo ,
#endif
clearCollectionLabel ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
collectionLabel ,
#endif
constructCollectionLabel ,
getCollectionLabel ,
setCollectionLabel ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionLockedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
collectionLocked ,
#endif
getCollectionLocked ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionModifiedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
collectionModified ,
#endif
constructCollectionModified ,
getCollectionModified ,
setCollectionModified ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CollectionServicePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 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 qualified GI.Secret.Flags as Secret.Flags
import qualified GI.Secret.Objects.Item as Secret.Item
import qualified GI.Secret.Objects.Service as Secret.Service
import qualified GI.Secret.Structs.Schema as Secret.Schema
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
class GObject o => IsCollection o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError Collection a) =>
IsCollection a
#endif
instance IsCollection Collection
instance Gio.DBusProxy.IsDBusProxy Collection
instance GObject.Object.IsObject Collection
instance Gio.AsyncInitable.IsAsyncInitable Collection
instance Gio.DBusInterface.IsDBusInterface Collection
instance Gio.Initable.IsInitable Collection
toCollection :: (MonadIO m, IsCollection o) => o -> m Collection
toCollection = liftIO . unsafeCastTo Collection
noCollection :: Maybe Collection
noCollection = Nothing
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 "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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveCollectionMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
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) => O.IsLabelProxy t (Collection -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveCollectionMethod t Collection, O.MethodInfo info Collection p) => O.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
#endif
getCollectionCreated :: (MonadIO m, IsCollection o) => o -> m Word64
getCollectionCreated obj = liftIO $ getObjectPropertyUInt64 obj "created"
setCollectionCreated :: (MonadIO m, IsCollection o) => o -> Word64 -> m ()
setCollectionCreated obj val = liftIO $ setObjectPropertyUInt64 obj "created" val
constructCollectionCreated :: (IsCollection o) => Word64 -> IO (GValueConstruct o)
constructCollectionCreated val = constructObjectPropertyUInt64 "created" val
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
getCollectionLabel :: (MonadIO m, IsCollection o) => o -> m (Maybe T.Text)
getCollectionLabel obj = liftIO $ getObjectPropertyString obj "label"
setCollectionLabel :: (MonadIO m, IsCollection o) => o -> T.Text -> m ()
setCollectionLabel obj val = liftIO $ setObjectPropertyString obj "label" (Just val)
constructCollectionLabel :: (IsCollection o) => T.Text -> IO (GValueConstruct o)
constructCollectionLabel val = constructObjectPropertyString "label" (Just val)
clearCollectionLabel :: (MonadIO m, IsCollection o) => o -> m ()
clearCollectionLabel obj = liftIO $ setObjectPropertyString obj "label" (Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
getCollectionLocked :: (MonadIO m, IsCollection o) => o -> m Bool
getCollectionLocked obj = liftIO $ getObjectPropertyBool obj "locked"
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
getCollectionModified :: (MonadIO m, IsCollection o) => o -> m Word64
getCollectionModified obj = liftIO $ getObjectPropertyUInt64 obj "modified"
setCollectionModified :: (MonadIO m, IsCollection o) => o -> Word64 -> m ()
setCollectionModified obj val = liftIO $ setObjectPropertyUInt64 obj "modified" val
constructCollectionModified :: (IsCollection o) => Word64 -> IO (GValueConstruct o)
constructCollectionModified val = constructObjectPropertyUInt64 "modified" val
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
getCollectionService :: (MonadIO m, IsCollection o) => o -> m Secret.Service.Service
getCollectionService obj = liftIO $ checkUnexpectedNothing "getCollectionService" $ getObjectPropertyObject obj "service" Secret.Service.Service
constructCollectionService :: (IsCollection o, Secret.Service.IsService a) => a -> IO (GValueConstruct o)
constructCollectionService val = constructObjectPropertyObject "service" (Just val)
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type instance O.SignalList Collection = CollectionSignalList
type CollectionSignalList = ('[ '("gPropertiesChanged", Gio.DBusProxy.DBusProxyGPropertiesChangedSignalInfo), '("gSignal", Gio.DBusProxy.DBusProxyGSignalSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "secret_collection_delete" secret_collection_delete ::
Ptr Collection ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
collectionDelete ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> 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'
ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
foreign import ccall "secret_collection_delete_finish" secret_collection_delete_finish ::
Ptr Collection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
collectionDeleteFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionDeleteFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo CollectionDeleteFinishMethodInfo a signature where
overloadedMethod _ = collectionDeleteFinish
#endif
foreign import ccall "secret_collection_delete_sync" secret_collection_delete_sync ::
Ptr Collection ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
collectionDeleteSync ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionDeleteSyncMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionDeleteSyncMethodInfo a signature where
overloadedMethod _ = collectionDeleteSync
#endif
foreign import ccall "secret_collection_get_created" secret_collection_get_created ::
Ptr Collection ->
IO Word64
collectionGetCreated ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m Word64
collectionGetCreated self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- secret_collection_get_created self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionGetCreatedMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetCreatedMethodInfo a signature where
overloadedMethod _ = collectionGetCreated
#endif
foreign import ccall "secret_collection_get_flags" secret_collection_get_flags ::
Ptr Collection ->
IO CUInt
collectionGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m [Secret.Flags.CollectionFlags]
collectionGetFlags self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- secret_collection_get_flags self'
let result' = wordToGFlags result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionGetFlagsMethodInfo
instance (signature ~ (m [Secret.Flags.CollectionFlags]), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetFlagsMethodInfo a signature where
overloadedMethod _ = collectionGetFlags
#endif
foreign import ccall "secret_collection_get_items" secret_collection_get_items ::
Ptr Collection ->
IO (Ptr (GList (Ptr Secret.Item.Item)))
collectionGetItems ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m [Secret.Item.Item]
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionGetItemsMethodInfo
instance (signature ~ (m [Secret.Item.Item]), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetItemsMethodInfo a signature where
overloadedMethod _ = collectionGetItems
#endif
foreign import ccall "secret_collection_get_label" secret_collection_get_label ::
Ptr Collection ->
IO CString
collectionGetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m T.Text
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionGetLabelMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetLabelMethodInfo a signature where
overloadedMethod _ = collectionGetLabel
#endif
foreign import ccall "secret_collection_get_locked" secret_collection_get_locked ::
Ptr Collection ->
IO CInt
collectionGetLocked ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m Bool
collectionGetLocked self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- secret_collection_get_locked self'
let result' = (/= 0) result
touchManagedPtr self
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionGetLockedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetLockedMethodInfo a signature where
overloadedMethod _ = collectionGetLocked
#endif
foreign import ccall "secret_collection_get_modified" secret_collection_get_modified ::
Ptr Collection ->
IO Word64
collectionGetModified ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m Word64
collectionGetModified self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- secret_collection_get_modified self'
touchManagedPtr self
return result
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionGetModifiedMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetModifiedMethodInfo a signature where
overloadedMethod _ = collectionGetModified
#endif
foreign import ccall "secret_collection_get_service" secret_collection_get_service ::
Ptr Collection ->
IO (Ptr Secret.Service.Service)
collectionGetService ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m Secret.Service.Service
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionGetServiceMethodInfo
instance (signature ~ (m Secret.Service.Service), MonadIO m, IsCollection a) => O.MethodInfo CollectionGetServiceMethodInfo a signature where
overloadedMethod _ = collectionGetService
#endif
foreign import ccall "secret_collection_load_items" secret_collection_load_items ::
Ptr Collection ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
collectionLoadItems ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> 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'
ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
foreign import ccall "secret_collection_load_items_finish" secret_collection_load_items_finish ::
Ptr Collection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
collectionLoadItemsFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionLoadItemsFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo CollectionLoadItemsFinishMethodInfo a signature where
overloadedMethod _ = collectionLoadItemsFinish
#endif
foreign import ccall "secret_collection_load_items_sync" secret_collection_load_items_sync ::
Ptr Collection ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
collectionLoadItemsSync ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionLoadItemsSyncMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) => O.MethodInfo CollectionLoadItemsSyncMethodInfo a signature where
overloadedMethod _ = collectionLoadItemsSync
#endif
foreign import ccall "secret_collection_refresh" secret_collection_refresh ::
Ptr Collection ->
IO ()
collectionRefresh ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a) =>
a
-> m ()
collectionRefresh self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
secret_collection_refresh self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionRefreshMethodInfo
instance (signature ~ (m ()), MonadIO m, IsCollection a) => O.MethodInfo CollectionRefreshMethodInfo a signature where
overloadedMethod _ = collectionRefresh
#endif
foreign import ccall "secret_collection_search" secret_collection_search ::
Ptr Collection ->
Ptr Secret.Schema.Schema ->
Ptr (GHashTable CString CString) ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
collectionSearch ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (Secret.Schema.Schema)
-> Map.Map T.Text T.Text
-> [Secret.Flags.SearchFlags]
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> 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'
ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
foreign import ccall "secret_collection_search_finish" secret_collection_search_finish ::
Ptr Collection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr (GList (Ptr Secret.Item.Item)))
collectionSearchFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m [Secret.Item.Item]
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
foreign import ccall "secret_collection_search_sync" secret_collection_search_sync ::
Ptr Collection ->
Ptr Secret.Schema.Schema ->
Ptr (GHashTable CString CString) ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr (GList (Ptr Secret.Item.Item)))
collectionSearchSync ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (Secret.Schema.Schema)
-> Map.Map T.Text T.Text
-> [Secret.Flags.SearchFlags]
-> Maybe (b)
-> m [Secret.Item.Item]
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
foreign import ccall "secret_collection_set_label" secret_collection_set_label ::
Ptr Collection ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
collectionSetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> 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'
ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
foreign import ccall "secret_collection_set_label_finish" secret_collection_set_label_finish ::
Ptr Collection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
collectionSetLabelFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CollectionSetLabelFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsCollection a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo CollectionSetLabelFinishMethodInfo a signature where
overloadedMethod _ = collectionSetLabelFinish
#endif
foreign import ccall "secret_collection_set_label_sync" secret_collection_set_label_sync ::
Ptr Collection ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
collectionSetLabelSync ::
(B.CallStack.HasCallStack, MonadIO m, IsCollection a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> m ()
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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
foreign import ccall "secret_collection_create" secret_collection_create ::
Ptr Secret.Service.Service ->
CString ->
CString ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
collectionCreate ::
(B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>
Maybe (a)
-> T.Text
-> Maybe (T.Text)
-> [Secret.Flags.CollectionCreateFlags]
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> 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'
ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif
foreign import ccall "secret_collection_create_finish" secret_collection_create_finish ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr Collection)
collectionCreateFinish ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>
a
-> m Collection
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif
foreign import ccall "secret_collection_create_sync" secret_collection_create_sync ::
Ptr Secret.Service.Service ->
CString ->
CString ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr Collection)
collectionCreateSync ::
(B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>
Maybe (a)
-> T.Text
-> Maybe (T.Text)
-> [Secret.Flags.CollectionCreateFlags]
-> Maybe (b)
-> m Collection
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif
foreign import ccall "secret_collection_for_alias" secret_collection_for_alias ::
Ptr Secret.Service.Service ->
CString ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
collectionForAlias ::
(B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>
Maybe (a)
-> T.Text
-> [Secret.Flags.CollectionFlags]
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> 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'
ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
maybeCallback <- case callback of
Nothing -> return (castPtrToFunPtr nullPtr)
Just jCallback -> do
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif
foreign import ccall "secret_collection_for_alias_finish" secret_collection_for_alias_finish ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr Collection)
collectionForAliasFinish ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>
a
-> m Collection
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif
foreign import ccall "secret_collection_for_alias_sync" secret_collection_for_alias_sync ::
Ptr Secret.Service.Service ->
CString ->
CUInt ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr Collection)
collectionForAliasSync ::
(B.CallStack.HasCallStack, MonadIO m, Secret.Service.IsService a, Gio.Cancellable.IsCancellable b) =>
Maybe (a)
-> T.Text
-> [Secret.Flags.CollectionFlags]
-> Maybe (b)
-> m Collection
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif