diff --git a/Emulsion/Emulsion.fsproj b/Emulsion/Emulsion.fsproj index 92dfc71b..2d3a8c8a 100644 --- a/Emulsion/Emulsion.fsproj +++ b/Emulsion/Emulsion.fsproj @@ -17,6 +17,7 @@ + diff --git a/Emulsion/Xmpp/AsyncXmppClient.fs b/Emulsion/Xmpp/AsyncXmppClient.fs new file mode 100644 index 00000000..09d6db74 --- /dev/null +++ b/Emulsion/Xmpp/AsyncXmppClient.fs @@ -0,0 +1,32 @@ +module Emulsion.Xmpp.AsyncXmppClient +open System.Security +open System.Threading + +type ServerInfo = { + Host: string + Port: uint16 +} + +type SignInInfo = { + Login: string + Password: SecureString +} + +type RoomInfo = { + RoomJid: string + Nickname: string +} + +type MessageInfo = { + RecipientJid: string + Text: string +} + +type Lifetime = CancellationToken // TODO[F]: Determine a proper lifetime? + +type IAsyncXmppClient = + abstract member Connect : ServerInfo -> Async + abstract member SignIn : SignInInfo -> Async + abstract member EnterRoom : RoomInfo -> Async + abstract member SendMessage : Lifetime -> MessageInfo -> Async + abstract member DisposeAsync : unit -> Async