From: cskim Date: Wed, 29 Mar 2017 08:07:31 +0000 (+0900) Subject: Add comments for Utils X-Git-Tag: submit/tizen/20170808.015446~136 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=612d3788b66c89c0a957bc4630ed1f90dc4574e7;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Add comments for Utils Change-Id: I1bed69d4db57e92feb5cf3431adfef4df3b7a533 --- diff --git a/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs index 625617d..b7dea14 100644 --- a/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs +++ b/LibTVRefCommonPortable/DataModels/AppShortcutInfo.cs @@ -203,7 +203,8 @@ namespace LibTVRefCommonPortable.DataModels public Command OptionMenuDeleteCommand { get; set; } /// - /// A initializer. + /// A Constructor. + /// Initializes AppShortcutInfo. /// public AppShortcutInfo() { diff --git a/LibTVRefCommonPortable/DataModels/BTSettingShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/BTSettingShortcutInfo.cs index a69f921..35e8939 100644 --- a/LibTVRefCommonPortable/DataModels/BTSettingShortcutInfo.cs +++ b/LibTVRefCommonPortable/DataModels/BTSettingShortcutInfo.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; namespace LibTVRefCommonPortable.DataModels { diff --git a/LibTVRefCommonPortable/DataModels/FileSystemEventCustomArgs.cs b/LibTVRefCommonPortable/DataModels/FileSystemEventCustomArgs.cs index 5ae5aba..b608ea9 100644 --- a/LibTVRefCommonPortable/DataModels/FileSystemEventCustomArgs.cs +++ b/LibTVRefCommonPortable/DataModels/FileSystemEventCustomArgs.cs @@ -38,13 +38,13 @@ namespace LibTVRefCommonPortable.DataModels /// /// Gets the type of directory event that occurred. - /// One of the System.IO.WatcherChangeTypes values that represents the kind of change + /// One of the System.IO.WatcherChangeTypes values that represents the kind of change /// detected in the file system. /// public WatcherType ChangeType { set; get; } /// - /// Gets the fully qualifed path of the affected file or directory. + /// Gets the fully qualified path of the affected file or directory. /// The path of the affected file or directory. /// public string FullPath { set; get; } diff --git a/LibTVRefCommonPortable/DataModels/ShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/ShortcutInfo.cs index 58d14e7..07389be 100644 --- a/LibTVRefCommonPortable/DataModels/ShortcutInfo.cs +++ b/LibTVRefCommonPortable/DataModels/ShortcutInfo.cs @@ -109,7 +109,7 @@ namespace LibTVRefCommonPortable.DataModels /// /// A method executes a action. - /// After execution of the action, status will be changed if returned status is avaiable. + /// After execution of the action, status will be changed if returned status is available. /// A result of action invocation. public bool DoAction() { diff --git a/LibTVRefCommonPortable/DataModels/WiFiLaunchAction.cs b/LibTVRefCommonPortable/DataModels/WiFiLaunchAction.cs index 6c67e50..89b6c50 100644 --- a/LibTVRefCommonPortable/DataModels/WiFiLaunchAction.cs +++ b/LibTVRefCommonPortable/DataModels/WiFiLaunchAction.cs @@ -14,14 +14,13 @@ * limitations under the License. */ -using System; using LibTVRefCommonPortable.Utils; using Xamarin.Forms; namespace LibTVRefCommonPortable.DataModels { /// - /// A Actionto shows a WiFi settings + /// A Action to shows a WiFi settings /// class WiFiLaunchAction : IAction { diff --git a/LibTVRefCommonPortable/DataModels/WiFiSettingShortcutInfo.cs b/LibTVRefCommonPortable/DataModels/WiFiSettingShortcutInfo.cs index 3a38e7f..2cd402d 100644 --- a/LibTVRefCommonPortable/DataModels/WiFiSettingShortcutInfo.cs +++ b/LibTVRefCommonPortable/DataModels/WiFiSettingShortcutInfo.cs @@ -19,16 +19,16 @@ using System; namespace LibTVRefCommonPortable.DataModels { /// - /// A class represnts the WiFi setting Shortcut. + /// A class represents the WiFi setting Shortcut. /// public class WiFiSettingShortcutInfo : ShortcutInfo { /// - /// A method initailizes the status of a Shortcut. + /// A method initializes the status of a Shortcut. /// public override void UpdateState() { - // 1. Check Current Wi-Fi Status. + // 1. Check Current WiFi Status. // 2. Set Description SetCurrentState("off"); diff --git a/LibTVRefCommonPortable/Models/AppShortcutController.cs b/LibTVRefCommonPortable/Models/AppShortcutController.cs index d75ead3..cb95eb8 100755 --- a/LibTVRefCommonPortable/Models/AppShortcutController.cs +++ b/LibTVRefCommonPortable/Models/AppShortcutController.cs @@ -27,9 +27,9 @@ namespace LibTVRefCommonPortable.Models /// /// 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. + /// by invoking AppShortcutController's API to retrieve the pinned app list. + /// The TVApps shows the installed the Tizen UI apps in the main screen. + /// To provides the installed apps, the TVApps invokes a AppShortcutController's API. /// public class AppShortcutController { @@ -79,7 +79,7 @@ namespace LibTVRefCommonPortable.Models } /// - /// A method prepends a All Apps Shortcut and a MediaHub Shortcut in the given App Shortcut list. + /// A method appends a All Apps Shortcut and a MediaHub Shortcut at first in the given App Shortcut list. /// Actually this method is used for making the Pinned App Shortcut panel of the TVHome /// /// @@ -153,7 +153,7 @@ namespace LibTVRefCommonPortable.Models } /// - /// A method provides Pinned App Shrotcut list by retriving from the AppShortcutStorage. + /// A method provides Pinned App Shortcut list by retrieving 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. /// @@ -234,9 +234,9 @@ namespace LibTVRefCommonPortable.Models } /// - /// A method provides only pinned app's app ID as a hashtable. + /// A method provides only pinned app's app ID as a hash table. /// - /// A hashtable includes pinned app's app ID. + /// A hash table includes pinned app's app ID. public async Task> GetPinnedAppsAppIDs() { IApplicationManagerAPIs applicationManagerPort = DependencyService.Get(); @@ -264,7 +264,7 @@ namespace LibTVRefCommonPortable.Models /// /// A listener to get notification of the AppShortcutStorage. /// - /// A Event Handler for the nofication of AppShortutStorage. + /// A Event Handler for the nonfiction of AppShortutStorage. public void AddFileSystemChangedListener(EventHandler eventListener) { if (AppShortcutStorage.Instance != null) diff --git a/LibTVRefCommonPortable/Models/RecentShortcutController.cs b/LibTVRefCommonPortable/Models/RecentShortcutController.cs index 07f67a3..0fcf3aa 100644 --- a/LibTVRefCommonPortable/Models/RecentShortcutController.cs +++ b/LibTVRefCommonPortable/Models/RecentShortcutController.cs @@ -46,7 +46,7 @@ namespace LibTVRefCommonPortable.Models } /// - /// A method revmoes all Recent Shortcuts. + /// A method removes all Recent Shortcuts. /// public void RemoveAll() { @@ -66,7 +66,7 @@ namespace LibTVRefCommonPortable.Models /// /// A method provides a Recent Shortcut list. /// - /// A Recnet Shortcut list. + /// A Recent Shortcut list. public IEnumerable GetList() { IApplicationManagerAPIs applicationManagerPort = DependencyService.Get(); diff --git a/LibTVRefCommonPortable/Utils/AppControlUtils.cs b/LibTVRefCommonPortable/Utils/AppControlUtils.cs index f71bfdd..5ebb287 100644 --- a/LibTVRefCommonPortable/Utils/AppControlUtils.cs +++ b/LibTVRefCommonPortable/Utils/AppControlUtils.cs @@ -18,18 +18,28 @@ using Xamarin.Forms; namespace LibTVRefCommonPortable.Utils { + /// + /// A class provides App Control utility APIs. + /// public sealed class AppControlUtils { - public static void SendLaunchRequest(string PkgID) + /// + /// A method makes the package ID's app to be launched. + /// + /// A package ID of the targeted application. + public static void SendLaunchRequest(string pkgID) { if (DependencyService.Get() == null) { return; } - DependencyService.Get().SendLaunchRequest(PkgID); + DependencyService.Get().SendLaunchRequest(pkgID); } + /// + /// A method sends a add pin request App Control to TVApps app. + /// public static void SendAddAppRequestToApps() { if (DependencyService.Get() == null) @@ -40,6 +50,10 @@ namespace LibTVRefCommonPortable.Utils DependencyService.Get().SendAddAppRequestToApps(); } + /// + /// A method sends a pin added notification App control to TVHome app. + /// + /// A app ID of newly added. public static void SendAppAddedNotificationToHome(string addedAddID) { if (DependencyService.Get() == null) @@ -50,6 +64,9 @@ namespace LibTVRefCommonPortable.Utils DependencyService.Get().SendAppAddedNotificationToHome(addedAddID); } + /// + /// A method terminates caller application. + /// public static void SelfTerminate() { if (DependencyService.Get() == null) diff --git a/LibTVRefCommonPortable/Utils/AppShortcutStorage.cs b/LibTVRefCommonPortable/Utils/AppShortcutStorage.cs index 7c9b13b..7daf948 100644 --- a/LibTVRefCommonPortable/Utils/AppShortcutStorage.cs +++ b/LibTVRefCommonPortable/Utils/AppShortcutStorage.cs @@ -26,25 +26,48 @@ using System.Diagnostics; namespace LibTVRefCommonPortable.Utils { + /// + /// A class manages App Shortcuts by using subsystem. + /// public class AppShortcutStorage { - // TODO : Make this working proeprly, a accessing below directory is not permitted. + /// + /// A storage path. + /// + // TODO : Make this working properly, a accessing below directory is not permitted. // private String storagePath = "/home/owner/apps_rw/TVHome.TizenTV/res/pinned_apps_info.xml"; private static String storagePath = "/opt/usr/home/owner/share/pinned_apps_info.xml"; + /// + /// A file system watcher which checks if the targeted storage is changed. + /// private static IFileSystemWatcherAPIs fileSystemWatcher = DependencyService.Get(); + + /// + /// A instance of AppShortcutStorage. + /// private static AppShortcutStorage instance = new AppShortcutStorage(); + /// + /// A instance of AppShortcutStorage. + /// public static AppShortcutStorage Instance { get { return instance; } } + /// + /// A constructor of AppShortcutStorage. + /// private AppShortcutStorage() { fileSystemWatcher.Run(); } + /// + /// A method provides sample App Shortcuts. + /// + /// a App Shortcut list private static List GetSampleList() { var pinnedAppsInfo = new List(); @@ -77,6 +100,10 @@ namespace LibTVRefCommonPortable.Utils return pinnedAppsInfo; } + /// + /// A method provides a App Shortcut list. + /// + /// A App Shortcut list. public static async Task> Read() { IFileSystemAPIs fileSystem = DependencyService.Get(); @@ -103,7 +130,7 @@ namespace LibTVRefCommonPortable.Utils } await Task.Delay(100); - DebuggingUtils.Dbg("[" + i + "/5] Waiting for Writting" + storagePath); + DebuggingUtils.Dbg("[" + i + "/5] Waiting for Writing" + storagePath); } using (Stream fileStream = fileSystem.OpenFile(storagePath, UtilFileMode.Open)) @@ -118,6 +145,11 @@ namespace LibTVRefCommonPortable.Utils } } + /// + /// A method updates App Shortcuts of the storage + /// + /// A App Shortcuts that pinned by a user. + /// A status of storage update. public static bool Write(IEnumerable pinnedAppInfo) { IFileSystemAPIs fileSystem = DependencyService.Get(); @@ -135,6 +167,10 @@ namespace LibTVRefCommonPortable.Utils return true; } + /// + /// A method sets a event listener for the storage watcher + /// + /// A event handler for the storage event public void AddStorageChangedListener(EventHandler eventListener) { fileSystemWatcher.CustomChanged += eventListener; diff --git a/LibTVRefCommonPortable/Utils/DateUtils.cs b/LibTVRefCommonPortable/Utils/DateUtils.cs index ed81fce..ee36ddb 100644 --- a/LibTVRefCommonPortable/Utils/DateUtils.cs +++ b/LibTVRefCommonPortable/Utils/DateUtils.cs @@ -18,10 +18,20 @@ using System; namespace LibTVRefCommonPortable.Utils { + /// + /// A class provides Date, Time related functions + /// public class DateUtils { + /// + /// A random seed + /// private static Random seed = new Random(); + /// + /// A method provides a random date. + /// + /// A date public static DateTime GetRandomDate() { DateTime baseDate = new DateTime(2015, 1, 1); diff --git a/LibTVRefCommonPortable/Utils/DebuggingUtils.cs b/LibTVRefCommonPortable/Utils/DebuggingUtils.cs index 5f991c3..49208b1 100644 --- a/LibTVRefCommonPortable/Utils/DebuggingUtils.cs +++ b/LibTVRefCommonPortable/Utils/DebuggingUtils.cs @@ -25,7 +25,14 @@ namespace LibTVRefCommonPortable.Utils /// public sealed class DebuggingUtils { + /// + /// A debugging API interface + /// private static IDebuggingAPIs ism; + + /// + /// A instance of DebuggingUtils + /// private static readonly DebuggingUtils instance = new DebuggingUtils(); /// @@ -40,14 +47,29 @@ namespace LibTVRefCommonPortable.Utils /// This is required for the unit testing of the Calculator application. private class DefaultSM : IDebuggingAPIs { + /// + /// A method displays a error log. + /// A error message. + /// A file name. + /// A function name. + /// A line number. public void Dbg(string message, String file, String func, Int32 line) { } + /// + /// A method displays a dialog with a given message. + /// A debugging message. + /// A file name. + /// A function name. + /// A line number. public void Err(string message, String file, String func, Int32 line) { } + /// + /// A method displays a debugging log. + /// A debugging message. public void Popup(string message) { } diff --git a/LibTVRefCommonPortable/Utils/IAppControl.cs b/LibTVRefCommonPortable/Utils/IAppControl.cs index e261a0e..c549066 100644 --- a/LibTVRefCommonPortable/Utils/IAppControl.cs +++ b/LibTVRefCommonPortable/Utils/IAppControl.cs @@ -17,12 +17,26 @@ namespace LibTVRefCommonPortable.Utils { + /// + /// A interface for App Control feature + /// public interface IAppControl { - void SendLaunchRequest(string PkgID); + /// + /// A method makes the package ID's app to be launched. + /// + /// A package ID of the targeted application. + void SendLaunchRequest(string pkgID); + /// + /// A method sends a add pin request App Control to TVApps app. + /// void SendAddAppRequestToApps(); + /// + /// A method sends a pin added notification App control to TVHome app. + /// + /// A app ID of newly added. void SendAppAddedNotificationToHome(string addedAddID); } } diff --git a/LibTVRefCommonPortable/Utils/IAppLifeControl.cs b/LibTVRefCommonPortable/Utils/IAppLifeControl.cs index 44b0f11..149b3ad 100644 --- a/LibTVRefCommonPortable/Utils/IAppLifeControl.cs +++ b/LibTVRefCommonPortable/Utils/IAppLifeControl.cs @@ -16,8 +16,14 @@ namespace LibTVRefCommonPortable.Utils { + /// + /// A Interface for app life management. + /// public interface IAppLifeControl { + /// + /// A method terminates the caller app. + /// void SelfTerminate(); } } diff --git a/LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs b/LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs index 7a8f693..62bfa08 100644 --- a/LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs +++ b/LibTVRefCommonPortable/Utils/IApplicationManagerAPIs.cs @@ -16,27 +16,73 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; namespace LibTVRefCommonPortable.Utils { + /// + /// A class to store RecentApp information. + /// public class RecentApp { + /// + /// A Recent instance ID + /// public String instanceID; + + /// + /// A Recent instance label + /// public String instanceLabel; + + /// + /// A app ID + /// public String appID; + + /// + /// A app label + /// public String applabel; + + /// + /// A app icon path + /// public String iconPath; + + /// + /// A last launched data + /// public DateTime launchedTime; + + /// + /// A URI of accessible content if the Recent is a content. + /// public String uri; } + /// + /// A interface for Application Manager feature + /// public interface IApplicationManagerAPIs { + /// + /// A method provides installed application list. + /// + /// A installed application list Task> GetAllInstalledApplication(); + + /// + /// A method provides a recent application list. + /// + /// A Recent application list. IEnumerable GetRecentApplications(); + + /// + /// A method provides application information which is matched with the given app ID. + /// + /// A application ID + /// A installed application information Dictionary GetInstalledApplication(string applicationId); } } diff --git a/LibTVRefCommonPortable/Utils/IBTAPIs.cs b/LibTVRefCommonPortable/Utils/IBTAPIs.cs index a1781a5..ca0b5f1 100644 --- a/LibTVRefCommonPortable/Utils/IBTAPIs.cs +++ b/LibTVRefCommonPortable/Utils/IBTAPIs.cs @@ -16,12 +16,24 @@ namespace LibTVRefCommonPortable.Utils { + /// + /// A Bluetooth interface. + /// public interface IBTAPIs { + /// + /// A method turns on the Bluetooth + /// void BTOn(); + /// + /// A method turns off the Bluetooth + /// void BTOff(); + /// + /// A method launches BT settings app. + /// void LaunchBTSetting(); } } diff --git a/LibTVRefCommonPortable/Utils/IFileSystemAPIs.cs b/LibTVRefCommonPortable/Utils/IFileSystemAPIs.cs index 63ec132..745f6a7 100644 --- a/LibTVRefCommonPortable/Utils/IFileSystemAPIs.cs +++ b/LibTVRefCommonPortable/Utils/IFileSystemAPIs.cs @@ -23,9 +23,9 @@ using System.IO; namespace LibTVRefCommonPortable.Utils { - // - // 요약: - // 운영 체제에서 파일을 여는 방법을 지정합니다. + /// + /// A enumeration for the file open mode. + /// public enum UtilFileMode { CreateNew = 1, @@ -36,16 +36,43 @@ namespace LibTVRefCommonPortable.Utils Append = 6 } + /// + /// A interface for the file operations + /// public interface IFileSystemAPIs { + /// + /// A method opens a file on the given mode. + /// + /// A file path + /// A opening mode + /// A file descriptor Stream OpenFile(string filePath, UtilFileMode mode); + /// + /// A method flushing the stream to write remains. + /// + /// A file descriptor void Flush(Stream stream); + /// + /// A method closes the file. + /// + /// A file descriptor void CloseFile(Stream stream); - bool IsFileExist(String fileName); + /// + /// A method checks if a file existence in the file system. + /// + /// A file path + /// A existence of the file + bool IsFileExist(String filePath); - bool IsFileReady(String fileName); + /// + /// A method checks if file is read to use. + /// + /// A file path + /// A status of ready + bool IsFileReady(String filePath); } } diff --git a/LibTVRefCommonPortable/Utils/IFileSystemWatcherAPIs.cs b/LibTVRefCommonPortable/Utils/IFileSystemWatcherAPIs.cs index 0e1a5b9..7966e52 100644 --- a/LibTVRefCommonPortable/Utils/IFileSystemWatcherAPIs.cs +++ b/LibTVRefCommonPortable/Utils/IFileSystemWatcherAPIs.cs @@ -15,13 +15,22 @@ */ using System; -using LibTVRefCommonPortable.DataModels; namespace LibTVRefCommonPortable.Utils { + /// + /// A interface for the file system watcher. + /// public interface IFileSystemWatcherAPIs { + /// + /// A EventHandler for the file system watcher. + /// event EventHandler CustomChanged; + + /// + /// A method starts the file system watcher. + /// void Run(); } } diff --git a/LibTVRefCommonPortable/Utils/IPackageManager.cs b/LibTVRefCommonPortable/Utils/IPackageManager.cs index 25b4e89..db05acc 100644 --- a/LibTVRefCommonPortable/Utils/IPackageManager.cs +++ b/LibTVRefCommonPortable/Utils/IPackageManager.cs @@ -14,31 +14,40 @@ * limitations under the License. */ -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace LibTVRefCommonPortable.Utils { /// - /// A interface contains debugging methods which are using platform subsystems. + /// A interface for package manager subsystem. /// - /// - /// Implementing this class should be occurred in platform project. - /// Also the implementation should be registered to the DependencyService in a app initialization. - /// Please refer to Xamarin Dependency Service - /// https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/ - /// public interface IPackageManager { + /// + /// A method provides installed package list. + /// + /// A package list Dictionary GetPackageList(); + /// + /// A method provides a detail information (TBD) + /// + /// A package ID + /// A package label string GetPackage(string PkgID); + /// + /// A method removes the package. + /// + /// A package ID + /// A status of uninstall bool UninstallPackage(string pkgID); + /// + /// A method remove the package by using a app ID. + /// + /// A app ID + /// A status of uninstall bool UninstallPackageByAppID(string appID); } } diff --git a/LibTVRefCommonPortable/Utils/IPlatformNotification.cs b/LibTVRefCommonPortable/Utils/IPlatformNotification.cs index ee2669c..c816f1d 100755 --- a/LibTVRefCommonPortable/Utils/IPlatformNotification.cs +++ b/LibTVRefCommonPortable/Utils/IPlatformNotification.cs @@ -17,18 +17,42 @@ namespace LibTVRefCommonPortable.Utils { + /// + /// A interface for the platform notification. + /// public interface IPlatformNotification { + /// + /// A method will be called when the Home remote control key is pressed. + /// void OnHomeKeyPressed(); + /// + /// A method will be called when the Menu remote control key is pressed. + /// void OnMenuKeyPressed(); + /// + /// A method will be called if a app is installed. + /// + /// A package ID of newly installed. void OnAppInstalled(string pkgID); + /// + /// A method will be called if a app is uninstalled. + /// + /// A package ID of uninstalled. void OnAppUninstalled(string pkgID); + /// + /// A method will be called if the app gets a pin app App Control request. + /// void OnPinAppRequestReceived(); + /// + /// A method will be called if the app gets a app pinned notification App Control request. + /// + /// A pinned app ID void OnAppPinnedNotificationReceived(string appID); } } diff --git a/LibTVRefCommonPortable/Utils/ITVHome.cs b/LibTVRefCommonPortable/Utils/ITVHome.cs index f19ecd4..21aab96 100644 --- a/LibTVRefCommonPortable/Utils/ITVHome.cs +++ b/LibTVRefCommonPortable/Utils/ITVHome.cs @@ -18,18 +18,37 @@ using LibTVRefCommonPortable.Models; namespace LibTVRefCommonPortable.Utils { + /// + /// A interface for the TVHomeImpl class + /// The Models' instances in the TVHomeImpl class, + /// so to use the Models from other files, it should access the instance of the TVHomeImpl. + /// To reduce dependency between the TVHome and any other file, + /// the instance of the TVHomeImpl will be provided as a ITVHome interface. + /// public interface ITVHome { + /// + /// A instance of the AppShortcutController + /// + /// AppShortcutController AppShortcutControllerInstance { get; } + /// + /// A instance of the RecentShortcutController + /// + /// RecentShortcutController RecentShortcutControllerInstance { get; } + /// + /// A instance of the SettingShortcutController + /// + /// SettingShortcutController SettingShortcutControllerInstance { get; diff --git a/LibTVRefCommonPortable/Utils/IWifiAPIs.cs b/LibTVRefCommonPortable/Utils/IWifiAPIs.cs index 5a45de6..32b81cc 100644 --- a/LibTVRefCommonPortable/Utils/IWifiAPIs.cs +++ b/LibTVRefCommonPortable/Utils/IWifiAPIs.cs @@ -16,12 +16,24 @@ namespace LibTVRefCommonPortable.Utils { + /// + /// A class for the WiFi function control + /// public interface IWifiAPIs { + /// + /// A method turns on the WiFi. + /// void WifiOn(); + /// + /// A method turns off the WiFi. + /// void WifiOff(); + /// + /// A method launches the WiFi Settings app. + /// void LaunchWifiSetting(); } } diff --git a/LibTVRefCommonPortable/Utils/IWindowAPIs.cs b/LibTVRefCommonPortable/Utils/IWindowAPIs.cs index 1186c79..0db84f4 100644 --- a/LibTVRefCommonPortable/Utils/IWindowAPIs.cs +++ b/LibTVRefCommonPortable/Utils/IWindowAPIs.cs @@ -16,9 +16,21 @@ namespace LibTVRefCommonPortable.Utils { + /// + /// A interface for the Window management. + /// public interface IWindowAPIs { + /// + /// A method minimizes the app's window. + /// + /// A minimize status void SetIconified(bool iconified); + + /// + /// A method provides a minimized status of the App. + /// + /// A status of minimized of app. bool GetIconified(); } } diff --git a/LibTVRefCommonPortable/Utils/PackageManagerUtils.cs b/LibTVRefCommonPortable/Utils/PackageManagerUtils.cs index 4123e6c..790f7b1 100644 --- a/LibTVRefCommonPortable/Utils/PackageManagerUtils.cs +++ b/LibTVRefCommonPortable/Utils/PackageManagerUtils.cs @@ -14,19 +14,20 @@ * limitations under the License. */ -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using LibTVRefCommonPortable.Utils; using Xamarin.Forms; namespace LibTVRefCommonPortable.Utils { + /// + /// A class for package manager function. + /// public sealed class PackageManagerUtils { + /// + /// A method provides installed package list. + /// + /// A package list public static Dictionary GetPackageList() { if (DependencyService.Get() == null) @@ -37,6 +38,11 @@ namespace LibTVRefCommonPortable.Utils return DependencyService.Get().GetPackageList(); } + /// + /// A method provides a detail information (TBD) + /// + /// A package ID + /// A package label public static string GetPackage(string PkgID) { if (DependencyService.Get() == null) @@ -47,6 +53,11 @@ namespace LibTVRefCommonPortable.Utils return DependencyService.Get().GetPackage(PkgID); } + /// + /// A method removes the package. + /// + /// A package ID + /// A status of uninstall public static bool UninstallPackage(string pkgID) { if (DependencyService.Get() == null) @@ -57,6 +68,11 @@ namespace LibTVRefCommonPortable.Utils return DependencyService.Get().UninstallPackage(pkgID); } + /// + /// A method remove the package by using a app ID. + /// + /// A app ID + /// A status of uninstall public static bool UninstallPackageByAppID(string appID) { if (DependencyService.Get() == null) diff --git a/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs b/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs index adfb8f5..01de300 100644 --- a/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs +++ b/LibTVRefCommonPortable/Utils/RecentShortcutStorage.cs @@ -19,24 +19,36 @@ using LibTVRefCommonPortable.DataModels; namespace LibTVRefCommonPortable.Utils { + /// + /// A class to manage the Recent Shortcuts. + /// public class RecentShortcutStorage { - public RecentShortcutStorage() - { - - } - + /// + /// A method creates the Recent Shortcut. + /// + /// A status of Recent Shortcut creation. public static bool Create() { + // TODO : make a recent content return false; } + /// + /// A method provides a Recent Shortcut information which is matched with the given key. + /// + /// A recent shortcut's ID + /// A Recent Shortcut Infomation public static RecentShortcutInfo Read(string key) { RecentShortcutInfo recentShortcutInfo = new RecentShortcutInfo(); return recentShortcutInfo; } + /// + /// A method provides all Recent Shortcuts' information list. + /// + /// a Recent Shortcut information list. public static IEnumerable Read() { List list = new List(); @@ -44,20 +56,29 @@ namespace LibTVRefCommonPortable.Utils return list; } + /// + /// A method updates a Recent Shortcut. + /// + /// A recent Shortcut + /// A status of update. public static bool Update(ShortcutInfo shortcut) { - // 받은 인자는 조정이 필요함. return false; } + /// + /// A method deletes a Recent Shortcut. + /// + /// A recent Shortcut public static void Delete(ShortcutInfo shortcut) { - // 받은 인자는 조정이 필요함. } + /// + /// A method deletes all Recent Shortcuts. + /// public static void DeleteAll() { - // 받은 인자는 조정이 필요함. } } } diff --git a/LibTVRefCommonPortable/Utils/TVHomeImpl.cs b/LibTVRefCommonPortable/Utils/TVHomeImpl.cs index 060c350..d923053 100644 --- a/LibTVRefCommonPortable/Utils/TVHomeImpl.cs +++ b/LibTVRefCommonPortable/Utils/TVHomeImpl.cs @@ -18,9 +18,25 @@ using LibTVRefCommonPortable.Models; namespace LibTVRefCommonPortable.Utils { + /// + /// A main instance class of the TVHome, TVApps to providing the Model functions. + /// This class is a kind of the Singleton class and includes major Model classes + /// such as the AppShortcutController, the RecentShortcutController, and the SettingShortcutcontroller + /// that are providing major functions related with TVHome, TVApps using scenarios. + /// + /// + /// + /// public class TVHomeImpl : ITVHome { + /// + /// A instance of the TVHomeImpl + /// private static readonly TVHomeImpl instance = new TVHomeImpl(); + + /// + /// A instance of the TVHomeImpl + /// public static ITVHome GetInstance { get @@ -29,11 +45,18 @@ namespace LibTVRefCommonPortable.Utils } } + /// + /// A constructor of TVHomeImpl + /// Initializes Model implementations. + /// private TVHomeImpl() { } + /// + /// A instance of the AppShortcutController + /// private static readonly AppShortcutController appShortcutController = new AppShortcutController(); public AppShortcutController AppShortcutControllerInstance { @@ -43,6 +66,9 @@ namespace LibTVRefCommonPortable.Utils } } + /// + /// A instance of the RecentShortcutController + /// private static readonly RecentShortcutController recentShortcutController = new RecentShortcutController(); public RecentShortcutController RecentShortcutControllerInstance { @@ -52,6 +78,9 @@ namespace LibTVRefCommonPortable.Utils } } + /// + /// A instance of the SettingShortcutController + /// private static readonly SettingShortcutController settingShortcutController = new SettingShortcutController(); public SettingShortcutController SettingShortcutControllerInstance { diff --git a/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk b/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk index ff70832..c07f789 100644 Binary files a/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk and b/TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk differ