module System.GIO.Enums (
FileQueryInfoFlags(..),
FileCreateFlags(..),
FileCopyFlags(..),
FileMonitorFlags(..),
FilesystemPreviewType(..),
FileType(..),
FileAttributeStatus(..),
FileAttributeInfoFlags(..),
AskPasswordFlags(..),
PasswordSave(..),
MountOperationResult(..),
IOErrorEnum(..),
FileMonitorEvent(..),
MountMountFlags(..),
MountUnmountFlags(..),
DriveStartFlags(..),
DriveStartStopType(..),
EmblemOrigin(..),
AppInfoCreateFlags(..),
) where
import Control.Monad
import Data.Typeable
import System.Glib.FFI
import System.Glib.Flags
import System.Glib.GError
import System.Glib.GObject
import System.Glib.UTFString
data FileQueryInfoFlags = FileQueryInfoNone
| FileQueryInfoNofollowSymlinks
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum FileQueryInfoFlags where
fromEnum FileQueryInfoNone = 0
fromEnum FileQueryInfoNofollowSymlinks = 1
toEnum 0 = FileQueryInfoNone
toEnum 1 = FileQueryInfoNofollowSymlinks
toEnum unmatched = error ("FileQueryInfoFlags.toEnum: Cannot match " ++ show unmatched)
succ FileQueryInfoNone = FileQueryInfoNofollowSymlinks
succ _ = undefined
pred FileQueryInfoNofollowSymlinks = FileQueryInfoNone
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FileQueryInfoNofollowSymlinks
enumFromThen _ _ = error "Enum FileQueryInfoFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FileQueryInfoFlags: enumFromThenTo not implemented"
instance Flags FileQueryInfoFlags
data FileCreateFlags = FileCreateNone
| FileCreatePrivate
| FileCreateReplaceDestination
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum FileCreateFlags where
fromEnum FileCreateNone = 0
fromEnum FileCreatePrivate = 1
fromEnum FileCreateReplaceDestination = 2
toEnum 0 = FileCreateNone
toEnum 1 = FileCreatePrivate
toEnum 2 = FileCreateReplaceDestination
toEnum unmatched = error ("FileCreateFlags.toEnum: Cannot match " ++ show unmatched)
succ FileCreateNone = FileCreatePrivate
succ FileCreatePrivate = FileCreateReplaceDestination
succ _ = undefined
pred FileCreatePrivate = FileCreateNone
pred FileCreateReplaceDestination = FileCreatePrivate
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FileCreateReplaceDestination
enumFromThen _ _ = error "Enum FileCreateFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FileCreateFlags: enumFromThenTo not implemented"
instance Flags FileCreateFlags
data FileCopyFlags = FileCopyNone
| FileCopyOverwrite
| FileCopyBackup
| FileCopyNofollowSymlinks
| FileCopyAllMetadata
| FileCopyNoFallbackForMove
| FileCopyTargetDefaultPerms
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum FileCopyFlags where
fromEnum FileCopyNone = 0
fromEnum FileCopyOverwrite = 1
fromEnum FileCopyBackup = 2
fromEnum FileCopyNofollowSymlinks = 4
fromEnum FileCopyAllMetadata = 8
fromEnum FileCopyNoFallbackForMove = 16
fromEnum FileCopyTargetDefaultPerms = 32
toEnum 0 = FileCopyNone
toEnum 1 = FileCopyOverwrite
toEnum 2 = FileCopyBackup
toEnum 4 = FileCopyNofollowSymlinks
toEnum 8 = FileCopyAllMetadata
toEnum 16 = FileCopyNoFallbackForMove
toEnum 32 = FileCopyTargetDefaultPerms
toEnum unmatched = error ("FileCopyFlags.toEnum: Cannot match " ++ show unmatched)
succ FileCopyNone = FileCopyOverwrite
succ FileCopyOverwrite = FileCopyBackup
succ FileCopyBackup = FileCopyNofollowSymlinks
succ FileCopyNofollowSymlinks = FileCopyAllMetadata
succ FileCopyAllMetadata = FileCopyNoFallbackForMove
succ FileCopyNoFallbackForMove = FileCopyTargetDefaultPerms
succ _ = undefined
pred FileCopyOverwrite = FileCopyNone
pred FileCopyBackup = FileCopyOverwrite
pred FileCopyNofollowSymlinks = FileCopyBackup
pred FileCopyAllMetadata = FileCopyNofollowSymlinks
pred FileCopyNoFallbackForMove = FileCopyAllMetadata
pred FileCopyTargetDefaultPerms = FileCopyNoFallbackForMove
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FileCopyTargetDefaultPerms
enumFromThen _ _ = error "Enum FileCopyFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FileCopyFlags: enumFromThenTo not implemented"
instance Flags FileCopyFlags
data FileMonitorFlags = FileMonitorNone
| FileMonitorWatchMounts
| FileMonitorSendMoved
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum FileMonitorFlags where
fromEnum FileMonitorNone = 0
fromEnum FileMonitorWatchMounts = 1
fromEnum FileMonitorSendMoved = 2
toEnum 0 = FileMonitorNone
toEnum 1 = FileMonitorWatchMounts
toEnum 2 = FileMonitorSendMoved
toEnum unmatched = error ("FileMonitorFlags.toEnum: Cannot match " ++ show unmatched)
succ FileMonitorNone = FileMonitorWatchMounts
succ FileMonitorWatchMounts = FileMonitorSendMoved
succ _ = undefined
pred FileMonitorWatchMounts = FileMonitorNone
pred FileMonitorSendMoved = FileMonitorWatchMounts
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FileMonitorSendMoved
enumFromThen _ _ = error "Enum FileMonitorFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FileMonitorFlags: enumFromThenTo not implemented"
instance Flags FileMonitorFlags
data FilesystemPreviewType = FilesystemPreviewTypeIfAlways
| FilesystemPreviewTypeIfLocal
| FilesystemPreviewTypeNever
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum FilesystemPreviewType where
fromEnum FilesystemPreviewTypeIfAlways = 0
fromEnum FilesystemPreviewTypeIfLocal = 1
fromEnum FilesystemPreviewTypeNever = 2
toEnum 0 = FilesystemPreviewTypeIfAlways
toEnum 1 = FilesystemPreviewTypeIfLocal
toEnum 2 = FilesystemPreviewTypeNever
toEnum unmatched = error ("FilesystemPreviewType.toEnum: Cannot match " ++ show unmatched)
succ FilesystemPreviewTypeIfAlways = FilesystemPreviewTypeIfLocal
succ FilesystemPreviewTypeIfLocal = FilesystemPreviewTypeNever
succ _ = undefined
pred FilesystemPreviewTypeIfLocal = FilesystemPreviewTypeIfAlways
pred FilesystemPreviewTypeNever = FilesystemPreviewTypeIfLocal
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FilesystemPreviewTypeNever
enumFromThen _ _ = error "Enum FilesystemPreviewType: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FilesystemPreviewType: enumFromThenTo not implemented"
data FileType = FileTypeUnknown
| FileTypeRegular
| FileTypeDirectory
| FileTypeSymbolicLink
| FileTypeSpecial
| FileTypeShortcut
| FileTypeMountable
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum FileType where
fromEnum FileTypeUnknown = 0
fromEnum FileTypeRegular = 1
fromEnum FileTypeDirectory = 2
fromEnum FileTypeSymbolicLink = 3
fromEnum FileTypeSpecial = 4
fromEnum FileTypeShortcut = 5
fromEnum FileTypeMountable = 6
toEnum 0 = FileTypeUnknown
toEnum 1 = FileTypeRegular
toEnum 2 = FileTypeDirectory
toEnum 3 = FileTypeSymbolicLink
toEnum 4 = FileTypeSpecial
toEnum 5 = FileTypeShortcut
toEnum 6 = FileTypeMountable
toEnum unmatched = error ("FileType.toEnum: Cannot match " ++ show unmatched)
succ FileTypeUnknown = FileTypeRegular
succ FileTypeRegular = FileTypeDirectory
succ FileTypeDirectory = FileTypeSymbolicLink
succ FileTypeSymbolicLink = FileTypeSpecial
succ FileTypeSpecial = FileTypeShortcut
succ FileTypeShortcut = FileTypeMountable
succ _ = undefined
pred FileTypeRegular = FileTypeUnknown
pred FileTypeDirectory = FileTypeRegular
pred FileTypeSymbolicLink = FileTypeDirectory
pred FileTypeSpecial = FileTypeSymbolicLink
pred FileTypeShortcut = FileTypeSpecial
pred FileTypeMountable = FileTypeShortcut
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FileTypeMountable
enumFromThen _ _ = error "Enum FileType: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FileType: enumFromThenTo not implemented"
data FileAttributeStatus = FileAttributeStatusUnset
| FileAttributeStatusSet
| FileAttributeStatusErrorSetting
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum FileAttributeStatus where
fromEnum FileAttributeStatusUnset = 0
fromEnum FileAttributeStatusSet = 1
fromEnum FileAttributeStatusErrorSetting = 2
toEnum 0 = FileAttributeStatusUnset
toEnum 1 = FileAttributeStatusSet
toEnum 2 = FileAttributeStatusErrorSetting
toEnum unmatched = error ("FileAttributeStatus.toEnum: Cannot match " ++ show unmatched)
succ FileAttributeStatusUnset = FileAttributeStatusSet
succ FileAttributeStatusSet = FileAttributeStatusErrorSetting
succ _ = undefined
pred FileAttributeStatusSet = FileAttributeStatusUnset
pred FileAttributeStatusErrorSetting = FileAttributeStatusSet
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FileAttributeStatusErrorSetting
enumFromThen _ _ = error "Enum FileAttributeStatus: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FileAttributeStatus: enumFromThenTo not implemented"
data FileAttributeInfoFlags = FileAttributeInfoNone
| FileAttributeInfoCopyWithFile
| FileAttributeInfoCopyWhenMoved
deriving (Eq,Ord,Bounded,Read,Show)
instance Enum FileAttributeInfoFlags where
fromEnum FileAttributeInfoNone = 0
fromEnum FileAttributeInfoCopyWithFile = 1
fromEnum FileAttributeInfoCopyWhenMoved = 2
toEnum 0 = FileAttributeInfoNone
toEnum 1 = FileAttributeInfoCopyWithFile
toEnum 2 = FileAttributeInfoCopyWhenMoved
toEnum unmatched = error ("FileAttributeInfoFlags.toEnum: Cannot match " ++ show unmatched)
succ FileAttributeInfoNone = FileAttributeInfoCopyWithFile
succ FileAttributeInfoCopyWithFile = FileAttributeInfoCopyWhenMoved
succ _ = undefined
pred FileAttributeInfoCopyWithFile = FileAttributeInfoNone
pred FileAttributeInfoCopyWhenMoved = FileAttributeInfoCopyWithFile
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x FileAttributeInfoCopyWhenMoved
enumFromThen _ _ = error "Enum FileAttributeInfoFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum FileAttributeInfoFlags: enumFromThenTo not implemented"
instance Flags FileAttributeInfoFlags
data AskPasswordFlags = AskPasswordNeedPassword
| AskPasswordNeedUsername
| AskPasswordNeedDomain
| AskPasswordSavingSupported
| AskPasswordAnonymousSupported
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum AskPasswordFlags where
fromEnum AskPasswordNeedPassword = 1
fromEnum AskPasswordNeedUsername = 2
fromEnum AskPasswordNeedDomain = 4
fromEnum AskPasswordSavingSupported = 8
fromEnum AskPasswordAnonymousSupported = 16
toEnum 1 = AskPasswordNeedPassword
toEnum 2 = AskPasswordNeedUsername
toEnum 4 = AskPasswordNeedDomain
toEnum 8 = AskPasswordSavingSupported
toEnum 16 = AskPasswordAnonymousSupported
toEnum unmatched = error ("AskPasswordFlags.toEnum: Cannot match " ++ show unmatched)
succ AskPasswordNeedPassword = AskPasswordNeedUsername
succ AskPasswordNeedUsername = AskPasswordNeedDomain
succ AskPasswordNeedDomain = AskPasswordSavingSupported
succ AskPasswordSavingSupported = AskPasswordAnonymousSupported
succ _ = undefined
pred AskPasswordNeedUsername = AskPasswordNeedPassword
pred AskPasswordNeedDomain = AskPasswordNeedUsername
pred AskPasswordSavingSupported = AskPasswordNeedDomain
pred AskPasswordAnonymousSupported = AskPasswordSavingSupported
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x AskPasswordAnonymousSupported
enumFromThen _ _ = error "Enum AskPasswordFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum AskPasswordFlags: enumFromThenTo not implemented"
instance Flags AskPasswordFlags
data PasswordSave = PasswordSaveNever
| PasswordSaveForSession
| PasswordSavePermanently
deriving (Enum,Eq,Ord,Bounded,Show,Typeable)
data MountOperationResult = MountOperationHandled
| MountOperationAborted
| MountOperationUnhandled
deriving (Enum,Eq,Ord,Bounded,Show,Typeable)
data IOErrorEnum = IoErrorFailed
| IoErrorNotFound
| IoErrorExists
| IoErrorIsDirectory
| IoErrorNotDirectory
| IoErrorNotEmpty
| IoErrorNotRegularFile
| IoErrorNotSymbolicLink
| IoErrorNotMountableFile
| IoErrorFilenameTooLong
| IoErrorInvalidFilename
| IoErrorTooManyLinks
| IoErrorNoSpace
| IoErrorInvalidArgument
| IoErrorPermissionDenied
| IoErrorNotSupported
| IoErrorNotMounted
| IoErrorAlreadyMounted
| IoErrorClosed
| IoErrorCancelled
| IoErrorPending
| IoErrorReadOnly
| IoErrorCantCreateBackup
| IoErrorWrongEtag
| IoErrorTimedOut
| IoErrorWouldRecurse
| IoErrorBusy
| IoErrorWouldBlock
| IoErrorHostNotFound
| IoErrorWouldMerge
| IoErrorFailedHandled
| IoErrorTooManyOpenFiles
| IoErrorNotInitialized
| IoErrorAddressInUse
| IoErrorPartialInput
| IoErrorInvalidData
| IoErrorDbusError
| IoErrorHostUnreachable
| IoErrorNetworkUnreachable
| IoErrorConnectionRefused
| IoErrorProxyFailed
| IoErrorProxyAuthFailed
| IoErrorProxyNeedAuth
| IoErrorProxyNotAllowed
deriving (Enum,Eq,Ord,Bounded,Show,Typeable)
data FileMonitorEvent = FileMonitorEventChanged
| FileMonitorEventChangesDoneHint
| FileMonitorEventDeleted
| FileMonitorEventCreated
| FileMonitorEventAttributeChanged
| FileMonitorEventPreUnmount
| FileMonitorEventUnmounted
| FileMonitorEventMoved
deriving (Enum,Eq,Ord,Bounded,Show,Typeable)
data MountMountFlags = MountMountNone
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum MountMountFlags where
fromEnum MountMountNone = 0
toEnum 0 = MountMountNone
toEnum unmatched = error ("MountMountFlags.toEnum: Cannot match " ++ show unmatched)
succ _ = undefined
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x MountMountNone
enumFromThen _ _ = error "Enum MountMountFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum MountMountFlags: enumFromThenTo not implemented"
instance Flags MountMountFlags
data MountUnmountFlags = MountUnmountNone
| MountUnmountForce
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum MountUnmountFlags where
fromEnum MountUnmountNone = 0
fromEnum MountUnmountForce = 1
toEnum 0 = MountUnmountNone
toEnum 1 = MountUnmountForce
toEnum unmatched = error ("MountUnmountFlags.toEnum: Cannot match " ++ show unmatched)
succ MountUnmountNone = MountUnmountForce
succ _ = undefined
pred MountUnmountForce = MountUnmountNone
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x MountUnmountForce
enumFromThen _ _ = error "Enum MountUnmountFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum MountUnmountFlags: enumFromThenTo not implemented"
instance Flags MountUnmountFlags
data DriveStartFlags = DriveStartNone
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum DriveStartFlags where
fromEnum DriveStartNone = 0
toEnum 0 = DriveStartNone
toEnum unmatched = error ("DriveStartFlags.toEnum: Cannot match " ++ show unmatched)
succ _ = undefined
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x DriveStartNone
enumFromThen _ _ = error "Enum DriveStartFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum DriveStartFlags: enumFromThenTo not implemented"
instance Flags DriveStartFlags
data DriveStartStopType = DriveStartStopTypeUnknown
| DriveStartStopTypeShutdown
| DriveStartStopTypeNetwork
| DriveStartStopTypeMultidisk
| DriveStartStopTypePassword
deriving (Enum,Eq,Ord,Bounded,Show,Typeable)
data EmblemOrigin = EmblemOriginUnknown
| EmblemOriginDevice
| EmblemOriginLivemetadata
| EmblemOriginTag
deriving (Enum,Eq,Ord,Bounded,Show,Typeable)
data AppInfoCreateFlags = AppInfoCreateNone
| AppInfoCreateNeedsTerminal
| AppInfoCreateSupportsUris
| AppInfoCreateSupportsStartupNotification
deriving (Eq,Ord,Bounded,Show,Typeable)
instance Enum AppInfoCreateFlags where
fromEnum AppInfoCreateNone = 0
fromEnum AppInfoCreateNeedsTerminal = 1
fromEnum AppInfoCreateSupportsUris = 2
fromEnum AppInfoCreateSupportsStartupNotification = 4
toEnum 0 = AppInfoCreateNone
toEnum 1 = AppInfoCreateNeedsTerminal
toEnum 2 = AppInfoCreateSupportsUris
toEnum 4 = AppInfoCreateSupportsStartupNotification
toEnum unmatched = error ("AppInfoCreateFlags.toEnum: Cannot match " ++ show unmatched)
succ AppInfoCreateNone = AppInfoCreateNeedsTerminal
succ AppInfoCreateNeedsTerminal = AppInfoCreateSupportsUris
succ AppInfoCreateSupportsUris = AppInfoCreateSupportsStartupNotification
succ _ = undefined
pred AppInfoCreateNeedsTerminal = AppInfoCreateNone
pred AppInfoCreateSupportsUris = AppInfoCreateNeedsTerminal
pred AppInfoCreateSupportsStartupNotification = AppInfoCreateSupportsUris
pred _ = undefined
enumFromTo x y | fromEnum x == fromEnum y = [ y ]
| otherwise = x : enumFromTo (succ x) y
enumFrom x = enumFromTo x AppInfoCreateSupportsStartupNotification
enumFromThen _ _ = error "Enum AppInfoCreateFlags: enumFromThen not implemented"
enumFromThenTo _ _ _ = error "Enum AppInfoCreateFlags: enumFromThenTo not implemented"
instance Flags AppInfoCreateFlags