diff --git a/dev/AppNotifications/AppNotification.cpp b/dev/AppNotifications/AppNotification.cpp index d1a15aec90..1ef5852a4c 100644 --- a/dev/AppNotifications/AppNotification.cpp +++ b/dev/AppNotifications/AppNotification.cpp @@ -4,6 +4,7 @@ #include "pch.h" #include "AppNotification.h" #include "Microsoft.Windows.AppNotifications.AppNotification.g.cpp" +#include "AppNotificationConferencingConfig.h" using namespace winrt::Windows::Data::Xml::Dom; diff --git a/dev/AppNotifications/AppNotificationBuilder/AppNotificationBuilder.cpp b/dev/AppNotifications/AppNotificationBuilder/AppNotificationBuilder.cpp index d74afdf2e9..aadcb00623 100644 --- a/dev/AppNotifications/AppNotificationBuilder/AppNotificationBuilder.cpp +++ b/dev/AppNotifications/AppNotificationBuilder/AppNotificationBuilder.cpp @@ -9,6 +9,7 @@ #include #include "Microsoft.Windows.AppNotifications.Builder.AppNotificationBuilder.g.cpp" #include "AppNotificationBuilderUtility.h" +#include "AppNotificationConferencingConfig.h" #include #include #include @@ -403,7 +404,7 @@ namespace winrt::Microsoft::Windows::AppNotifications::Builder::implementation winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::AddCameraPreview() { - THROW_HR_IF(E_NOTIMPL, !AppNotificationConferencingConfig::IsCallingPreviewSupported()); + THROW_HR_IF(E_NOTIMPL, !winrt::Microsoft::Windows::AppNotifications::implementation::AppNotificationConferencingConfig::IsCallingPreviewSupported()); THROW_HR_IF_MSG(E_INVALIDARG, m_useCameraPreview, "CameraPreview element is already added, only one is allowed"); diff --git a/dev/AppNotifications/AppNotificationBuilder/AppNotificationButton.cpp b/dev/AppNotifications/AppNotificationBuilder/AppNotificationButton.cpp index b78e592841..cd151774c4 100644 --- a/dev/AppNotifications/AppNotificationBuilder/AppNotificationButton.cpp +++ b/dev/AppNotifications/AppNotificationBuilder/AppNotificationButton.cpp @@ -7,6 +7,7 @@ #include "Microsoft.Windows.AppNotifications.Builder.AppNotificationButton.g.cpp" #include #include "AppNotificationBuilderUtility.h" +#include "AppNotificationConferencingConfig.h" #include "AppNotificationBuilderTelemetry.h" namespace winrt::Microsoft::Windows::AppNotifications::Builder::implementation @@ -138,7 +139,7 @@ namespace winrt::Microsoft::Windows::AppNotifications::Builder::implementation winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationButton AppNotificationButton::SetSettingStyle(AppNotificationButtonSettingStyle const& value) { - THROW_HR_IF(E_NOTIMPL, !AppNotificationConferencingConfig::IsCallingPreviewSupported()); + THROW_HR_IF(E_NOTIMPL, !winrt::Microsoft::Windows::AppNotifications::implementation::AppNotificationConferencingConfig::IsCallingPreviewSupported()); m_settingType = value; return *this; diff --git a/dev/AppNotifications/AppNotificationConferencingConfig.cpp b/dev/AppNotifications/AppNotificationConferencingConfig.cpp index e7e066e44b..043735f9e4 100644 --- a/dev/AppNotifications/AppNotificationConferencingConfig.cpp +++ b/dev/AppNotifications/AppNotificationConferencingConfig.cpp @@ -51,15 +51,3 @@ namespace winrt::Microsoft::Windows::AppNotifications::implementation return isSupported; } } - -// This function (not in the "implementation" namespace) is not defined when the feature is disabled, -// resulting in a linker error. Define the function for that scenario. -#if WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_CALLINGPREVIEWSUPPORT_FEATURE_CALLINGPREVIEWSUPPORT_ENABLED != 1 -namespace winrt::Microsoft::Windows::AppNotifications -{ - bool AppNotificationConferencingConfig::IsCallingPreviewSupported() - { - return false; - } -} -#endif diff --git a/dev/AppNotifications/AppNotificationManager.cpp b/dev/AppNotifications/AppNotificationManager.cpp index bcee2ddfc5..27977cca02 100644 --- a/dev/AppNotifications/AppNotificationManager.cpp +++ b/dev/AppNotifications/AppNotificationManager.cpp @@ -25,6 +25,7 @@ #include #include #include +#include "AppNotificationConferencingConfig.h" #include #include @@ -434,7 +435,7 @@ namespace winrt::Microsoft::Windows::AppNotifications::implementation notification.Payload(), notification.Tag(), notification.Group(), - winrt::AppNotificationConferencingConfig::IsCallingPreviewSupported()) }; + AppNotificationConferencingConfig::IsCallingPreviewSupported()) }; THROW_HR_IF(WPN_E_NOTIFICATION_POSTED, notification.Id() != 0); diff --git a/dev/AppNotifications/NotificationConferencingConfig.cpp b/dev/AppNotifications/NotificationConferencingConfig.cpp index d8ef87aa00..551169dedb 100644 --- a/dev/AppNotifications/NotificationConferencingConfig.cpp +++ b/dev/AppNotifications/NotificationConferencingConfig.cpp @@ -26,7 +26,7 @@ STDMETHODIMP NotificationConferencingConfig::get_AudioInputDeviceId(_Out_ HSTRIN winrt::copy_to_abi(m_conferencingConfig.AudioInputDeviceId(), reinterpret_cast(value)); return S_OK; } -CATCH_RETURN() +CATCH_RETURN() STDMETHODIMP NotificationConferencingConfig::get_AudioOutputDeviceId(_Out_ HSTRING* value) noexcept try diff --git a/dev/AppNotifications/NotificationProperties.cpp b/dev/AppNotifications/NotificationProperties.cpp index 2dfe21f253..ce969a3737 100644 --- a/dev/AppNotifications/NotificationProperties.cpp +++ b/dev/AppNotifications/NotificationProperties.cpp @@ -50,7 +50,7 @@ NotificationProperties::NotificationProperties(winrt::AppNotification const& toa m_toastProgressData = winrt::make_self(toastNotification.Progress()); } - if (winrt::AppNotificationConferencingConfig::IsCallingPreviewSupported()) + if (winrt::implementation::AppNotificationConferencingConfig::IsCallingPreviewSupported()) { if (auto config = toastNotification.ConferencingConfig()) {