-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NUI] Add WebAuthDisplayQR, Response and MediaPermission
- Loading branch information
1 parent
404cc82
commit 4b319dd
Showing
6 changed files
with
331 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/Tizen.NUI/src/internal/Interop/Interop.WebUserMediaPermissionRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright(c) 2021 Samsung Electronics Co., Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
namespace Tizen.NUI | ||
{ | ||
internal static partial class Interop | ||
{ | ||
internal static partial class WebUserMediaPermissionRequest | ||
{ | ||
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_UserMediaPermissionRequest")] | ||
public static extern void Delete(global::System.Runtime.InteropServices.HandleRef webPermission); | ||
|
||
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_UserMediaPermissionRequest_Set")] | ||
public static extern void Set(global::System.Runtime.InteropServices.HandleRef webPermission, bool allowed); | ||
|
||
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_UserMediaPermissionRequest_Suspend")] | ||
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] | ||
public static extern bool Suspend(global::System.Runtime.InteropServices.HandleRef webPermission); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/Tizen.NUI/src/internal/WebView/WebUserMediaPermissionRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright (c) 2024 Samsung Electronics Co., Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using System; | ||
using System.ComponentModel; | ||
|
||
namespace Tizen.NUI | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public class WebUserMediaPermissionRequest : Disposable | ||
{ | ||
internal WebUserMediaPermissionRequest(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) | ||
{ | ||
} | ||
|
||
/// This will not be public opened. | ||
/// <param name="swigCPtr"></param> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) | ||
{ | ||
Interop.WebUserMediaPermissionRequest.Delete(swigCPtr); | ||
} | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
/// <param name="allowed">Allowed or not</param> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public void Set(bool allowed) | ||
{ | ||
Interop.WebUserMediaPermissionRequest.Set(SwigCPtr, allowed); | ||
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); | ||
} | ||
|
||
/// <summary> | ||
/// Suspend certification policy decision. | ||
/// </summary> | ||
/// <returns></returns> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public bool Suspend() | ||
{ | ||
bool ret = Interop.WebUserMediaPermissionRequest.Suspend(SwigCPtr); | ||
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); | ||
return ret; | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
src/Tizen.NUI/src/internal/WebView/WebViewUserMediaPermissionRequestEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (c) 2024 Samsung Electronics Co., Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using System; | ||
using System.ComponentModel; | ||
|
||
namespace Tizen.NUI | ||
{ | ||
/// <summary> | ||
/// Event arguments that | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public class WebViewUserMediaPermissionRequestEventArgs : EventArgs | ||
{ | ||
internal WebViewUserMediaPermissionRequestEventArgs(WebUserMediaPermissionRequest permission, string message) | ||
{ | ||
UserMediaPermissionRequest = permission; | ||
Message = message; | ||
} | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public WebUserMediaPermissionRequest UserMediaPermissionRequest { get; } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public string Message { get; } | ||
|
||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/Tizen.NUI/src/internal/WebView/WebViewWebAuthDisplayQREventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2024 Samsung Electronics Co., Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
using System; | ||
using System.ComponentModel; | ||
|
||
namespace Tizen.NUI | ||
{ | ||
/// <summary> | ||
/// Event arguments that passed via the WebView.WebAuthDisplayQR. | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public class WebViewWebAuthDisplayQREventArgs : EventArgs | ||
{ | ||
internal WebViewWebAuthDisplayQREventArgs(string contents) | ||
{ | ||
Contents = contents; | ||
} | ||
|
||
/// <summary> | ||
/// The string contents to make QR code image in user side. | ||
/// </summary> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public string Contents { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters