{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Dazzle.Structs.FileTransferStat
(
FileTransferStat(..) ,
newZeroFileTransferStat ,
#if defined(ENABLE_OVERLOADING)
ResolveFileTransferStatMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
fileTransferStat_nBytes ,
#endif
getFileTransferStatNBytes ,
setFileTransferStatNBytes ,
#if defined(ENABLE_OVERLOADING)
fileTransferStat_nBytesTotal ,
#endif
getFileTransferStatNBytesTotal ,
setFileTransferStatNBytesTotal ,
#if defined(ENABLE_OVERLOADING)
fileTransferStat_nDirs ,
#endif
getFileTransferStatNDirs ,
setFileTransferStatNDirs ,
#if defined(ENABLE_OVERLOADING)
fileTransferStat_nDirsTotal ,
#endif
getFileTransferStatNDirsTotal ,
setFileTransferStatNDirsTotal ,
#if defined(ENABLE_OVERLOADING)
fileTransferStat_nFiles ,
#endif
getFileTransferStatNFiles ,
setFileTransferStatNFiles ,
#if defined(ENABLE_OVERLOADING)
fileTransferStat_nFilesTotal ,
#endif
getFileTransferStatNFilesTotal ,
setFileTransferStatNFilesTotal ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
#else
#endif
newtype FileTransferStat = FileTransferStat (SP.ManagedPtr FileTransferStat)
deriving (FileTransferStat -> FileTransferStat -> Bool
(FileTransferStat -> FileTransferStat -> Bool)
-> (FileTransferStat -> FileTransferStat -> Bool)
-> Eq FileTransferStat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileTransferStat -> FileTransferStat -> Bool
== :: FileTransferStat -> FileTransferStat -> Bool
$c/= :: FileTransferStat -> FileTransferStat -> Bool
/= :: FileTransferStat -> FileTransferStat -> Bool
Eq)
instance SP.ManagedPtrNewtype FileTransferStat where
toManagedPtr :: FileTransferStat -> ManagedPtr FileTransferStat
toManagedPtr (FileTransferStat ManagedPtr FileTransferStat
p) = ManagedPtr FileTransferStat
p
instance BoxedPtr FileTransferStat where
boxedPtrCopy :: FileTransferStat -> IO FileTransferStat
boxedPtrCopy = \FileTransferStat
p -> FileTransferStat
-> (Ptr FileTransferStat -> IO FileTransferStat)
-> IO FileTransferStat
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FileTransferStat
p (Int -> Ptr FileTransferStat -> IO (Ptr FileTransferStat)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
128 (Ptr FileTransferStat -> IO (Ptr FileTransferStat))
-> (Ptr FileTransferStat -> IO FileTransferStat)
-> Ptr FileTransferStat
-> IO FileTransferStat
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr FileTransferStat -> FileTransferStat)
-> Ptr FileTransferStat -> IO FileTransferStat
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr FileTransferStat -> FileTransferStat
FileTransferStat)
boxedPtrFree :: FileTransferStat -> IO ()
boxedPtrFree = \FileTransferStat
x -> FileTransferStat -> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr FileTransferStat
x Ptr FileTransferStat -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr FileTransferStat where
boxedPtrCalloc :: IO (Ptr FileTransferStat)
boxedPtrCalloc = Int -> IO (Ptr FileTransferStat)
forall a. Int -> IO (Ptr a)
callocBytes Int
128
newZeroFileTransferStat :: MonadIO m => m FileTransferStat
newZeroFileTransferStat :: forall (m :: * -> *). MonadIO m => m FileTransferStat
newZeroFileTransferStat = IO FileTransferStat -> m FileTransferStat
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileTransferStat -> m FileTransferStat)
-> IO FileTransferStat -> m FileTransferStat
forall a b. (a -> b) -> a -> b
$ IO (Ptr FileTransferStat)
forall a. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr FileTransferStat)
-> (Ptr FileTransferStat -> IO FileTransferStat)
-> IO FileTransferStat
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr FileTransferStat -> FileTransferStat)
-> Ptr FileTransferStat -> IO FileTransferStat
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr FileTransferStat -> FileTransferStat
FileTransferStat
instance tag ~ 'AttrSet => Constructible FileTransferStat tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr FileTransferStat -> FileTransferStat)
-> [AttrOp FileTransferStat tag] -> m FileTransferStat
new ManagedPtr FileTransferStat -> FileTransferStat
_ [AttrOp FileTransferStat tag]
attrs = do
FileTransferStat
o <- m FileTransferStat
forall (m :: * -> *). MonadIO m => m FileTransferStat
newZeroFileTransferStat
FileTransferStat -> [AttrOp FileTransferStat 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set FileTransferStat
o [AttrOp FileTransferStat tag]
[AttrOp FileTransferStat 'AttrSet]
attrs
FileTransferStat -> m FileTransferStat
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return FileTransferStat
o
getFileTransferStatNFilesTotal :: MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNFilesTotal :: forall (m :: * -> *). MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNFilesTotal FileTransferStat
s = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO Int64) -> IO Int64)
-> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Int64
val <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO Int64
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
val
setFileTransferStatNFilesTotal :: MonadIO m => FileTransferStat -> Int64 -> m ()
setFileTransferStatNFilesTotal :: forall (m :: * -> *).
MonadIO m =>
FileTransferStat -> Int64 -> m ()
setFileTransferStatNFilesTotal FileTransferStat
s Int64
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO ()) -> IO ())
-> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Ptr Int64 -> Int64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (Int64
val :: Int64)
#if defined(ENABLE_OVERLOADING)
data FileTransferStatNFilesTotalFieldInfo
instance AttrInfo FileTransferStatNFilesTotalFieldInfo where
type AttrBaseTypeConstraint FileTransferStatNFilesTotalFieldInfo = (~) FileTransferStat
type AttrAllowedOps FileTransferStatNFilesTotalFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint FileTransferStatNFilesTotalFieldInfo = (~) Int64
type AttrTransferTypeConstraint FileTransferStatNFilesTotalFieldInfo = (~)Int64
type AttrTransferType FileTransferStatNFilesTotalFieldInfo = Int64
type AttrGetType FileTransferStatNFilesTotalFieldInfo = Int64
type AttrLabel FileTransferStatNFilesTotalFieldInfo = "n_files_total"
type AttrOrigin FileTransferStatNFilesTotalFieldInfo = FileTransferStat
attrGet = getFileTransferStatNFilesTotal
attrSet = setFileTransferStatNFilesTotal
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Dazzle.Structs.FileTransferStat.nFilesTotal"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dazzle-1.0.2/docs/GI-Dazzle-Structs-FileTransferStat.html#g:attr:nFilesTotal"
})
fileTransferStat_nFilesTotal :: AttrLabelProxy "nFilesTotal"
fileTransferStat_nFilesTotal = AttrLabelProxy
#endif
getFileTransferStatNFiles :: MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNFiles :: forall (m :: * -> *). MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNFiles FileTransferStat
s = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO Int64) -> IO Int64)
-> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Int64
val <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Int64
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
val
setFileTransferStatNFiles :: MonadIO m => FileTransferStat -> Int64 -> m ()
setFileTransferStatNFiles :: forall (m :: * -> *).
MonadIO m =>
FileTransferStat -> Int64 -> m ()
setFileTransferStatNFiles FileTransferStat
s Int64
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO ()) -> IO ())
-> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Ptr Int64 -> Int64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Int64
val :: Int64)
#if defined(ENABLE_OVERLOADING)
data FileTransferStatNFilesFieldInfo
instance AttrInfo FileTransferStatNFilesFieldInfo where
type AttrBaseTypeConstraint FileTransferStatNFilesFieldInfo = (~) FileTransferStat
type AttrAllowedOps FileTransferStatNFilesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint FileTransferStatNFilesFieldInfo = (~) Int64
type AttrTransferTypeConstraint FileTransferStatNFilesFieldInfo = (~)Int64
type AttrTransferType FileTransferStatNFilesFieldInfo = Int64
type AttrGetType FileTransferStatNFilesFieldInfo = Int64
type AttrLabel FileTransferStatNFilesFieldInfo = "n_files"
type AttrOrigin FileTransferStatNFilesFieldInfo = FileTransferStat
attrGet = getFileTransferStatNFiles
attrSet = setFileTransferStatNFiles
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Dazzle.Structs.FileTransferStat.nFiles"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dazzle-1.0.2/docs/GI-Dazzle-Structs-FileTransferStat.html#g:attr:nFiles"
})
fileTransferStat_nFiles :: AttrLabelProxy "nFiles"
fileTransferStat_nFiles = AttrLabelProxy
#endif
getFileTransferStatNDirsTotal :: MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNDirsTotal :: forall (m :: * -> *). MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNDirsTotal FileTransferStat
s = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO Int64) -> IO Int64)
-> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Int64
val <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO Int64
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
val
setFileTransferStatNDirsTotal :: MonadIO m => FileTransferStat -> Int64 -> m ()
setFileTransferStatNDirsTotal :: forall (m :: * -> *).
MonadIO m =>
FileTransferStat -> Int64 -> m ()
setFileTransferStatNDirsTotal FileTransferStat
s Int64
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO ()) -> IO ())
-> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Ptr Int64 -> Int64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Int64
val :: Int64)
#if defined(ENABLE_OVERLOADING)
data FileTransferStatNDirsTotalFieldInfo
instance AttrInfo FileTransferStatNDirsTotalFieldInfo where
type AttrBaseTypeConstraint FileTransferStatNDirsTotalFieldInfo = (~) FileTransferStat
type AttrAllowedOps FileTransferStatNDirsTotalFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint FileTransferStatNDirsTotalFieldInfo = (~) Int64
type AttrTransferTypeConstraint FileTransferStatNDirsTotalFieldInfo = (~)Int64
type AttrTransferType FileTransferStatNDirsTotalFieldInfo = Int64
type AttrGetType FileTransferStatNDirsTotalFieldInfo = Int64
type AttrLabel FileTransferStatNDirsTotalFieldInfo = "n_dirs_total"
type AttrOrigin FileTransferStatNDirsTotalFieldInfo = FileTransferStat
attrGet = getFileTransferStatNDirsTotal
attrSet = setFileTransferStatNDirsTotal
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Dazzle.Structs.FileTransferStat.nDirsTotal"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dazzle-1.0.2/docs/GI-Dazzle-Structs-FileTransferStat.html#g:attr:nDirsTotal"
})
fileTransferStat_nDirsTotal :: AttrLabelProxy "nDirsTotal"
fileTransferStat_nDirsTotal = AttrLabelProxy
#endif
getFileTransferStatNDirs :: MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNDirs :: forall (m :: * -> *). MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNDirs FileTransferStat
s = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO Int64) -> IO Int64)
-> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Int64
val <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO Int64
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
val
setFileTransferStatNDirs :: MonadIO m => FileTransferStat -> Int64 -> m ()
setFileTransferStatNDirs :: forall (m :: * -> *).
MonadIO m =>
FileTransferStat -> Int64 -> m ()
setFileTransferStatNDirs FileTransferStat
s Int64
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO ()) -> IO ())
-> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Ptr Int64 -> Int64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (Int64
val :: Int64)
#if defined(ENABLE_OVERLOADING)
data FileTransferStatNDirsFieldInfo
instance AttrInfo FileTransferStatNDirsFieldInfo where
type AttrBaseTypeConstraint FileTransferStatNDirsFieldInfo = (~) FileTransferStat
type AttrAllowedOps FileTransferStatNDirsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint FileTransferStatNDirsFieldInfo = (~) Int64
type AttrTransferTypeConstraint FileTransferStatNDirsFieldInfo = (~)Int64
type AttrTransferType FileTransferStatNDirsFieldInfo = Int64
type AttrGetType FileTransferStatNDirsFieldInfo = Int64
type AttrLabel FileTransferStatNDirsFieldInfo = "n_dirs"
type AttrOrigin FileTransferStatNDirsFieldInfo = FileTransferStat
attrGet = getFileTransferStatNDirs
attrSet = setFileTransferStatNDirs
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Dazzle.Structs.FileTransferStat.nDirs"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dazzle-1.0.2/docs/GI-Dazzle-Structs-FileTransferStat.html#g:attr:nDirs"
})
fileTransferStat_nDirs :: AttrLabelProxy "nDirs"
fileTransferStat_nDirs = AttrLabelProxy
#endif
getFileTransferStatNBytesTotal :: MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNBytesTotal :: forall (m :: * -> *). MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNBytesTotal FileTransferStat
s = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO Int64) -> IO Int64)
-> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Int64
val <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO Int64
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
val
setFileTransferStatNBytesTotal :: MonadIO m => FileTransferStat -> Int64 -> m ()
setFileTransferStatNBytesTotal :: forall (m :: * -> *).
MonadIO m =>
FileTransferStat -> Int64 -> m ()
setFileTransferStatNBytesTotal FileTransferStat
s Int64
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO ()) -> IO ())
-> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Ptr Int64 -> Int64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (Int64
val :: Int64)
#if defined(ENABLE_OVERLOADING)
data FileTransferStatNBytesTotalFieldInfo
instance AttrInfo FileTransferStatNBytesTotalFieldInfo where
type AttrBaseTypeConstraint FileTransferStatNBytesTotalFieldInfo = (~) FileTransferStat
type AttrAllowedOps FileTransferStatNBytesTotalFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint FileTransferStatNBytesTotalFieldInfo = (~) Int64
type AttrTransferTypeConstraint FileTransferStatNBytesTotalFieldInfo = (~)Int64
type AttrTransferType FileTransferStatNBytesTotalFieldInfo = Int64
type AttrGetType FileTransferStatNBytesTotalFieldInfo = Int64
type AttrLabel FileTransferStatNBytesTotalFieldInfo = "n_bytes_total"
type AttrOrigin FileTransferStatNBytesTotalFieldInfo = FileTransferStat
attrGet = getFileTransferStatNBytesTotal
attrSet = setFileTransferStatNBytesTotal
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Dazzle.Structs.FileTransferStat.nBytesTotal"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dazzle-1.0.2/docs/GI-Dazzle-Structs-FileTransferStat.html#g:attr:nBytesTotal"
})
fileTransferStat_nBytesTotal :: AttrLabelProxy "nBytesTotal"
fileTransferStat_nBytesTotal = AttrLabelProxy
#endif
getFileTransferStatNBytes :: MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNBytes :: forall (m :: * -> *). MonadIO m => FileTransferStat -> m Int64
getFileTransferStatNBytes FileTransferStat
s = IO Int64 -> m Int64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO Int64) -> IO Int64)
-> (Ptr FileTransferStat -> IO Int64) -> IO Int64
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Int64
val <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO Int64
Int64 -> IO Int64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
val
setFileTransferStatNBytes :: MonadIO m => FileTransferStat -> Int64 -> m ()
setFileTransferStatNBytes :: forall (m :: * -> *).
MonadIO m =>
FileTransferStat -> Int64 -> m ()
setFileTransferStatNBytes FileTransferStat
s Int64
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileTransferStat -> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileTransferStat
s ((Ptr FileTransferStat -> IO ()) -> IO ())
-> (Ptr FileTransferStat -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileTransferStat
ptr -> do
Ptr Int64 -> Int64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileTransferStat
ptr Ptr FileTransferStat -> Int -> Ptr Int64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (Int64
val :: Int64)
#if defined(ENABLE_OVERLOADING)
data FileTransferStatNBytesFieldInfo
instance AttrInfo FileTransferStatNBytesFieldInfo where
type AttrBaseTypeConstraint FileTransferStatNBytesFieldInfo = (~) FileTransferStat
type AttrAllowedOps FileTransferStatNBytesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint FileTransferStatNBytesFieldInfo = (~) Int64
type AttrTransferTypeConstraint FileTransferStatNBytesFieldInfo = (~)Int64
type AttrTransferType FileTransferStatNBytesFieldInfo = Int64
type AttrGetType FileTransferStatNBytesFieldInfo = Int64
type AttrLabel FileTransferStatNBytesFieldInfo = "n_bytes"
type AttrOrigin FileTransferStatNBytesFieldInfo = FileTransferStat
attrGet = getFileTransferStatNBytes
attrSet = setFileTransferStatNBytes
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Dazzle.Structs.FileTransferStat.nBytes"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-dazzle-1.0.2/docs/GI-Dazzle-Structs-FileTransferStat.html#g:attr:nBytes"
})
fileTransferStat_nBytes :: AttrLabelProxy "nBytes"
fileTransferStat_nBytes = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FileTransferStat
type instance O.AttributeList FileTransferStat = FileTransferStatAttributeList
type FileTransferStatAttributeList = ('[ '("nFilesTotal", FileTransferStatNFilesTotalFieldInfo), '("nFiles", FileTransferStatNFilesFieldInfo), '("nDirsTotal", FileTransferStatNDirsTotalFieldInfo), '("nDirs", FileTransferStatNDirsFieldInfo), '("nBytesTotal", FileTransferStatNBytesTotalFieldInfo), '("nBytes", FileTransferStatNBytesFieldInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveFileTransferStatMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveFileTransferStatMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFileTransferStatMethod t FileTransferStat, O.OverloadedMethod info FileTransferStat p) => OL.IsLabel t (FileTransferStat -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveFileTransferStatMethod t FileTransferStat, O.OverloadedMethod info FileTransferStat p, R.HasField t FileTransferStat p) => R.HasField t FileTransferStat p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFileTransferStatMethod t FileTransferStat, O.OverloadedMethodInfo info FileTransferStat) => OL.IsLabel t (O.MethodProxy info FileTransferStat) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif