{-# LANGUAGE TemplateHaskell #-}

module Rattletrap.Type.RemoteId
  ( RemoteId(..)
  )
where

import Rattletrap.Type.Common
import Rattletrap.Type.Str
import Rattletrap.Type.Word64le

data RemoteId
  = RemoteIdPlayStation Text [Word8]
  | RemoteIdPsyNet (Either Word64le (Word64le, Word64le, Word64le, Word64le))
  | RemoteIdSplitscreen Word32
  -- ^ Really only 24 bits.
  | RemoteIdSteam Word64le
  | RemoteIdSwitch Word64le Word64le Word64le Word64le
  | RemoteIdXbox Word64le
  | RemoteIdEpic Str
  deriving (RemoteId -> RemoteId -> Bool
(RemoteId -> RemoteId -> Bool)
-> (RemoteId -> RemoteId -> Bool) -> Eq RemoteId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoteId -> RemoteId -> Bool
$c/= :: RemoteId -> RemoteId -> Bool
== :: RemoteId -> RemoteId -> Bool
$c== :: RemoteId -> RemoteId -> Bool
Eq, Eq RemoteId
Eq RemoteId
-> (RemoteId -> RemoteId -> Ordering)
-> (RemoteId -> RemoteId -> Bool)
-> (RemoteId -> RemoteId -> Bool)
-> (RemoteId -> RemoteId -> Bool)
-> (RemoteId -> RemoteId -> Bool)
-> (RemoteId -> RemoteId -> RemoteId)
-> (RemoteId -> RemoteId -> RemoteId)
-> Ord RemoteId
RemoteId -> RemoteId -> Bool
RemoteId -> RemoteId -> Ordering
RemoteId -> RemoteId -> RemoteId
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: RemoteId -> RemoteId -> RemoteId
$cmin :: RemoteId -> RemoteId -> RemoteId
max :: RemoteId -> RemoteId -> RemoteId
$cmax :: RemoteId -> RemoteId -> RemoteId
>= :: RemoteId -> RemoteId -> Bool
$c>= :: RemoteId -> RemoteId -> Bool
> :: RemoteId -> RemoteId -> Bool
$c> :: RemoteId -> RemoteId -> Bool
<= :: RemoteId -> RemoteId -> Bool
$c<= :: RemoteId -> RemoteId -> Bool
< :: RemoteId -> RemoteId -> Bool
$c< :: RemoteId -> RemoteId -> Bool
compare :: RemoteId -> RemoteId -> Ordering
$ccompare :: RemoteId -> RemoteId -> Ordering
$cp1Ord :: Eq RemoteId
Ord, Int -> RemoteId -> ShowS
[RemoteId] -> ShowS
RemoteId -> String
(Int -> RemoteId -> ShowS)
-> (RemoteId -> String) -> ([RemoteId] -> ShowS) -> Show RemoteId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoteId] -> ShowS
$cshowList :: [RemoteId] -> ShowS
show :: RemoteId -> String
$cshow :: RemoteId -> String
showsPrec :: Int -> RemoteId -> ShowS
$cshowsPrec :: Int -> RemoteId -> ShowS
Show)

$(deriveJson ''RemoteId)