This commit is contained in:
Tony Garnock-Jones 2022-01-04 14:41:56 +01:00
parent baa1d931bf
commit 0f087115f2
5 changed files with 79 additions and 13 deletions

View File

@ -2,15 +2,17 @@
WidgetType„„„„„³Window´³rec´³lit³window„´³tupleµ´³named³id´³refµ„³WidgetId„„´³named³space´³embedded³any„„„„„³BoxSize´³rec´³lit³box-size„´³tupleµ´³named³
horizontal´³refµ„³Sizing„„´³named³vertical´³refµ„³Sizing„„„„„³SortKey´³orµµ±double´³atom³Double„„µ±string´³atom³String„„„„³LeafType´³orµµ±blank´³lit³blank„„µ±text´³lit³text„„µ±slider´³lit³slider„„µ±image´³lit³image„„µ±icon´³lit³icon„„„„³NodeType´³orµµ±column´³lit³column„„µ±row´³lit³row„„„„³WidgetId³any³ Attribute´³rec´³lit³ attribute„´³tupleµ´³named³id´³refµ„³WidgetId„„´³named³key´³atom³Symbol„„´³named³value³any„„„„³
WidgetType´³orµµ±NodeType´³refµ„³NodeType„„µ±LeafType´³refµ„³LeafType„„„„³ WindowTitle´³rec´³lit³ window-title„´³tupleµ´³named³title´³atom³String„„„„„³WidgetInstance´³rec´³lit³widget-instance„´³tupleµ´³named³id´³refµ„³WidgetId„„´³named³instance´³embedded³any„„„„„³WindowCloseable´³rec´³lit³window-closeable„´³tupleµ„„„„³ embeddedType€„„µ³mime„´³schema·³version³ definitions·³Value´³rec´³lit³mime„´³tupleµ´³named³type´³atom³Symbol„„´³named³data´³atom³
ByteString„„„„„„³ embeddedType€„„µ³hayes„´³schema·³version³ definitions·³Result´³rec´³lit³result„´³tupleµ´³named³text´³atom³String„„´³named³tag´³refµ„³ MaybeString„„´³named³fields´³refµ„³ MaybeStrings„„„„„³ MaybeString´³orµµ±present´³atom³String„„µ±absent´³lit€„„„„³ MaybeStrings´³orµµ±present´³seqof´³atom³String„„„µ±absent´³lit€„„„„³ ModemPresent´³rec´³lit³modem„´³tupleµ´³lit³hayes„´³named³
devicePath´³atom³String„„´³named³ dataspace´³embedded´³refµ„³InternalProtocol„„„„„„³ CommandResult´³rec´³lit³command-result„´³tupleµ´³named³ commandText´³atom³String„„´³named³results´³seqof´³refµ„³Result„„„´³named³ finalResult´³atom³String„„„„„³ExecuteCommand´³rec´³lit³execute-command„´³tupleµ´³named³ commandText´³atom³String„„´³named³replyTo´³refµ„³CommandContinuation„„„„„³InternalProtocol³any³CommandContinuation´³orµµ± replyWanted´³embedded´³refµ„³ CommandResult„„„µ± fireAndForget´³lit€„„„„³UnsolicitedResultCode´³rec´³lit³ unsolicited„´³tupleµ´³named³result´³refµ„³Result„„„„„„³ embeddedType€„„µ³ telephony„´³schema·³version³ definitions·³CallId´³atom³ SignedInteger„³CallType´³orµµ±voice´³lit³voice„„µ±data´³lit³data„„µ±fax´³lit³fax„„„„³ CallState´³orµµ±hold´³lit³hold„„µ±original´³lit³original„„µ±connect´³lit³connect„„µ±incoming´³lit³incoming„„µ±waiting´³lit³waiting„„µ±end´³lit³end„„µ±alerting´³lit³alerting„„„„³ PlaceCall´³rec´³lit³
ByteString„„„„„„³ embeddedType€„„µ³audio„´³schema·³version³ definitions·³Sink´³orµµ±speaker´³lit³speaker„„µ±headset´³lit³headset„„µ±earpiece´³lit³earpiece„„„„³Source´³orµµ± speakerphone´³lit³ speakerphone„„µ±headset´³lit³headset„„µ±handset´³lit³handset„„„„³ SinkMapping´³rec´³lit³alsa-sink-mapping„´³tupleµ´³named³abstract´³refµ„³Sink„„´³named³concrete´³atom³String„„„„„³HeadsetSpeakerPresent´³rec´³lit³headset-speaker-present„´³tupleµ„„„³HeadsetMicrophonePresent´³rec´³lit³headset-microphone-present„´³tupleµ„„„„³ embeddedType€„„µ³hayes„´³schema·³version³ definitions·³Result´³rec´³lit³result„´³tupleµ´³named³text´³atom³String„„´³named³tag´³refµ„³ MaybeString„„´³named³fields´³refµ„³ MaybeStrings„„„„„³ MaybeString´³orµµ±present´³atom³String„„µ±absent´³lit€„„„„³ MaybeStrings´³orµµ±present´³seqof´³atom³String„„„µ±absent´³lit€„„„„³ ModemPresent´³rec´³lit³modem„´³tupleµ´³lit³hayes„´³named³
devicePath´³atom³String„„´³named³ dataspace´³embedded´³refµ„³InternalProtocol„„„„„„³ CommandResult´³rec´³lit³command-result„´³tupleµ´³named³ commandText´³atom³String„„´³named³results´³seqof´³refµ„³Result„„„´³named³ finalResult´³atom³String„„„„„³ExecuteCommand´³rec´³lit³execute-command„´³tupleµ´³named³ commandText´³atom³String„„´³named³replyTo´³refµ„³CommandContinuation„„„„„³InternalProtocol³any³CommandContinuation´³orµµ± replyWanted´³embedded´³refµ„³ CommandResult„„„µ± fireAndForget´³lit€„„„„³UnsolicitedResultCode´³rec´³lit³ unsolicited„´³tupleµ´³named³result´³refµ„³Result„„„„„„³ embeddedType€„„µ³ telephony„´³schema·³version³ definitions·³CallId´³atom³ SignedInteger„³Address´³rec´³lit³address„´³tupleµ´³named³
numberType´³refµ„³
NumberType„„´³named³number´³atom³String„„„„„³CallType´³orµµ±voice´³lit³voice„„µ±data´³lit³data„„µ±fax´³lit³fax„„„„³ CallState´³orµµ±hold´³lit³hold„„µ±original´³lit³original„„µ±connect´³lit³connect„„µ±incoming´³lit³incoming„„µ±waiting´³lit³waiting„„µ±end´³lit³end„„µ±alerting´³lit³alerting„„„„³ PlaceCall´³rec´³lit³
place-call„´³tupleµ´³named³
devicePath´³atom³String„„´³named³peer´³atom³String„„„„„³
devicePath´³atom³String„„´³named³peer´³refµ„³Address„„„„„³ TimeStamp´³rec´³lit³rfc3339„´³tupleµ´³named³value´³atom³String„„„„„³
ActiveCall´³rec´³lit³
call-state„´³tupleµ´³named³callId´³refµ„³CallId„„´³named³ direction´³refµ„³ CallDirection„„´³named³type´³refµ„³CallType„„´³named³peer´³atom³String„„´³named³peerNumberType´³refµ„³
NumberType„„´³named³state´³refµ„³ CallState„„„„„³
call-state„´³tupleµ´³named³callId´³refµ„³CallId„„´³named³ direction´³refµ„³ CallDirection„„´³named³type´³refµ„³CallType„„´³named³peer´³refµ„³Address„„´³named³state´³refµ„³ CallState„„„„„³
AnswerCall´³rec´³lit³ answer-call„´³tupleµ´³named³callId´³atom³ SignedInteger„„„„„³
NumberType´³orµµ±unknown´³lit³unknown„„µ± international´³lit³ international„„µ±national´³lit³national„„„„³ ModemPresent´³rec´³lit³modem„´³tupleµ´³named³type´³atom³Symbol„„´³named³
devicePath´³atom³String„„´³named³ dataspace´³embedded³any„„„„„³ ReleaseCause´³orµµ±unassignedNumber´³lit³unassignedNumber„„µ±normal´³lit³normal„„µ±busy´³lit³busy„„µ±noUserResponding´³lit³noUserResponding„„µ± callRejected´³lit³ callRejected„„µ±destinationOutOfOrder´³lit³destinationOutOfOrder„„µ±normalUnspecified´³lit³normalUnspecified„„µ±incompatibleDestination´³lit³incompatibleDestination„„„„³ CallDirection´³orµµ±mo´³lit³mo„„µ±mt´³lit³mt„„„„³CallIdSelector´³orµµ± specificCall´³atom³ SignedInteger„„µ±allCalls´³lit³all„„„„³CallInProgress´³rec´³lit³call-in-progress„´³tupleµ„„„³DisconnectCall´³rec´³lit³disconnect-call„´³tupleµ´³named³callId´³refµ„³CallIdSelector„„´³named³cause´³refµ„³ ReleaseCause„„„„„„³ embeddedType€„„µ³usersAndGroups„´³schema·³version³ definitions·³Spec´³orµµ± userAccount´³lit³user„„µ± systemAccount´³lit³system„„µ±id´³atom³ SignedInteger„„„„³Group´³rec´³lit³grent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³name´³named³name´³atom³String„„„„„„„³Account´³rec´³lit³pwent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³uid´³named³uid´³atom³ SignedInteger„„³home´³named³home´³atom³String„„³info´³named³info´³atom³String„„³name´³named³name´³atom³String„„³shell´³named³shell´³atom³String„„„„„„„³ EnsureGroup´³rec´³lit³ ensure-group„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„³ GroupMember´³rec´³lit³ group-member„´³tupleµ´³named³uid´³atom³ SignedInteger„„´³named³gid´³atom³ SignedInteger„„„„„³ EnsureAccount´³rec´³lit³ensure-account„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„„³ embeddedType€„„µ³samsungGalaxyS7„´³schema·³version³ definitions·³ FmtPacket´³rec´³lit³fmt„´³tupleµ´³named³body´³embedded³any„„„„„³ RfsPacket´³rec´³lit³rfs„´³tupleµ´³named³body´³embedded³any„„„„„³ ModemPacket´³orµµ±in´³rec´³lit³
NumberType´³orµµ±unknown´³lit³unknown„„µ± international´³lit³ international„„µ±national´³lit³national„„„„³ PeerRinging´³rec´³lit³ peer-ringing„´³tupleµ„„„³ SmsDelivery´³rec´³lit³ sms-delivery„´³tupleµ´³named³smsc´³refµ„³Address„„´³named³peer´³refµ„³Address„„´³named³ timestamp´³refµ„³ TimeStamp„„´³named³body´³atom³String„„„„„³ ModemPresent´³rec´³lit³modem„´³tupleµ´³named³type´³atom³Symbol„„´³named³
devicePath´³atom³String„„´³named³ dataspace´³embedded³any„„„„„³ PhoneRinging´³rec´³lit³ phone-ringing„´³tupleµ„„„³ ReleaseCause´³orµµ±unassignedNumber´³lit³unassignedNumber„„µ±normal´³lit³normal„„µ±busy´³lit³busy„„µ±noUserResponding´³lit³noUserResponding„„µ± callRejected´³lit³ callRejected„„µ±destinationOutOfOrder´³lit³destinationOutOfOrder„„µ±normalUnspecified´³lit³normalUnspecified„„µ±incompatibleDestination´³lit³incompatibleDestination„„„„³ Speakerphone´³rec´³lit³ speakerphone„´³tupleµ„„„³ CallDirection´³orµµ±mo´³lit³mo„„µ±mt´³lit³mt„„„„³CallIdSelector´³orµµ± specificCall´³atom³ SignedInteger„„µ±allCalls´³lit³all„„„„³CallInProgress´³rec´³lit³call-in-progress„´³tupleµ„„„³DisconnectCall´³rec´³lit³disconnect-call„´³tupleµ´³named³callId´³refµ„³CallIdSelector„„´³named³cause´³refµ„³ ReleaseCause„„„„„„³ embeddedType€„„µ³ soundEffects„´³schema·³version³ definitions·³
AlertSound´³rec´³lit³ alert-sound„´³tupleµ´³named³data´³refµ³mime„³Value„„„„„³ContinuousSound´³rec´³lit³continuous-sound„´³tupleµ´³named³data´³refµ³mime„³Value„„„„„³AlertSoundPlaying´³rec´³lit³alert-sound-playing„´³tupleµ„„„³ContinuousSoundPlaying´³rec´³lit³continuous-sound-playing„´³tupleµ„„„„³ embeddedType€„„µ³usersAndGroups„´³schema·³version³ definitions·³Spec´³orµµ± userAccount´³lit³user„„µ± systemAccount´³lit³system„„µ±id´³atom³ SignedInteger„„„„³Group´³rec´³lit³grent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³name´³named³name´³atom³String„„„„„„„³Account´³rec´³lit³pwent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³uid´³named³uid´³atom³ SignedInteger„„³home´³named³home´³atom³String„„³info´³named³info´³atom³String„„³name´³named³name´³atom³String„„³shell´³named³shell´³atom³String„„„„„„„³ EnsureGroup´³rec´³lit³ ensure-group„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„³ GroupMember´³rec´³lit³ group-member„´³tupleµ´³named³uid´³atom³ SignedInteger„„´³named³gid´³atom³ SignedInteger„„„„„³ EnsureAccount´³rec´³lit³ensure-account„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„„³ embeddedType€„„µ³samsungGalaxyS7„´³schema·³version³ definitions·³ FmtPacket´³rec´³lit³fmt„´³tupleµ´³named³body´³embedded³any„„„„„³ RfsPacket´³rec´³lit³rfs„´³tupleµ´³named³body´³embedded³any„„„„„³ ModemPacket´³orµµ±in´³rec´³lit³
from-modem„´³tupleµ´³named³packet³any„„„„„µ±out´³rec´³lit³to-modem„´³tupleµ´³named³packet³any„„„„„„„³ ModemPresent´³rec´³lit³modem„´³tupleµ´³lit³samsung-galaxy-s7„´³named³
devicePath´³atom³String„„´³named³ dataspace´³embedded´³refµ„³InternalProtocol„„„„„„³InternalProtocol³any„³ embeddedType€„„„„
devicePath´³atom³String„„´³named³ dataspace´³embedded´³refµ„³InternalProtocol„„„„„„³ExecuteCommand´³rec´³lit³execute-command„´³tupleµ´³named³command´³refµ„³ FmtPacket„„´³named³replyTo´³refµ„³CommandContinuation„„„„„³InternalProtocol³any³CommandContinuation´³orµµ± replyWanted´³embedded´³refµ„³ FmtPacket„„„µ± fireAndForget´³lit€„„„„„³ embeddedType€„„„„

