pub struct SubscriptionManager { /* private fields */ }Expand description
Manages subscriptions for registered speaker/service pairs
Implementations§
Source§impl SubscriptionManager
impl SubscriptionManager
Sourcepub async fn set_firewall_status(&self, status: FirewallStatus)
pub async fn set_firewall_status(&self, status: FirewallStatus)
Set the firewall status (called by firewall detection system)
Sourcepub async fn firewall_status(&self) -> FirewallStatus
pub async fn firewall_status(&self) -> FirewallStatus
Get the current firewall status
Sourcepub async fn create_subscription(
&self,
registration_id: RegistrationId,
pair: SpeakerServicePair,
) -> SubscriptionResult<Arc<ManagedSubscriptionWrapper>>
pub async fn create_subscription( &self, registration_id: RegistrationId, pair: SpeakerServicePair, ) -> SubscriptionResult<Arc<ManagedSubscriptionWrapper>>
Create a subscription for a speaker/service pair
Sourcepub async fn remove_subscription(
&self,
registration_id: RegistrationId,
) -> SubscriptionResult<()>
pub async fn remove_subscription( &self, registration_id: RegistrationId, ) -> SubscriptionResult<()>
Remove a subscription
Sourcepub async fn get_subscription(
&self,
registration_id: RegistrationId,
) -> Option<Arc<ManagedSubscriptionWrapper>>
pub async fn get_subscription( &self, registration_id: RegistrationId, ) -> Option<Arc<ManagedSubscriptionWrapper>>
Get a subscription by registration ID
Sourcepub async fn get_subscription_by_sid(
&self,
subscription_id: &str,
) -> Option<Arc<ManagedSubscriptionWrapper>>
pub async fn get_subscription_by_sid( &self, subscription_id: &str, ) -> Option<Arc<ManagedSubscriptionWrapper>>
Get subscription by UPnP subscription ID (for event routing)
Sourcepub async fn list_subscriptions(&self) -> Vec<Arc<ManagedSubscriptionWrapper>>
pub async fn list_subscriptions(&self) -> Vec<Arc<ManagedSubscriptionWrapper>>
List all active subscriptions
Sourcepub async fn check_renewals(&self) -> SubscriptionResult<usize>
pub async fn check_renewals(&self) -> SubscriptionResult<usize>
Check for subscriptions that need renewal and renew them
Sourcepub async fn record_event_received(&self, subscription_id: &str)
pub async fn record_event_received(&self, subscription_id: &str)
Record that an event was received for a subscription
Sourcepub async fn stats(&self) -> SubscriptionStats
pub async fn stats(&self) -> SubscriptionStats
Get statistics about managed subscriptions
Sourcepub async fn shutdown(&self) -> SubscriptionResult<()>
pub async fn shutdown(&self) -> SubscriptionResult<()>
Shutdown all subscriptions
Auto Trait Implementations§
impl Freeze for SubscriptionManager
impl !RefUnwindSafe for SubscriptionManager
impl Send for SubscriptionManager
impl Sync for SubscriptionManager
impl Unpin for SubscriptionManager
impl UnsafeUnpin for SubscriptionManager
impl !UnwindSafe for SubscriptionManager
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