livekit_datatrack/lib.rs
1// Copyright 2025 LiveKit, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#![doc = include_str!("../README.md")]
16
17/// Common types for local and remote tracks.
18mod track;
19
20/// Schema and frame encoding metadata for typed tracks.
21mod schema;
22
23/// Local track publication.
24mod local;
25
26/// Remote track subscription.
27mod remote;
28
29/// Application-level frame.
30mod frame;
31
32/// Provider for end-to-end encryption/decryption.
33mod e2ee;
34
35/// Data track packet (DTP) format.
36mod packet;
37
38/// Internal utilities.
39mod utils;
40
41/// Internal error.
42mod error;
43
44/// Public APIs re-exported by client SDKs.
45pub mod api {
46 pub use crate::{error::*, frame::*, local::*, remote::*, schema::*, track::*};
47}
48
49/// Internal APIs used within client SDKs to power data tracks functionality.
50pub mod backend {
51 pub use crate::e2ee::*;
52
53 /// Local track publication
54 pub mod local {
55 pub use crate::local::{events::*, manager::*, proto::*};
56 }
57
58 /// Remote track subscription
59 pub mod remote {
60 pub use crate::remote::{events::*, manager::*, proto::*};
61 }
62}
63
64/// Internal re-export for the fuzzing target.
65#[doc(hidden)]
66#[cfg(feature = "__fuzz")]
67pub mod __fuzz {
68 pub use crate::packet::{Extensions, FrameMarker, Handle, Header, Packet, Timestamp};
69}
70
71#[cfg(feature = "uniffi")]
72uniffi::setup_scaffolding!();