| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Simplex.Chat.Remote
Synopsis
- remoteFilesFolder :: String
- minRemoteCtrlVersion :: AppVersion
- minRemoteHostVersion :: AppVersion
- currentAppVersion :: AppVersion
- ctrlAppVersionRange :: AppVersionRange
- hostAppVersionRange :: AppVersionRange
- networkIOTimeout :: Int
- discoveryTimeout :: Int
- getRemoteHostClient :: RemoteHostId -> CM RemoteHostClient
- withRemoteHostSession :: RHKey -> SessionSeq -> (RemoteHostSession -> Either ChatError (a, RemoteHostSession)) -> CM a
- setNewRemoteHostId :: SessionSeq -> RemoteHostId -> CM ()
- startRemoteHost :: Maybe (RemoteHostId, Bool) -> Maybe RCCtrlAddress -> Maybe Word16 -> CM (NonEmpty RCCtrlAddress, Maybe RemoteHostInfo, RCSignedInvitation)
- startRemoteHostSession :: RHKey -> CM SessionSeq
- closeRemoteHost :: RHKey -> CM ()
- cancelRemoteHostSession :: Maybe (SessionSeq, RemoteHostStopReason) -> RHKey -> CM ()
- cancelRemoteHost :: Bool -> RemoteHostSession -> IO ()
- randomStorePath :: IO FilePath
- listRemoteHosts :: CM [RemoteHostInfo]
- switchRemoteHost :: Maybe RemoteHostId -> CM (Maybe RemoteHostInfo)
- remoteHostInfo :: RemoteHost -> Maybe RemoteHostSessionState -> RemoteHostInfo
- deleteRemoteHost :: RemoteHostId -> CM ()
- storeRemoteFile :: RemoteHostId -> Maybe Bool -> FilePath -> CM CryptoFile
- getRemoteFile :: RemoteHostId -> RemoteFile -> CM ()
- processRemoteCommand :: RemoteHostId -> RemoteHostClient -> ChatCommand -> ByteString -> Int -> CM ChatResponse
- liftRH :: RemoteHostId -> ExceptT RemoteProtocolError IO a -> CM a
- connectRemoteCtrlURI :: RCSignedInvitation -> CM (Maybe RemoteCtrlInfo, CtrlAppInfo)
- findKnownRemoteCtrl :: CM ()
- confirmRemoteCtrl :: RemoteCtrlId -> CM (RemoteCtrlInfo, CtrlAppInfo)
- startRemoteCtrlSession :: CM SessionSeq
- connectRemoteCtrl :: RCVerifiedInvitation -> SessionSeq -> CM (Maybe RemoteCtrlInfo, CtrlAppInfo)
- parseCtrlAppInfo :: Value -> CM CtrlAppInfo
- handleRemoteCommand :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> RemoteCrypto -> TBQueue (Either ChatError ChatEvent) -> HTTP2Request -> CM' ()
- takeRCStep :: RCStepTMVar a -> CM a
- type GetChunk = Int -> IO ByteString
- type SendChunk = Builder -> IO ()
- type Respond = RemoteResponse -> (SbKeyNonce -> SendChunk -> IO ()) -> CM' ()
- liftRC :: ExceptT RemoteProtocolError IO a -> CM a
- handleSend :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> Text -> Int -> CM' RemoteResponse
- handleRecv :: Int -> TBQueue (Either ChatError ChatEvent) -> IO RemoteResponse
- handleStoreFile :: SbKeyNonce -> FilePath -> Word32 -> FileDigest -> GetChunk -> CM' RemoteResponse
- handleGetFile :: User -> RemoteFile -> Respond -> CM ()
- listRemoteCtrls :: CM [RemoteCtrlInfo]
- remoteCtrlInfo :: RemoteCtrl -> Maybe RemoteCtrlSessionState -> RemoteCtrlInfo
- verifyRemoteCtrlSession :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> Text -> CM RemoteCtrlInfo
- stopRemoteCtrl :: CM ()
- handleCtrlError :: SessionSeq -> (ChatError -> RemoteCtrlStopReason) -> Text -> CM a -> CM a
- cancelActiveRemoteCtrl :: Maybe (SessionSeq, RemoteCtrlStopReason) -> CM ()
- cancelRemoteCtrl :: Bool -> RemoteCtrlSession -> IO ()
- deleteRemoteCtrl :: RemoteCtrlId -> CM ()
- checkNoRemoteCtrlSession :: CM ()
- updateRemoteCtrlSession :: SessionSeq -> (RemoteCtrlSession -> Either ChatError RemoteCtrlSession) -> CM ()
- utf8String :: [Char] -> ByteString
Documentation
remoteFilesFolder :: String Source #
networkIOTimeout :: Int Source #
discoveryTimeout :: Int Source #
Desktop side
withRemoteHostSession :: RHKey -> SessionSeq -> (RemoteHostSession -> Either ChatError (a, RemoteHostSession)) -> CM a Source #
setNewRemoteHostId :: SessionSeq -> RemoteHostId -> CM () Source #
Transition session state with a RHNew ID to an assigned RemoteHostId
startRemoteHost :: Maybe (RemoteHostId, Bool) -> Maybe RCCtrlAddress -> Maybe Word16 -> CM (NonEmpty RCCtrlAddress, Maybe RemoteHostInfo, RCSignedInvitation) Source #
closeRemoteHost :: RHKey -> CM () Source #
cancelRemoteHostSession :: Maybe (SessionSeq, RemoteHostStopReason) -> RHKey -> CM () Source #
cancelRemoteHost :: Bool -> RemoteHostSession -> IO () Source #
randomStorePath :: IO FilePath Source #
Generate a random 16-char filepath without / in it by using base64url encoding.
switchRemoteHost :: Maybe RemoteHostId -> CM (Maybe RemoteHostInfo) Source #
remoteHostInfo :: RemoteHost -> Maybe RemoteHostSessionState -> RemoteHostInfo Source #
deleteRemoteHost :: RemoteHostId -> CM () Source #
storeRemoteFile :: RemoteHostId -> Maybe Bool -> FilePath -> CM CryptoFile Source #
getRemoteFile :: RemoteHostId -> RemoteFile -> CM () Source #
processRemoteCommand :: RemoteHostId -> RemoteHostClient -> ChatCommand -> ByteString -> Int -> CM ChatResponse Source #
liftRH :: RemoteHostId -> ExceptT RemoteProtocolError IO a -> CM a Source #
Mobile side
QR/link
connectRemoteCtrlURI :: RCSignedInvitation -> CM (Maybe RemoteCtrlInfo, CtrlAppInfo) Source #
Use provided OOB link as an annouce
Multicast
findKnownRemoteCtrl :: CM () Source #
Common
connectRemoteCtrl :: RCVerifiedInvitation -> SessionSeq -> CM (Maybe RemoteCtrlInfo, CtrlAppInfo) Source #
parseCtrlAppInfo :: Value -> CM CtrlAppInfo Source #
handleRemoteCommand :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> RemoteCrypto -> TBQueue (Either ChatError ChatEvent) -> HTTP2Request -> CM' () Source #
takeRCStep :: RCStepTMVar a -> CM a Source #
liftRC :: ExceptT RemoteProtocolError IO a -> CM a Source #
handleSend :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> Text -> Int -> CM' RemoteResponse Source #
handleRecv :: Int -> TBQueue (Either ChatError ChatEvent) -> IO RemoteResponse Source #
handleStoreFile :: SbKeyNonce -> FilePath -> Word32 -> FileDigest -> GetChunk -> CM' RemoteResponse Source #
handleGetFile :: User -> RemoteFile -> Respond -> CM () Source #
remoteCtrlInfo :: RemoteCtrl -> Maybe RemoteCtrlSessionState -> RemoteCtrlInfo Source #
verifyRemoteCtrlSession :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> Text -> CM RemoteCtrlInfo Source #
Take a look at emoji of tlsunique, commit pairing, and start session server
stopRemoteCtrl :: CM () Source #
handleCtrlError :: SessionSeq -> (ChatError -> RemoteCtrlStopReason) -> Text -> CM a -> CM a Source #
cancelActiveRemoteCtrl :: Maybe (SessionSeq, RemoteCtrlStopReason) -> CM () Source #
Stop session controller, unless session update key is present but stale
cancelRemoteCtrl :: Bool -> RemoteCtrlSession -> IO () Source #
deleteRemoteCtrl :: RemoteCtrlId -> CM () Source #
checkNoRemoteCtrlSession :: CM () Source #
updateRemoteCtrlSession :: SessionSeq -> (RemoteCtrlSession -> Either ChatError RemoteCtrlSession) -> CM () Source #
Transition controller to a new state, unless session update key is stale
utf8String :: [Char] -> ByteString Source #