diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-01-04 21:02:55 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-01-04 21:02:55 +0100 |
commit | 3e93319284aa86cc462137bda1594368361a1905 (patch) | |
tree | df240da73b8df85c34022a97a542cc350595d529 /main/Main.hs | |
parent | 7ad3fb235dde2e0be8adc0feeb890da438c70eff (diff) | |
parent | 0f83948e7f5cad486cb8c8e18b39ebbbfbfa8d98 (diff) |
Diffstat (limited to 'main/Main.hs')
-rw-r--r-- | main/Main.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/main/Main.hs b/main/Main.hs index 7f9250b..fa2b4c1 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -41,8 +41,8 @@ import Erebos.Contact import Erebos.Chatroom import Erebos.Conversation import Erebos.DirectMessage -#ifdef ENABLE_ICE_SUPPORT import Erebos.Discovery +#ifdef ENABLE_ICE_SUPPORT import Erebos.ICE #endif import Erebos.Identity @@ -104,10 +104,8 @@ availableServices = True "create contacts with network peers" , ServiceOption "dm" (someService @DirectMessage Proxy) True "direct messages" -#ifdef ENABLE_ICE_SUPPORT , ServiceOption "discovery" (someService @DiscoveryService Proxy) True "peer discovery" -#endif ] options :: [OptDescr (Options -> Options)] @@ -494,9 +492,9 @@ commands = , ("contact-reject", cmdContactReject) , ("conversations", cmdConversations) , ("details", cmdDetails) -#ifdef ENABLE_ICE_SUPPORT , ("discovery-init", cmdDiscoveryInit) , ("discovery", cmdDiscovery) +#ifdef ENABLE_ICE_SUPPORT , ("ice-create", cmdIceCreate) , ("ice-destroy", cmdIceDestroy) , ("ice-show", cmdIceShow) @@ -840,8 +838,6 @@ cmdDetails = do , map (BC.unpack . showRefDigest . refDigest . storedRef) $ idExtDataF cpid ] -#ifdef ENABLE_ICE_SUPPORT - cmdDiscoveryInit :: Command cmdDiscoveryInit = void $ do server <- asks ciServer @@ -869,6 +865,8 @@ cmdDiscovery = void $ do Right _ -> return () Left err -> eprint err +#ifdef ENABLE_ICE_SUPPORT + cmdIceCreate :: Command cmdIceCreate = do role <- asks ciLine >>= return . \case |