namespace LibTVRefCommonPortable.Models
{
+ /// <summary>
+ /// A class provides Application related information to ViewModel.
+ /// The TVHome shows the Pinned app list when the App Home Menu is pressed,
+ /// by invoking AppShortcutController's api to retrive the pinned app list.
+ /// The TVApps shows the installed Tizen UI apps in the main screen.
+ /// To provides the installed apps, the TVApps invokes a AppShortcutController's api.
+ /// </summary>
public class AppShortcutController
{
+ /// <summary>
+ /// A default app icon for no icon applications.
+ /// </summary>
private static String DefaultAppIcon = "AppIcon.png";
- public AppShortcutController()
- {
-
- }
-
+ /// <summary>
+ /// A method provides installed app list.
+ /// The returned app list has only Tizen UI apps not the system app or no display apps.
+ /// </summary>
+ /// <returns>A installed app list.</returns>
public async Task<IEnumerable<AppShortcutInfo>> GetInstalledApps()
{
IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();
return appShortcutInfoList;
}
+ /// <summary>
+ /// A method prepends a All Apps Shortcut and a MediaHub Shortcut in the given App Shortcut list.
+ /// Actually this method is used for making the Pinned App Shortcut panel of the TVHome
+ /// </summary>
+ /// <seealso cref="GetDefaultShortcuts"/>
+ /// <seealso cref="GetPinnedAppsWithDefaultShortcuts"/>
+ /// <param name="returnPinnedAppsInfo">A App Shortcut list contains the additional Shortcuts.</param>
private void AddAllAppsAndMediaHubShortcut(ref List<ShortcutInfo> returnPinnedAppsInfo)
{
var allAppsStateDescription = new StateDescription()
returnPinnedAppsInfo.Insert(1, mediaHubShortcutInfo);
}
+ /// <summary>
+ /// A method appends a Add Pin Shortcut in the given App Shortcut list.
+ /// </summary>
+ /// <seealso cref="GetDefaultShortcuts"/>
+ /// <seealso cref="GetPinnedAppsWithDefaultShortcuts"/>
+ /// <param name="returnPinnedAppsInfo">A App Shortcut list contains the additional Shortcuts.</param>
private void AppendAddPinShortcut(ref List<ShortcutInfo> returnPinnedAppsInfo)
{
var addPinStateDescription = new StateDescription()
returnPinnedAppsInfo.Add(addPinShortcutInfo);
}
+ /// <summary>
+ /// A method provides Pinned App Shrotcut list by retriving from the AppShortcutStorage.
+ /// This method provides only the Pinned App Shortcut list not including any additional Shortcuts
+ /// such as the All Apps, the Media Hub, and the Add Pin.
+ /// </summary>
+ /// <returns>A Pinned App Shortcut list.</returns>
private async Task<List<ShortcutInfo>> GetPinnedApps()
{
IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();
return returnPinnedAppsInfo;
}
+ /// <summary>
+ /// A method provides a App Shortcut list which contains default App Shortcuts
+ /// such as the All Apps, the Media Hub, and the Add Pin.
+ /// </summary>
+ /// <returns>A default App Shortcut list.</returns>
public IEnumerable<ShortcutInfo> GetDefaultShortcuts()
{
List<ShortcutInfo> returnPinnedAppsInfo = new List<ShortcutInfo>();
return returnPinnedAppsInfo;
}
+ /// <summary>
+ /// A method provides the App Shortcut list with the default App Shortcut icons.
+ /// The pinned apps, the All Apps, the MediaHub, and the Add Pin are included in the return App Shortcut list.
+ /// </summary>
+ /// <returns>App Shortcut list.</returns>
public async Task<IEnumerable<ShortcutInfo>> GetPinnedAppsWithDefaultShortcuts()
{
List<ShortcutInfo> returnPinnedAppsInfo = await GetPinnedApps();
return returnPinnedAppsInfo;
}
+ /// <summary>
+ /// A method provides only pinned app's app ID as a hashtable.
+ /// </summary>
+ /// <returns>A hashtable includes pinned app's app ID.</returns>
public async Task<Dictionary<string, string>> GetPinnedAppsAppIDs()
{
IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();
return pinnedAppsDictionary;
}
+ /// <summary>
+ /// A method updates the pinned App list by using the AppShortcutStorage.
+ /// </summary>
+ /// <param name="pinnedAppsInfo">A pinned app list.</param>
public void UpdatePinnedApps(IEnumerable<AppShortcutInfo> pinnedAppsInfo)
{
AppShortcutStorage.Write(pinnedAppsInfo);
}
+ /// <summary>
+ /// A listener to get notification of the AppShortcutStorage.
+ /// </summary>
+ /// <param name="eventListener">A Event Handler for the nofication of AppShortutStorage.</param>
public void AddFileSystemChangedListener(EventHandler<EventArgs> eventListener)
{
if (AppShortcutStorage.Instance != null)
{
- AppShortcutStorage.Instance.AddFileSystemChangedListener(eventListener);
+ AppShortcutStorage.Instance.AddStorageChangedListener(eventListener);
}
else
{
* limitations under the License.
*/
-using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Threading.Tasks;
using LibTVRefCommonPortable.DataModels;
using LibTVRefCommonPortable.Utils;
namespace LibTVRefCommonPortable.Models
{
+ /// <summary>
+ /// A class provides Recent Shortcut information to the ViewModel
+ /// The Recent Shortcut can be a app which is recently used and
+ /// a content which is recently consumed in the TV.
+ /// </summary>
public class RecentShortcutController
{
+ /// <summary>
+ /// A constructor
+ /// </summary>
public RecentShortcutController()
{
}
+ /// <summary>
+ /// A method removes a Recent Shortcut.
+ /// </summary>
+ /// <param name="history">a Recent Shortcut to be removed.</param>
public void Remove(RecentShortcutInfo history)
{
RecentShortcutStorage.Delete(history);
}
+ /// <summary>
+ /// A method revmoes all Recent Shortcuts.
+ /// </summary>
public void RemoveAll()
{
RecentShortcutStorage.DeleteAll();
}
+ /// <summary>
+ /// A method updates Recent Shortcut.
+ /// </summary>
+ /// <param name="shortcut">A Recent Shortcut to be updated.</param>
+ /// <returns>A Status of Update</returns>
public bool Update(RecentShortcutInfo shortcut)
{
- RecentShortcutStorage.Update(shortcut);
- return false;
+ return RecentShortcutStorage.Update(shortcut);
}
+ /// <summary>
+ /// A method provides a Recent Shortcut list.
+ /// </summary>
+ /// <returns>A Recnet Shortcut list.</returns>
public IEnumerable<RecentShortcutInfo> GetList()
{
IApplicationManagerAPIs applicationManagerPort = DependencyService.Get<IApplicationManagerAPIs>();
* limitations under the License.
*/
-using System;
-using System.Collections;
using System.Collections.Generic;
using LibTVRefCommonPortable.DataModels;
namespace LibTVRefCommonPortable.Models
{
+ /// <summary>
+ /// A class provides Settings Shortcut information.
+ /// </summary>
public class SettingShortcutController
{
+ /// <summary>
+ /// A Setting Shortcut list.
+ /// </summary>
private List<ShortcutInfo> settingShortcutList = new List<ShortcutInfo>();
+ /// <summary>
+ /// A Constructor
+ /// Set dedicated Settings to be displayed in the TVHome.
+ /// </summary>
public SettingShortcutController()
{
// TODO : read from file!!!
// TODO : Provides list of SettingShortcuts
}
+ /// <summary>
+ /// A method provides Setting Shortcut list.
+ /// </summary>
+ /// <returns>A Setting Shortcut list.</returns>
public IEnumerable<ShortcutInfo> GetList()
{
return new List<ShortcutInfo>(settingShortcutList);