This document describes the current boundary of source/protocol/dlna/control/.
source/protocol/dlna/control/
action/
event_server.*
handler.*
protocol_state.*
soap_router.*
soap_server.*
soap_writer.*
Responsible for:
- HTTP entry handling.
- SOAP envelope and fault wrapping.
- Forwarding requests to the router.
Responsible for routing by service + action.
Responsible for:
- Dynamic XML output.
- Shared XML escaping.
Responsible for:
- Argument extraction.
- XML entity decoding.
- Bridging SOAP actions to the player.
- Synchronizing player events into protocol state.
Responsible for:
- Owning the single protocol-observed state.
- Serving SOAP query reads.
- Serving
LastChangegeneration. - Serving compatibility helper reads.
This is one of the most important current structure decisions.
Responsible for:
SUBSCRIBE / UNSUBSCRIBE.NOTIFY.LastChange.
HTTP POST
-> soap_server
-> soap_router
-> action
-> player / protocol_state
-> soap_writer
-> HTTP response
SUBSCRIBE / UNSUBSCRIBE
-> event_server
player event
-> handler
-> protocol_state
-> event_server worker
-> NOTIFY / LastChange
- Protocol code should do protocol work only.
- Protocol code should not become a source-specific adapter layer.
- Protocol state has one owner.
- SOAP queries and event notifications share the same state.
- The player remains the source of real playback state.
SetAVTransportURIPlay / Pause / Stop / SeekGetTransportInfoGetMediaInfoGetPositionInfoGetCurrentTransportActions
GetVolume / SetVolumeGetMute / SetMuteGetBrightnesscompatibility stub
GetProtocolInfoGetCurrentConnectionIDsGetCurrentConnectionInfo
The current code avoids:
- Per-action private runtime state.
- A separate
LastChangestate model. - Fixed-size manual XML buffer assembly.
- Source-specific behavior inside SOAP.
- Keep protocol-observed state consistent.
- Improve controller compatibility.
- Keep query, event, and action semantics aligned.