2 * Copyright 2020 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef PC_PEER_CONNECTION_MESSAGE_HANDLER_H_
12 #define PC_PEER_CONNECTION_MESSAGE_HANDLER_H_
17 #include "api/legacy_stats_types.h"
18 #include "api/media_stream_interface.h"
19 #include "api/peer_connection_interface.h"
20 #include "api/rtc_error.h"
21 #include "api/task_queue/pending_task_safety_flag.h"
22 #include "api/task_queue/task_queue_base.h"
23 #include "pc/legacy_stats_collector_interface.h"
27 class PeerConnectionMessageHandler
{
29 explicit PeerConnectionMessageHandler(rtc::Thread
* signaling_thread
)
30 : signaling_thread_(signaling_thread
) {}
31 ~PeerConnectionMessageHandler() = default;
33 void PostSetSessionDescriptionSuccess(
34 SetSessionDescriptionObserver
* observer
);
35 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver
* observer
,
37 void PostCreateSessionDescriptionFailure(
38 CreateSessionDescriptionObserver
* observer
,
40 void PostGetStats(StatsObserver
* observer
,
41 LegacyStatsCollectorInterface
* legacy_stats
,
42 MediaStreamTrackInterface
* track
);
43 void RequestUsagePatternReport(std::function
<void()>, int delay_ms
);
46 ScopedTaskSafety safety_
;
47 TaskQueueBase
* const signaling_thread_
;
52 #endif // PC_PEER_CONNECTION_MESSAGE_HANDLER_H_