Rename Call::Config to CallConfig, keep old name as alias.
We want api/peerconnectioninterface.h (and corresponding build target)
to not depend on call.h, and generally we treat Call as an internal,
non-api, class. But we need CallFactoryInterface in the api in order to
enable use of PeerConnection with or without support for media.
Making CallConfig a top-level class makes it possible to forward declare
it, together with Call, for use in callfactoryinterface.h and
peerconnectioninterface.h.
Delete the peerconnection_and_implicit_call_api target, replaced by
new target callfactory_api, to link between Call and Peerconnection.
Bug: webrtc:7504
Change-Id: I5e3978ef89bcd6705e94536f8676bcf89fc82fe1
Reviewed-on: https://webrtc-review.googlesource.com/46201
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22020}
diff --git a/api/call/callfactoryinterface.h b/api/call/callfactoryinterface.h
new file mode 100644
index 0000000..a7f3245
--- /dev/null
+++ b/api/call/callfactoryinterface.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2017 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.
+ */
+
+#ifndef API_CALL_CALLFACTORYINTERFACE_H_
+#define API_CALL_CALLFACTORYINTERFACE_H_
+
+#include <memory>
+
+namespace webrtc {
+
+// These classes are not part of the API, and are treated as opaque pointers.
+class Call;
+struct CallConfig;
+
+// This interface exists to allow webrtc to be optionally built without media
+// support (i.e., if only being used for data channels). PeerConnectionFactory
+// is constructed with a CallFactoryInterface, which may or may not be null.
+class CallFactoryInterface {
+ public:
+ virtual ~CallFactoryInterface() {}
+
+ virtual Call* CreateCall(const CallConfig& config) = 0;
+};
+
+std::unique_ptr<CallFactoryInterface> CreateCallFactory();
+
+} // namespace webrtc
+
+#endif // API_CALL_CALLFACTORYINTERFACE_H_