module GI.Secret.Flags
(
ServiceFlags(..) ,
SearchFlags(..) ,
SchemaFlags(..) ,
ItemFlags(..) ,
ItemCreateFlags(..) ,
CollectionFlags(..) ,
CollectionCreateFlags(..) ,
) 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
data ServiceFlags =
ServiceFlagsNone
| ServiceFlagsOpenSession
| ServiceFlagsLoadCollections
| AnotherServiceFlags Int
deriving (Show, Eq)
instance P.Enum ServiceFlags where
fromEnum ServiceFlagsNone = 0
fromEnum ServiceFlagsOpenSession = 2
fromEnum ServiceFlagsLoadCollections = 4
fromEnum (AnotherServiceFlags k) = k
toEnum 0 = ServiceFlagsNone
toEnum 2 = ServiceFlagsOpenSession
toEnum 4 = ServiceFlagsLoadCollections
toEnum k = AnotherServiceFlags k
instance P.Ord ServiceFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance IsGFlag ServiceFlags
data SearchFlags =
SearchFlagsNone
| SearchFlagsAll
| SearchFlagsUnlock
| SearchFlagsLoadSecrets
| AnotherSearchFlags Int
deriving (Show, Eq)
instance P.Enum SearchFlags where
fromEnum SearchFlagsNone = 0
fromEnum SearchFlagsAll = 2
fromEnum SearchFlagsUnlock = 4
fromEnum SearchFlagsLoadSecrets = 8
fromEnum (AnotherSearchFlags k) = k
toEnum 0 = SearchFlagsNone
toEnum 2 = SearchFlagsAll
toEnum 4 = SearchFlagsUnlock
toEnum 8 = SearchFlagsLoadSecrets
toEnum k = AnotherSearchFlags k
instance P.Ord SearchFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance IsGFlag SearchFlags
data SchemaFlags =
SchemaFlagsNone
| SchemaFlagsDontMatchName
| AnotherSchemaFlags Int
deriving (Show, Eq)
instance P.Enum SchemaFlags where
fromEnum SchemaFlagsNone = 0
fromEnum SchemaFlagsDontMatchName = 2
fromEnum (AnotherSchemaFlags k) = k
toEnum 0 = SchemaFlagsNone
toEnum 2 = SchemaFlagsDontMatchName
toEnum k = AnotherSchemaFlags k
instance P.Ord SchemaFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance IsGFlag SchemaFlags
data ItemFlags =
ItemFlagsNone
| ItemFlagsLoadSecret
| AnotherItemFlags Int
deriving (Show, Eq)
instance P.Enum ItemFlags where
fromEnum ItemFlagsNone = 0
fromEnum ItemFlagsLoadSecret = 2
fromEnum (AnotherItemFlags k) = k
toEnum 0 = ItemFlagsNone
toEnum 2 = ItemFlagsLoadSecret
toEnum k = AnotherItemFlags k
instance P.Ord ItemFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance IsGFlag ItemFlags
data ItemCreateFlags =
ItemCreateFlagsNone
| ItemCreateFlagsReplace
| AnotherItemCreateFlags Int
deriving (Show, Eq)
instance P.Enum ItemCreateFlags where
fromEnum ItemCreateFlagsNone = 0
fromEnum ItemCreateFlagsReplace = 2
fromEnum (AnotherItemCreateFlags k) = k
toEnum 0 = ItemCreateFlagsNone
toEnum 2 = ItemCreateFlagsReplace
toEnum k = AnotherItemCreateFlags k
instance P.Ord ItemCreateFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance IsGFlag ItemCreateFlags
data CollectionFlags =
CollectionFlagsNone
| CollectionFlagsLoadItems
| AnotherCollectionFlags Int
deriving (Show, Eq)
instance P.Enum CollectionFlags where
fromEnum CollectionFlagsNone = 0
fromEnum CollectionFlagsLoadItems = 2
fromEnum (AnotherCollectionFlags k) = k
toEnum 0 = CollectionFlagsNone
toEnum 2 = CollectionFlagsLoadItems
toEnum k = AnotherCollectionFlags k
instance P.Ord CollectionFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance IsGFlag CollectionFlags
data CollectionCreateFlags =
CollectionCreateFlagsCollectionCreateNone
| AnotherCollectionCreateFlags Int
deriving (Show, Eq)
instance P.Enum CollectionCreateFlags where
fromEnum CollectionCreateFlagsCollectionCreateNone = 0
fromEnum (AnotherCollectionCreateFlags k) = k
toEnum 0 = CollectionCreateFlagsCollectionCreateNone
toEnum k = AnotherCollectionCreateFlags k
instance P.Ord CollectionCreateFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
instance IsGFlag CollectionCreateFlags