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 signalType = $jsonSignal["type"].getStr
|
||||
|
||||
# TODO: ideally the signal would receive an object
|
||||
# formatted for easier usage
|
||||
case signalType:
|
||||
of "messages.new":
|
||||
state.nextSignal(SignalType.Message, $jsonSignal)
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
import hashes
|
||||
|
||||
type SignalCallback* = proc(eventMessage: cstring): void
|
||||
|
||||
type SignalType* {.pure.} = enum
|
||||
Message = "messages.new"
|
||||
Wallet = "wallet"
|
||||
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
|
||||
#TODO: add missing types
|
||||
|
|
Loading…
Reference in New Issue