From: Geunsun, Lee Date: Tue, 28 Mar 2017 08:55:38 +0000 (+0900) Subject: Add comments for AppControlPort.cs X-Git-Tag: submit/tizen/20170808.015446~151 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51ef72c4d65dd422c148e1908112c5cf8a92795c;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Add comments for AppControlPort.cs Change-Id: Ide881a58fc589f709aaf72f177ffc4c4ca6f9afe --- diff --git a/LibTVRefCommonTizen/Ports/AppControlPort.cs b/LibTVRefCommonTizen/Ports/AppControlPort.cs index 72fca7e..b946580 100644 --- a/LibTVRefCommonTizen/Ports/AppControlPort.cs +++ b/LibTVRefCommonTizen/Ports/AppControlPort.cs @@ -21,33 +21,63 @@ using Tizen.Applications; namespace LibTVRefCommonTizen.Ports { + /// + /// This class is for AppControl API + /// public class AppControlPort : IAppControl { + /// + /// The app ID of TV reference home application + /// // TODO : change application later public static string TVHomeAppID = "org.tizen.example.TVHome.TizenTV"; + + /// + /// The app ID of TV reference apps-tray application + /// public static string TVAppsAppID = "org.tizen.example.TVApps.TizenTV"; + /// + /// This operation is sended from TVHomes to TVApps + /// public static string AddAppOperation = "http://xahome.tizen.org/appcontrol/operation/add_app"; + + /// + /// This operation is sended from TVApps to TVHome + /// public static string AppAddedNotifyOperation = "http://xahome.tizen.org/appcontrol/operation/app_added"; public static string KeyAddedAppID = "AddedAppID"; - public void SendLaunchRequest(string PkgID) + /// + /// Sends the launch request + /// + /// The app ID to explicitly launch + public void SendLaunchRequest(string AppId) { - AppControl appControl = new AppControl(); - - if (PkgID != null) + try { - appControl.ApplicationId = PkgID; + AppControl appControl = new AppControl(); + + if (AppId == null || AppId.Length <= 0) + { + DebuggingUtils.Err("The AppID is null or black"); + return; + } + + appControl.ApplicationId = AppId; + + AppControl.SendLaunchRequest(appControl); } - else + catch (InvalidOperationException) { - appControl.ApplicationId = "org.tizen.settings"; + DebuggingUtils.Err("Failed to create AppControl"); } - - AppControl.SendLaunchRequest(appControl); } + /// + /// Sends the 'Add PIN apps' operation to TV Apps + /// public void SendAddAppRequestToApps() { AppControl appControl = new AppControl() @@ -58,6 +88,10 @@ namespace LibTVRefCommonTizen.Ports AppControl.SendLaunchRequest(appControl); } + /// + /// Sends the pinned app ID to TV Home + /// + /// The app ID to add PIN list int the TV Home public void SendAppAddedNotificationToHome(string addedAddID) { AppControl appControl = new AppControl()