-- GENERATED by C->Haskell Compiler, version 0.16.0 Crystal Seed, 24 Jan 2009 (Haskell)-- Edit the ORIGNAL .chs file instead!{-# LINE 1 "./Gnome/Keyring/KeyringInfo.chs" #-}-- Copyright (C) 2009 John Millikin <jmillikin@gmail.com>-- -- This program is free software: you can redistribute it and/or modify-- it under the terms of the GNU General Public License as published by-- the Free Software Foundation, either version 3 of the License, or-- any later version.-- -- This program is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-- GNU General Public License for more details.-- -- You should have received a copy of the GNU General Public License-- along with this program. If not, see <http://www.gnu.org/licenses/>.-- {-# LANGUAGE ForeignFunctionInterface #-}{-# LINE 18 "./Gnome/Keyring/KeyringInfo.chs" #-}moduleGnome.Keyring.KeyringInfo(KeyringInfo(..),KeyringInfoToken,GetKeyringInfoCallbackPtr,keyringInfoOperation,withKeyringInfo,stealKeyringInfoPtr)whereimportData.Time(UTCTime)importGnome.Keyring.Internal.FFIimportGnome.Keyring.Internal.Operation-- Our keyring info populates/is populated by the native info structure.-- Clients can't create them directly, because GKR doesn't allow it.newtypeKeyringInfoToken=KeyringInfoToken(ForeignPtr())dataKeyringInfo=KeyringInfo{keyringLockOnIdle::Bool,keyringLockTimeout::Word32,keyringMTime::UTCTime,keyringCTime::UTCTime,keyringIsLocked::Bool,keyringInfoToken::KeyringInfoToken}-- The extra pointer shouldn't be printed out when showing a KeyringInfo,-- so deriving(Show) can't be used. This instance acts like the-- auto-generated instance, minus the pointer.instanceShowKeyringInfowhereshowsPrecdinfo=showParen(d>10)$s"KeyringInfo".s" {keyringLockOnIdle = ".shows(keyringLockOnIdleinfo).s", keyringLockTimeout = ".shows(keyringLockTimeoutinfo).s", keyringMTime = ".shows(keyringMTimeinfo).s", keyringCTime = ".shows(keyringCTimeinfo).s", keyringIsLocked = ".shows(keyringIsLockedinfo).s"}"wheres=showString-- GnomeKeyringOperationGetKeyringInfoCallbacktypeGetKeyringInfoCallback=CInt->Ptr()->Ptr()->IO()typeGetKeyringInfoCallbackPtr=FunPtr((CInt->((Ptr())->((Ptr())->(IO()))))){-# LINE 63 "./Gnome/Keyring/KeyringInfo.chs" #-}foreignimportccall"wrapper"wrapGetKeyringInfoCallback::GetKeyringInfoCallback->IOGetKeyringInfoCallbackPtrkeyringInfoOperation::OperationImplGetKeyringInfoCallbackKeyringInfokeyringInfoOperation=operationImpl$\checkResult->wrapGetKeyringInfoCallback$\cresptr_->checkResultcres$peekKeyringInfoptrcopyInfo::Ptr()->IO(ForeignPtr())copyInfo=(newForeignPtrfinalizeKeyringInfo=<<).c_copy{-# LINE 74 "./Gnome/Keyring/KeyringInfo.chs" #-}peekKeyringInfo::Ptr()->IOKeyringInfopeekKeyringInfoptr=dolockOnIdle<-toBool`fmap`gnome_keyring_info_get_lock_on_idleptrtimeout<-fromIntegral`fmap`gnome_keyring_info_get_lock_timeoutptrmtime<-cToUTC`fmap`gnome_keyring_info_get_mtimeptrctime<-cToUTC`fmap`gnome_keyring_info_get_ctimeptrisLocked<-toBool`fmap`gnome_keyring_info_get_is_lockedptrcopy<-copyInfoptrlettoken=KeyringInfoTokencopyreturn$KeyringInfolockOnIdletimeoutmtimectimeisLockedtokenstealKeyringInfoPtr::Ptr(Ptr())->IOKeyringInfostealKeyringInfoPtrptr=doinfoPtr<-newForeignPtrfinalizeKeyringInfo=<<peekptrwithForeignPtrinfoPtrpeekKeyringInfowithKeyringInfo::KeyringInfo->(Ptr()->IOa)->IOawithKeyringInfoinfoio=dolet(KeyringInfoTokeninfoPtr)=keyringInfoTokeninfocopy<-withForeignPtrinfoPtrcopyInfowithForeignPtrcopy$\ptr->dognome_keyring_info_set_lock_on_idleptr.fromBool.keyringLockOnIdle$infognome_keyring_info_set_lock_timeoutptr.fromIntegral.keyringLockTimeout$infoioptrforeignimportccall"gnome-keyring.h &gnome_keyring_info_free"finalizeKeyringInfo::FunPtr(Ptra->IO())foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_copy"c_copy::((Ptr())->(IO(Ptr())))foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_get_lock_on_idle"gnome_keyring_info_get_lock_on_idle::((Ptr())->(IOCInt))foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_get_lock_timeout"gnome_keyring_info_get_lock_timeout::((Ptr())->(IOCUInt))foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_get_mtime"gnome_keyring_info_get_mtime::((Ptr())->(IOCLong))foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_get_ctime"gnome_keyring_info_get_ctime::((Ptr())->(IOCLong))foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_get_is_locked"gnome_keyring_info_get_is_locked::((Ptr())->(IOCInt))foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_set_lock_on_idle"gnome_keyring_info_set_lock_on_idle::((Ptr())->(CInt->(IO())))foreignimportccallunsafe"Gnome/Keyring/KeyringInfo.chs.h gnome_keyring_info_set_lock_timeout"gnome_keyring_info_set_lock_timeout::((Ptr())->(CUInt->(IO())))