1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Cross-crate event wrapper for rvoip-sip user-facing (API) events.
//!
//! Session API events are published to the `"session_to_app"` channel on the
//! [`GlobalEventCoordinator`](rvoip_infra_common::events::coordinator::GlobalEventCoordinator).
//! Any peer type (StreamPeer, CallbackPeer, or a custom implementation using
//! `UnifiedCoordinator::subscribe_events()`) receives them by subscribing to
//! that channel.
//!
//! The `MonolithicEventBus` inside the coordinator uses a lock-free broadcast channel
//! internally, so multiple subscribers each get an independent, low-latency delivery.
use CrossCrateEvent;
use EventPriority;
use PlaneType;
use Any;
use Arc;
/// Event type identifier for session API events on the global coordinator.
///
/// Subscribe with:
/// ```rust,ignore
/// let mut rx = global_coordinator.subscribe(SESSION_TO_APP_CHANNEL).await?;
/// ```
pub const SESSION_TO_APP_CHANNEL: &str = "session_to_app";
/// Wraps an rvoip-sip [`Event`] for publishing through the
/// [`GlobalEventCoordinator`](rvoip_infra_common::events::coordinator::GlobalEventCoordinator).
///
/// [`Event`]: crate::api::events::Event