View File

@ -0,0 +1,34 @@
version 1 .
; If headset present:
; - ringing: speaker & headset
; - notification: speaker & headset
; - non-speakerphone call: headset
; - speakerphone call: speaker
; - music: headset
;
; If headset absent:
; - ringing: speaker
; - notification: speaker
; - non-speakerphone call: earpiece
; - speakerphone call: speaker
; - music: speaker
;
.
SinkMapping = <alsa-sink-mapping @abstract Sink @concrete string> .
Sink =
/ =speaker
/ =headset
/ =earpiece
.
Source =
/ =speakerphone
/ =headset
/ =handset
.
HeadsetSpeakerPresent = <headset-speaker-present> .
HeadsetMicrophonePresent = <headset-microphone-present> .

View File

@ -12,3 +12,7 @@ ModemPacket = @in <from-modem @packet any> / @out <to-modem @packet any> .
; The bodies are instances of SamsungFmtMessage and SamsungRfsMessage, respectively.
FmtPacket = <fmt @body #!any> .
RfsPacket = <rfs @body #!any> .
; Assertion. Asks the modem to execute the given command.
ExecuteCommand = <execute-command @command FmtPacket @replyTo CommandContinuation> .
CommandContinuation = @replyWanted #!FmtPacket / @fireAndForget #f .

