Add internal API (#4427)
authorpjh9216 <jh9216.park@samsung.com>
Wed, 20 Jul 2022 05:14:42 +0000 (01:14 -0400)
committerGitHub <noreply@github.com>
Wed, 20 Jul 2022 05:14:42 +0000 (01:14 -0400)
- Add Bundle.ImportFromArgv()

Signed-off-by: jh9216.park <jh9216.park@samsung.com>
src/Tizen.Applications.Common/Interop/Interop.Bundle.cs
src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs

index 65c314a..0d872df 100644 (file)
@@ -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)
index 94592a7..791cfad 100644 (file)
@@ -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);
+        }
+
         /// <summary>
         /// Destructor of the bundle class.
         /// </summary>