module Gnome.Keyring.Item
(
ItemID (..)
, ItemType (..)
, itemCreate
, itemDelete
, Attribute (..)
, attributeName
, itemGetAttributes
, itemSetAttributes
, ItemInfoFlag (..)
, ItemInfo (..)
, itemGetInfo
, itemGetInfoFull
, itemSetInfo
, AccessControl (..)
, AccessType (..)
, itemGetACL
, itemSetACL
, itemGrantAccessRights
, FoundItem (..)
, findItems
) where
import Control.Exception (bracket)
import Data.Set (Set, toList, fromList)
import Data.Text.Lazy (Text)
import Gnome.Keyring.ItemInfo
import Gnome.Keyring.Internal.FFI
import Gnome.Keyring.Internal.Operation
import Gnome.Keyring.Internal.Types
data ItemInfoFlag
= ItemInfoBasics
| ItemInfoSecret
deriving (Show, Eq)
cItemID :: Integral a => ItemID -> a
cItemID (ItemID x) = fromIntegral x
cItemInfoFlags :: Bits a => Set ItemInfoFlag -> a
cItemInfoFlags = foldr (.|.) 0 . map flagValue . toList where
flagValue ItemInfoBasics = 0
flagValue ItemInfoSecret = 1
itemCreate :: Maybe KeyringName
-> ItemType
-> Text
-> [Attribute]
-> Text
-> Bool
-> Operation ItemID
itemCreate k t dn as s u = itemIDOperation
(item_create k t dn as s u)
(item_create_sync k t dn as s u)
item_create :: Maybe Text -> ItemType -> Text -> [Attribute] -> Text -> Bool -> GetIntCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_create a1 a2 a3 a4 a5 a6 a7 a8 a9 =
withNullableText a1 $ \a1' ->
let {a2' = fromItemType a2} in
withText a3 $ \a3' ->
withAttributeList a4 $ \a4' ->
withText a5 $ \a5' ->
let {a6' = fromBool a6} in
let {a7' = id a7} in
let {a8' = id a8} in
let {a9' = id a9} in
item_create'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_create_sync :: Maybe Text -> ItemType -> Text -> [Attribute] -> Text -> Bool -> IO (Result, ItemID)
item_create_sync a1 a2 a3 a4 a5 a6 =
withNullableText a1 $ \a1' ->
let {a2' = fromItemType a2} in
withText a3 $ \a3' ->
withAttributeList a4 $ \a4' ->
withText a5 $ \a5' ->
let {a6' = fromBool a6} in
alloca $ \a7' ->
item_create_sync'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
peekItemID a7'>>= \a7'' ->
let {res' = result res} in
return (res', a7'')
itemDelete :: Maybe KeyringName -> ItemID -> Operation ()
itemDelete k item = voidOperation
(item_delete k item)
(item_delete_sync k item)
item_delete :: Maybe Text -> ItemID -> DoneCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_delete a1 a2 a3 a4 a5 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
item_delete'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_delete_sync :: Maybe Text -> ItemID -> IO ((Result, ()))
item_delete_sync a1 a2 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
item_delete_sync'_ a1' a2' >>= \res ->
let {res' = resultAndTuple res} in
return (res')
itemGetInfo :: Maybe KeyringName -> ItemID -> Operation ItemInfo
itemGetInfo k item = itemInfoOperation
(item_get_info k item)
(item_get_info_sync k item)
item_get_info :: Maybe Text -> ItemID -> GetItemInfoCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_get_info a1 a2 a3 a4 a5 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
item_get_info'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_get_info_sync :: Maybe Text -> ItemID -> IO (Result, ItemInfo)
item_get_info_sync a1 a2 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
alloca $ \a3' ->
item_get_info_sync'_ a1' a2' a3' >>= \res ->
stealItemInfo a3'>>= \a3'' ->
let {res' = result res} in
return (res', a3'')
itemGetInfoFull :: Maybe KeyringName -> ItemID -> Set ItemInfoFlag
-> Operation ItemInfo
itemGetInfoFull k item flags = itemInfoOperation
(item_get_info_full k item flags)
(item_get_info_full_sync k item flags)
item_get_info_full :: Maybe Text -> ItemID -> Set ItemInfoFlag -> GetItemInfoCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_get_info_full a1 a2 a3 a4 a5 a6 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
let {a3' = cItemInfoFlags a3} in
let {a4' = id a4} in
let {a5' = id a5} in
let {a6' = id a6} in
item_get_info_full'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_get_info_full_sync :: Maybe Text -> ItemID -> Set ItemInfoFlag -> IO (Result, ItemInfo)
item_get_info_full_sync a1 a2 a3 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
let {a3' = cItemInfoFlags a3} in
alloca $ \a4' ->
item_get_info_full_sync'_ a1' a2' a3' a4' >>= \res ->
stealItemInfo a4'>>= \a4'' ->
let {res' = result res} in
return (res', a4'')
itemSetInfo :: Maybe KeyringName -> ItemID -> ItemInfo -> Operation ()
itemSetInfo k item info = voidOperation
(item_set_info k item info)
(item_set_info_sync k item info)
item_set_info :: Maybe Text -> ItemID -> ItemInfo -> DoneCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_set_info a1 a2 a3 a4 a5 a6 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
withItemInfo a3 $ \a3' ->
let {a4' = id a4} in
let {a5' = id a5} in
let {a6' = id a6} in
item_set_info'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_set_info_sync :: Maybe Text -> ItemID -> ItemInfo -> IO ((Result, ()))
item_set_info_sync a1 a2 a3 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
withItemInfo a3 $ \a3' ->
item_set_info_sync'_ a1' a2' a3' >>= \res ->
let {res' = resultAndTuple res} in
return (res')
data AttributeType = ATTRIBUTE_TYPE_STRING
| ATTRIBUTE_TYPE_UINT32
deriving (Enum)
data Attribute
= TextAttribute Text Text
| WordAttribute Text Word32
deriving (Show, Eq)
attributeName :: Attribute -> Text
attributeName (TextAttribute n _) = n
attributeName (WordAttribute n _) = n
withAttributeList :: [Attribute] -> (Ptr () -> IO a) -> IO a
withAttributeList attrs io = bracket newList freeAttributeList buildList where
newList = g_array_new 0 0 12
buildList list = mapM_ (append list) attrs >> io list
append list (TextAttribute n x) = appendString list n x
append list (WordAttribute n x) = appendUInt32 list n x
appendString :: Ptr () -> Text -> Text -> IO (())
appendString a1 a2 a3 =
let {a1' = id a1} in
withText a2 $ \a2' ->
withText a3 $ \a3' ->
appendString'_ a1' a2' a3' >>= \res ->
let {res' = id res} in
return (res')
appendUInt32 :: Ptr () -> Text -> Word32 -> IO (())
appendUInt32 a1 a2 a3 =
let {a1' = id a1} in
withText a2 $ \a2' ->
let {a3' = fromIntegral a3} in
appendUInt32'_ a1' a2' a3' >>= \res ->
let {res' = id res} in
return (res')
peekAttribute :: Ptr () -> IO Attribute
peekAttribute attr = do
name <- peekText =<< (\ptr -> do {peekByteOff ptr 0 ::IO (Ptr CChar)}) attr
cType <- (\ptr -> do {peekByteOff ptr 4 ::IO CInt}) attr
case toEnum . fromIntegral $ cType of
ATTRIBUTE_TYPE_STRING -> do
value <- peekText =<< (\ptr -> do {peekByteOff ptr 8 ::IO (Ptr CChar)}) attr
return $ TextAttribute name value
ATTRIBUTE_TYPE_UINT32 -> do
cValue <- (\ptr -> do {peekByteOff ptr 8 ::IO CUInt}) attr
return $ WordAttribute name $ fromIntegral cValue
peekAttributeList :: Ptr () -> IO [Attribute]
peekAttributeList = mapGArray peekAttribute 12
stealAttributeList :: Ptr (Ptr ()) -> IO [Attribute]
stealAttributeList ptr = bracket (peek ptr) freeAttributeList peekAttributeList
freeAttributeList :: Ptr () -> IO ()
freeAttributeList = gnome_keyring_attribute_list_free
type GetAttributesCallback = CInt -> Ptr () -> Ptr () -> IO ()
type GetAttributesCallbackPtr = FunPtr ((CInt -> ((Ptr ()) -> ((Ptr ()) -> (IO ())))))
foreign import ccall "wrapper"
wrapGetAttributesCallback :: GetAttributesCallback -> IO GetAttributesCallbackPtr
attributeListOperation :: OperationImpl GetAttributesCallback [Attribute]
attributeListOperation = operationImpl $ \checkResult ->
wrapGetAttributesCallback $ \cres array _ ->
checkResult cres $ peekAttributeList array
itemGetAttributes :: Maybe KeyringName -> ItemID -> Operation [Attribute]
itemGetAttributes k item = attributeListOperation
(item_get_attributes k item)
(item_get_attributes_sync k item)
item_get_attributes :: Maybe Text -> ItemID -> GetAttributesCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_get_attributes a1 a2 a3 a4 a5 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
item_get_attributes'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_get_attributes_sync :: Maybe Text -> ItemID -> IO (Result, [Attribute])
item_get_attributes_sync a1 a2 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
alloca $ \a3' ->
item_get_attributes_sync'_ a1' a2' a3' >>= \res ->
stealAttributeList a3'>>= \a3'' ->
let {res' = result res} in
return (res', a3'')
itemSetAttributes :: Maybe KeyringName -> ItemID -> [Attribute] -> Operation ()
itemSetAttributes k item as = voidOperation
(item_set_attributes k item as)
(item_set_attributes_sync k item as)
item_set_attributes :: Maybe Text -> ItemID -> [Attribute] -> DoneCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_set_attributes a1 a2 a3 a4 a5 a6 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
withAttributeList a3 $ \a3' ->
let {a4' = id a4} in
let {a5' = id a5} in
let {a6' = id a6} in
item_set_attributes'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_set_attributes_sync :: Maybe Text -> ItemID -> [Attribute] -> IO ((Result, ()))
item_set_attributes_sync a1 a2 a3 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
withAttributeList a3 $ \a3' ->
item_set_attributes_sync'_ a1' a2' a3' >>= \res ->
let {res' = resultAndTuple res} in
return (res')
data RawAccessType = ACCESS_READ
| ACCESS_WRITE
| ACCESS_REMOVE
deriving (Show)
instance Enum RawAccessType where
fromEnum ACCESS_READ = 1
fromEnum ACCESS_WRITE = 2
fromEnum ACCESS_REMOVE = 4
toEnum 1 = ACCESS_READ
toEnum 2 = ACCESS_WRITE
toEnum 4 = ACCESS_REMOVE
toEnum unmatched = error ("RawAccessType.toEnum: Cannot match " ++ show unmatched)
data AccessType
= AccessRead
| AccessWrite
| AccessRemove
deriving (Show, Eq, Ord)
data AccessControl = AccessControl
{ accessControlName :: Maybe Text
, accessControlPath :: Maybe Text
, accessControlType :: Set AccessType
}
deriving (Show, Eq)
peekAccessControl :: Ptr () -> IO AccessControl
peekAccessControl ac = do
name <- stealNullableText =<< gnome_keyring_item_ac_get_display_name ac
path <- stealNullableText =<< gnome_keyring_item_ac_get_path_name ac
cType <- gnome_keyring_item_ac_get_access_type ac
return $ AccessControl name path $ peekAccessType cType
stealACL :: Ptr (Ptr ()) -> IO [AccessControl]
stealACL ptr = bracket (peek ptr) freeACL (mapGList peekAccessControl)
withACL :: [AccessControl] -> (Ptr () -> IO a) -> IO a
withACL acl = bracket (buildACL acl) freeACL
buildACL :: [AccessControl] -> IO (Ptr ())
buildACL acs = bracket
gnome_keyring_application_ref_new
gnome_keyring_application_ref_free $ \appRef ->
buildACL' appRef acs nullPtr
buildACL' :: Ptr () -> [AccessControl] -> Ptr () -> IO (Ptr ())
buildACL' _ [] list = return list
buildACL' appRef (ac:acs) list = buildAC appRef ac
>>= g_list_append list
>>= buildACL' appRef acs
buildAC :: Ptr () -> AccessControl -> IO (Ptr ())
buildAC appRef ac = do
let cAllowed = cAccessTypes $ accessControlType ac
ptr <- gnome_keyring_access_control_new appRef cAllowed
withNullableText (accessControlName ac) $ gnome_keyring_item_ac_set_display_name ptr
withNullableText (accessControlPath ac) $ gnome_keyring_item_ac_set_path_name ptr
return ptr
freeACL :: Ptr () -> IO ()
freeACL = gnome_keyring_acl_free
cAccessTypes :: Bits a => Set AccessType -> a
cAccessTypes = foldr (.|.) 0 . map (fromIntegral . fromEnum . fromAccessType) . toList where
peekAccessType :: Integral a => a -> Set AccessType
peekAccessType cint = fromList $ concat
[ [AccessRead | int .&. fromEnum ACCESS_READ > 0]
, [AccessWrite | int .&. fromEnum ACCESS_WRITE > 0]
, [AccessRemove | int .&. fromEnum ACCESS_REMOVE > 0]
]
where int = fromIntegral cint
fromAccessType :: AccessType -> RawAccessType
fromAccessType AccessRead = ACCESS_READ
fromAccessType AccessWrite = ACCESS_WRITE
fromAccessType AccessRemove = ACCESS_REMOVE
accessControlListOperation :: OperationImpl GetListCallback [AccessControl]
accessControlListOperation = operationImpl $ \checkResult ->
wrapGetListCallback $ \cres list _ ->
checkResult cres $ mapGList peekAccessControl list
itemGetACL :: Maybe KeyringName -> ItemID -> Operation [AccessControl]
itemGetACL k item = accessControlListOperation
(item_get_acl k item)
(item_get_acl_sync k item)
item_get_acl :: Maybe Text -> ItemID -> GetListCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_get_acl a1 a2 a3 a4 a5 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
item_get_acl'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_get_acl_sync :: Maybe Text -> ItemID -> IO (Result, [AccessControl])
item_get_acl_sync a1 a2 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
alloca $ \a3' ->
item_get_acl_sync'_ a1' a2' a3' >>= \res ->
stealACL a3'>>= \a3'' ->
let {res' = result res} in
return (res', a3'')
itemSetACL :: Maybe KeyringName -> ItemID -> [AccessControl] -> Operation ()
itemSetACL k item acl = voidOperation
(item_set_acl k item acl)
(item_set_acl_sync k item acl)
item_set_acl :: Maybe Text -> ItemID -> [AccessControl] -> DoneCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_set_acl a1 a2 a3 a4 a5 a6 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
withACL a3 $ \a3' ->
let {a4' = id a4} in
let {a5' = id a5} in
let {a6' = id a6} in
item_set_acl'_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_set_acl_sync :: Maybe Text -> ItemID -> [AccessControl] -> IO ((Result, ()))
item_set_acl_sync a1 a2 a3 =
withNullableText a1 $ \a1' ->
let {a2' = cItemID a2} in
withACL a3 $ \a3' ->
item_set_acl_sync'_ a1' a2' a3' >>= \res ->
let {res' = resultAndTuple res} in
return (res')
itemGrantAccessRights :: Maybe KeyringName
-> Text
-> Text
-> ItemID
-> Set AccessType
-> Operation ()
itemGrantAccessRights k d p item r = voidOperation
(item_grant_access_rights k d p item r)
(item_grant_access_rights_sync k d p item r)
item_grant_access_rights :: Maybe Text -> Text -> Text -> ItemID -> Set AccessType -> DoneCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
item_grant_access_rights a1 a2 a3 a4 a5 a6 a7 a8 =
withNullableText a1 $ \a1' ->
withText a2 $ \a2' ->
withText a3 $ \a3' ->
let {a4' = cItemID a4} in
let {a5' = cAccessTypes a5} in
let {a6' = id a6} in
let {a7' = id a7} in
let {a8' = id a8} in
item_grant_access_rights'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
let {res' = CancellationKey res} in
return (res')
item_grant_access_rights_sync :: Maybe Text -> Text -> Text -> ItemID -> Set AccessType -> IO ((Result, ()))
item_grant_access_rights_sync a1 a2 a3 a4 a5 =
withNullableText a1 $ \a1' ->
withText a2 $ \a2' ->
withText a3 $ \a3' ->
let {a4' = cItemID a4} in
let {a5' = cAccessTypes a5} in
item_grant_access_rights_sync'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = resultAndTuple res} in
return (res')
data FoundItem = FoundItem
{ foundItemKeyring :: KeyringName
, foundItemID :: ItemID
, foundItemAttributes :: [Attribute]
, foundItemSecret :: Text
}
deriving (Show, Eq)
peekFound :: Ptr () -> IO FoundItem
peekFound f = do
keyring <- peekText =<< (\ptr -> do {peekByteOff ptr 0 ::IO (Ptr CChar)}) f
itemID <- (\ptr -> do {peekByteOff ptr 4 ::IO CUInt}) f
attrs <- peekAttributeList =<< (\ptr -> do {peekByteOff ptr 8 ::IO (Ptr ())}) f
secret <- peekText =<< (\ptr -> do {peekByteOff ptr 12 ::IO (Ptr CChar)}) f
let itemID' = ItemID $ fromIntegral itemID
return $ FoundItem keyring itemID' attrs secret
stealFoundList :: Ptr (Ptr ()) -> IO [FoundItem]
stealFoundList ptr = bracket (peek ptr)
gnome_keyring_found_list_free
(mapGList peekFound)
foundItemsOperation :: OperationImpl GetListCallback [FoundItem]
foundItemsOperation = operationImpl $ \checkResult ->
wrapGetListCallback $ \cres list _ ->
checkResult cres $ (mapGList peekFound) list
findItems :: ItemType -> [Attribute] -> Operation [FoundItem]
findItems t as = foundItemsOperation
(find_items t as)
(find_items_sync t as)
find_items :: ItemType -> [Attribute] -> GetListCallbackPtr -> Ptr () -> DestroyNotifyPtr -> IO (CancellationKey)
find_items a1 a2 a3 a4 a5 =
let {a1' = fromItemType a1} in
withAttributeList a2 $ \a2' ->
let {a3' = id a3} in
let {a4' = id a4} in
let {a5' = id a5} in
find_items'_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = CancellationKey res} in
return (res')
find_items_sync :: ItemType -> [Attribute] -> IO (Result, [FoundItem])
find_items_sync a1 a2 =
let {a1' = fromItemType a1} in
withAttributeList a2 $ \a2' ->
alloca $ \a3' ->
find_items_sync'_ a1' a2' a3' >>= \res ->
stealFoundList a3'>>= \a3'' ->
let {res' = result res} in
return (res', a3'')
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_create"
item_create'_ :: ((Ptr CChar) -> (CInt -> ((Ptr CChar) -> ((Ptr ()) -> ((Ptr CChar) -> (CInt -> ((FunPtr (CInt -> (CUInt -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ())))))))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_create_sync"
item_create_sync'_ :: ((Ptr CChar) -> (CInt -> ((Ptr CChar) -> ((Ptr ()) -> ((Ptr CChar) -> (CInt -> ((Ptr CUInt) -> (IO CInt))))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_delete"
item_delete'_ :: ((Ptr CChar) -> (CUInt -> ((FunPtr (CInt -> ((Ptr ()) -> (IO ())))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ())))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_delete_sync"
item_delete_sync'_ :: ((Ptr CChar) -> (CUInt -> (IO CInt)))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_info"
item_get_info'_ :: ((Ptr CChar) -> (CUInt -> ((FunPtr (CInt -> ((Ptr ()) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ())))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_info_sync"
item_get_info_sync'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_info_full"
item_get_info_full'_ :: ((Ptr CChar) -> (CUInt -> (CUInt -> ((FunPtr (CInt -> ((Ptr ()) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ()))))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_info_full_sync"
item_get_info_full_sync'_ :: ((Ptr CChar) -> (CUInt -> (CUInt -> ((Ptr (Ptr ())) -> (IO CInt)))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_set_info"
item_set_info'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr ()) -> ((FunPtr (CInt -> ((Ptr ()) -> (IO ())))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ()))))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_set_info_sync"
item_set_info_sync'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr ()) -> (IO CInt))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h g_array_new"
g_array_new :: (CInt -> (CInt -> (CUInt -> (IO (Ptr ())))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_attribute_list_append_string"
appendString'_ :: ((Ptr ()) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_attribute_list_append_uint32"
appendUInt32'_ :: ((Ptr ()) -> ((Ptr CChar) -> (CUInt -> (IO ()))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_attribute_list_free"
gnome_keyring_attribute_list_free :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_attributes"
item_get_attributes'_ :: ((Ptr CChar) -> (CUInt -> ((GetAttributesCallbackPtr) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ())))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_attributes_sync"
item_get_attributes_sync'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_set_attributes"
item_set_attributes'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr ()) -> ((FunPtr (CInt -> ((Ptr ()) -> (IO ())))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ()))))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_set_attributes_sync"
item_set_attributes_sync'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr ()) -> (IO CInt))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_ac_get_display_name"
gnome_keyring_item_ac_get_display_name :: ((Ptr ()) -> (IO (Ptr CChar)))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_ac_get_path_name"
gnome_keyring_item_ac_get_path_name :: ((Ptr ()) -> (IO (Ptr CChar)))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_ac_get_access_type"
gnome_keyring_item_ac_get_access_type :: ((Ptr ()) -> (IO CInt))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_application_ref_new"
gnome_keyring_application_ref_new :: (IO (Ptr ()))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_application_ref_free"
gnome_keyring_application_ref_free :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Gnome/Keyring/Item.chs.h g_list_append"
g_list_append :: ((Ptr ()) -> ((Ptr ()) -> (IO (Ptr ()))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_access_control_new"
gnome_keyring_access_control_new :: ((Ptr ()) -> (CInt -> (IO (Ptr ()))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_ac_set_display_name"
gnome_keyring_item_ac_set_display_name :: ((Ptr ()) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_ac_set_path_name"
gnome_keyring_item_ac_set_path_name :: ((Ptr ()) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_acl_free"
gnome_keyring_acl_free :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_acl"
item_get_acl'_ :: ((Ptr CChar) -> (CUInt -> ((FunPtr (CInt -> ((Ptr ()) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ())))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_get_acl_sync"
item_get_acl_sync'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_set_acl"
item_set_acl'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr ()) -> ((FunPtr (CInt -> ((Ptr ()) -> (IO ())))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ()))))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_set_acl_sync"
item_set_acl_sync'_ :: ((Ptr CChar) -> (CUInt -> ((Ptr ()) -> (IO CInt))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_grant_access_rights"
item_grant_access_rights'_ :: ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> (CUInt -> (CInt -> ((FunPtr (CInt -> ((Ptr ()) -> (IO ())))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ()))))))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_item_grant_access_rights_sync"
item_grant_access_rights_sync'_ :: ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> (CUInt -> (CInt -> (IO CInt))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_found_list_free"
gnome_keyring_found_list_free :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_find_items"
find_items'_ :: (CInt -> ((Ptr ()) -> ((FunPtr (CInt -> ((Ptr ()) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO (Ptr ())))))))
foreign import ccall safe "Gnome/Keyring/Item.chs.h gnome_keyring_find_items_sync"
find_items_sync'_ :: (CInt -> ((Ptr ()) -> ((Ptr (Ptr ())) -> (IO CInt))))