Add RTC_EXPORT to symbols imported by CRD

Bug: chromium:1291247
Change-Id: Ia7420f8305f1c52d255429c49e99f3b898534a60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290660
Commit-Queue: Salman Malik <salmanmalik@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39061}
This commit is contained in:
Salman 2023-01-10 18:07:20 +00:00 committed by WebRTC LUCI CQ
parent bfc26c65e6
commit 154cbea357
7 changed files with 45 additions and 22 deletions

View file

@ -23,9 +23,10 @@
namespace webrtc { namespace webrtc {
class BaseCapturerPipeWire : public DesktopCapturer, class RTC_EXPORT BaseCapturerPipeWire
public DelegatedSourceListController, : public DesktopCapturer,
public ScreenCastPortal::PortalNotifier { public DelegatedSourceListController,
public ScreenCastPortal::PortalNotifier {
public: public:
// Returns whether or not the current system can support capture via PipeWire. // Returns whether or not the current system can support capture via PipeWire.
// This will only be true on Wayland systems that also have PipeWire // This will only be true on Wayland systems that also have PipeWire

View file

@ -35,7 +35,7 @@ using SessionClosedSignalHandler = void (*)(GDBusConnection*,
// Note: downstream clients inherit from this class so it is advisable to // Note: downstream clients inherit from this class so it is advisable to
// provide a default implementation of any new virtual methods that may be added // provide a default implementation of any new virtual methods that may be added
// to this class. // to this class.
class ScreenCapturePortalInterface { class RTC_EXPORT ScreenCapturePortalInterface {
public: public:
virtual ~ScreenCapturePortalInterface() {} virtual ~ScreenCapturePortalInterface() {}
// Gets details about the session such as session handle. // Gets details about the session such as session handle.

View file

@ -23,7 +23,8 @@
namespace webrtc { namespace webrtc {
class ScreenCastPortal : public xdg_portal::ScreenCapturePortalInterface { class RTC_EXPORT ScreenCastPortal
: public xdg_portal::ScreenCapturePortalInterface {
public: public:
using ProxyRequestResponseHandler = void (*)(GObject* object, using ProxyRequestResponseHandler = void (*)(GObject* object,
GAsyncResult* result, GAsyncResult* result,

View file

@ -111,6 +111,7 @@ if ((is_linux || is_chromeos) && rtc_use_pipewire) {
"../../rtc_base:checks", "../../rtc_base:checks",
"../../rtc_base:logging", "../../rtc_base:logging",
"../../rtc_base:sanitizer", "../../rtc_base:sanitizer",
"../../rtc_base/system:rtc_export",
] ]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ] absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]

View file

@ -12,6 +12,13 @@
namespace webrtc { namespace webrtc {
template class RTC_EXPORT_TEMPLATE_DEFINE(RTC_EXPORT) Scoped<GError>;
template class RTC_EXPORT_TEMPLATE_DEFINE(RTC_EXPORT) Scoped<char>;
template class RTC_EXPORT_TEMPLATE_DEFINE(RTC_EXPORT) Scoped<GVariant>;
template class RTC_EXPORT_TEMPLATE_DEFINE(RTC_EXPORT) Scoped<GVariantIter>;
template class RTC_EXPORT_TEMPLATE_DEFINE(RTC_EXPORT) Scoped<GDBusMessage>;
template class RTC_EXPORT_TEMPLATE_DEFINE(RTC_EXPORT) Scoped<GUnixFDList>;
template <> template <>
Scoped<GError>::~Scoped() { Scoped<GError>::~Scoped() {
if (ptr_) { if (ptr_) {

View file

@ -14,6 +14,7 @@
#include <gio/gio.h> #include <gio/gio.h>
#include "rtc_base/checks.h" #include "rtc_base/checks.h"
#include "rtc_base/system/rtc_export_template.h"
namespace webrtc { namespace webrtc {
@ -60,6 +61,16 @@ Scoped<GDBusMessage>::~Scoped();
template <> template <>
Scoped<GUnixFDList>::~Scoped(); Scoped<GUnixFDList>::~Scoped();
extern template class RTC_EXPORT_TEMPLATE_DECLARE(RTC_EXPORT) Scoped<GError>;
extern template class RTC_EXPORT_TEMPLATE_DECLARE(RTC_EXPORT) Scoped<char>;
extern template class RTC_EXPORT_TEMPLATE_DECLARE(RTC_EXPORT) Scoped<GVariant>;
extern template class RTC_EXPORT_TEMPLATE_DECLARE(
RTC_EXPORT) Scoped<GVariantIter>;
extern template class RTC_EXPORT_TEMPLATE_DECLARE(
RTC_EXPORT) Scoped<GDBusMessage>;
extern template class RTC_EXPORT_TEMPLATE_DECLARE(
RTC_EXPORT) Scoped<GUnixFDList>;
} // namespace webrtc } // namespace webrtc
#endif // MODULES_PORTAL_SCOPED_GLIB_H_ #endif // MODULES_PORTAL_SCOPED_GLIB_H_

View file

@ -55,28 +55,30 @@ using SessionStartRequestedHandler = void (*)(GDBusProxy*,
GAsyncResult*, GAsyncResult*,
gpointer); gpointer);
std::string RequestResponseToString(RequestResponse request); RTC_EXPORT std::string RequestResponseToString(RequestResponse request);
RequestResponse RequestResponseFromPortalResponse(uint32_t portal_response); RequestResponse RequestResponseFromPortalResponse(uint32_t portal_response);
// Returns a string path for signal handle based on the provided connection and // Returns a string path for signal handle based on the provided connection and
// token. // token.
std::string PrepareSignalHandle(absl::string_view token, RTC_EXPORT std::string PrepareSignalHandle(absl::string_view token,
GDBusConnection* connection); GDBusConnection* connection);
// Sets up the callback to execute when a response signal is received for the // Sets up the callback to execute when a response signal is received for the
// given object. // given object.
uint32_t SetupRequestResponseSignal(absl::string_view object_path, RTC_EXPORT uint32_t
const GDBusSignalCallback callback, SetupRequestResponseSignal(absl::string_view object_path,
gpointer user_data, const GDBusSignalCallback callback,
GDBusConnection* connection); gpointer user_data,
GDBusConnection* connection);
void RequestSessionProxy(absl::string_view interface_name, RTC_EXPORT void RequestSessionProxy(
const ProxyRequestCallback proxy_request_callback, absl::string_view interface_name,
GCancellable* cancellable, const ProxyRequestCallback proxy_request_callback,
gpointer user_data); GCancellable* cancellable,
gpointer user_data);
void SetupSessionRequestHandlers( RTC_EXPORT void SetupSessionRequestHandlers(
absl::string_view portal_prefix, absl::string_view portal_prefix,
const SessionRequestCallback session_request_callback, const SessionRequestCallback session_request_callback,
const SessionRequestResponseSignalHandler request_response_signale_handler, const SessionRequestResponseSignalHandler request_response_signale_handler,
@ -87,7 +89,7 @@ void SetupSessionRequestHandlers(
guint& session_request_signal_id, guint& session_request_signal_id,
gpointer user_data); gpointer user_data);
void StartSessionRequest( RTC_EXPORT void StartSessionRequest(
absl::string_view prefix, absl::string_view prefix,
absl::string_view session_handle, absl::string_view session_handle,
const StartRequestResponseSignalHandler signal_handler, const StartRequestResponseSignalHandler signal_handler,
@ -100,10 +102,10 @@ void StartSessionRequest(
gpointer user_data); gpointer user_data);
// Tears down the portal session and cleans up related objects. // Tears down the portal session and cleans up related objects.
void TearDownSession(absl::string_view session_handle, RTC_EXPORT void TearDownSession(absl::string_view session_handle,
GDBusProxy* proxy, GDBusProxy* proxy,
GCancellable* cancellable, GCancellable* cancellable,
GDBusConnection* connection); GDBusConnection* connection);
} // namespace xdg_portal } // namespace xdg_portal
} // namespace webrtc } // namespace webrtc