pub struct EventProcessor { /* private fields */ }Expand description
Simplified event processor that delegates to sonos-api event framework
Implementations§
Source§impl EventProcessor
impl EventProcessor
Sourcepub fn new(
subscription_manager: Arc<SubscriptionManager>,
event_sender: UnboundedSender<EnrichedEvent>,
firewall_coordinator: Option<Arc<FirewallDetectionCoordinator>>,
) -> Self
pub fn new( subscription_manager: Arc<SubscriptionManager>, event_sender: UnboundedSender<EnrichedEvent>, firewall_coordinator: Option<Arc<FirewallDetectionCoordinator>>, ) -> Self
Create a new event processor
Sourcepub async fn process_upnp_notification(
&self,
payload: NotificationPayload,
) -> EventProcessingResult<()>
pub async fn process_upnp_notification( &self, payload: NotificationPayload, ) -> EventProcessingResult<()>
Process a UPnP notification payload from the callback server
Sourcepub async fn process_polling_event(
&self,
event: EnrichedEvent,
) -> EventProcessingResult<()>
pub async fn process_polling_event( &self, event: EnrichedEvent, ) -> EventProcessingResult<()>
Process a synthetic event from polling (already enriched)
Sourcepub async fn process_resync_event(
&self,
event: EnrichedEvent,
) -> EventProcessingResult<()>
pub async fn process_resync_event( &self, event: EnrichedEvent, ) -> EventProcessingResult<()>
Process a resync event (already enriched)
Sourcepub async fn start_upnp_processing(
&self,
upnp_receiver: UnboundedReceiver<NotificationPayload>,
)
pub async fn start_upnp_processing( &self, upnp_receiver: UnboundedReceiver<NotificationPayload>, )
Start processing UPnP events from the callback server
Sourcepub async fn start_polling_processing(
&self,
polling_receiver: UnboundedReceiver<EnrichedEvent>,
)
pub async fn start_polling_processing( &self, polling_receiver: UnboundedReceiver<EnrichedEvent>, )
Start processing polling events
Sourcepub async fn start_resync_processing(
&self,
resync_receiver: UnboundedReceiver<EnrichedEvent>,
)
pub async fn start_resync_processing( &self, resync_receiver: UnboundedReceiver<EnrichedEvent>, )
Start processing resync events
Sourcepub async fn stats(&self) -> EventProcessorStats
pub async fn stats(&self) -> EventProcessorStats
Get event processor statistics
Sourcepub fn supported_services(&self) -> Vec<Service>
pub fn supported_services(&self) -> Vec<Service>
Get list of supported service types
Sourcepub fn is_service_supported(&self, service: &Service) -> bool
pub fn is_service_supported(&self, service: &Service) -> bool
Check if a service type is supported
Auto Trait Implementations§
impl Freeze for EventProcessor
impl !RefUnwindSafe for EventProcessor
impl Send for EventProcessor
impl Sync for EventProcessor
impl Unpin for EventProcessor
impl UnsafeUnpin for EventProcessor
impl !UnwindSafe for EventProcessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more