Revert "Add Test cases for app shortcut, managedapps"
[profile/tv/apps/dotnet/home.git] / LibTVRefCommonPortable / Utils / IApplicationManagerAPIs.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (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
7  *
8  *     http://floralicense.org/license/
9  *
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.
15  */
16
17 using System;
18 using System.Collections.Generic;
19 using System.Threading.Tasks;
20
21 namespace LibTVRefCommonPortable.Utils
22 {
23     /// <summary>
24     /// A class to store RecentApp information.
25     /// </summary>
26     public class RecentApp
27     {
28         /// <summary>
29         /// A Recent instance ID
30         /// </summary>
31         public String InstanceID;
32
33         /// <summary>
34         /// A Recent instance label
35         /// </summary>
36         public String InstanceLabel;
37
38         /// <summary>
39         /// An app ID
40         /// </summary>
41         public String AppID;
42
43         /// <summary>
44         /// An app label
45         /// </summary>
46         public String Applabel;
47
48         /// <summary>
49         /// An app icon path
50         /// </summary>
51         public String IconPath;
52
53         /// <summary>
54         /// A last launched data
55         /// </summary>
56         public DateTime LaunchedTime;
57
58         /// <summary>
59         /// A URI of accessible content if the Recent is a content.
60         /// </summary>
61         public String Uri;
62
63         /// <summary>
64         /// A File Path of screenshot of the recent app or recent content.
65         /// </summary>
66         public String ScreenShot;
67     }
68
69     /// <summary>
70     /// An interface for Application Manager feature
71     /// </summary>
72     public interface IApplicationManagerAPIs
73     {
74         /// <summary>
75         /// A method provides installed application list.
76         /// </summary>
77         /// <returns>An installed application list</returns>
78         Task<Dictionary<string, string[]>> GetAllInstalledApplication();
79
80         /// <summary>
81         /// A method provides a recent application list.
82         /// </summary>
83         /// <returns>A Recent application list.</returns>
84         IEnumerable<RecentApp> GetRecentApplications();
85
86         /// <summary>
87         /// A method provides application information which is matched with the given app ID.
88         /// </summary>
89         /// <param name="applicationId">An application ID</param>
90         /// <returns>An installed application information</returns>
91         Dictionary<string, string> GetInstalledApplication(string applicationId);
92
93         /// <summary>
94         /// A method for removing all recent applications
95         /// </summary>
96         void DeleteAllRecentApplication();
97
98         /// <summary>
99         /// A method for removing the specified recent application
100         /// </summary>
101         /// <param name="appId">An application ID</param>
102         void DeleteRecentApplication(string appId);
103
104         /// <summary>
105         /// Checks whether application is removable
106         /// </summary>
107         /// <param name="appID">The app ID to get</param>
108         /// <returns>If the application is removable, true; otherwise, false</returns>
109         bool GetAppInfoRemovable(string appID);
110
111         /// <summary>
112         /// Gets the app ID by the app label
113         /// </summary>
114         /// <param name="appLabel">the app label to get</param>
115         /// <returns>the app ID of the app label</returns>
116         Task<string> GetAppIDbyAppLabel(string appLabel);
117     }
118 }