59 using PublicationMap =
60 std::unordered_map<std::string, std::shared_ptr<LocalTrackPublication>>;
61 using TrackMap = std::unordered_map<std::string, std::weak_ptr<Track>>;
77 std::string identity, std::string metadata,
78 std::unordered_map<std::string, std::string> attributes,
79 ParticipantKind kind, DisconnectReason reason);
100 bool reliable =
true,
101 const std::vector<std::string> &destination_identities = {},
102 const std::string &topic = {});
119 void setMetadata(
const std::string &metadata);
120 void setName(
const std::string &name);
122 setAttributes(
const std::unordered_map<std::string, std::string> &attributes);
132 const std::vector<ParticipantTrackPermission>
133 &participant_permissions = {});
150 std::shared_ptr<LocalVideoTrack>
152 const std::shared_ptr<VideoSource> &source,
153 TrackSource track_source);
162 std::shared_ptr<LocalAudioTrack>
164 const std::shared_ptr<AudioSource> &source,
165 TrackSource track_source);
218 performRpc(
const std::string &destination_identity,
const std::string &method,
219 const std::string &payload,
220 const std::optional<double> &response_timeout = std::nullopt);
264 void handleRpcMethodInvocation(std::uint64_t invocation_id,
265 const std::string &method,
266 const std::string &request_id,
267 const std::string &caller_identity,
268 const std::string &payload,
269 double response_timeout);
271 std::shared_ptr<TrackPublication>
272 findTrackPublication(
const std::string &sid)
const override;
279 mutable TrackMap published_tracks_by_sid_;
281 std::unordered_map<std::string, RpcHandler> rpc_handlers_;
286 struct RpcInvocationState {
288 std::condition_variable cv;
289 int active_invocations = 0;
290 bool shutting_down =
false;
292 std::shared_ptr<RpcInvocationState> rpc_state_ =
293 std::make_shared<RpcInvocationState>();