Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interfaces for "Enhanced UX Notification for Video and Audio Call Feature" #4783

Merged
merged 16 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added Feature flag in idl interfaces
  • Loading branch information
satkh committed Nov 20, 2024
commit cc00d5209eba28b94dff4cb353c0a6c8b405bb75
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

import "..\AppNotifications\AppNotifications.idl";
#include <TerminalVelocityFeatures-CallingPreviewSupport.h>

namespace Microsoft.Windows.AppNotifications.Builder
{
Expand Down Expand Up @@ -31,7 +32,7 @@ namespace Microsoft.Windows.AppNotifications.Builder
Critical,
};

[contract(AppNotificationBuilderContract, 2)]
[contract(AppNotificationBuilderContract, 2), feature(Feature_CallingPreviewSupport)]
enum AppNotificationButtonSettingStyle
{
None,
Expand Down Expand Up @@ -79,7 +80,7 @@ namespace Microsoft.Windows.AppNotifications.Builder
AppNotificationButton SetInvokeUri(Windows.Foundation.Uri protocolUri, String targetAppId);

// Sets the setting type for the button.
[contract(AppNotificationBuilderContract, 2)]
[contract(AppNotificationBuilderContract, 2), feature(Feature_CallingPreviewSupport)]
AppNotificationButton SetSettingStyle(AppNotificationButtonSettingStyle value);
};

Expand Down Expand Up @@ -256,7 +257,7 @@ namespace Microsoft.Windows.AppNotifications.Builder
AppNotificationBuilder SetGroup(String group);

// Adds a camera preview to the AppNotification
[contract(AppNotificationBuilderContract, 2)]
[contract(AppNotificationBuilderContract, 2), feature(Feature_CallingPreviewSupport)]
AppNotificationBuilder AddCameraPreview();
};
}
5 changes: 3 additions & 2 deletions dev/AppNotifications/AppNotifications.idl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.
import "..\AppLifecycle\AppLifecycle.idl";
#include <TerminalVelocityFeatures-CallingPreviewSupport.h>

namespace Microsoft.Windows.AppNotifications
{
Expand Down Expand Up @@ -113,12 +114,12 @@ namespace Microsoft.Windows.AppNotifications
Boolean SuppressDisplay;

// Gets or sets the Notification Conferencing Config
[contract(AppNotificationsContract, 4)]
[contract(AppNotificationsContract, 4), feature(Feature_CallingPreviewSupport)]
AppNotificationConferencingConfig ConferencingConfig;
}

// The Notification Conferencing Config
[contract(AppNotificationsContract, 4)]
[contract(AppNotificationsContract, 4), feature(Feature_CallingPreviewSupport)]
runtimeclass AppNotificationConferencingConfig
{
// Initializes a new Instance of AppNotificationConferencingConfig
Expand Down
11 changes: 11 additions & 0 deletions dev/Common/TerminalVelocityFeatures-AppNotifications.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,15 @@
<description>Enables Local App sourced Notifications on the device</description>
<state>AlwaysEnabled</state>
</feature>

<feature>
<name>Feature_CallingPreviewSupport</name>
<description>Apis for Calling preview feature</description>
<state>AlwaysEnabled</state>
<alwaysDisabledChannelTokens>
<channelToken>Preview</channelToken>
<channelToken>Stable</channelToken>
</alwaysDisabledChannelTokens>
</feature>

</features>
40 changes: 40 additions & 0 deletions dev/Common/TerminalVelocityFeatures-CallingPreviewSupport.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation and Contributors.
// Licensed under the MIT License.

// THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT IT

// INPUT FILE: C:\code\WinAppSdk\dev\Common\TerminalVelocityFeatures-AppNotifications.xml
// OPTIONS: -Channel Experimental -Language C++ -Namespace Microsoft.Windows.CallingPreviewSupport -Path C:\code\WinAppSdk\dev\Common\TerminalVelocityFeatures-AppNotifications.xml -Output C:\code\WinAppSdk\dev\Common\TerminalVelocityFeatures-CallingPreviewSupport.h

#if defined(__midlrt)
namespace features
{
feature_name Feature_AppNotifications = { DisabledByDefault, FALSE };
feature_name Feature_CallingPreviewSupport = { DisabledByDefault, FALSE };
}
#endif // defined(__midlrt)

// Feature constants
#define WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_CALLINGPREVIEWSUPPORT_FEATURE_APPNOTIFICATIONS_ENABLED 1
#define WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_CALLINGPREVIEWSUPPORT_FEATURE_CALLINGPREVIEWSUPPORT_ENABLED 1

#if defined(__cplusplus)

namespace Microsoft::Windows::CallingPreviewSupport
{

__pragma(detect_mismatch("ODR_violation_WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_CALLINGPREVIEWSUPPORT_FEATURE_APPNOTIFICATIONS_ENABLED_mismatch", "AlwaysEnabled"))
struct Feature_AppNotifications
{
static constexpr bool IsEnabled() { return WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_CALLINGPREVIEWSUPPORT_FEATURE_APPNOTIFICATIONS_ENABLED == 1; }
};

__pragma(detect_mismatch("ODR_violation_WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_CALLINGPREVIEWSUPPORT_FEATURE_CALLINGPREVIEWSUPPORT_ENABLED_mismatch", "AlwaysEnabled"))
struct Feature_CallingPreviewSupport
{
static constexpr bool IsEnabled() { return WINDOWSAPPRUNTIME_MICROSOFT_WINDOWS_CALLINGPREVIEWSUPPORT_FEATURE_CALLINGPREVIEWSUPPORT_ENABLED == 1; }
};

} // namespace Microsoft.Windows.CallingPreviewSupport

#endif // defined(__cplusplus)
Loading