Adding missing signals
This commit is contained in:
parent
ba2fc5eb73
commit
ed0059d48f
|
@ -8,6 +8,8 @@ proc onSignal*(state: AppState): SignalCallback =
|
||||||
let jsonSignal = ($p0).parseJson
|
let jsonSignal = ($p0).parseJson
|
||||||
let signalType = $jsonSignal["type"].getStr
|
let signalType = $jsonSignal["type"].getStr
|
||||||
|
|
||||||
|
# TODO: ideally the signal would receive an object
|
||||||
|
# formatted for easier usage
|
||||||
case signalType:
|
case signalType:
|
||||||
of "messages.new":
|
of "messages.new":
|
||||||
state.nextSignal(SignalType.Message, $jsonSignal)
|
state.nextSignal(SignalType.Message, $jsonSignal)
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
import hashes
|
|
||||||
|
|
||||||
type SignalCallback* = proc(eventMessage: cstring): void
|
type SignalCallback* = proc(eventMessage: cstring): void
|
||||||
|
|
||||||
type SignalType* {.pure.} = enum
|
type SignalType* {.pure.} = enum
|
||||||
Message = "messages.new"
|
Message = "messages.new"
|
||||||
Wallet = "wallet"
|
Wallet = "wallet"
|
||||||
NodeStarted = "node.started"
|
NodeStarted = "node.started"
|
||||||
|
NodeLogin = "node.login"
|
||||||
|
EnvelopeSent = "envelope.sent"
|
||||||
|
EnvelopeExpired = "envelope.expired"
|
||||||
|
MailserverRequestCompleted = "mailserver.request.completed"
|
||||||
|
MailserverRequestExpired = "mailserver.request.expired"
|
||||||
|
DiscoverSummary = "discover.summary"
|
||||||
|
SubscriptionsData = "subscriptions.data"
|
||||||
|
SubscriptionsError = "subscriptions.error"
|
||||||
|
WhisperFilterAdded = "whisper.filter.added"
|
||||||
Unknown
|
Unknown
|
||||||
#TODO: add missing types
|
|
||||||
|
|
Loading…
Reference in New Issue