View File

@ -0,0 +1,11 @@
version 1 .
; Assertion.
ContinuousSound = <continuous-sound @data mime.Value> .
; Assertion.
ContinuousSoundPlaying = <continuous-sound-playing> .
; Message.
AlertSound = <alert-sound @data mime.Value> .
; Assertion.
AlertSoundPlaying = <alert-sound-playing> .

View File

@ -3,12 +3,14 @@ version 1 .
ModemPresent = <modem @type symbol @devicePath string @dataspace #!any> .
Address = <address @numberType NumberType @number string> .
NumberType = =unknown / =international / =national .
; Assertion. Describes an ongoing call.
ActiveCall = <call-state @callId CallId @direction CallDirection @type CallType @peer string @peerNumberType NumberType @state CallState> .
ActiveCall = <call-state @callId CallId @direction CallDirection @type CallType @peer Address @state CallState> .
CallId = int .
CallDirection = =mo / =mt .
CallType = =voice / =data / =fax .
NumberType = =unknown / =international / =national .
CallState = =hold / =original / =connect / =incoming / =waiting / =end / =alerting .
; Message. Triggers call answering.
@ -28,8 +30,21 @@ ReleaseCause =
/ =incompatibleDestination
.
; Message. Starts an outgoing call. Assumes `international` NumberType.
PlaceCall = <place-call @devicePath string @peer string> .
; Message. Starts an outgoing call.
PlaceCall = <place-call @devicePath string @peer Address> .
; Assertion. Some call is active.
; Assertion. Some call is active - be it alerting, connected, ringing, etc.
CallInProgress = <call-in-progress> .
; Assertion. An incoming call is signalling the user, asking for a decision about answer/reject/ignore.
PhoneRinging = <phone-ringing> .
; Assertion. A remote party's phone should be ringing.
PeerRinging = <peer-ringing> .
; Message. An incoming SMS has been received.
SmsDelivery = <sms-delivery @smsc Address @peer Address @timestamp TimeStamp @body string> .
TimeStamp = <rfc3339 @value string> .
; Assertion. Enable speakerphone mode, if available.
Speakerphone = <speakerphone> .