diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-12-30 22:40:39 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-01-04 10:00:05 +0100 |
commit | 9a401324f20334ca06c77ea09ab005f9ab7e80dc (patch) | |
tree | 57fb585f5ce03e178db115019dd13604d1ae2bb2 /main/Main.hs | |
parent | 58244ef30fcfb2584c651c23595b36d55b77f5b1 (diff) |
Build discovery service without requiring ICE support
Changelog: Discovery service without requiring ICE support
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 73def51..000bbf9 100644 --- a/main/Main.hs +++ b/main/Main.hs @@ -40,8 +40,8 @@ import Erebos.Attach import Erebos.Contact import Erebos.Chatroom import Erebos.Conversation -#ifdef ENABLE_ICE_SUPPORT import Erebos.Discovery +#ifdef ENABLE_ICE_SUPPORT import Erebos.ICE #endif import Erebos.Identity @@ -102,10 +102,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)] @@ -492,9 +490,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) @@ -838,8 +836,6 @@ cmdDetails = do , map (BC.unpack . showRefDigest . refDigest . storedRef) $ idExtDataF cpid ] -#ifdef ENABLE_ICE_SUPPORT - cmdDiscoveryInit :: Command cmdDiscoveryInit = void $ do server <- asks ciServer @@ -867,6 +863,8 @@ cmdDiscovery = void $ do Right _ -> return () Left err -> eprint err +#ifdef ENABLE_ICE_SUPPORT + cmdIceCreate :: Command cmdIceCreate = do role <- asks ciLine >>= return . \case |