Files
platform-external-webrtc/rtc_base/robo_caller.cc
Lahiru Ginnaliya Gamathige 52fa992ccc Rename CancerStickCastle to RoboCaller.
The name was chosen because just like a real-world robocaller
[https://en.wikipedia.org/wiki/Robocall], webrtc::RoboCaller will
call multiple recipients and give all of them the same message,
without giving them the chance to reply.

Change-Id: Ia95f4543b15b48fa6388a50706e489dfccc19f71
Bug: webrtc:11943
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184621
Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32152}
2020-09-21 19:50:39 +00:00

32 lines
902 B
C++

/*
* Copyright 2020 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "rtc_base/robo_caller.h"
namespace webrtc {
namespace robo_caller_impl {
RoboCallerReceivers::RoboCallerReceivers() = default;
RoboCallerReceivers::~RoboCallerReceivers() = default;
void RoboCallerReceivers::AddReceiverImpl(UntypedFunction* f) {
receivers_.push_back(std::move(*f));
}
void RoboCallerReceivers::Foreach(
rtc::FunctionView<void(UntypedFunction&)> fv) {
for (auto& r : receivers_) {
fv(r);
}
}
} // namespace robo_caller_impl
} // namespace webrtc