From cdef4814e789cdad3842e4fa6f05726e5ecf472c Mon Sep 17 00:00:00 2001 From: pjh9216 Date: Wed, 20 Jul 2022 01:14:42 -0400 Subject: [PATCH] Add internal API (#4427) - Add Bundle.ImportFromArgv() Signed-off-by: jh9216.park --- src/Tizen.Applications.Common/Interop/Interop.Bundle.cs | 3 +++ src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/src/Tizen.Applications.Common/Interop/Interop.Bundle.cs b/src/Tizen.Applications.Common/Interop/Interop.Bundle.cs index 65c314a..0d872df 100644 --- a/src/Tizen.Applications.Common/Interop/Interop.Bundle.cs +++ b/src/Tizen.Applications.Common/Interop/Interop.Bundle.cs @@ -68,6 +68,9 @@ internal static partial class Interop [DllImport(Libraries.Bundle, EntryPoint = "bundle_dup")] internal static extern SafeBundleHandle DangerousClone(IntPtr handle); + [DllImport(Libraries.Bundle, EntryPoint = "bundle_import_from_argv")] + internal static extern SafeBundleHandle ImportFromArgv(int argc, string[] argv); + internal static class UnsafeCode { internal static unsafe int AddItem(SafeBundleHandle handle, string key, byte[] value, int offset, int count) diff --git a/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs b/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs index 94592a7..791cfad 100644 --- a/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs @@ -20,6 +20,7 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using Tizen.Internals.Errors; +using System.ComponentModel; namespace Tizen.Applications { @@ -711,6 +712,13 @@ namespace Tizen.Applications } } + [EditorBrowsable(EditorBrowsableState.Never)] + public static Bundle ImportFromArgv(string[] argv) + { + var ret = Interop.Bundle.ImportFromArgv(argv.Length, argv); + return new Bundle(ret); + } + /// /// Destructor of the bundle class. /// -- 2.7.4