-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.GstPbutils.Flags
    ( 

 -- * Flags


-- ** DiscovererSerializeFlags #flag:DiscovererSerializeFlags#

    DiscovererSerializeFlags(..)            ,


-- ** PbUtilsCapsDescriptionFlags #flag:PbUtilsCapsDescriptionFlags#

    PbUtilsCapsDescriptionFlags(..)         ,




    ) 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


-- Flags PbUtilsCapsDescriptionFlags
-- | Flags that are returned by 'GI.GstPbutils.Functions.pbUtilsGetCapsDescriptionFlags' and
-- describe the format of the caps.
-- 
-- /Since: 1.20/
data PbUtilsCapsDescriptionFlags = 
      PbUtilsCapsDescriptionFlagsContainer
    -- ^ Caps describe a container format.
    | PbUtilsCapsDescriptionFlagsAudio
    -- ^ Caps describe an audio format, or a
    --     container format that can store audio.
    | PbUtilsCapsDescriptionFlagsVideo
    -- ^ Caps describe an video format, or a
    --     container format that can store video.
    | PbUtilsCapsDescriptionFlagsImage
    -- ^ Caps describe an image format, or a
    --     container format that can store image.
    | PbUtilsCapsDescriptionFlagsSubtitle
    -- ^ Caps describe an subtitle format, or a
    --     container format that can store subtitles.
    | PbUtilsCapsDescriptionFlagsTag
    -- ^ Container format is a tags container.
    | PbUtilsCapsDescriptionFlagsGeneric
    -- ^ Container format can store any kind of
    --     stream type.
    | PbUtilsCapsDescriptionFlagsMetadata
    -- ^ Caps describe a metadata format, or a container format that can store
    -- metadata.
    -- 
    -- /Since: 1.22/
    | AnotherPbUtilsCapsDescriptionFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> PbUtilsCapsDescriptionFlags -> ShowS
[PbUtilsCapsDescriptionFlags] -> ShowS
PbUtilsCapsDescriptionFlags -> String
(Int -> PbUtilsCapsDescriptionFlags -> ShowS)
-> (PbUtilsCapsDescriptionFlags -> String)
-> ([PbUtilsCapsDescriptionFlags] -> ShowS)
-> Show PbUtilsCapsDescriptionFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PbUtilsCapsDescriptionFlags -> ShowS
showsPrec :: Int -> PbUtilsCapsDescriptionFlags -> ShowS
$cshow :: PbUtilsCapsDescriptionFlags -> String
show :: PbUtilsCapsDescriptionFlags -> String
$cshowList :: [PbUtilsCapsDescriptionFlags] -> ShowS
showList :: [PbUtilsCapsDescriptionFlags] -> ShowS
Show, PbUtilsCapsDescriptionFlags -> PbUtilsCapsDescriptionFlags -> Bool
(PbUtilsCapsDescriptionFlags
 -> PbUtilsCapsDescriptionFlags -> Bool)
-> (PbUtilsCapsDescriptionFlags
    -> PbUtilsCapsDescriptionFlags -> Bool)
-> Eq PbUtilsCapsDescriptionFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PbUtilsCapsDescriptionFlags -> PbUtilsCapsDescriptionFlags -> Bool
== :: PbUtilsCapsDescriptionFlags -> PbUtilsCapsDescriptionFlags -> Bool
$c/= :: PbUtilsCapsDescriptionFlags -> PbUtilsCapsDescriptionFlags -> Bool
/= :: PbUtilsCapsDescriptionFlags -> PbUtilsCapsDescriptionFlags -> Bool
Eq)

instance P.Enum PbUtilsCapsDescriptionFlags where
    fromEnum :: PbUtilsCapsDescriptionFlags -> Int
fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsContainer = Int
1
    fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsAudio = Int
2
    fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsVideo = Int
4
    fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsImage = Int
8
    fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsSubtitle = Int
16
    fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsTag = Int
32
    fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsGeneric = Int
64
    fromEnum PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsMetadata = Int
128
    fromEnum (AnotherPbUtilsCapsDescriptionFlags Int
k) = Int
k

    toEnum :: Int -> PbUtilsCapsDescriptionFlags
toEnum Int
1 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsContainer
    toEnum Int
2 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsAudio
    toEnum Int
4 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsVideo
    toEnum Int
8 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsImage
    toEnum Int
16 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsSubtitle
    toEnum Int
32 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsTag
    toEnum Int
64 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsGeneric
    toEnum Int
128 = PbUtilsCapsDescriptionFlags
PbUtilsCapsDescriptionFlagsMetadata
    toEnum Int
k = Int -> PbUtilsCapsDescriptionFlags
AnotherPbUtilsCapsDescriptionFlags Int
k

instance P.Ord PbUtilsCapsDescriptionFlags where
    compare :: PbUtilsCapsDescriptionFlags
-> PbUtilsCapsDescriptionFlags -> Ordering
compare PbUtilsCapsDescriptionFlags
a PbUtilsCapsDescriptionFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (PbUtilsCapsDescriptionFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum PbUtilsCapsDescriptionFlags
a) (PbUtilsCapsDescriptionFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum PbUtilsCapsDescriptionFlags
b)

type instance O.ParentTypes PbUtilsCapsDescriptionFlags = '[]
instance O.HasParentTypes PbUtilsCapsDescriptionFlags

foreign import ccall "gst_pb_utils_caps_description_flags_get_type" c_gst_pb_utils_caps_description_flags_get_type :: 
    IO GType

instance B.Types.TypedObject PbUtilsCapsDescriptionFlags where
    glibType :: IO GType
glibType = IO GType
c_gst_pb_utils_caps_description_flags_get_type

instance B.Types.BoxedFlags PbUtilsCapsDescriptionFlags

instance IsGFlag PbUtilsCapsDescriptionFlags

-- Flags DiscovererSerializeFlags
-- | You can use these flags to control what is serialized by
-- 'GI.GstPbutils.Objects.DiscovererInfo.discovererInfoToVariant'
-- 
-- /Since: 1.6/
data DiscovererSerializeFlags = 
      DiscovererSerializeFlagsBasic
    -- ^ Serialize only basic information, excluding
    -- caps, tags and miscellaneous information
    | DiscovererSerializeFlagsCaps
    -- ^ Serialize the caps for each stream
    | DiscovererSerializeFlagsTags
    -- ^ Serialize the tags for each stream
    | DiscovererSerializeFlagsMisc
    -- ^ Serialize miscellaneous information for each stream
    | DiscovererSerializeFlagsAll
    -- ^ Serialize all the available info, including
    -- caps, tags and miscellaneous information
    | AnotherDiscovererSerializeFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> DiscovererSerializeFlags -> ShowS
[DiscovererSerializeFlags] -> ShowS
DiscovererSerializeFlags -> String
(Int -> DiscovererSerializeFlags -> ShowS)
-> (DiscovererSerializeFlags -> String)
-> ([DiscovererSerializeFlags] -> ShowS)
-> Show DiscovererSerializeFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DiscovererSerializeFlags -> ShowS
showsPrec :: Int -> DiscovererSerializeFlags -> ShowS
$cshow :: DiscovererSerializeFlags -> String
show :: DiscovererSerializeFlags -> String
$cshowList :: [DiscovererSerializeFlags] -> ShowS
showList :: [DiscovererSerializeFlags] -> ShowS
Show, DiscovererSerializeFlags -> DiscovererSerializeFlags -> Bool
(DiscovererSerializeFlags -> DiscovererSerializeFlags -> Bool)
-> (DiscovererSerializeFlags -> DiscovererSerializeFlags -> Bool)
-> Eq DiscovererSerializeFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DiscovererSerializeFlags -> DiscovererSerializeFlags -> Bool
== :: DiscovererSerializeFlags -> DiscovererSerializeFlags -> Bool
$c/= :: DiscovererSerializeFlags -> DiscovererSerializeFlags -> Bool
/= :: DiscovererSerializeFlags -> DiscovererSerializeFlags -> Bool
Eq)

instance P.Enum DiscovererSerializeFlags where
    fromEnum :: DiscovererSerializeFlags -> Int
fromEnum DiscovererSerializeFlags
DiscovererSerializeFlagsBasic = Int
0
    fromEnum DiscovererSerializeFlags
DiscovererSerializeFlagsCaps = Int
1
    fromEnum DiscovererSerializeFlags
DiscovererSerializeFlagsTags = Int
2
    fromEnum DiscovererSerializeFlags
DiscovererSerializeFlagsMisc = Int
4
    fromEnum DiscovererSerializeFlags
DiscovererSerializeFlagsAll = Int
7
    fromEnum (AnotherDiscovererSerializeFlags Int
k) = Int
k

    toEnum :: Int -> DiscovererSerializeFlags
toEnum Int
0 = DiscovererSerializeFlags
DiscovererSerializeFlagsBasic
    toEnum Int
1 = DiscovererSerializeFlags
DiscovererSerializeFlagsCaps
    toEnum Int
2 = DiscovererSerializeFlags
DiscovererSerializeFlagsTags
    toEnum Int
4 = DiscovererSerializeFlags
DiscovererSerializeFlagsMisc
    toEnum Int
7 = DiscovererSerializeFlags
DiscovererSerializeFlagsAll
    toEnum Int
k = Int -> DiscovererSerializeFlags
AnotherDiscovererSerializeFlags Int
k

instance P.Ord DiscovererSerializeFlags where
    compare :: DiscovererSerializeFlags -> DiscovererSerializeFlags -> Ordering
compare DiscovererSerializeFlags
a DiscovererSerializeFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (DiscovererSerializeFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum DiscovererSerializeFlags
a) (DiscovererSerializeFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum DiscovererSerializeFlags
b)

type instance O.ParentTypes DiscovererSerializeFlags = '[]
instance O.HasParentTypes DiscovererSerializeFlags

foreign import ccall "gst_discoverer_serialize_flags_get_type" c_gst_discoverer_serialize_flags_get_type :: 
    IO GType

instance B.Types.TypedObject DiscovererSerializeFlags where
    glibType :: IO GType
glibType = IO GType
c_gst_discoverer_serialize_flags_get_type

instance B.Types.BoxedFlags DiscovererSerializeFlags

instance IsGFlag DiscovererSerializeFlags