2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
21 namespace Tizen.Applications
24 /// This class provides methods and properties to get information of recent application.
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public class RecentApplicationInfo : ApplicationInfo
29 private const string LogTag = "Tizen.Applications";
32 /// Gets the instance id.
34 public string InstanceId { get; private set; }
37 /// Gets the instance Name.
39 public string InstanceName { get; private set; }
42 /// Gets the arguements.
44 public string Arg { get; private set; }
49 public string Uri { get; private set; }
52 /// Gets the launchTime.
54 public DateTime LaunchTime { get; private set; }
57 /// Gets the recent application controller.
59 public RecentApplicationControl Controller { get; private set; }
61 internal RecentApplicationInfo(Interop.ApplicationManager.RuaRec record) : base(Marshal.PtrToStringAnsi(record.pkgName))
63 InstanceId = Marshal.PtrToStringAnsi(record.instanceId);
64 InstanceName = Marshal.PtrToStringAnsi(record.instanceName);
65 Arg = Marshal.PtrToStringAnsi(record.arg);
66 Uri = Marshal.PtrToStringAnsi(record.uri);
67 long seconds = record.launchTime.ToInt64();
68 LaunchTime = new DateTime(1970, 1, 1).AddSeconds(seconds);
69 Controller = new RecentApplicationControl(Marshal.PtrToStringAnsi(record.pkgName));