| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Simplex.Chat.Remote.Types
Synopsis
- data RemoteHostClient = RemoteHostClient {
- hostEncoding :: PlatformEncoding
- hostDeviceName :: Text
- httpClient :: HTTP2Client
- encryption :: RemoteCrypto
- encryptHostFiles :: Bool
- storePath :: FilePath
- data RemoteCrypto = RemoteCrypto {
- sessionCode :: ByteString
- sndCounter :: TVar Word32
- rcvCounter :: TVar Word32
- chainKeys :: TSbChainKeys
- skippedKeys :: TMap Word32 (SbKeyNonce, SbKeyNonce)
- signatures :: RemoteSignatures
- getRemoteSndKeys :: RemoteCrypto -> STM (Word32, SbKeyNonce, SbKeyNonce)
- getRemoteRcvKeys :: RemoteCrypto -> Word32 -> STM (Either RemoteProtocolError (SbKeyNonce, SbKeyNonce))
- data RemoteSignatures
- = RSSign {
- idPrivKey :: PrivateKeyEd25519
- sessPrivKey :: PrivateKeyEd25519
- | RSVerify {
- idPubKey :: PublicKeyEd25519
- sessPubKey :: PublicKeyEd25519
- = RSSign {
- type SessionSeq = Int
- data RHPendingSession = RHPendingSession {
- rhKey :: RHKey
- rchClient :: RCHostClient
- rhsWaitSession :: Async ()
- remoteHost_ :: Maybe RemoteHostInfo
- data RemoteHostSession
- = RHSessionStarting
- | RHSessionConnecting {
- invitation :: Text
- rhPendingSession :: RHPendingSession
- | RHSessionPendingConfirmation {
- sessionCode :: Text
- tls :: TLS 'TServer
- rhPendingSession :: RHPendingSession
- | RHSessionConfirmed {
- tls :: TLS 'TServer
- rhPendingSession :: RHPendingSession
- | RHSessionConnected {
- rchClient :: RCHostClient
- tls :: TLS 'TServer
- rhClient :: RemoteHostClient
- pollAction :: Async ()
- storePath :: FilePath
- data RemoteHostSessionState
- = RHSStarting
- | RHSConnecting {
- invitation :: Text
- | RHSPendingConfirmation {
- sessionCode :: Text
- | RHSConfirmed {
- sessionCode :: Text
- | RHSConnected {
- sessionCode :: Text
- rhsSessionState :: RemoteHostSession -> RemoteHostSessionState
- tlsSessionCode :: forall (p :: TransportPeer). TLS p -> Text
- data RemoteProtocolError
- = RPEInvalidSize
- | RPEInvalidJSON {
- invalidJSON :: String
- | RPEInvalidBody {
- invalidBody :: String
- | PRESessionCode
- | RPEIncompatibleEncoding
- | RPEUnexpectedFile
- | RPENoFile
- | RPEFileSize
- | RPEFileDigest
- | RPEManySkippedIds Word32
- | PREEarlierId Word32
- | PREDuplicateId
- | RPEUnexpectedResponse {
- response :: Text
- | RPEStoredFileExists
- | PRERemoteControl {
- rcError :: RCErrorType
- | RPEHTTP2 {
- http2Error :: Text
- | RPEException {
- someException :: Text
- type RemoteHostId = Int64
- data RHKey
- data RemoteHost = RemoteHost {
- remoteHostId :: RemoteHostId
- hostDeviceName :: Text
- storePath :: FilePath
- bindAddress_ :: Maybe RCCtrlAddress
- bindPort_ :: Maybe Word16
- hostPairing :: RCHostPairing
- data RemoteHostInfo = RemoteHostInfo {
- remoteHostId :: RemoteHostId
- hostDeviceName :: Text
- storePath :: FilePath
- bindAddress_ :: Maybe RCCtrlAddress
- bindPort_ :: Maybe Word16
- sessionState :: Maybe RemoteHostSessionState
- type RemoteCtrlId = Int64
- data RemoteCtrl = RemoteCtrl {
- remoteCtrlId :: RemoteCtrlId
- ctrlDeviceName :: Text
- ctrlPairing :: RCCtrlPairing
- remoteCtrlId' :: RemoteCtrl -> RemoteCtrlId
- data PlatformEncoding
- localEncoding :: PlatformEncoding
- data RemoteFile = RemoteFile {
- userId :: Int64
- fileId :: Int64
- sent :: Bool
- fileSource :: CryptoFile
- data CtrlAppInfo = CtrlAppInfo {
- appVersionRange :: AppVersionRange
- deviceName :: Text
- data HostAppInfo = HostAppInfo {
- appVersion :: AppVersion
- deviceName :: Text
- encoding :: PlatformEncoding
- encryptFiles :: Bool
Documentation
data RemoteHostClient Source #
Constructors
| RemoteHostClient | |
Fields
| |
data RemoteCrypto Source #
Constructors
| RemoteCrypto | |
Fields
| |
getRemoteSndKeys :: RemoteCrypto -> STM (Word32, SbKeyNonce, SbKeyNonce) Source #
getRemoteRcvKeys :: RemoteCrypto -> Word32 -> STM (Either RemoteProtocolError (SbKeyNonce, SbKeyNonce)) Source #
data RemoteSignatures Source #
Constructors
| RSSign | |
Fields
| |
| RSVerify | |
Fields
| |
type SessionSeq = Int Source #
data RHPendingSession Source #
Constructors
| RHPendingSession | |
Fields
| |
data RemoteHostSession Source #
Constructors
| RHSessionStarting | |
| RHSessionConnecting | |
Fields
| |
| RHSessionPendingConfirmation | |
Fields
| |
| RHSessionConfirmed | |
Fields
| |
| RHSessionConnected | |
Fields
| |
data RemoteHostSessionState Source #
Constructors
| RHSStarting | |
| RHSConnecting | |
Fields
| |
| RHSPendingConfirmation | |
Fields
| |
| RHSConfirmed | |
Fields
| |
| RHSConnected | |
Fields
| |
Instances
| FromJSON RemoteHostSessionState Source # | |
Defined in Simplex.Chat.Remote.Types Methods parseJSON :: Value -> Parser RemoteHostSessionState parseJSONList :: Value -> Parser [RemoteHostSessionState] omittedField :: Maybe RemoteHostSessionState | |
| ToJSON RemoteHostSessionState Source # | |
Defined in Simplex.Chat.Remote.Types Methods toJSON :: RemoteHostSessionState -> Value toEncoding :: RemoteHostSessionState -> Encoding toJSONList :: [RemoteHostSessionState] -> Value toEncodingList :: [RemoteHostSessionState] -> Encoding omitField :: RemoteHostSessionState -> Bool | |
| Show RemoteHostSessionState Source # | |
Defined in Simplex.Chat.Remote.Types Methods showsPrec :: Int -> RemoteHostSessionState -> ShowS show :: RemoteHostSessionState -> String showList :: [RemoteHostSessionState] -> ShowS | |
tlsSessionCode :: forall (p :: TransportPeer). TLS p -> Text Source #
data RemoteProtocolError Source #
Constructors
| RPEInvalidSize | size prefix is malformed |
| RPEInvalidJSON | failed to parse RemoteCommand or RemoteResponse |
Fields
| |
| RPEInvalidBody | |
Fields
| |
| PRESessionCode | |
| RPEIncompatibleEncoding | |
| RPEUnexpectedFile | |
| RPENoFile | |
| RPEFileSize | |
| RPEFileDigest | |
| RPEManySkippedIds Word32 | |
| PREEarlierId Word32 | |
| PREDuplicateId | |
| RPEUnexpectedResponse | Wrong response received for the command sent |
Fields
| |
| RPEStoredFileExists | A file already exists in the destination position |
| PRERemoteControl | |
Fields
| |
| RPEHTTP2 | |
Fields
| |
| RPEException | |
Fields
| |
Instances
type RemoteHostId = Int64 Source #
Instances
| FromJSON RHKey Source # | |
Defined in Simplex.Chat.Remote.Types Methods parseJSON :: Value -> Parser RHKey parseJSONList :: Value -> Parser [RHKey] omittedField :: Maybe RHKey | |
| ToJSON RHKey Source # | |
Defined in Simplex.Chat.Remote.Types Methods toEncoding :: RHKey -> Encoding toJSONList :: [RHKey] -> Value toEncodingList :: [RHKey] -> Encoding | |
| Show RHKey Source # | |
| Eq RHKey Source # | |
| Ord RHKey Source # | |
data RemoteHost Source #
Storable/internal remote host data
Constructors
| RemoteHost | |
Fields
| |
data RemoteHostInfo Source #
UI-accessible remote host information
Constructors
| RemoteHostInfo | |
Fields
| |
Instances
| FromJSON RemoteHostInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods parseJSON :: Value -> Parser RemoteHostInfo parseJSONList :: Value -> Parser [RemoteHostInfo] omittedField :: Maybe RemoteHostInfo | |
| ToJSON RemoteHostInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods toJSON :: RemoteHostInfo -> Value toEncoding :: RemoteHostInfo -> Encoding toJSONList :: [RemoteHostInfo] -> Value toEncodingList :: [RemoteHostInfo] -> Encoding omitField :: RemoteHostInfo -> Bool | |
| Show RemoteHostInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods showsPrec :: Int -> RemoteHostInfo -> ShowS show :: RemoteHostInfo -> String showList :: [RemoteHostInfo] -> ShowS | |
type RemoteCtrlId = Int64 Source #
data RemoteCtrl Source #
Storable/internal remote controller data
Constructors
| RemoteCtrl | |
Fields
| |
data PlatformEncoding Source #
Instances
| FromJSON PlatformEncoding Source # | |
Defined in Simplex.Chat.Remote.Types Methods parseJSON :: Value -> Parser PlatformEncoding parseJSONList :: Value -> Parser [PlatformEncoding] omittedField :: Maybe PlatformEncoding | |
| ToJSON PlatformEncoding Source # | |
Defined in Simplex.Chat.Remote.Types Methods toJSON :: PlatformEncoding -> Value toEncoding :: PlatformEncoding -> Encoding toJSONList :: [PlatformEncoding] -> Value toEncodingList :: [PlatformEncoding] -> Encoding omitField :: PlatformEncoding -> Bool | |
| Show PlatformEncoding Source # | |
Defined in Simplex.Chat.Remote.Types Methods showsPrec :: Int -> PlatformEncoding -> ShowS show :: PlatformEncoding -> String showList :: [PlatformEncoding] -> ShowS | |
| Eq PlatformEncoding Source # | |
Defined in Simplex.Chat.Remote.Types Methods (==) :: PlatformEncoding -> PlatformEncoding -> Bool (/=) :: PlatformEncoding -> PlatformEncoding -> Bool | |
data RemoteFile Source #
Constructors
| RemoteFile | |
Fields
| |
Instances
| FromJSON RemoteFile Source # | |
Defined in Simplex.Chat.Remote.Types Methods parseJSON :: Value -> Parser RemoteFile parseJSONList :: Value -> Parser [RemoteFile] omittedField :: Maybe RemoteFile | |
| ToJSON RemoteFile Source # | |
Defined in Simplex.Chat.Remote.Types Methods toJSON :: RemoteFile -> Value toEncoding :: RemoteFile -> Encoding toJSONList :: [RemoteFile] -> Value toEncodingList :: [RemoteFile] -> Encoding omitField :: RemoteFile -> Bool | |
| Show RemoteFile Source # | |
Defined in Simplex.Chat.Remote.Types Methods showsPrec :: Int -> RemoteFile -> ShowS show :: RemoteFile -> String showList :: [RemoteFile] -> ShowS | |
data CtrlAppInfo Source #
Constructors
| CtrlAppInfo | |
Fields
| |
Instances
| FromJSON CtrlAppInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods parseJSON :: Value -> Parser CtrlAppInfo parseJSONList :: Value -> Parser [CtrlAppInfo] omittedField :: Maybe CtrlAppInfo | |
| ToJSON CtrlAppInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods toJSON :: CtrlAppInfo -> Value toEncoding :: CtrlAppInfo -> Encoding toJSONList :: [CtrlAppInfo] -> Value toEncodingList :: [CtrlAppInfo] -> Encoding omitField :: CtrlAppInfo -> Bool | |
| Show CtrlAppInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods showsPrec :: Int -> CtrlAppInfo -> ShowS show :: CtrlAppInfo -> String showList :: [CtrlAppInfo] -> ShowS | |
data HostAppInfo Source #
Constructors
| HostAppInfo | |
Fields
| |
Instances
| FromJSON HostAppInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods parseJSON :: Value -> Parser HostAppInfo parseJSONList :: Value -> Parser [HostAppInfo] omittedField :: Maybe HostAppInfo | |
| ToJSON HostAppInfo Source # | |
Defined in Simplex.Chat.Remote.Types Methods toJSON :: HostAppInfo -> Value toEncoding :: HostAppInfo -> Encoding toJSONList :: [HostAppInfo] -> Value toEncodingList :: [HostAppInfo] -> Encoding omitField :: HostAppInfo -> Bool | |