From cbe3582092b363670753880aabb70b607a192e4d Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Thu, 26 Sep 2024 13:31:08 +0900 Subject: [PATCH 01/31] [ComponentBased.Port] Enhance API descriptions Signed-off-by: Changgyu Choi --- .../ComponentPort.cs | 48 ++++++++++--------- .../ComponentTask.cs | 8 ++-- .../Parcel.cs | 6 +-- .../RequestEventArgs.cs | 2 +- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs index e62d82f764f..274772a4763 100755 --- a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs +++ b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs @@ -43,12 +43,12 @@ public class ComponentPort : IDisposable private static int _requestId = 0; /// - /// Constructor for this class. + /// Constructs a new instance of this class. /// /// Thrown when the argument is invalid. /// Thrown when the memory is insufficient. /// Thrown when because of I/O error. - /// The name of the port. + /// The name of the port to connect to. /// 9 public ComponentPort(string portName) { @@ -66,7 +66,7 @@ public ComponentPort(string portName) /// /// Gets the port name. /// - /// 9 + /// 9 public string PortName { get; @@ -77,7 +77,7 @@ public string PortName /// Adds a privilege to the port object. /// /// Thrown when the argument is invalid. - /// privilege data + /// Privilege data specifying the access rights to be granted. /// 9 public void AddPrivilege(string privilege) { @@ -157,8 +157,8 @@ public static Task WaitForPort(string endpoint) /// /// /// This method runs a main loop until Cancel() is called. - /// The code in the next line will not run until Cancel() is called. - /// To avoid blocking the main thread, it's recommended to use the ComponentTask class. + /// The code in the next line will not execute until Cancel() is called. + /// To prevent blocking the main thread, consider using the ComponentTask class instead. /// /// /// @@ -182,15 +182,19 @@ public void Cancel() } /// - /// Sends the request data. + /// Sends the request data to the specified endpoint. /// + /// + /// This method sends the serialized request data to the specified endpoint. + /// If the timeout value is not set (-1), the default timeout will be used. + /// /// Thrown when the argument is invalid. /// Thrown when the memory is insufficient. /// Thrown when permission is denied. /// Thrown when because of I/O error. - /// The name of the endpoint - /// The timeout in milliseconds, -1 to use the default timeout - /// The serializable data to send + /// The name of the endpoint to which the request is sent. + /// The timeout in milliseconds, -1 to use the default timeout. + /// The serializable data to send. /// 9 public void Send(string endpoint, int timeout, object request) { @@ -222,10 +226,10 @@ public void Send(string endpoint, int timeout, object request) /// Thrown when the memory is insufficient. /// Thrown when permission is denied. /// Thrown when because of I/O error. - /// The name of the endpoint - /// The timeout in milliseconds, -1 to use the default timeout - /// The serializable data to send - /// The received serializable data + /// The name of the endpoint to which the request is sent. + /// The timeout in milliseconds, -1 to use the default timeout. + /// The serializable data to send. + /// The received serializable data. /// 9 public object SendAndReceive(string endpoint, int timeout, object request) { @@ -264,11 +268,11 @@ public object SendAndReceive(string endpoint, int timeout, object request) /// Thrown when the memory is insufficient. /// Thrown when permission is denied. /// Thrown when because of I/O error. - /// The name of the endpoint - /// The timeout in milliseconds, -1 to use the default timeout - /// The serializable data to send - /// The received serializable data - /// /// 9 + /// The name of the endpoint to which the request is sent. + /// The timeout in milliseconds, -1 to use the default timeout. + /// The serializable data to send. + /// The received serializable data. + /// 9 public Task SendAndReceiveAsync(string endpoint, int timeout, object request) { try @@ -285,7 +289,7 @@ public Task SendAndReceiveAsync(string endpoint, int timeout, object req /// Occurs whenever the request is received. /// /// - /// If the reply is requested, RequestEventArgs.Request should be set. + /// The event handler receives a RequestEventArgs argument that contains information about the request. If the reply is requested, RequestEventArgs.Request should be set. /// /// 9 public event EventHandler RequestReceived; @@ -422,7 +426,7 @@ protected virtual void Dispose(bool disposing) } /// - /// Finalizer of the class ComponentPort. + /// Finalizes an instance of the class ComponentPort. /// /// 9 ~ComponentPort() @@ -433,7 +437,7 @@ protected virtual void Dispose(bool disposing) /// /// Releases all the resources used by the class ComponentPort. /// - /// 9 > + /// 9 public void Dispose() { Dispose(disposing: true); diff --git a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentTask.cs b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentTask.cs index 2134be10a4b..9d5bb6c1754 100755 --- a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentTask.cs +++ b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentTask.cs @@ -59,10 +59,10 @@ private void OnThread() /// /// Starts the task. - /// - /// This method calls ComponentPort.WaitForEvent() in the thread. - /// /// + /// + /// This method calls in the thread. + /// /// 9 public void Start() { @@ -81,7 +81,7 @@ public void Start() /// Stops the task. /// /// - /// This method calls ComponentPort.Cancel() before stopping the thread. + /// This method calls before stopping the thread. /// /// 9 public void Stop() diff --git a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/Parcel.cs b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/Parcel.cs index 4f2db8ac6a0..ac10b5e9ef3 100755 --- a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/Parcel.cs +++ b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/Parcel.cs @@ -86,7 +86,7 @@ protected virtual void Dispose(bool disposing) } /// - /// Finalizer of the class Parcel. + /// Finalizes an instance of the Parcel class. /// /// 9 ~Parcel() @@ -97,7 +97,7 @@ protected virtual void Dispose(bool disposing) /// /// Releases all the resources used by the class parcel. /// - /// 9 > + /// 9 public void Dispose() { Dispose(disposing: true); @@ -123,4 +123,4 @@ internal static Exception GetException(Interop.Parcel.ErrorCode err, string mess } } } -} \ No newline at end of file +} diff --git a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/RequestEventArgs.cs b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/RequestEventArgs.cs index 652c9b1577a..c93086ee17b 100755 --- a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/RequestEventArgs.cs +++ b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/RequestEventArgs.cs @@ -19,7 +19,7 @@ namespace Tizen.Applications.ComponentBased { /// - /// Arguments for the event raised when the request is received. + /// The arguments for the event raised when the request is received. /// /// 9 public class RequestEventArgs : EventArgs From 0849af1d9e84d552d0869a7d3e5779df660b554b Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Thu, 26 Sep 2024 13:41:14 +0900 Subject: [PATCH 02/31] Remove wrong spaces Signed-off-by: Changgyu Choi --- .../Tizen.Applications.ComponentBased.Port/ComponentPort.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs index 274772a4763..a0f70d1dec6 100755 --- a/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs +++ b/src/Tizen.Applications.ComponentBased.Port/Tizen.Applications.ComponentBased.Port/ComponentPort.cs @@ -66,7 +66,7 @@ public ComponentPort(string portName) /// /// Gets the port name. /// - /// 9 + /// 9 public string PortName { get; From 4960277acdda62771cea0a64b1683c168ed86e5a Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Thu, 26 Sep 2024 14:20:27 +0900 Subject: [PATCH 03/31] [Applications.Preference] Enhance API descriptions Signed-off-by: Changgyu Choi --- .../Tizen.Applications/Preference.cs | 21 +++++++++++++------ .../PreferenceChangedEventArgs.cs | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Tizen.Applications.Preference/Tizen.Applications/Preference.cs b/src/Tizen.Applications.Preference/Tizen.Applications/Preference.cs index fd5bbc4ef61..99b9280fa22 100755 --- a/src/Tizen.Applications.Preference/Tizen.Applications/Preference.cs +++ b/src/Tizen.Applications.Preference/Tizen.Applications/Preference.cs @@ -21,8 +21,8 @@ namespace Tizen.Applications { /// - /// The preference class provides APIs to store and retrieve an application specific data/preference. A preference is saved in the form of a key-value pair. - /// Keys are always text strings and the value can be any one of the four types: integer, double, string, and boolean. + /// The Preference class provides methods to store and retrieve application specific data/preferences. Preferences are stored in the form of key-value pairs. + /// Key names must be text strings while values can be integers, doubles, strings, or booleans. /// /// 3 public static class Preference @@ -136,6 +136,9 @@ public static WeakReference GetEventContext(string key) /// True if the key exists in the preference, otherwise false. /// Thrown if the key is an invalid parameter. /// Thrown when the method failed due to an internal I/O error. + /// + /// This method checks if the specified key exists in the preferences. It returns true if the key exists, and false if not. The key argument should be a valid parameter. An ArgumentException will be thrown if the key is invalid. Additionally, an IOException may be thrown if the method fails due to an internal input/output error. + /// /// /// /// Preference.Set("active_user", "Joe"); @@ -166,18 +169,18 @@ public static bool Contains(string key) /// /// /// If the key already exists in the preference, the old value will be overwritten with a new value. - /// Data types for supported values are: integer, double, string, and bool. + /// Supported value data types include integers, doubles, strings, and booleans. /// /// The name of the key to create/modify. /// The value corresponding to the key. /// Thrown if the key is an invalid parameter. - /// Thrown when the method failed due to an internal I/O error. + /// Thrown when the method fails due to an internal I/O error. /// /// /// Preference.Set("Option_enabled", true); /// Preference.Set("active_user", "Joe"); /// Preference.Set("default_volume", 10); - /// Preference.Set("brightness", "0.6"); + /// Preference.Set("brightness", 0.6); /// /// /// 3 @@ -362,7 +365,7 @@ private static void DisallowChangeNotifications(string key) } /// - /// The class manages event handlers of the preference keys. The class enables having event handlers for individual preference keys. + /// The class manages event handlers of the preference keys. It provides functionality to have event handlers for individual preference keys. /// /// 3 public class EventContext @@ -377,14 +380,20 @@ internal EventContext(string key) /// /// Occurs whenever there is a change in the value of a preference key. /// + /// + /// This event is raised whenever the value of a preference key changes. It provides information about the changed key through the PreferenceChangedEventArgs argument. + /// The Changed event can be used to keep track of any modifications made to preferences during runtime. + /// /// Thrown when the key does not exist or when there is an invalid parameter. /// Thrown when the bundle instance has been disposed. /// + /// In this example, we show how to handle the Changed event by printing out the key that was modified. We also demonstrate how to subscribe and unsubscribe from the event. /// /// private static void Preference_PreferenceChanged(object sender, PreferenceChangedEventArgs e) /// { /// Console.WriteLine("key {0}", e.Key); /// } + /// /// Preference.EventContext context = null; /// Preference.GetEventContext("active_user").TryGetTarget(out context); /// if(context != null) diff --git a/src/Tizen.Applications.Preference/Tizen.Applications/PreferenceChangedEventArgs.cs b/src/Tizen.Applications.Preference/Tizen.Applications/PreferenceChangedEventArgs.cs index cb3db24bbfa..e4b12ded3f4 100755 --- a/src/Tizen.Applications.Preference/Tizen.Applications/PreferenceChangedEventArgs.cs +++ b/src/Tizen.Applications.Preference/Tizen.Applications/PreferenceChangedEventArgs.cs @@ -19,7 +19,7 @@ namespace Tizen.Applications { /// - /// This class is an event argument of the PreferenceChanged event. + /// This class represents the event arguments for the PreferenceChanged event. /// /// 3 public class PreferenceChangedEventArgs : EventArgs From 25212374c77cfed2733c4388a9b3e3ee379d3a2a Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:52:22 +0900 Subject: [PATCH 04/31] [Applications.Common] Enhance API descriptions (#6367) * [Applications.Common] Enhance API descriptions Signed-off-by: Hwankyu Jhun * [Applications.Common] Add a missing '' Signed-off-by: Hwankyu Jhun --------- Signed-off-by: Hwankyu Jhun --- .../ApplicationComponentType.cs | 10 +- .../ApplicationLaunchedEventArgs.cs | 2 +- .../Tizen.Applications/ApplicationManager.cs | 181 +++++++++++++++--- .../ApplicationRunningContext.cs | 30 ++- .../Tizen.Applications/Bundle.cs | 13 +- .../Tizen.Applications/CoreApplication.cs | 63 +++--- 6 files changed, 232 insertions(+), 67 deletions(-) diff --git a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationComponentType.cs b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationComponentType.cs index c5e9838b2cb..015a3e99941 100755 --- a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationComponentType.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationComponentType.cs @@ -23,27 +23,27 @@ namespace Tizen.Applications public enum ApplicationComponentType { /// - /// Component type is ui application. + /// The user interface (UI) application component type. /// UIApplication = 0, /// - /// Component type is service application. + /// The service application component type. /// ServiceApplication, /// - /// Component type is widget application. + /// The widget application component type. /// WidgetApplication, /// - /// Component type is watch application. + /// The watch application component type. /// WatchApplication, /// - /// Component type is component-based application. + /// The component-based application component type. /// /// 7 ComponentBasedApplication, diff --git a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationLaunchedEventArgs.cs b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationLaunchedEventArgs.cs index b65c4412048..106d9b0ee90 100644 --- a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationLaunchedEventArgs.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationLaunchedEventArgs.cs @@ -25,7 +25,7 @@ namespace Tizen.Applications public class ApplicationLaunchedEventArgs : EventArgs { /// - /// The information of the application. + /// Gets the current running context of the application. /// /// 3 public ApplicationRunningContext ApplicationRunningContext { get; internal set; } diff --git a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationManager.cs b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationManager.cs index 21abc91d8c5..904594a832a 100755 --- a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationManager.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationManager.cs @@ -43,6 +43,9 @@ public static class ApplicationManager /// /// Occurs whenever the installed application is enabled. /// + /// + /// This event is raised whenever the installed application is enabled. It provides information about the application that was enabled through the arguments passed in the event handler. + /// /// 3 public static event EventHandler ApplicationEnabled { @@ -74,6 +77,10 @@ public static event EventHandler ApplicationEnabled /// /// Occurs whenever the installed application is disabled. /// + /// + /// This event is raised whenever the user disables an installed application through the Settings menu. + /// The event handler receives an argument of type ApplicationDisabledEventArgs which contains information about the disabled application. + /// /// 3 public static event EventHandler ApplicationDisabled { @@ -105,6 +112,10 @@ public static event EventHandler ApplicationDisabl /// /// Occurs whenever the installed applications get launched. /// + /// + /// This event provides information about the application that was just launched, including its package ID, version, and other details. + /// It is useful for tracking and monitoring application launches in order to gather statistics or perform certain actions based on specific conditions. + /// /// 3 public static event EventHandler ApplicationLaunched { @@ -133,9 +144,13 @@ public static event EventHandler ApplicationLaunch } } + /// /// Occurs whenever the installed applications get terminated. /// + /// + /// This event is raised whenever any application gets terminated on the device. It provides information about the terminated application through the arguments passed in the event handler. + /// /// 3 public static event EventHandler ApplicationTerminated { @@ -165,9 +180,24 @@ public static event EventHandler ApplicationTerm } /// - /// Gets the information of the installed applications asynchronously. + /// Asynchronously retrieves information about the installed applications. /// - /// The installed application info list. + /// An asynchronous task that returns a list containing information about the installed applications. + /// + /// By calling this method, you can retrieve details about all the applications currently installed on the device. The returned list contains ApplicationInfo objects, which provide various properties such as package ID, version, and icon. + /// + /// + /// To get the information of the installed applications, you can call the following code snippet: + /// + /// + /// var listApp = await ApplicationManager.GetInstalledApplicationsAsync(); + /// Assert.IsNotEmpty(_listApp, "The list of installed app should not be empty."); + /// foreach (ApplicationInfo instapp in _listApp) + /// { + /// Console.WriteLine(instapp.ApplicationId); + /// } + /// + /// /// 3 public static async Task> GetInstalledApplicationsAsync() { @@ -238,10 +268,25 @@ public static void TerminateBackgroundApplication(ApplicationRunningContext app) } /// - /// Gets the information of the installed applications with the ApplicationInfoFilter asynchronously. + /// Retrieves the information about installed applications that match the specified filter criteria in an asynchronous manner. /// - /// Key-value pairs for filtering. - /// The installed application info list. + /// + /// By specifying the desired filter criteria through the argument, you can retrieve only those applications that meet these conditions. The returned result will contain a list of ApplicationInfo objects representing the matched applications. + /// + /// An ApplicationInfoFilter containing the desired filter criteria. + /// An IEnumerable<ApplicationInfo> containing the information of the installed applications that match the specified filter. + /// + /// The following code snippet demonstrates how to obtain the information of all installed applications: + /// + /// var filter = new ApplicationInfoFilter(); + /// filter.Filter.Add(ApplicationInfoFilter.Keys.Id, "org.exmaple.hello"); + /// var apps = await GetInstalledApplicationsAsync(filter); + /// foreach (var app in apps) + /// { + /// Console.WriteLine(app.ApplicationId); + /// } + /// + /// /// 3 public static async Task> GetInstalledApplicationsAsync(ApplicationInfoFilter filter) { @@ -285,10 +330,27 @@ public static async Task> GetInstalledApplicationsA } /// - /// Gets the information of the installed applications with the ApplicationInfoMetadataFilter asynchronously. + /// Asynchronously retrieves the information about installed applications filtered by the specified criteria in the form of ApplicationInfoMetadataFilter. /// - /// Key-value pairs for filtering. - /// The installed application info list. + /// + /// By providing the filter argument, you can specify various conditions such as package names, types, visibility status, etc., which will help narrow down the search results to only those that match the desired criteria. + /// The returned result is a list of ApplicationInfo objects containing detailed information about each matched application. + /// + /// A dictionary of key-value pairs used to define the specific filtering criteria. + /// An enumerable collection of ApplicationInfo objects representing the installed applications that meet the specified filtering criteria. + /// + /// To retrieve all visible applications: + /// + /// + /// var filter = new ApplicationInfoMetadataFilter(); + /// filter.Filter.Add("http://tizen.org/metadata/test-id", "org.exmaple.hello"); + /// var apps = await GetInstalledApplicationsAsync(filter); + /// foreach (var app in apps) + /// { + /// Console.WriteLine(app.ApplicationId); + /// } + /// + /// /// 3 public static async Task> GetInstalledApplicationsAsync(ApplicationInfoMetadataFilter filter) { @@ -332,9 +394,22 @@ public static async Task> GetInstalledApplicationsA } /// - /// Gets the information of the running applications asynchronously. + /// Asynchronously retrieves the information about currently running applications. /// - /// The application running context list. + /// An enumerable list containing details about the running applications. + /// + /// This method provides an efficient way to gather information about all the active apps on the device without blocking the current thread. It returns a task which can be awaited in order to obtain the desired result. + /// + /// + /// Here's an example demonstrating how to retrieve the running applications and display their IDs: + /// + /// await ApplicationManager.GetRunningApplicationsAsync().ContinueWith((task) => { + /// foreach (var app in task.Result) { + /// Console.WriteLine(app.ApplicationId); + /// } + /// }); + /// + /// /// 3 public static async Task> GetRunningApplicationsAsync() { @@ -371,9 +446,26 @@ public static async Task> GetRunningAppli } /// - /// Gets the information of the running applications including subapp asynchronously. + /// Asynchronously retrieves the information about all currently running applications, including subapps. /// - /// The application running context list. + /// An enumerable list containing details about the running applications. + /// + /// This method provides access to the current state of all active applications on the device, allowing you to gather information such as their IDs, types, and states. + /// By utilizing this functionality, developers can gain insights into the overall system activity and make informed decisions based on the available data. + /// + /// + /// Here is an example that demonstrates how to utilize the GetAllRunningApplicationsAsync method in order to obtain information about the currently running applications: + /// + /// // Initiate the call to get all running applications + /// IEnumerable<ApplicationRunningContext> runningApps = await GetAllRunningApplicationsAsync(); + /// + /// // Iterate through the obtained list of running apps + /// foreach (var app in runningApps) + /// { + /// Console.WriteLine($"Id: {app.ApplicationId}"); + /// } + /// + /// /// 3 public static async Task> GetAllRunningApplicationsAsync() { @@ -410,10 +502,25 @@ public static async Task> GetAllRunningAp } /// - /// Gets the information of the specified application with the application ID. + /// Retrieves the information of the specified application by its application ID. /// - /// Application ID. - /// The application info. + /// The ID of the target application. + /// An object containing detailed information about the requested application. + /// + /// This function enables you to obtain specific information about an application based on its application ID. + /// It returns an object that contains various attributes such as the package name, version, icon URL, etc., which are associated with the identified application. + /// If the specified application does not exist in the system, an error message will be thrown indicating that the requested application could not be found. + /// + /// + /// The following code snippet demonstrates how to retrieve the details of an application with the ID "org.example.app": + /// + /// // Retrieve the application details + /// ApplicationInfo appInfo = ApplicationManager.GetInstalledApplication("org.example.app"); + /// + /// // Print the package ID of the retrieved application + /// Console.WriteLine($"Package ID: {appInfo.PackageId}"); + /// + /// /// 3 public static ApplicationInfo GetInstalledApplication(string applicationId) { @@ -428,11 +535,26 @@ public static ApplicationInfo GetInstalledApplication(string applicationId) } /// - /// Returns if the specified application is running or not. + /// Determines whether the specified application is currently running. /// - /// The application ID. - /// Returns true if the given application is running, otherwise false. - /// Thrown when the given parameter is invalid. + /// The unique identifier of the application to check. + /// True if the application identified by the given ID is currently running, otherwise False. + /// Thrown when the provided argument is invalid or missing. + /// + /// The following code snippet demonstrates how to determine if a specific application is currently running: + /// + /// + /// string applicationId = "org.example.app"; + /// if (ApplicationManager.IsRunning(applicationId)) + /// { + /// Console.WriteLine("The application with ID '{0}' is currently running.", applicationId); + /// } + /// else + /// { + /// Console.WriteLine("The application with ID '{0}' is not currently running.", applicationId); + /// } + /// + /// /// 3 public static bool IsRunning(string applicationId) { @@ -446,11 +568,24 @@ public static bool IsRunning(string applicationId) } /// - /// Returns the application id. + /// Retrieves the application ID based on the specified process ID. /// - /// The application pid. - /// Returns the application id. - /// Thrown when the given parameter is invalid. + /// + /// By providing the process ID as input, this function enables you to obtain the corresponding application ID. + /// It ensures that the correct application is identified even if multiple applications are running simultaneously. + /// + /// The process ID of the target application. + /// The application ID associated with the given process ID. + /// If the argument passed in is not valid. + /// + /// The following code snippet demonstrates how to retrieve the application ID by calling the GetAppId() function: + /// + /// + /// int processId = 12345; // Replace with actual process ID + /// string appId = GetAppId(processId); + /// Console.WriteLine($"Application ID: {appId}"); + /// + /// /// 6 public static string GetAppId(int processId) { diff --git a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs index e93d5709368..80a8ae32f50 100755 --- a/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/ApplicationRunningContext.cs @@ -21,8 +21,12 @@ namespace Tizen.Applications { /// - /// This class provides methods and properties to get information of the application. + /// This class provides methods and properties to retrieve information about the currently running application context. /// + /// + /// The ApplicationRunningContext class enables you to obtain various details related to the current execution environment such as the application ID, process id, and user data directory. + /// It also offers functionality to check if the current application is in foreground or background mode. + /// /// 3 public class ApplicationRunningContext : IDisposable { @@ -37,12 +41,24 @@ internal ApplicationRunningContext(IntPtr contextHandle) } /// - /// A constructor of ApplicationRunningContext that takes the application ID. + /// Constructs an ApplicationRunningContext object from the specified application ID. /// - /// Application ID. - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the "application not exist" error or the system error. - /// Thrown when failed because of out of memory. + /// The ID of the application. + /// + /// The constructor creates a new instance of the ApplicationRunningContext class by passing in the application ID. + /// It throws exceptions if any errors occur during initialization, such as invalid arguments, non-existent applications, system errors, or out of memory conditions. + /// + /// + /// Here's an example demonstrating how to construct an ApplicationRunningContext object using the constructor: + /// + /// + /// // Define the application ID + /// const string APP_ID = "org.example.app"; + /// + /// // Instantiate the ApplicationRunningContext class with the application ID + /// var context = new ApplicationRunningContext(APP_ID); + /// + /// /// 3 public ApplicationRunningContext(string applicationId) { @@ -99,7 +115,7 @@ public ApplicationRunningContext(string applicationId, string instanceId) } /// - /// Destructor of the class. + /// Destroys the current application running context. /// ~ApplicationRunningContext() { diff --git a/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs b/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs index 61960542db2..1bcfe009212 100644 --- a/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs @@ -39,10 +39,15 @@ public class Bundle : IDisposable private readonly HashSet _keys; /// - /// The bundle constructor. + /// Creates a new instance of the Bundle class. /// + /// + /// This constructor initializes a new instance of the Bundle class. It does not perform any specific actions by itself but provides a starting point for creating and managing bundles of data. + /// /// Thrown when out of memory. /// + /// Here's an example showing how to create a new instance of the Bundle class: + /// /// /// Tizen.Applications.Bundle bundle = new Tizen.Applications.Bundle(); /// @@ -56,10 +61,10 @@ public Bundle() } /// - /// The bundle constructor. + /// Creates a new instance of the Bundle class from the specified SafeBundleHandle. /// - /// The SafeBundleHandle instance. - /// Thrown when the handle is null or invalid. + /// The SafeBundleHandle instance that represents the bundle. + /// Thrown if the handle argument is null or invalid. /// 3 public Bundle(SafeBundleHandle handle) { diff --git a/src/Tizen.Applications.Common/Tizen.Applications/CoreApplication.cs b/src/Tizen.Applications.Common/Tizen.Applications/CoreApplication.cs index 916c7392a26..1e04fc155cc 100644 --- a/src/Tizen.Applications.Common/Tizen.Applications/CoreApplication.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications/CoreApplication.cs @@ -28,8 +28,11 @@ namespace Tizen.Applications { /// - /// This class represents an application controlled lifecycles by the backend system. + /// The CoreApplication class provides functionality to manage application lifecycle events that are controlled by the backend system. /// + /// + /// By inheriting from the Application class, CoreApplication enables developers to handle various application states such as creating and terminating. It also allows them to define their own event handlers for these states. + /// /// 3 public class CoreApplication : Application { @@ -38,9 +41,14 @@ public class CoreApplication : Application private bool _disposedValue = false; /// - /// Initializes the CoreApplication class. + /// Initializes the CoreApplication class by providing a specific implementation of the ICoreBackend interface. /// - /// The backend instance implementing ICoreBacked interface. + /// An instance of the desired implementation of the ICoreBackend interface. + /// + /// The CoreApplication class provides access to various features and functionalities related to application management. + /// By initializing the CoreApplication class with a specific implementation of the ICoreBackend interface, developers can customize the behavior and functionality of their applications based on their requirements. + /// It enables them to extend the capabilities of the default CoreApplication class and tailor it according to their needs. + /// /// 3 public CoreApplication(ICoreBackend backend) { @@ -169,8 +177,9 @@ public override void Exit() } /// - /// Overrides this method if want to handle behavior when the application is launched. - /// If base.OnCreated() is not called, the event 'Created' will not be emitted. + /// Overrides this method if you want to handle specific behavior when the application is created. + /// Calling base.OnCreate() ensures that the default implementation is executed before any custom code in this method. + /// If base.OnCreate() is not called, the event 'Created' will not be emitted. /// /// 3 protected virtual void OnCreate() @@ -195,8 +204,8 @@ protected virtual void OnCreate() } /// - /// Overrides this method if want to handle behavior when the application is terminated. - /// If base.OnTerminate() is not called, the event 'Terminated' will not be emitted. + /// Override this method to define specific actions that occur when the application terminates. + /// Calling base.OnTerminate() ensures that the default termination process takes place and the 'Terminated' event is emitted. /// /// 3 protected virtual void OnTerminate() @@ -205,10 +214,10 @@ protected virtual void OnTerminate() } /// - /// Overrides this method if want to handle behavior when the application receives the appcontrol message. - /// If base.OnAppControlReceived() is not called, the event 'AppControlReceived' will not be emitted. + /// Override this method to customize the behavior when the application receives the appcontrol message. + /// If base.OnAppControlReceived() is not called, the event 'AppControlReceived' will not be triggered. /// - /// + /// The arguments passed in the appcontrol message /// 3 protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e) { @@ -222,8 +231,8 @@ protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e) } /// - /// Overrides this method if want to handle behavior when the system memory is low. - /// If base.OnLowMemory() is not called, the event 'LowMemory' will not be emitted. + /// Override this method to handle behavior when the system memory is low. + /// Calling base.OnLowMemory() ensures that the 'LowMemory' event is emitted. /// /// The low memory event argument /// 3 @@ -243,10 +252,10 @@ protected virtual void OnLowMemory(LowMemoryEventArgs e) } /// - /// Overrides this method if want to handle behavior when the system battery is low. - /// If base.OnLowBattery() is not called, the event 'LowBattery' will not be emitted. + /// Override this method to handle the behavior when the system battery level drops. + /// If base.OnLowBattery() is not called, the LowBattery event will not be raised. /// - /// The low battery event argument + /// The arguments for the low battery event /// 3 protected virtual void OnLowBattery(LowBatteryEventArgs e) { @@ -260,10 +269,10 @@ protected virtual void OnLowBattery(LowBatteryEventArgs e) } /// - /// Overrides this method if want to handle behavior when the system language is changed. - /// If base.OnLocaleChanged() is not called, the event 'LocaleChanged' will not be emitted. + /// Override this method to handle changes in the system language. + /// If base.OnLocaleChanged() is not called, the LocaleChanged event will not be triggered. /// - /// The locale changed event argument + /// The arguments passed with the LocaleChanged event /// 3 protected virtual void OnLocaleChanged(LocaleChangedEventArgs e) { @@ -282,10 +291,10 @@ protected virtual void OnLocaleChanged(LocaleChangedEventArgs e) } /// - /// Overrides this method if want to handle behavior when the region format is changed. - /// If base.OnRegionFormatChanged() is not called, the event 'RegionFormatChanged' will not be emitted. + /// Override this method to handle changes in the region format. + /// Make sure to call base.OnRegionFormatChanged() to ensure that the RegionFormatChanged event is raised. /// - /// The region format changed event argument + /// The region format changed event arguments /// 3 protected virtual void OnRegionFormatChanged(RegionFormatChangedEventArgs e) { @@ -304,10 +313,10 @@ protected virtual void OnRegionFormatChanged(RegionFormatChangedEventArgs e) } /// - /// Overrides this method if want to handle behavior when the device orientation is changed. - /// If base.OnRegionFormatChanged() is not called, the event 'RegionFormatChanged' will not be emitted. + /// Override this method to define specific behavior when the device orientation changes. + /// If base.OnDeviceOrientationChanged() is not called, the 'DeviceOrientationChanged' event will not be raised. /// - /// The device orientation changed event argument + /// The arguments for the device orientation change event /// 3 protected virtual void OnDeviceOrientationChanged(DeviceOrientationEventArgs e) { @@ -315,10 +324,10 @@ protected virtual void OnDeviceOrientationChanged(DeviceOrientationEventArgs e) } /// - /// Override this method if you want to handle behavior when the time zone is changed. - /// If base.OnTimeZoneChanged() is not called, the event "TimeZoneChanged" will not be emitted. + /// Override this method to handle changes in the current time zone. + /// Calling base.OnTimeZoneChanged() ensures that the TimeZoneChanged event is triggered. /// - /// The time zone changed event argument + /// The arguments containing details about the time zone change /// 11 protected virtual void OnTimeZoneChanged(TimeZoneChangedEventArgs e) { From 20bbe35ace3b0052771992e81a13b516a2696399 Mon Sep 17 00:00:00 2001 From: sukhyungkang <35091460+sukhyungkang@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:09:18 +0900 Subject: [PATCH 05/31] [TCSACR-602][Shortcut] Deprecate Shortcut apis (#6319) * Deprecate shortcut API Signed-off-by: SukhyungKang * [TCSACR-602][Shortcut] Deprecate Shortcut apis Signed-off-by: SukhyungKang --------- Signed-off-by: SukhyungKang --- .../Tizen.Applications.Shortcut.csproj | 0 .../Tizen.Applications.Shortcut/HomeShortcutInfo.cs | 4 ++++ .../Tizen.Applications.Shortcut/ShortcutEnumerations.cs | 4 ++++ .../Tizen.Applications.Shortcut/ShortcutInfo.cs | 6 ++++++ .../Tizen.Applications.Shortcut/ShortcutManager.cs | 5 +++++ .../Tizen.Applications.Shortcut/WidgetShortcutInfo.cs | 6 ++++++ .../HomeShortcutAddedInfo.cs | 5 +++++ .../Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs | 6 ++++++ .../ShortcutDeletedInfo.cs | 5 +++++ .../ShortcutEventEnumerations.cs | 3 +++ .../ShortcutEventManager.cs | 8 ++++++++ .../Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs | 8 ++++++++ .../WidgetShortcutAddedInfo.cs | 6 ++++++ 13 files changed, 66 insertions(+) mode change 100644 => 100755 src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut.csproj diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut.csproj b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut.csproj old mode 100644 new mode 100755 diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs index 5a344c372ba..c4e52328b5e 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs @@ -16,16 +16,20 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the shortcut information. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class HomeShortcutInfo : ShortcutInfo { /// /// Gets or sets the specific information delivered to the viewer for creating a shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string Uri { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs index e735cfd1827..0fd5adfb431 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs @@ -16,10 +16,13 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// Enumeration for the sizes of the shortcut widget. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public enum ShortcutWidgetSize { /// @@ -96,6 +99,7 @@ public enum ShortcutWidgetSize /// /// Enumeration for the shortcut types. /// + [Obsolete("Deprecated since API12. Will be removed in API14.")] internal enum ShortcutType { /// diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs index 5d95b2f4b87..3351c2224f1 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs @@ -16,28 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class to get the information of the shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutInfo { /// /// Gets or sets the name of the created shortcut icon. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; set; } = string.Empty; /// /// Gets or sets the absolute path of an icon file for this shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string IconPath { get; set; } = string.Empty; /// /// Gets or sets a value indicating whether to allow or not allow duplication. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public bool IsAllowDuplicate { get; set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs index 5d3fd7ba0ac..f2be8aa5338 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs @@ -22,6 +22,7 @@ namespace Tizen.Applications.Shortcut /// This class provides some functions to add or delete a shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static class ShortcutManager { private const string LogTag = "Tizen.Applications.Shortcut"; @@ -38,6 +39,7 @@ public static class ShortcutManager /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Add(HomeShortcutInfo shortcut) { Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None; @@ -79,6 +81,7 @@ public static void Add(HomeShortcutInfo shortcut) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Add(WidgetShortcutInfo shortcut) { Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None; @@ -114,6 +117,7 @@ public static void Add(WidgetShortcutInfo shortcut) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Delete(string shortcutName) { Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None; @@ -149,6 +153,7 @@ public static void Delete(string shortcutName) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Delete(ShortcutInfo shortcut) { if (shortcut == null) diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs index 1e0d6052574..549944844ea 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs @@ -16,28 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the information about the widget. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class WidgetShortcutInfo : ShortcutInfo { /// /// Gets or sets the widget ID. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string WidgetId { get; set; } = string.Empty; /// /// Gets or sets the size of the widget. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public ShortcutWidgetSize WidgetSize { get; set; } /// /// Gets or sets the update period in seconds. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public double Period { get; set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs index df1fe96c846..0e41bd067a8 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs @@ -16,22 +16,27 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the shortcut information. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class HomeShortcutAddedInfo : ShortcutAddedInfo { /// /// Gets the name of the application. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string AppId { get; internal set; } /// /// Gets the specific information for creating a new shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string Uri { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs index 6eced613f5a..63955c6c881 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs @@ -16,28 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class for getting the information of the shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutAddedInfo { /// /// Gets the name of the created shortcut icon. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; internal set; } /// /// Gets the absolute path of an icon file for this shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string IconPath { get; internal set; } /// /// Gets a value indicating whether to allow or not to allow duplication. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public bool IsAllowDuplicate { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs index dec0ec750d7..aa4ddb675c8 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs @@ -16,22 +16,27 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class for getting the information of the shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutDeletedInfo { /// /// Gets the name of the package. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string AppId { get; internal set; } /// /// Gets the name of the created shortcut icon. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs index 34d72ef7497..a0a18eb32d2 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs @@ -16,10 +16,13 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// Enumeration for values of the shortcut response types. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public enum ShortcutError { /// diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs index 7e6c57a16a7..7e3e16dfb40 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs @@ -26,6 +26,7 @@ namespace Tizen.Applications.Shortcut /// Object that contains the shortcut information to add. /// The result of handling a shortcut add request. /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public delegate ShortcutError ShortcutAdded(ShortcutAddedInfo args); /// @@ -34,12 +35,14 @@ namespace Tizen.Applications.Shortcut /// Object that contains the shortcut information to delete. /// The result of handling a shortcut delete request. /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public delegate ShortcutError ShortcutDeleted(ShortcutDeletedInfo args); /// /// This class provides a way to register the callback function for the shortcut add and delete events. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static class ShortcutEventManager { private static Interop.Shortcut.AddCallback shortcutAddCallback; @@ -67,6 +70,7 @@ public static class ShortcutEventManager /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void RegisterEventHandler(ShortcutAdded addedEvent) { if (shortcutAddCallback == null) @@ -103,6 +107,7 @@ public static void RegisterEventHandler(ShortcutAdded addedEvent) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void RegisterEventHandler(ShortcutDeleted deletedEvent) { if (shortcutDeleteCallback == null) @@ -134,6 +139,7 @@ public static void RegisterEventHandler(ShortcutDeleted deletedEvent) /// Thrown when an argument is invalid. /// Thrown in case the permission is denied. /// Thrown when the shortcut is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void UnregisterEventHandler(ShortcutAdded addedEvent) { if (shortcutAdded != null && shortcutAdded.Equals(addedEvent)) @@ -168,6 +174,7 @@ public static void UnregisterEventHandler(ShortcutAdded addedEvent) /// Thrown when an argument is invalid. /// Thrown in case the permission is denied. /// Thrown when the shortcut is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void UnregisterEventHandler(ShortcutDeleted deletedEvent) { if (shortcutDeleted != null && shortcutDeleted.Equals(deletedEvent)) @@ -205,6 +212,7 @@ public static void UnregisterEventHandler(ShortcutDeleted deletedEvent) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static IEnumerable GetTemplateList(string appId) { shortcutTemplates.Clear(); diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs index 0645e1457be..1b073d33e84 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs @@ -16,40 +16,48 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the preset list of the shortcut template from the installed package. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutTemplate { /// /// Gets the application ID. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string AppId { get; internal set; } /// /// Gets the name of the created shortcut icon. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; internal set; } /// /// Gets the absolute path of an icon file for this shortcut. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string IconPath { get; internal set; } /// /// Gets the user data. A property of the shortcut element in the manifest file. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ExtraKey { get; internal set; } /// /// Gets the user data. A property of the shortcut element in the manifest file. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ExtraData { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs index 39892e72178..06e58fb28a8 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs @@ -16,28 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the information about the widget. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class WidgetShortcutAddedInfo : ShortcutAddedInfo { /// /// Gets the widget ID. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string WidgetId { get; internal set; } /// /// Gets the size of the widget. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public ShortcutWidgetSize WidgetSize { get; internal set; } /// /// Gets the update period in seconds. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public double Period { get; internal set; } } } \ No newline at end of file From a97907f8e1ea047b00fe235fe6638190282d5643 Mon Sep 17 00:00:00 2001 From: sukhyungkang <35091460+sukhyungkang@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:17:51 +0900 Subject: [PATCH 06/31] [TCSACR-601][Badge] Deprecate Badge apis (#6318) Signed-off-by: SukhyungKang --- src/Tizen.Applications.Badge/Tizen.Applications/Badge.cs | 5 +++++ .../Tizen.Applications/BadgeControl.cs | 8 ++++++++ .../Tizen.Applications/BadgeEventArgs.cs | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/src/Tizen.Applications.Badge/Tizen.Applications/Badge.cs b/src/Tizen.Applications.Badge/Tizen.Applications/Badge.cs index c7a4f1acabc..6378e4b5ba8 100644 --- a/src/Tizen.Applications.Badge/Tizen.Applications/Badge.cs +++ b/src/Tizen.Applications.Badge/Tizen.Applications/Badge.cs @@ -22,6 +22,7 @@ namespace Tizen.Applications /// The class containing common properties of the Badge. /// /// 3 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class Badge { private int count = 0; @@ -34,6 +35,7 @@ public class Badge /// Count value /// True if it should be displayed /// Thrown when failed because of invalid argument + [Obsolete("Deprecated since API12. Will be removed in API14.")] public Badge(string appId, int count = 1, bool visible = true) { if (IsNegativeNumber(count)) @@ -50,6 +52,7 @@ public Badge(string appId, int count = 1, bool visible = true) /// /// 3 /// Thrown when set negative number + [Obsolete("Deprecated since API12. Will be removed in API14.")] public int Count { get @@ -71,12 +74,14 @@ public int Count /// Property for the application ID of the badge. /// /// 3 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string AppId { get; set; } /// /// Property for display visibility. True if the badge display visible, otherwise false.. /// /// 4 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public bool Visible{ get; set; } private bool IsNegativeNumber(int number) diff --git a/src/Tizen.Applications.Badge/Tizen.Applications/BadgeControl.cs b/src/Tizen.Applications.Badge/Tizen.Applications/BadgeControl.cs index 093f40f65f8..7a2e4f11f5e 100755 --- a/src/Tizen.Applications.Badge/Tizen.Applications/BadgeControl.cs +++ b/src/Tizen.Applications.Badge/Tizen.Applications/BadgeControl.cs @@ -22,6 +22,7 @@ namespace Tizen.Applications /// The class for badge operation. /// /// 3 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static class BadgeControl { private static event EventHandler s_changed; @@ -37,6 +38,7 @@ public static class BadgeControl /// Thrown in case of failed conditions. /// Thrown when an application does not have the privilege to access. /// Thrown when Badge is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static event EventHandler Changed { add @@ -88,6 +90,7 @@ public static event EventHandler Changed /// Thrown when an application does not have the privilege to access. /// Thrown in case of failed conditions. /// Thrown when Badge is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static Badge Find(string appId) { uint count; @@ -119,6 +122,7 @@ public static Badge Find(string appId) /// Thrown when an application does not have the privilege to access. /// Thrown in case of failed conditions. /// Thrown when Badge is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Remove(string appId) { BadgeError err = Interop.Badge.Remove(appId); @@ -139,6 +143,7 @@ public static void Remove(string appId) /// Thrown when an application does not have the privilege to access. /// Thrown in case of failed conditions. /// Thrown when Badge is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Remove(Badge badge) { if (badge == null) @@ -160,6 +165,7 @@ public static void Remove(Badge badge) /// Thrown when an application does not have the privilege to access. /// Thrown in case of failed conditions. /// Thrown when Badge is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Add(Badge badge) { if (badge == null) @@ -195,6 +201,7 @@ public static void Add(Badge badge) /// Thrown when an application does not have the privilege to access. /// Thrown in case of failed conditions. /// Thrown when Badge is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Update(Badge badge) { if (badge == null) @@ -225,6 +232,7 @@ public static void Update(Badge badge) /// Thrown when an application does not have the privilege to access. /// Thrown in case of failed conditions. /// Thrown when Badge is not supported. + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static IEnumerable GetBadges() { IList list = new List(); diff --git a/src/Tizen.Applications.Badge/Tizen.Applications/BadgeEventArgs.cs b/src/Tizen.Applications.Badge/Tizen.Applications/BadgeEventArgs.cs index c0b8d0ff1da..c20c0add80a 100755 --- a/src/Tizen.Applications.Badge/Tizen.Applications/BadgeEventArgs.cs +++ b/src/Tizen.Applications.Badge/Tizen.Applications/BadgeEventArgs.cs @@ -22,6 +22,7 @@ namespace Tizen.Applications /// The class for event arguments of the badge event. /// /// 3 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class BadgeEventArgs : EventArgs { internal BadgeEventArgs() @@ -32,6 +33,7 @@ internal BadgeEventArgs() /// Enumeration for the badge action. /// /// 3 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public enum Action : int { /// @@ -54,12 +56,14 @@ public enum Action : int /// The property for the badge object. /// /// 3 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public Badge Badge { get; internal set; } /// /// The property for the action value. /// /// 3 + [Obsolete("Deprecated since API12. Will be removed in API14.")] public Action Reason { get; internal set; } } } From 14f8515a2c7c8a417ce3c8d47c7e864abfac58db Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Thu, 26 Sep 2024 16:24:54 +0900 Subject: [PATCH 07/31] [Applications.Service] Enhance API descriptions Signed-off-by: Changgyu Choi --- .../Tizen.Applications/ServiceApplication.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Tizen.Applications.Service/Tizen.Applications/ServiceApplication.cs b/src/Tizen.Applications.Service/Tizen.Applications/ServiceApplication.cs index 91babc5fe9e..428225acd86 100755 --- a/src/Tizen.Applications.Service/Tizen.Applications/ServiceApplication.cs +++ b/src/Tizen.Applications.Service/Tizen.Applications/ServiceApplication.cs @@ -48,6 +48,9 @@ public override void Run(string[] args) /// /// Exits the main loop of the application without restarting. /// + /// + /// This function terminates the current execution of the application by exiting its main loop. It does not trigger the app restart request. + /// /// 10 [EditorBrowsable(EditorBrowsableState.Never)] public void ExitWithoutRestarting() From 08eac397f7bfe488facb6619200a03d9f49e3c88 Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:44:22 +0900 Subject: [PATCH 08/31] [Content.MimeType] Enhance API descriptions (#6372) Signed-off-by: Hwankyu Jhun --- .../Tizen.Content.MimeType/MimeUtil.cs | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Tizen.Content.MimeType/Tizen.Content.MimeType/MimeUtil.cs b/src/Tizen.Content.MimeType/Tizen.Content.MimeType/MimeUtil.cs index 02e45a37ab7..16d0a332501 100644 --- a/src/Tizen.Content.MimeType/Tizen.Content.MimeType/MimeUtil.cs +++ b/src/Tizen.Content.MimeType/Tizen.Content.MimeType/MimeUtil.cs @@ -32,10 +32,11 @@ namespace Tizen.Content.MimeType public static class MimeUtil { /// - /// Gets the MIME type for the given file extension. - /// The MIME type is 'application/octet-stream' if the given file extension is not associated with specific file formats. + /// Retrieves the MIME type for the specified file extension. + /// If no specific file format is associated with the given file extension, the default MIME type 'application/octet-stream' is returned. /// - /// The file extension. + /// The file extension for which the MIME type needs to be retrieved. + /// The MIME type for the specified file extension. /// /// /// string mimeType = MimeUtil.GetMimeType("png"); @@ -54,19 +55,22 @@ public static string GetMimeType(string fileExtension) } /// - /// Gets the file extensions for the given MIME type. + /// Retrieves the file extensions associated with the specified MIME type. /// - /// - /// If successful, returns the list of file extension strings for the given MIME type. - /// The array of file extension is without the leading dot ('.'). - /// - /// The MIME type. + /// + /// By calling this function with a specific MIME type argument, you can obtain a list of file extensions related to that MIME type. + /// These file extensions are returned without the leading period ('.') character. + /// + /// The MIME type for which you want to retrieve the associated file extensions. + /// An enumerable collection of file extension strings for the specified MIME type. /// + /// In the following code snippet, we demonstrate how to utilize the GetFileExtension method by retrieving the file extensions associated with the video/mpeg MIME type: + /// /// - /// var extColl = MimeUtil.GetFileExtension("video/mpeg"); - /// foreach ( string obj in extColl ) + /// var fileExtensions = MimeUtil.GetFileExtension("video/mpeg"); + /// foreach (var extension in fileExtensions) /// { - /// Console.WriteLine(obj); + /// Console.WriteLine(extension); /// } /// /// From 73a24651233e8ed2d7b3ec5b1828d0b580aba35c Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Thu, 26 Sep 2024 16:48:53 +0900 Subject: [PATCH 09/31] [Applications.UI] Enhance API descriptions Signed-off-by: Changgyu Choi --- .../Tizen.Applications/CoreUIApplication.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Tizen.Applications.UI/Tizen.Applications/CoreUIApplication.cs b/src/Tizen.Applications.UI/Tizen.Applications/CoreUIApplication.cs index 7fb0608a95b..948096e9410 100755 --- a/src/Tizen.Applications.UI/Tizen.Applications/CoreUIApplication.cs +++ b/src/Tizen.Applications.UI/Tizen.Applications/CoreUIApplication.cs @@ -23,7 +23,7 @@ namespace Tizen.Applications { /// - /// Represents an application that has an UI screen. The events for resuming and pausing are provided. + /// Represents an application that has an UI screen. It provides events for handling resume and pause actions. /// /// 3 public class CoreUIApplication : CoreApplication @@ -32,7 +32,7 @@ public class CoreUIApplication : CoreApplication /// Initializes the CoreUIApplication class. /// /// - /// The default backend for the UI application will be used. + /// By calling this constructor, the default backend for the UI application will be used. /// /// 3 #pragma warning disable CA2000 @@ -45,9 +45,9 @@ public CoreUIApplication() : base(new UICoreBackend()) /// Initializes the CoreUIApplication class. /// /// - /// If you want to change the backend, use this constructor. + /// This constructor is called if you need to modify the default behavior by providing a custom implementation of the ICoreBackend interface. By passing in your own backend instance, you can customize the application's functionality according to your requirements. /// - /// The backend instance implementing the ICoreBacked interface. + /// The custom implementation of the ICoreBackend interface that provides customized functionalities. /// 3 public CoreUIApplication(ICoreBackend backend) : base(backend) { @@ -91,7 +91,7 @@ public override void Run(string[] args) } /// - /// Overrides this method if you want to handle the behavior before calling OnCreate(). + /// Overrides this method if you want to handle any specific actions before calling the OnCreate() method. /// /// 3 protected virtual void OnPreCreate() @@ -99,8 +99,8 @@ protected virtual void OnPreCreate() } /// - /// Overrides this method if you want to handle the behavior when the application is resumed. - /// If base.OnResume() is not called, the event 'Resumed' will not be emitted. + /// Override this method to define the behavior when the application is resumed. + /// Calling base.OnResume() is required in order for the Resumed event to be raised. /// /// 3 protected virtual void OnResume() @@ -109,8 +109,8 @@ protected virtual void OnResume() } /// - /// Overrides this method if you want to handle the behavior when the application is paused. - /// If base.OnPause() is not called, the event 'Paused' will not be emitted. + /// Override this method to define the behavior when the application is paused. + /// Calling base.OnPause() is required in order for the Paused event to be raised. /// /// 3 protected virtual void OnPause() @@ -122,7 +122,7 @@ protected virtual void OnPause() /// Gets the window position of the application. /// /// The window position. - /// Thrown when there is no window position. + /// Thrown if there is no valid window position available. /// 11 public WindowPosition GetWindowPosition() { From 2c2947dc348fe004f0bedfd1728ecb2851d040c4 Mon Sep 17 00:00:00 2001 From: upple Date: Fri, 27 Sep 2024 00:54:36 +0900 Subject: [PATCH 10/31] [ComponentBased.ComponentManager] Enhance API descriptions Signed-off-by: Changgyu Choi --- .../Tizen.Applications/ComponentInfo.cs | 39 +++++----- .../Tizen.Applications/ComponentManager.cs | 64 +++++++++-------- .../ComponentRunningContext.cs | 71 ++++++++++--------- 3 files changed, 94 insertions(+), 80 deletions(-) diff --git a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentInfo.cs b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentInfo.cs index 16805c4b013..f0b6ebfb90a 100755 --- a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentInfo.cs +++ b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentInfo.cs @@ -20,7 +20,8 @@ namespace Tizen.Applications.ComponentBased { /// - /// This class provides methods and properties to get information of the component. + /// Provides methods and properties to retrieve information about a component in a Tizen application. + /// This class encapsulates details such as component ID, application ID, and other attributes. /// /// 6 public class ComponentInfo : IDisposable @@ -41,13 +42,13 @@ internal ComponentInfo(IntPtr infoHandle) } /// - /// A constructor of ComponentInfo that takes the component ID. + /// Initializes a new instance of the class with the specified component ID. /// - /// Component ID. - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied.> + /// The ID of the component. + /// Thrown when the component ID is invalid. + /// Thrown when a system error occurs. + /// Thrown when memory allocation fails. + /// Thrown when permission is denied. /// http://tizen.org/privilege/packagemanager.info /// 6 public ComponentInfo(string componentId) @@ -63,7 +64,7 @@ public ComponentInfo(string componentId) } /// - /// Destructor of the class. + /// Finalizes an instance of the class. /// ~ComponentInfo() { @@ -71,7 +72,7 @@ public ComponentInfo(string componentId) } /// - /// Gets the component ID. + /// Gets the ID of the component. /// /// 6 public string ComponentId @@ -94,7 +95,7 @@ public string ComponentId } /// - /// Gets the application ID of the component. + /// Gets the application ID associated with the component. /// /// 6 public string ApplicationId @@ -132,7 +133,7 @@ public ComponentType ComponentType } /// - /// Checks whether the icon of the component should be displayed or not. + /// Checks whether the icon of the component should be displayed. /// /// 6 public bool IsIconDisplayed @@ -151,7 +152,7 @@ public bool IsIconDisplayed } /// - /// Checks whether the component should be managed by task-manager or not. + /// Checks whether the component is managed by the task manager. /// /// 6 public bool IsManagedByTaskManager @@ -170,7 +171,7 @@ public bool IsManagedByTaskManager } /// - /// Gets the absolute path of the icon image. + /// Gets the absolute path of the component's icon image. /// /// 6 public string IconPath @@ -207,11 +208,11 @@ public string Label } /// - /// Gets the localized label of the component for the given locale. + /// Gets the localized label of the component for a specified locale. /// - /// Locale. - /// The format of locale is language and country code. (available value: "[2-letter lowercase language code (ISO 639-1)]-[2-letter lowercase country code (ISO 3166-alpha-2)]") - /// The localized label. + /// The locale in the format of language and country code (e.g., "en-US"). + /// Available values are in the format "[2-letter lowercase language code (ISO 639-1)]-[2-letter lowercase country code (ISO 3166-alpha-2)]". + /// The localized label corresponding to the specified locale. /// 6 public string GetLocalizedLabel(string locale) { @@ -226,7 +227,7 @@ public string GetLocalizedLabel(string locale) } /// - /// Releases all resources used by the ComponentInfo class. + /// Releases all resources used by the class. /// /// 6 public void Dispose() @@ -236,7 +237,7 @@ public void Dispose() } /// - /// Releases all resources used by the ComponentInfo class. + /// Releases resources used by the class. /// /// Disposing /// 6 diff --git a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs index 4824e6f4e4b..890c8080fc0 100755 --- a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs +++ b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs @@ -29,15 +29,18 @@ namespace Tizen.Applications.ComponentBased public static class ComponentManager { private const string LogTag = "Tizen.Applications"; - + /// - /// Gets the information of the installed components asynchronously. + /// Asynchronously retrieves a list of installed components. /// - /// The installed component info list. - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the "component not exist" error or the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// + /// A task that represents the asynchronous operation. + /// The task result contains an of the installed component information. + /// + /// Thrown when an invalid argument is provided. + /// Thrown when the component does not exist or if a system error occurs. + /// Thrown when the system runs out of memory. + /// Thrown when permission is denied to access the component information. /// http://tizen.org/privilege/packagemanager.info /// 6 public static async Task> GetInstalledComponentsAsync() @@ -74,13 +77,16 @@ public static async Task> GetInstalledComponentsAsync } /// - /// Gets the information of the running components asynchronously. + /// Asynchronously retrieves a list of currently running components. /// - /// The component running context list. - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the "component not exist" error or the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// + /// A task that represents the asynchronous operation. + /// The task result contains an of the running components. + /// + /// Thrown when an invalid argument is provided. + /// Thrown when the component does not exist or if a system error occurs. + /// Thrown when the system runs out of memory. + /// Thrown when permission is denied to access the running components. /// http://tizen.org/privilege/packagemanager.info /// 6 public static async Task> GetRunningComponentsAsync() @@ -117,14 +123,16 @@ public static async Task> GetRunningCompone } /// - /// Checks whether the component is running or not. + /// Checks if a specified component is currently running. /// - /// Component ID. - /// Returns true if the component is running, otherwise false. - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the "component not exist" error or the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// The unique identifier of the component. + /// + /// True if the component is running; otherwise, false. + /// + /// Thrown when an invalid argument is provided. + /// Thrown when the component does not exist or if a system error occurs. + /// Thrown when the system runs out of memory. + /// Thrown when permission is denied to access the component status. /// http://tizen.org/privilege/packagemanager.info /// 6 public static bool IsRunning(string componentId) @@ -139,17 +147,17 @@ public static bool IsRunning(string componentId) } /// - /// Terminates the component if it is running in the background. + /// Requests to terminate a specified component that is running in the background. /// - /// Component ID - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the "component not exist" error or the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// The context of the running component to terminate. + /// Thrown when an invalid argument is provided. + /// Thrown when the component does not exist or if a system error occurs. + /// Thrown when the system runs out of memory. + /// Thrown when permission is denied to terminate the component. /// http://tizen.org/privilege/appmanager.kill.bgapp /// - /// This function returns after it just sends a request for terminating a background component. - /// Platform will decide if the target component could be terminated or not according to the state of the target component. + /// This method sends a request to terminate a background component. + /// The platform determines if the target component can be terminated based on its current state. /// /// 6 public static void TerminateBackgroundComponent(ComponentRunningContext context) diff --git a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentRunningContext.cs b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentRunningContext.cs index 4932922087c..0c366ec1c6e 100755 --- a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentRunningContext.cs +++ b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentRunningContext.cs @@ -23,7 +23,8 @@ namespace Tizen.Applications.ComponentBased { /// - /// This class provides methods and properties to get information of the running component. + /// Represents the context of a running component, providing methods and properties + /// to retrieve information about the component's state and behavior. /// /// 6 public class ComponentRunningContext : IDisposable @@ -39,13 +40,14 @@ internal ComponentRunningContext(IntPtr contextHandle) } /// - /// A constructor of ComponentRunningContext that takes the component ID. + /// Initializes a new instance of the class + /// with a specified component ID, retrieving the context handle associated with it. /// - /// Component ID. - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the "component not exist" error or the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// The ID of the component. + /// Thrown when the component ID is invalid. + /// Thrown when the component does not exist or a system error occurs. + /// Thrown when memory allocation fails. + /// Thrown when permission is denied to access the component. /// http://tizen.org/privilege/packagemanager.info /// 6 public ComponentRunningContext(string componentId) @@ -61,7 +63,7 @@ public ComponentRunningContext(string componentId) } /// - /// Destructor of the class. + /// Finalizes an instance of the class. /// ~ComponentRunningContext() { @@ -69,7 +71,7 @@ public ComponentRunningContext(string componentId) } /// - /// Enumeration for the component state. + /// Represents the possible states of a component. /// /// 6 public enum ComponentState @@ -108,6 +110,7 @@ public enum ComponentState /// /// Gets the ID of the component. /// + /// The component ID as a string. /// 6 public string ComponentId { @@ -129,7 +132,7 @@ public string ComponentId } /// - /// Gets the application ID of the component. + /// Gets the application ID associated with the component. /// /// 6 public string ApplicationId @@ -146,7 +149,7 @@ public string ApplicationId return appId; } } - + /// /// Gets the instance ID of the component. /// @@ -167,7 +170,7 @@ public string InstanceId } /// - /// Gets the state of the component. + /// Gets the current state of the component. /// /// 6 public ComponentState State @@ -186,8 +189,9 @@ public ComponentState State } /// - /// Checks whether the component is terminated or not. + /// Checks whether the component has been terminated. /// + /// true if the component is terminated; otherwise, false. /// 6 public bool IsTerminated { @@ -205,8 +209,9 @@ public bool IsTerminated } /// - /// Checks whether the component is running as sub component of the group. + /// Checks whether the component is running as a sub-component of a group. /// + /// true if the component is a sub-component; otherwise, false. /// 6 public bool IsSubComponent { @@ -224,12 +229,12 @@ public bool IsSubComponent } /// - /// Resumes the running component. + /// Resumes the execution of the running component. /// - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// Thrown when the argument is invalid. + /// Thrown when a system error occurs. + /// Thrown when memory allocation fails. + /// Thrown when permission is denied to resume the component. /// http://tizen.org/privilege/appmanager.launch /// 6 public void Resume() @@ -237,17 +242,17 @@ public void Resume() Interop.ComponentManager.ErrorCode err = Interop.ComponentManager.ComponentManagerResumeComponent(_contextHandle); if (err != Interop.ComponentManager.ErrorCode.None) { - throw ComponentManager.ComponentManagerErrorFactory.GetException(err, "Failed to Send the resume request."); + throw ComponentManager.ComponentManagerErrorFactory.GetException(err, "Failed to send the resume request."); } } /// - /// Pauses the running component. + /// Pauses the execution of the running component. /// - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// Thrown when the argument is invalid. + /// Thrown when a system error occurs. + /// Thrown when memory allocation fails. + /// Thrown when permission is denied to pause the component. /// http://tizen.org/privilege/appmanager.launch /// 6 [EditorBrowsable(EditorBrowsableState.Never)] @@ -261,12 +266,12 @@ public void Pause() } /// - /// Terminates the running component. + /// Terminates the execution of the running component. /// - /// Thrown when failed because of an invalid argument. - /// Thrown when failed because of the system error. - /// Thrown when failed because of out of memory. - /// Thrown when failed because of permission denied. + /// Thrown when the argument is invalid. + /// Thrown when a system error occurs. + /// Thrown when memory allocation fails. + /// Thrown when permission is denied to terminate the component. /// http://tizen.org/privilege/appmanager.launch /// 6 [EditorBrowsable(EditorBrowsableState.Never)] @@ -280,7 +285,7 @@ public void Terminate() } /// - /// Releases all resources used by the ComponentInfo class. + /// Releases all resources used by the class. /// /// 6 public void Dispose() @@ -290,9 +295,9 @@ public void Dispose() } /// - /// Releases all resources used by the ComponentInfo class. + /// Releases all resources used by the class. /// - /// Disposing + /// true to release managed resources; otherwise, false. /// 6 private void Dispose(bool disposing) { From c7fe8b2231de0b116620c576d248e21f10f02415 Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:45:29 +0900 Subject: [PATCH 11/31] [Applications.RPCPort] Enhance API descriptions (#6370) * [Applications.RPCPort] Enhance API descriptions Signed-off-by: Hwankyu Jhun * [Applications.RPCPort] Modify privileges section Signed-off-by: Hwankyu Jhun --------- Signed-off-by: Hwankyu Jhun --- .../Tizen.Applications.RPCPort/Parcel.cs | 132 ++++++++++-------- .../Tizen.Applications.RPCPort/Port.cs | 2 +- .../Tizen.Applications.RPCPort/ProxyBase.cs | 64 +++++---- .../Tizen.Applications.RPCPort/StubBase.cs | 47 +++++-- 4 files changed, 143 insertions(+), 102 deletions(-) diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs index 9923019a73a..ce0aada91db 100755 --- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs @@ -156,10 +156,10 @@ public class Parcel : IDisposable private ParcelHeader _header; /// - /// Constructor for this class. + /// Constructs a new instance of the Parcel class. /// - /// If it's false, the parcel object does not have the header. - /// Thrown when an internal IO error occurs. + /// Determines whether the created parcel object includes a header or not. + /// Thrown when an internal I/O error occurs during the construction process. /// 11 public Parcel(bool withHeader) { @@ -188,10 +188,10 @@ public Parcel() : this(true) } /// - /// Constructor with port object. + /// Creates a new parcel object from a specified port object. /// - /// Port object. - /// Thrown when an internal IO error occurs. + /// The port object to create a parcel from. + /// An internal IO error occurred while creating the parcel. /// 5 public Parcel(Port port) { @@ -203,10 +203,10 @@ public Parcel(Port port) } /// - /// Constructor with the raw bytes. + /// Constructs a new Parcel object from the specified raw bytes. /// - /// The raw bytes. - /// Thrown when an internal IO error occurs. + /// An array of bytes that represents the content of the parcel. + /// Thrown if an invalid argument is passed in or an internal I/O error occurs. /// 9 public Parcel(byte[] bytes) { @@ -218,10 +218,10 @@ public Parcel(byte[] bytes) } /// - /// Gets the raw bytes of the parcel. + /// Converts the current parcel into its raw bytes representation. /// - /// The raw bytes of the parcel. - /// Thrown when an internal IO error occurs. + /// An array of bytes containing the contents of the parcel. + /// Thrown if an internal I/O error occurs during conversion. /// 9 public byte[] ToBytes() { @@ -234,9 +234,9 @@ public byte[] ToBytes() } /// - /// Sends parcel data through the port. + /// Sends parcel data through the specified port. /// - /// The RPC port object for writing data. + /// The RPC port object for writing data. /// Thrown when an internal IO error occurs. /// 5 public void Send(Port p) @@ -249,9 +249,9 @@ public void Send(Port p) } /// - /// Writes a byte value into parcel object. + /// Writes a single byte value into the parcel object. /// - /// byte data. + /// The byte value to be written into the parcel object. /// 5 public void WriteByte(byte b) { @@ -261,7 +261,7 @@ public void WriteByte(byte b) /// /// Writes a short value into parcel object. /// - /// short data. + /// The short data to write. /// 5 public void WriteShort(short b) { @@ -269,9 +269,23 @@ public void WriteShort(short b) } /// - /// Writes an int value into parcel object. - /// - /// int data. + /// Writes an integer value into the parcel object. + /// + /// The integer value to write. + /// + /// Here's an example showing how to write an integer value into a parcel object: + /// + /// + /// // Create a new parcel object + /// Parcel parcel = new Parcel(); + /// + /// // Write an integer value into the parcel object + /// parcel.WriteInt(42); + /// + /// // Do something else with the parcel object... + /// ... + /// + /// /// 5 public void WriteInt(int b) { @@ -279,9 +293,9 @@ public void WriteInt(int b) } /// - /// Writes a long value into parcel object. + /// Writes a long value into the parcel object. /// - /// long data. + /// The long data to write. /// 5 public void WriteLong(long b) { @@ -289,9 +303,9 @@ public void WriteLong(long b) } /// - /// Writes a float value into parcel object. + /// Writes a float value into the parcel object. /// - /// float data. + /// The float data to write into the parcel object. /// 5 public void WriteFloat(float b) { @@ -299,9 +313,9 @@ public void WriteFloat(float b) } /// - /// Writes a double value into parcel object. + /// Writes a double value into the parcel object. /// - /// double data. + /// The double data to write. /// 5 public void WriteDouble(double b) { @@ -309,9 +323,9 @@ public void WriteDouble(double b) } /// - /// Writes a string value into parcel object. + /// Writes a string value into the parcel object. /// - /// string data. + /// The string data to be written into the parcel object. /// 5 public void WriteString(string b) { @@ -319,9 +333,9 @@ public void WriteString(string b) } /// - /// Writes a bool value into parcel object. + /// Writes a boolean value into the parcel object. /// - /// bool data. + /// The boolean value to write. /// 5 public void WriteBool(bool b) { @@ -329,9 +343,9 @@ public void WriteBool(bool b) } /// - /// Writes a Bundle data into parcel object. + /// Writes a Bundle data into the parcel object. /// - /// Bundle data. + /// The Bundle object to write. /// 5 public void WriteBundle(Bundle b) { @@ -344,9 +358,9 @@ public void WriteBundle(Bundle b) } /// - /// Writes a count of an array into parcel object. + /// Writes a count of an array into the parcel object. /// - /// Array count. + /// The number of elements in the array. /// 5 public void WriteArrayCount(int cnt) { @@ -354,9 +368,9 @@ public void WriteArrayCount(int cnt) } /// - /// Reads a byte value from parcel object. + /// Reads a byte value from the parcel object. /// - /// byte data. + /// The byte value. /// 5 public byte ReadByte() { @@ -365,9 +379,9 @@ public byte ReadByte() } /// - /// Reads a short value from parcel object. + /// Reads a short value from the parcel object. /// - /// short data. + /// The short data. /// 5 public short ReadShort() { @@ -376,9 +390,9 @@ public short ReadShort() } /// - /// Reads an int value from parcel object. + /// Reads an integer value from the parcel object. /// - /// int data. + /// The integer data. /// 5 public int ReadInt() { @@ -387,9 +401,9 @@ public int ReadInt() } /// - /// Reads a long value from parcel object. + /// Reads a long value from the parcel object. /// - /// long data. + /// The long data. /// 5 public long ReadLong() { @@ -398,9 +412,9 @@ public long ReadLong() } /// - /// Reads a float value from parcel object. + /// Reads a float value from the parcel object. /// - /// float data. + /// The float data. /// 5 public float ReadFloat() { @@ -409,9 +423,9 @@ public float ReadFloat() } /// - /// Reads a double value from parcel object. + /// Reads a double value from the parcel object. /// - /// double data. + /// The double data. /// 5 public double ReadDouble() { @@ -420,9 +434,9 @@ public double ReadDouble() } /// - /// Reads a string value from parcel object. + /// Reads a string value from the parcel object. /// - /// string data. + /// The string data. /// 5 public string ReadString() { @@ -431,9 +445,9 @@ public string ReadString() } /// - /// Reads a bool value from parcel object. + /// Reads a boolean value from the parcel object. /// - /// bool data. + /// The boolean data. /// 5 public bool ReadBool() { @@ -442,9 +456,9 @@ public bool ReadBool() } /// - /// Reads a Bundle value from parcel object. + /// Reads a Bundle value from the parcel object. /// - /// Bundle data. + /// The Bundle data. /// 5 public Bundle ReadBundle() { @@ -460,9 +474,9 @@ public Bundle ReadBundle() } /// - /// Reads a count of an array from parcel object. + /// Reads a count of an array from a parcel object. /// - /// Array count. + /// The number of elements in the array. /// 5 public int ReadArrayCount() { @@ -471,9 +485,9 @@ public int ReadArrayCount() } /// - /// Writes bytes into parcel object. + /// Writes bytes into the parcel object. /// - /// Array of bytes. + /// An array of bytes containing the data to be written. /// 5 public void Write(byte[] bytes) { @@ -486,10 +500,10 @@ public void Write(byte[] bytes) } /// - /// Reads bytes from parcel object. + /// Reads bytes from the parcel object. /// - /// Bytes to read. - /// Array of bytes. + /// The number of bytes to read. + /// An array of bytes that were read from the parcel. /// 5 public byte[] Read(int size) { diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs index f8261902ae5..5518b86fae5 100755 --- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Port.cs @@ -21,7 +21,7 @@ namespace Tizen.Applications.RPCPort { /// - /// The class that proxy and stub can use to communicate with each other. + /// A class used by proxies and stubs to communicate with each other. /// /// 5 public class Port diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs index 3206c52f240..038dbdd1c3b 100755 --- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/ProxyBase.cs @@ -19,7 +19,7 @@ namespace Tizen.Applications.RPCPort { /// - /// Abstract class for creating a proxy class for RPC. + /// Base class for creating a proxy class for remote procedure calls. /// /// 5 public abstract class ProxyBase : IDisposable @@ -45,9 +45,9 @@ public abstract class ProxyBase : IDisposable protected Port CallbackPort { get; private set; } /// - /// Constructor for this class. + /// Creates a new instance of the ProxyBase class. /// - /// Thrown when internal IO error occurs. + /// Thrown when an internal I/O error occurs during initialization. /// 5 public ProxyBase() { @@ -64,13 +64,17 @@ public ProxyBase() } /// - /// Connects to port. + /// Establishes a connection to the specified application through the named remote procedure call (RPC) port. /// - /// The target stub app ID. - /// The name of the RPC port. - /// Thrown when not available app ID is used. - /// Thrown when an internal IO error occurs. - /// Thrown when the permission is denied. + /// + /// By calling this method, you can establish a connection between two applications using the specified RPC port. It requires the target application ID and the name of the desired RPC port. + /// If the connection cannot be established due to invalid arguments or insufficient privileges, appropriate exceptions are thrown accordingly. + /// + /// The ID of the target application to connect to. + /// The name of the RPC port to use for the connection. + /// Thrown if the specified application ID does not exist. + /// Thrown in case of an internal input/output error during the connection process. + /// Thrown when the required privileges are missing or access is otherwise restricted. /// http://tizen.org/privilege/datasharing /// http://tizen.org/privilege/appmanager.launch /// 5 @@ -89,13 +93,13 @@ protected void Connect(string appid, string port) } /// - /// Connects to port synchronously. + /// Establishes a connection to the specified application synchronously through the named remote procedure call (RPC) port. /// - /// The target stub app ID. - /// The name of the RPC port. - /// Thrown when not available app ID is used. - /// Thrown when an internal IO error occurs. - /// Thrown when the permission is denied. + /// The ID of the target application to connect to. + /// The name of the RPC port to use for the connection. + /// Thrown if the specified application ID does not exist. + /// Thrown in case of an internal input/output error during the connection process. + /// Thrown when the required privileges are missing or access is otherwise restricted. /// http://tizen.org/privilege/datasharing /// http://tizen.org/privilege/appmanager.launch /// 8 @@ -114,11 +118,17 @@ protected void ConnectSync(string appid, string port) } /// - /// Gets a port. + /// Retrieves a port based on its type. /// - /// The type of port. - /// Port object. - /// Thrown when an internal IO error occurs. + /// The specific type of port to retrieve. + /// An object representing the requested port. + /// Thrown if an internal I/O error occurs while retrieving the port. + /// + /// To get a main port: + /// + /// Port mainPort = GetPort(Port.Type.Main); + /// + /// /// 5 protected Port GetPort(Port.Type t) { @@ -137,8 +147,8 @@ protected Port GetPort(Port.Type t) /// /// Abstract method for receiving connected event. /// - /// The target stub app ID. - /// The name of the RPC port. + /// The target stub application ID. + /// The name of the Remote Procedure Call (RPC) port. /// Port object for reading and writing. /// 5 protected abstract void OnConnectedEvent(string endPoint, string portName, Port port); @@ -146,24 +156,24 @@ protected Port GetPort(Port.Type t) /// /// Abstract method for receiving disconnected event. /// - /// The target stub app ID. - /// The name of the port. + /// The target stub application ID.. + /// The name of the Remote Procedure Call (RPC) port. /// 5 protected abstract void OnDisconnectedEvent(string endPoint, string portName); /// /// Abstract method called when the proxy receives data from stub. /// - /// The target stub app ID. - /// The name of the RPC port. + /// The target stub application ID.. + /// The name of the Remote Procedure Call (RPC) port. /// 5 protected abstract void OnReceivedEvent(string endPoint, string portName); /// /// Abstract method for receiving rejected event. /// - /// The target stub app ID. - /// The name of the RPC port. + /// The target stub application ID.. + /// The name of the Remote Procedure Call (RPC) port. /// 5 protected abstract void OnRejectedEvent(string endPoint, string portName); diff --git a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs index 8e9c13a80ca..43272dee33e 100755 --- a/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs +++ b/src/Tizen.Applications.Common/Tizen.Applications.RPCPort/StubBase.cs @@ -19,8 +19,13 @@ namespace Tizen.Applications.RPCPort { /// - /// Abstract class for creating a stub class for RPC. + /// Base class for creating stubs in RPC. /// + /// + /// This class provides a base implementation for creating stubs that are used in Remote Procedure Call (RPC). By extending this class, you can easily implement your own stubs for specific interfaces. + /// The StubBase class handles common functionality such as managing the connection state and handling incoming requests from clients. It also provides methods for sending responses back to the client after processing the request. + /// To create a stub for a specific interface, you need to extend the StubBase class and override its virtual methods according to the requirements of the interface. + /// /// 5 public abstract class StubBase : IDisposable { @@ -36,10 +41,18 @@ public abstract class StubBase : IDisposable public string PortName { get; } /// - /// Constructor for this class. + /// Constructs a new instance of the StubBase class. /// /// The name of the port that wants to listen. /// Thrown when an internal IO error occurs. + /// + /// Here's an example showing how to construct a new instance of the StubBase class: + /// + /// + /// // Create a new instance of the StubBase class + /// var stubBase = new StubBase("MyPort"); + /// + /// /// 5 public StubBase(string portName) { @@ -55,9 +68,13 @@ public StubBase(string portName) } /// - /// Listens to the requests for connections. + /// Starts listening to incoming connection requests on the specified port. /// - /// Thrown when an internal IO error occurs. + /// + /// This method enables your application to listen for incoming connection requests from other applications. + /// It is typically called after setting up the necessary network infrastructure such as creating a server socket and specifying a listening port. + /// + /// Thrown when an internal IO error occurs during the listening process. /// 5 protected void Listen() { @@ -87,9 +104,9 @@ protected void AddPrivilege(string privilege) } /// - /// Sets a trusted proxy to the stub. + /// Sets whether the stub allows only trusted proxies or not. /// - /// Whether stub allows only trusted proxy or not. + /// Indicates if the stub allows only trusted proxies or not. /// 5 protected void SetTrusted(bool trusted) { @@ -97,13 +114,13 @@ protected void SetTrusted(bool trusted) } /// - /// Gets s port. + /// Retrieves a port based on its type and the connected instance. /// - /// The type of port. - /// The ID of the instance, which is connected. - /// Port object. - /// Thrown when invalid instance is used. - /// Thrown when an internal IO error occurs. + /// The type of port to retrieve. + /// The ID of the instance that the port is connected to. + /// The requested port. + /// Thrown if an invalid instance ID is passed. + /// Thrown in case of an internal I/O error. /// 5 protected Port GetPort(Port.Type t, string instance) { @@ -123,7 +140,7 @@ protected Port GetPort(Port.Type t, string instance) /// /// Abstract method for receiving connected event. /// - /// The target proxy app ID. + /// The target proxy applicstion ID. /// The information about the request. /// 5 protected abstract void OnConnectedEvent(string sender, string instance); @@ -131,7 +148,7 @@ protected Port GetPort(Port.Type t, string instance) /// /// Abstract method for receiving disconnected event. /// - /// The target proxy app ID. + /// The target proxy applicstion ID. /// The information about the request. /// 5 protected abstract void OnDisconnectedEvent(string sender, string instance); @@ -139,7 +156,7 @@ protected Port GetPort(Port.Type t, string instance) /// /// Abstract method called when the stub receives data from proxy. /// - /// The target proxy app ID. + /// The target proxy applicstion ID. /// The information about the request. /// Port object for reading and writing. /// true to continue receiving data, otherwise false to disconnect from the port. From 4b5245228055ab4e14aad4ae3cd7582c9a8b5d7d Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:16:15 +0900 Subject: [PATCH 12/31] [System.MediaKey] Enhance API descriptions (#6377) Signed-off-by: Hwankyu Jhun --- .../Tizen.System/MediaKey.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Tizen.System.MediaKey/Tizen.System/MediaKey.cs b/src/Tizen.System.MediaKey/Tizen.System/MediaKey.cs index 86df6f1db14..099ca161a3d 100755 --- a/src/Tizen.System.MediaKey/Tizen.System/MediaKey.cs +++ b/src/Tizen.System.MediaKey/Tizen.System/MediaKey.cs @@ -19,8 +19,12 @@ namespace Tizen.System { /// - /// The class for event arguments of the media key. + /// Event arguments class for handling media key events. /// + /// + /// This class provides properties that contain information about the media key event, such as the key value and key status. + /// By implementing handlers for the appropriate events, you can respond to user interactions with media keys on supported devices. + /// /// 3 public class MediaKeyEventArgs : EventArgs { @@ -117,8 +121,12 @@ public enum KeyStatus } /// - /// The class for receiving events of media keys. + /// A class that provides methods for handling media key events. /// + /// + /// This class enables developers to receive and handle events triggered by various media keys such as play/pause, volume up/down, etc. + /// By implementing the appropriate event handlers, applications can respond accordingly to user input from these keys. + /// /// 3 public static class MediaKey { @@ -137,8 +145,13 @@ private static void OnEvent(Interop.MediaKey.KeyValue value, Interop.MediaKey.Ke /// /// Adds or removes events for all media keys. /// - /// 3 + /// + /// By subscribing to this event, you can receive notifications about user interactions with media keys such as play/pause, volume up/down, etc. + /// To handle these events, you need to provide a callback function that implements the EventHandler<MediaKeyEventArgs> delegate. + /// In case of failure while reserving or releasing the key, an InvalidOperationException will be thrown. + /// /// Failed to reserve or release the key. + /// 3 public static event EventHandler Event { add From 01207c58d026e50aa3cb03ae73a1704d90cb50f3 Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:22:10 +0900 Subject: [PATCH 13/31] [NUI.Gadget] Export NUIGadgetAssembly class for inhouse developers (#6379) The developers want to check whether the assembly is alive or not. This patch provides the NUIGadgetAssembly for inhouse developers. Signed-off-by: Hwankyu Jhun --- .../Tizen.NUI/NUIGadgetAssembly.cs | 24 ++++++++++++++----- .../Tizen.NUI/NUIGadgetInfo.cs | 6 ++++- .../Tizen.NUI/NUIGadgetManager.cs | 3 +-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetAssembly.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetAssembly.cs index 9946fe8caad..206bf788be7 100644 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetAssembly.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetAssembly.cs @@ -15,6 +15,7 @@ */ using System; +using System.ComponentModel; using System.IO; using System.Reflection; using System.Runtime.Loader; @@ -35,16 +36,21 @@ protected override Assembly Load(AssemblyName name) } } - internal class NUIGadgetAssembly + /// + /// Represents a class that provides access to the methods and properties of the NUIGadgetAssembly. + /// + /// 10 + [EditorBrowsable(EditorBrowsableState.Never)] + public class NUIGadgetAssembly { private static readonly object _assemblyLock = new object(); private readonly string _assemblyPath; private WeakReference _assemblyRef; private Assembly _assembly = null; - public NUIGadgetAssembly(string assemblyPath) { _assemblyPath = assemblyPath; } + internal NUIGadgetAssembly(string assemblyPath) { _assemblyPath = assemblyPath; } - public void Load() + internal void Load() { lock (_assemblyLock) { @@ -65,9 +71,9 @@ public void Load() } } - public bool IsLoaded { get { return _assembly != null; } } + internal bool IsLoaded { get { return _assembly != null; } } - public NUIGadget CreateInstance(string className) + internal NUIGadget CreateInstance(string className) { lock (_assemblyLock) { @@ -75,7 +81,13 @@ public NUIGadget CreateInstance(string className) } } - public void Unload() + /// + /// Property indicating whether the weak reference to the gadget assembly is still alive. + /// + /// 12 + public bool IsAlive { get { return _assemblyRef.IsAlive; } } + + internal void Unload() { lock (_assemblyLock) { diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs index d25f5200717..dcd551f43d3 100755 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs @@ -87,7 +87,11 @@ public string ResourcePath internal Assembly Assembly { get; set; } - internal NUIGadgetAssembly NUIGadgetAssembly { get; set; } + /// + /// Gets the assembly of the gadget. + /// + /// 12 + public NUIGadgetAssembly NUIGadgetAssembly { get; set; } internal static NUIGadgetInfo CreateNUIGadgetInfo(string packageId) { diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs index 05aa1746632..c0289ea0bb4 100755 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs @@ -193,7 +193,6 @@ private static void Unload(NUIGadgetInfo info) if (info.NUIGadgetAssembly != null && info.NUIGadgetAssembly.IsLoaded) { info.NUIGadgetAssembly.Unload(); - info.NUIGadgetAssembly = null; } } } @@ -221,7 +220,7 @@ private static void Load(NUIGadgetInfo info, bool useDefaultContext) } else { - if (info.NUIGadgetAssembly == null) + if (info.NUIGadgetAssembly == null || !info.NUIGadgetAssembly.IsLoaded) { Log.Warn("NUIGadgetAssembly.Load(): " + info.ResourcePath + info.ExecutableFile + " ++"); info.NUIGadgetAssembly = new NUIGadgetAssembly(info.ResourcePath + info.ExecutableFile); From 8d84eec8fd45eb8ec10539f60b0ec4af17bebdd4 Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Tue, 24 Sep 2024 17:42:55 +0900 Subject: [PATCH 14/31] [System.Information] Elaborate API description Signed-off-by: Youngjae Cho --- .../Common/Information.cs | 2 +- .../Usage/ProcessCpuUsage.cs | 12 +++++----- .../Usage/ProcessMemoryUsage.cs | 24 +++++++++---------- .../Usage/SystemCpuUsage.cs | 18 +++++++------- .../Usage/SystemMemoryUsage.cs | 14 +++++------ 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Tizen.System.Information/Common/Information.cs b/src/Tizen.System.Information/Common/Information.cs index 62a01aaea06..8ae73edfa6c 100644 --- a/src/Tizen.System.Information/Common/Information.cs +++ b/src/Tizen.System.Information/Common/Information.cs @@ -124,7 +124,7 @@ private static bool TryGetSystemInfoValue(string key, out T value) #pragma warning restore CS0618 // Type or member is obsolete /// - /// Gets the value of the feature. + /// Gets the value of the feature. It accepts both system and runtime feature key. /// /// 4 /// The type of . diff --git a/src/Tizen.System.Information/Usage/ProcessCpuUsage.cs b/src/Tizen.System.Information/Usage/ProcessCpuUsage.cs index f42fee9d2ae..53a387772d7 100755 --- a/src/Tizen.System.Information/Usage/ProcessCpuUsage.cs +++ b/src/Tizen.System.Information/Usage/ProcessCpuUsage.cs @@ -23,7 +23,7 @@ namespace Tizen.System { /// - /// The class for CPU usage per process. + /// The class for CPU usage per given list of process. /// /// 3 public class ProcessCpuUsage @@ -32,7 +32,7 @@ public class ProcessCpuUsage private Interop.RuntimeInfo.ProcessCpuUsage[] Usages; /// - /// The constructor of ProcessCpuUsage class. + /// The constructor of ProcessCpuUsage class of the given list of process. It internally call Update() on constructing an instance. /// /// 4 /// List of unique process ids. @@ -47,13 +47,13 @@ public ProcessCpuUsage(IEnumerable pid) } /// - /// The number of usage entries. + /// The number of processes being tracked by the instance. /// /// 4 public int Count { get; internal set; } /// - /// Gets the amount of time this process has been scheduled in user mode. + /// Gets the amount of time this process has been scheduled in user mode. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -71,7 +71,7 @@ public uint GetUTime(int pid) } /// - /// Gets the amount of time this process has been scheduled in kernel mode. + /// Gets the amount of time this process has been scheduled in kernel mode. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -89,7 +89,7 @@ public uint GetSTime(int pid) } /// - /// Update the process CPU usage to the latest. + /// Update CPU usage of the given processes to the latest. /// /// 4 /// List of unique process ids. diff --git a/src/Tizen.System.Information/Usage/ProcessMemoryUsage.cs b/src/Tizen.System.Information/Usage/ProcessMemoryUsage.cs index 0c4a2a393fe..8b1bbeee02f 100755 --- a/src/Tizen.System.Information/Usage/ProcessMemoryUsage.cs +++ b/src/Tizen.System.Information/Usage/ProcessMemoryUsage.cs @@ -36,7 +36,7 @@ public class ProcessMemoryUsage private int[] Gems; /// - /// The constructor of ProcessMemoryInformation class. + /// The constructor of ProcessMemoryInformation class of the given list of process. It internally call Update() on constructing an instance. /// /// 4 /// List of unique process ids. @@ -51,13 +51,13 @@ public ProcessMemoryUsage(IEnumerable pid) } /// - /// The number of usage entries. + /// The number of processes being tracked by the instance. /// /// 4 public int Count => Pids.Length; /// - /// Gets the virtual memory size of a process. + /// Gets the virtual memory size of the given process. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -75,7 +75,7 @@ public int GetVsz(int pid) } /// - /// Gets the resident set size of a process. + /// Gets the resident set size of the given process. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -93,7 +93,7 @@ public int GetRss(int pid) } /// - /// Gets the proportional set size of a process. + /// Gets the proportional set size of the given process. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -111,7 +111,7 @@ public int GetPss(int pid) } /// - /// Gets the size not modified and mapped by other processes of a process. + /// Gets the memory size of the given process that is not modified and mapped by other processes. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -129,7 +129,7 @@ public int GetSharedClean(int pid) } /// - /// Gets the size modified and mapped by other processes of a process. + /// Gets the memory size of the given process that is modified and mapped by other processes. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -147,7 +147,7 @@ public int GetSharedDirty(int pid) } /// - /// Gets the size not modified and available only to that process of a process. + /// Gets the memory size of the given process that is not modified and available only to it. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -165,7 +165,7 @@ public int GetPrivateClean(int pid) } /// - /// Gets the size modified and available only to that process of a process. + /// Gets the memory size of the given process that is modified and available only to it. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The process id. @@ -183,7 +183,7 @@ public int GetPrivateDirty(int pid) } /// - /// Gets the GPU memory size of a process. + /// Gets the GPU memory size of the given process. To get the latest value, it is recommended to call Update() before it. /// /// The process id. /// The GPU memory size is using (KiB). @@ -208,7 +208,7 @@ public int GetGPU(int pid) } /// - /// Gets the resident set size in graphic execution manager of a process. + /// Gets the resident set size in graphic execution manager of a process. To get the latest value, it is recommended to call Update() before it. /// /// The process id. /// The resident set size is using (KiB). @@ -233,7 +233,7 @@ public int GetGemRss(int pid) } /// - /// Gets the SWAP memory size of a process. + /// Gets the SWAP memory size of the given process. To get the latest value, it is recommended to call Update() before it. /// /// The process id. /// The SWAP memory size is using (KiB). diff --git a/src/Tizen.System.Information/Usage/SystemCpuUsage.cs b/src/Tizen.System.Information/Usage/SystemCpuUsage.cs index a248275ee4e..76eee812d08 100755 --- a/src/Tizen.System.Information/Usage/SystemCpuUsage.cs +++ b/src/Tizen.System.Information/Usage/SystemCpuUsage.cs @@ -20,7 +20,7 @@ namespace Tizen.System { /// - /// The class for system CPU usage. + /// The class for CPU usage information of the system. /// /// 4 public class SystemCpuUsage @@ -30,7 +30,7 @@ public class SystemCpuUsage private int[] MaxFrequencies; /// - /// The constructor of SystemCpuUsage class. + /// The constructor of SystemCpuUsage class. It internally call Update() on constructing an instance. /// /// 4 /// Thrown when an I/O error occurs while reading from the system. @@ -41,7 +41,7 @@ public SystemCpuUsage() } /// - /// Running time of un-niced user processes (Percent). + /// Running time of un-niced user processes (Percent). To get the latest value, it is recommended to call Update() before it. /// /// 4 public double User @@ -53,7 +53,7 @@ public double User } /// - /// Running time of kernel processes (Percent). + /// Running time of kernel processes (Percent). To get the latest value, it is recommended to call Update() before it. /// /// 4 public double System @@ -65,7 +65,7 @@ public double System } /// - /// Running time of niced user processes (Percent). + /// Running time of niced user processes (Percent). To get the latest value, it is recommended to call Update() before it. /// /// 4 public double Nice @@ -77,7 +77,7 @@ public double Nice } /// - /// Time waiting for I/O completion (Percent). + /// Time waiting for I/O completion (Percent). To get the latest value, it is recommended to call Update() before it. /// /// 4 public double IoWait @@ -95,7 +95,7 @@ public double IoWait public int ProcessorCount { get; internal set; } /// - /// Gets the current frequency of the processor. + /// Gets the current frequency of the processor. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The index (from 0) of the CPU core that you want to know the frequency of. @@ -113,7 +113,7 @@ public int GetCurrentFrequency(int coreId) } /// - /// Gets the max frequency of the processor. + /// Gets the max frequency of the processor. To get the latest value, it is recommended to call Update() before it. /// /// 4 /// The index (from 0) of CPU core that you want to know the frequency of. @@ -131,7 +131,7 @@ public int GetMaxFrequency(int coreId) } /// - /// Update the system CPU usage to the latest. + /// Update the system CPU usage information to the latest. /// /// 4 /// Thrown when an I/O error occurs while reading from the system. diff --git a/src/Tizen.System.Information/Usage/SystemMemoryUsage.cs b/src/Tizen.System.Information/Usage/SystemMemoryUsage.cs index 4819afa8109..e0c7e715a97 100755 --- a/src/Tizen.System.Information/Usage/SystemMemoryUsage.cs +++ b/src/Tizen.System.Information/Usage/SystemMemoryUsage.cs @@ -19,7 +19,7 @@ namespace Tizen.System { /// - /// The class for system memory information. + /// The class for memory usage information of the system. /// /// 4 public class SystemMemoryUsage @@ -27,7 +27,7 @@ public class SystemMemoryUsage private Interop.RuntimeInfo.MemoryInfo Info; /// - /// The constructor of MemoryInformation class. + /// The constructor of MemoryInformation class. It internally call Update() on constructing an instance. /// /// 4 /// Thrown when an I/O error occurs while reading from the system. @@ -37,7 +37,7 @@ public SystemMemoryUsage() } /// - /// Total memory (KiB). + /// Total memory (KiB). To get the latest value, it is recommended to call Update() before it. /// /// 4 public int Total @@ -49,7 +49,7 @@ public int Total } /// - /// Used memory (KiB). + /// Used memory (KiB). To get the latest value, it is recommended to call Update() before it. /// /// 4 public int Used @@ -61,7 +61,7 @@ public int Used } /// - /// Free memory (KiB). + /// Free memory (KiB). To get the latest value, it is recommended to call Update() before it. /// /// 4 public int Free @@ -73,7 +73,7 @@ public int Free } /// - /// Cache memory (KiB). + /// Cache memory (KiB). To get the latest value, it is recommended to call Update() before it. /// /// 4 public int Cache @@ -85,7 +85,7 @@ public int Cache } /// - /// Swap memory (KiB). + /// Swap memory (KiB). To get the latest value, it is recommended to call Update() before it. /// /// 4 public int Swap From 590ff19fef59cceded518a9fa252ee02a8ecd95a Mon Sep 17 00:00:00 2001 From: SangYoun Kwak Date: Wed, 25 Sep 2024 19:23:10 +0900 Subject: [PATCH 15/31] Tizen.Sensor: Update description of sensor class/methods The description of the classes and methods of Tizen.Sensor are updated for these tags: summary, remarks, see, seealso Signed-off-by: SangYoun Kwak --- src/Tizen.Sensor/Tizen.Sensor/BatchSensor.cs | 19 ++- .../Tizen.Sensor/Plugins/Accelerometer.cs | 10 +- .../Tizen.Sensor/Plugins/ActivityDetector.cs | 2 +- .../Plugins/AutoRotationSensor.cs | 15 ++- .../Plugins/FaceDownGestureDetector.cs | 13 +- .../Tizen.Sensor/Plugins/GravitySensor.cs | 21 +-- .../Tizen.Sensor/Plugins/Gyroscope.cs | 18 +-- .../Plugins/GyroscopeRotationVectorSensor.cs | 20 +-- .../Tizen.Sensor/Plugins/HeartRateMonitor.cs | 11 +- .../Plugins/HeartRateMonitorBatch.cs | 16 ++- .../Plugins/HeartRateMonitorLEDGreenBatch.cs | 16 ++- .../Tizen.Sensor/Plugins/HumiditySensor.cs | 12 +- .../Plugins/InVehicleActivityDetector.cs | 13 +- .../Tizen.Sensor/Plugins/LightSensor.cs | 12 +- .../Plugins/LinearAccelerationSensor.cs | 19 +-- .../Tizen.Sensor/Plugins/Magnetometer.cs | 19 +-- .../MagnetometerRotationVectorSensor.cs | 25 ++-- .../Tizen.Sensor/Plugins/OrientationSensor.cs | 19 +-- .../Tizen.Sensor/Plugins/Pedometer.cs | 28 ++-- .../Plugins/PickUpGestureDetector.cs | 13 +- .../Tizen.Sensor/Plugins/PressureSensor.cs | 12 +- .../Tizen.Sensor/Plugins/ProximitySensor.cs | 14 +- .../Plugins/RotationVectorSensor.cs | 25 ++-- .../Plugins/RunningActivityDetector.cs | 13 +- .../Tizen.Sensor/Plugins/SleepMonitor.cs | 14 +- .../Plugins/StationaryActivityDetector.cs | 13 +- .../Tizen.Sensor/Plugins/TemperatureSensor.cs | 12 +- .../Tizen.Sensor/Plugins/UltravioletSensor.cs | 12 +- .../Plugins/UncalibratedGyroscope.cs | 22 +-- .../Plugins/UncalibratedMagnetometer.cs | 25 ++-- .../Plugins/WalkingActivityDetector.cs | 13 +- .../Plugins/WristUpGestureDetector.cs | 13 +- src/Tizen.Sensor/Tizen.Sensor/Sensor.cs | 126 ++++++++++++++++-- 33 files changed, 392 insertions(+), 243 deletions(-) diff --git a/src/Tizen.Sensor/Tizen.Sensor/BatchSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/BatchSensor.cs index aafc00f15f0..a0a5260c963 100644 --- a/src/Tizen.Sensor/Tizen.Sensor/BatchSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/BatchSensor.cs @@ -20,8 +20,13 @@ namespace Tizen.Sensor { /// - /// Abstract sensor for series of sensor data + /// Abstract class for sensor for series of sensor data. + /// Inherit the class 'Sensor' which is an abstract class. /// + /// + /// A class which inherits this abstract class should provide TData as an + /// class that inherits BatchData class. + /// /// 8 public abstract class BatchSensor : Sensor where TData : Tizen.Sensor.BatchData { @@ -40,15 +45,23 @@ public BatchSensor(uint index = 0) : base(index) { public IReadOnlyList Data { get; protected set; } /// - /// Convert general batch data to specific batch data + /// Convert general batch data to specific batch data type "TData". /// /// 8 /// List of converted specific batch data protected abstract IReadOnlyList ConvertBatchData(); /// - /// Update the internal batch data using the latest events + /// Update the internal batch data using the latest events. + /// Call updateBatchEvents() which inherited from the Sensor class to + /// update batch data list which is managed by the Sensor class. + /// Then convert the updated batch data to the specific type by using + /// the method "ConvertBatchData" and assign it to the Data property. /// + /// + /// To use this method, you must override the ConvertBatchData method. + /// + /// /// /// General batch data's raw pointer /// diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs index d60f83ce087..13b66a04eb7 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs @@ -26,28 +26,28 @@ public sealed class Accelerometer : Sensor { private static string AccelerometerKey = "http://tizen.org/feature/sensor.accelerometer"; /// - /// Gets the X component of the acceleration. + /// Get the X component value of acceleration from the accelerometer sensor. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the acceleration. + /// Get the Y component value of acceleration from the accelerometer sensor. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the acceleration. + /// Get the Z component value of acceleration from the accelerometer sensor. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether accelerometer sensor is supported by the device. + /// Return true or false based on whether accelerometer sensor is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -61,7 +61,7 @@ public static bool IsSupported } /// - /// Returns the number of accelerometer sensors available on the device. + /// Return the number of accelerometer sensors available by the system. /// /// 3 /// The count of accelerometer sensors. diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/ActivityDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/ActivityDetector.cs index a7e297d8460..9de206fa290 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/ActivityDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/ActivityDetector.cs @@ -62,7 +62,7 @@ protected enum ActivityType }; /// - /// Gets the activity accuracy of the activity detector. + /// Get the activity accuracy of the activity detector sensor. /// /// 3 /// The activity accuracy. diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/AutoRotationSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/AutoRotationSensor.cs index c1d567eb140..3e20b74a6d9 100644 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/AutoRotationSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/AutoRotationSensor.cs @@ -30,22 +30,22 @@ public sealed class AutoRotationSensor : Sensor private event EventHandler _accuracyChanged; /// - /// Gets the value of the rotation state. + /// Get the degree of the rotation state of the sensor as enum type. /// /// 7 - /// The rotation state. + /// The rotation state, . public AutoRotationState Rotation { get; private set; } = AutoRotationState.Degree_0; /// - /// Gets the accuracy of the auto-rotation data. + /// Get the accuracy of the auto-rotation data as enum type. /// /// 7 - /// Accuracy + /// Accuracy, public SensorDataAccuracy Accuracy { get; private set; } = SensorDataAccuracy.Undefined; /// - /// Returns true or false based on whether the auto-rotation sensor is supported by the device. + /// Return true or false based on whether the auto-rotation sensor is supported by the system. /// /// 7 /// true if supported; otherwise false. @@ -87,11 +87,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the auto-rotation sensor data. /// /// 7 - public event EventHandler DataUpdated; /// - /// An event handler for accuracy changed events. + /// An event handler for the event of accuracy change. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 7 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs index 8cdf9406149..837ff2476e9 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs @@ -27,14 +27,14 @@ public sealed class FaceDownGestureDetector : Sensor private static string GestureDetectorKey = "http://tizen.org/feature/sensor.gesture_recognition"; /// - /// Gets the state of the face down gesture. + /// Get the state of the face down gesture as enum type. /// /// 3 - /// The face down state. + /// The face down state, . public DetectorState FaceDown { get; private set; } = DetectorState.Unknown; /// - /// Returns true or false based on whether the face down gesture detector is supported by the device. + /// Return true or false based on whether the face down gesture detector is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of face down gesture detectors available on the device. + /// Return the number of face down gesture detectors available on the system. /// /// 3 /// The count of face down gesture detectors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.gesture_recognition @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular face down gesture detector in case of multiple sensors. + /// Index refers to a particular face down gesture detector in case of multiple sensors. + /// Default value is 0. /// public FaceDownGestureDetector(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs index f3e4f233b2d..8682aa92893 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs @@ -27,29 +27,30 @@ public sealed class GravitySensor : Sensor private const string GravitySensorKey = "http://tizen.org/feature/sensor.gravity"; private event EventHandler _accuracyChanged; + /// - /// Gets the X component of the gravity. + /// Get the X component value of the gravity sensor as float type. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the gravity. + /// Get the Y component value of the gravity sensor as float type. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the gravity. + /// Get the Z component value of the gravity sensor as float type. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the gravity sensor is supported by the device. + /// Return true or false based on whether the gravity sensor is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -63,7 +64,7 @@ public static bool IsSupported } /// - /// Returns the number of gravity sensors available on the device. + /// Return the number of gravity sensors available on the system. /// /// 3 /// The count of gravity sensors. @@ -77,7 +78,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.gravity @@ -85,7 +86,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular gravity sensor in case of multiple sensors. + /// Index refers to a particular gravity sensor in case of multiple sensors. + /// Default value is 0. /// public GravitySensor (uint index = 0) : base(index) { @@ -101,11 +103,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the gravity sensor data. /// /// 3 - public event EventHandler DataUpdated; /// - /// An event handler for accuracy changed events. + /// An event handler for the event of accuracy change. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs index 4730feb9c86..414d23e39b8 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs @@ -27,28 +27,28 @@ public sealed class Gyroscope : Sensor private const string GyroscopeKey = "http://tizen.org/feature/sensor.gyroscope"; /// - /// Gets the X component of the acceleration. + /// Get the X component value of the acceleration as float type. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the acceleration. + /// Get the Y component value of the acceleration as float type. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the acceleration. + /// Get the Z component value of the acceleration as float type. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the gyroscope sensor is supported by the device. + /// Return true or false based on whether the gyroscope sensor is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -62,7 +62,7 @@ public static bool IsSupported } /// - /// Returns the number of the gyroscope sensors available on the device. + /// Return the number of the gyroscope sensors available on the system. /// /// 3 /// The count of the gyroscope sensors. @@ -76,7 +76,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.gyroscope @@ -84,7 +84,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular gyroscope sensor in case of multiple sensors. + /// Index refers to a particular gyroscope sensor in case of multiple sensors. + /// Default value is 0. /// public Gyroscope(uint index = 0) : base(index) { @@ -98,9 +99,10 @@ internal override SensorType GetSensorType() /// /// An event handler for storing the callback functions for the event corresponding to the change in the gyroscope sensor data. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 - public event EventHandler DataUpdated; private static int GetCount() diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs index 21738e26d17..5b9e5b0cda2 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs @@ -27,42 +27,42 @@ public sealed class GyroscopeRotationVectorSensor : Sensor private const string GyroscopeRVKey = "http://tizen.org/feature/sensor.gyroscope_rotation_vector"; /// - /// Gets the X component of the gyroscope rotation vector. + /// Get the X component of the gyroscope rotation vector. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the gyroscope rotation vector. + /// Get the Y component of the gyroscope rotation vector. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the gyroscope rotation vector. + /// Get the Z component of the gyroscope rotation vector. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Gets the W component of the gyroscope rotation vector. + /// Get the W component of the gyroscope rotation vector. /// /// 3 /// W public float W { get; private set; } = float.MinValue; /// - /// Gets the accuracy of the gyroscope rotation vector data. + /// Get the accuracy of the gyroscope rotation vector data. /// /// 3 /// Accuracy public SensorDataAccuracy Accuracy { get; private set; } /// - /// Returns true or false based on whether the gyroscope rotation vector sensor is supported by the device. + /// Return true or false based on whether the gyroscope rotation vector sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -76,7 +76,7 @@ public static bool IsSupported } /// - /// Returns the number of the gyroscope rotation vector sensors available on the device. + /// Return the number of the gyroscope rotation vector sensors available on the system. /// /// 3 /// The count of accelerometer rotation vector sensors. @@ -90,7 +90,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.gyroscope_rotation_vector @@ -98,7 +98,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular gyroscope rotation vector sensor in case of multiple sensors. + /// Index refers to a particular gyroscope rotation vector sensor in case of multiple sensors. + /// Default value is 0. /// public GyroscopeRotationVectorSensor(uint index = 0) : base(index) { @@ -114,7 +115,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the gyroscope rotation vector sensor data. /// /// 3 - public event EventHandler DataUpdated; private static int GetCount() diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs index b26ea9c9918..e312b773296 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs @@ -27,14 +27,14 @@ public sealed class HeartRateMonitor : Sensor private const string HRMKey = "http://tizen.org/feature/sensor.heart_rate_monitor"; /// - /// Gets the value of the heart rate monitor. + /// Get the value of the heart rate monitor as int type. /// /// 3 /// The heart rate. public int HeartRate { get; private set; } = int.MinValue; /// - /// Returns true or false based on whether the heart rate monitor is supported by the device. + /// Return true or false based on whether the heart rate monitor is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of heart rate monitors available on the device. + /// Return the number of heart rate monitors available on the system. /// /// 3 /// The count of heart rate monitors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/privilege/healthinfo @@ -73,7 +73,8 @@ public static int Count /// Thrown when the application has no privilege to use the sensor. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular heart rate monitor in case of multiple sensors. + /// Index refers to a particular heart rate monitor in case of multiple sensors. + /// Default value is 0. /// public HeartRateMonitor(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorBatch.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorBatch.cs index a0cb24a617c..76882b89ca7 100644 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorBatch.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorBatch.cs @@ -47,14 +47,14 @@ protected override IReadOnlyList ConvertBatchData() } /// - /// Gets the accuracy of the HeartRateMonitorBatch data. + /// Get the accuracy of the HeartRateMonitorBatch data as enum type. /// /// 8 - /// Accuracy + /// Accuracy, . public SensorDataAccuracy Accuracy { get; private set; } = SensorDataAccuracy.Undefined; /// - /// Returns true or false based on whether the HeartRateMonitorBatch sensor is supported by the device. + /// Return true or false based on whether the HeartRateMonitorBatch sensor is supported by the device. /// /// 8 /// true if supported; otherwise false. @@ -68,7 +68,7 @@ public static bool IsSupported } /// - /// Returns the number of HeartRateMonitorBatch sensors available on the device. + /// Return the number of HeartRateMonitorBatch sensors available on the system. /// /// 8 /// The count of HeartRateMonitorBatch sensors. @@ -83,7 +83,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 8 /// http://tizen.org/privilege/healthinfo @@ -94,7 +94,8 @@ public static int Count /// Thrown when the application has no privilege to use the sensor. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular HeartRateMonitorBatch in case of multiple sensors. + /// Index refers to a particular HeartRateMonitorBatch in case of multiple sensors. + /// Default value is 0. /// public HeartRateMonitorBatch(uint index = 0) : base(index) { @@ -110,11 +111,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the HeartRateMonitorBatch data. /// /// 8 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 8 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorLEDGreenBatch.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorLEDGreenBatch.cs index ad0e6d839ec..fcf78e2f6bc 100644 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorLEDGreenBatch.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitorLEDGreenBatch.cs @@ -47,14 +47,14 @@ protected override IReadOnlyList ConvertBatch } /// - /// Gets the accuracy of the auto HeartRateMonitorLEDGreenBatch data. + /// Get the accuracy of the auto HeartRateMonitorLEDGreenBatch data as enum type. /// /// 8 - /// Accuracy + /// Accuracy, . public SensorDataAccuracy Accuracy { get; private set; } = SensorDataAccuracy.Undefined; /// - /// Returns true or false based on whether the HeartRateMonitorLEDGreenBatch sensor is supported by the device. + /// Return true or false based on whether the HeartRateMonitorLEDGreenBatch sensor is supported by the system. /// /// 8 /// true if supported; otherwise false. @@ -68,7 +68,7 @@ public static bool IsSupported } /// - /// Returns the number of HeartRateMonitorLEDGreenBatch sensors available on the device. + /// Return the number of HeartRateMonitorLEDGreenBatch sensors available on the system. /// /// 8 /// The count of HeartRateMonitorLEDGreenBatch sensors. @@ -83,7 +83,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 8 /// http://tizen.org/privilege/healthinfo @@ -94,7 +94,8 @@ public static int Count /// Thrown when the application has no privilege to use the sensor. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular HeartRateMonitorLEDGreenBatch sensor in case of multiple sensors. + /// Index refers to a particular HeartRateMonitorLEDGreenBatch sensor in case of multiple sensors. + /// Default value is 0. /// public HeartRateMonitorLEDGreenBatch(uint index = 0) : base(index) { @@ -110,11 +111,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the HeartRateMonitorLEDGreenBatch sensor data. /// /// 8 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 8 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs index b18c7bbc703..aec54085ce3 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs @@ -27,14 +27,14 @@ public sealed class HumiditySensor : Sensor private const string HumiditySensorKey = "http://tizen.org/feature/sensor.humidity"; /// - /// Gets the value of the humidity sensor. + /// Get the value of the humidity sensor as float type. /// /// 3 /// Humidity public float Humidity { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the humidity sensor is supported by the device. + /// Return true or false based on whether the humidity sensor is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of humidity sensors available on the device. + /// Return the number of humidity sensors available on the system. /// /// 3 /// The count of humidity sensors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.humidity @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular humidity sensor in case of multiple sensors. + /// Index refers to a particular humidity sensor in case of multiple sensors. + /// Default value is 0. /// public HumiditySensor(uint index = 0) : base(index) { @@ -86,7 +87,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the humidity sensor data. /// /// 3 - public event EventHandler DataUpdated; private static int GetCount() diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs index 389c47d5e96..3cec328a815 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs @@ -27,14 +27,14 @@ public sealed class InVehicleActivityDetector : ActivityDetector private const string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition"; /// - /// Gets the state of the in-vehicle activity detector. + /// Get the state of the in-vehicle activity detector as enum type. /// /// 3 - /// The in-vehicle state. + /// The in-vehicle state, . public DetectorState InVehicle { get; private set; } = DetectorState.Unknown; /// - /// Returns true or false based on whether the in-vehicle activity detector is supported by the device. + /// Return true or false based on whether the in-vehicle activity detector is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of in-vehicle activity detectors available on the device. + /// Return the number of in-vehicle activity detectors available on the system. /// /// 3 /// The count of in-vehicle activity detectors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.activity_recognition @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular in-vehicle activity detector in case of multiple sensors. + /// Index refers to a particular in-vehicle activity detector in case of multiple sensors. + /// Default value is 0. /// public InVehicleActivityDetector(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs index 9a11d2adce9..5177176f3f9 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs @@ -27,14 +27,14 @@ public sealed class LightSensor : Sensor private const string LightSensorKey = "http://tizen.org/feature/sensor.photometer"; /// - /// Gets the level of the light. + /// Get the light level of light sensor as float type. /// /// 3 /// The light level. public float Level { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the light sensor is supported by the device. + /// Return true or false based on whether the light sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of light sensors available on the device. + /// Return the number of light sensors available on the system. /// /// 3 /// The count of light sensors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.photometer @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular light sensor in case of multiple sensors. + /// Index refers to a particular light sensor in case of multiple sensors. + /// Default value is 0. /// public LightSensor(uint index = 0) : base(index) { @@ -86,7 +87,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the light sensor data. /// /// 3 - public event EventHandler DataUpdated; private static int GetCount() diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs index 2a2d80cc086..ec2f658fb7e 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs @@ -27,29 +27,30 @@ public sealed class LinearAccelerationSensor : Sensor private const string LinearAccelerationSensorKey = "http://tizen.org/feature/sensor.linear_acceleration"; private event EventHandler _accuracyChanged; + /// - /// Gets the X component of the linear acceleration. + /// Get the X component value of the linear acceleration. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the linear acceleration. + /// Get the Y component value of the linear acceleration. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the linear acceleration. + /// Get the Z component value of the linear acceleration. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the linear acceleration sensor is supported by the device. + /// Return true or false based on whether the linear acceleration sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -63,7 +64,7 @@ public static bool IsSupported } /// - /// Returns the number of linear acceleration sensors available on the device. + /// Return the number of linear acceleration sensors available on the system. /// /// 3 /// The count of linear acceleration sensors. @@ -77,7 +78,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.linear_acceleration @@ -85,7 +86,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular linear acceleration sensor in case of multiple sensors. + /// Index refers to a particular linear acceleration sensor in case of multiple sensors. + /// Default value is 0. /// public LinearAccelerationSensor(uint index = 0) : base(index) { @@ -101,11 +103,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the linear acceleration sensor data. /// /// 3 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs index 0e47cec0203..e23c092826a 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs @@ -27,29 +27,30 @@ public sealed class Magnetometer : Sensor private static string MagnetometerKey = "http://tizen.org/feature/sensor.magnetometer"; private event EventHandler _accuracyChanged; + /// - /// Gets the X component of the magnetometer. + /// Get the X component value of the magnetometer as float type. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the magnetometer. + /// Get the Y component value of the magnetometer as float type. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the magnetometer. + /// Get the Z component value of the magnetometer as float type. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether magnetometer is supported by the device. + /// Return true or false based on whether magnetometer is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -63,7 +64,7 @@ public static bool IsSupported } /// - /// Returns the number of magnetometers available on the device. + /// Return the number of magnetometers available on the system. /// /// 3 /// The count of magnetometers. @@ -77,7 +78,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.magnetometer @@ -85,7 +86,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular magnetometer in case of multiple sensors. + /// Index refers to a particular magnetometer in case of multiple sensors. + /// Default value is 0. /// public Magnetometer(uint index = 0) : base(index) { @@ -101,11 +103,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the magnetometer data. /// /// 3 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs index 8813bd21fee..3e9c70fec65 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs @@ -27,43 +27,44 @@ public sealed class MagnetometerRotationVectorSensor : Sensor private static string MagnetometerRVKey = "http://tizen.org/feature/sensor.geomagnetic_rotation_vector"; private event EventHandler _accuracyChanged; + /// - /// Gets the X component of the magnetometer rotation vector. + /// Get the X component value of the magnetometer rotation vector as float type. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the magnetometer rotation vector. + /// Get the Y component value of the magnetometer rotation vector as float type. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the magnetometer rotation vector. + /// Get the Z component value of the magnetometer rotation vector as float type. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Gets the W component of the magnetometer rotation vector. + /// Get the W component value of the magnetometer rotation vector as float type. /// /// 3 /// W public float W { get; private set; } = float.MinValue; /// - /// Gets the accuracy of the magnetometer rotation vector data. + /// Get the accuracy of the magnetometer rotation vector data as enum type. /// /// 3 - /// Accuracy + /// Accuracy, . public SensorDataAccuracy Accuracy { get; private set; } /// - /// Returns true or false based on whether the magnetometer rotation vector sensor is supported by the device. + /// Return true or false based on whether the magnetometer rotation vector sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -77,7 +78,7 @@ public static bool IsSupported } /// - /// Returns the number of magnetometer rotation vector sensors available on the device. + /// Return the number of magnetometer rotation vector sensors available on the system. /// /// 3 /// The count of magnetometer rotation vector sensors. @@ -91,7 +92,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.geomagnetic_rotation_vector @@ -99,7 +100,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular magnetometer rotation vector sensor in case of multiple sensors. + /// Index refers to a particular magnetometer rotation vector sensor in case of multiple sensors. + /// Default value is 0. /// public MagnetometerRotationVectorSensor(uint index = 0) : base(index) { @@ -115,11 +117,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the magnetometer rotation vector sensor data. /// /// 3 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs index 0a221a05ac6..988e6ebc05f 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs @@ -27,29 +27,30 @@ public sealed class OrientationSensor : Sensor private static string OrientationSensorKey = "http://tizen.org/feature/sensor.tiltmeter"; private event EventHandler _accuracyChanged; + /// - /// Gets the azimuth component of the orientation. + /// Get the azimuth component value of the orientation as float type. /// /// 3 /// Azimuth public float Azimuth { get; private set; } = float.MinValue; /// - /// Gets the pitch component of the orientation. + /// Get the pitch component value of the orientation as float type. /// /// 3 /// Pitch public float Pitch { get; private set; } = float.MinValue; /// - /// Gets the roll component of the orientation. + /// Get the roll component value of the orientation as float type. /// /// 3 /// Roll public float Roll { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the orientation sensor is supported by the device. + /// Return true or false based on whether the orientation sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -63,7 +64,7 @@ public static bool IsSupported } /// - /// Returns the number of orientation sensors available on the device. + /// Return the number of orientation sensors available on the system. /// /// 3 /// The count of orientation sensors. @@ -77,7 +78,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.tiltmeter @@ -85,7 +86,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular orientation sensor in case of multiple sensors. + /// Index refers to a particular orientation sensor in case of multiple sensors. + /// Default value is 0. /// public OrientationSensor(uint index = 0) : base(index) { @@ -101,11 +103,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the orientation sensor data. /// /// 3 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs index a6e81905607..0cc2764ee46 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs @@ -27,63 +27,63 @@ public sealed class Pedometer : Sensor private static string PedometerKey = "http://tizen.org/feature/sensor.pedometer"; /// - /// Gets the step count. + /// Get the step count from pedometer as unsigned integer type. /// /// 3 /// The step count. public uint StepCount { get; private set; } = 0; /// - /// Gets the walking step count. + /// Get the walking step count from pedometer as unsigned integer type. /// /// 3 /// The walk step count. public uint WalkStepCount { get; private set; } = 0; /// - /// Gets the running step count. + /// Get the running step count from pedometer as unsigned integer type. /// /// 3 /// The run step count. public uint RunStepCount { get; private set; } = 0; /// - /// Gets the moving distance. + /// Get the moving distance from pedometer as float type. /// /// 3 /// The moving distance. public float MovingDistance { get; private set; } = 0; /// - /// Gets the calorie burned. + /// Get the calorie burned from pedometer as float type. /// /// 3 /// The calorie burned. public float CalorieBurned { get; private set; } = 0; /// - /// Gets the last speed. + /// Get the last speed from pedometer as float type. /// /// 3 /// The last speed. public float LastSpeed { get; private set; } = 0; /// - /// Gets the last stepping frequency. + /// Get the last stepping frequency from pedometer as float type. /// /// 3 /// The last stepping frequency. public float LastSteppingFrequency { get; private set; } = 0; /// - /// Gets the last step status. + /// Get the last step status from pedometer as enum type. /// /// 3 - /// The last step status. + /// The last step status, . public PedometerState LastStepStatus { get; private set; } = PedometerState.Unknown; /// - /// Returns true or false based on whether the pedometer sensor is supported by the device. + /// Return true or false based on whether the pedometer sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -97,7 +97,7 @@ public static bool IsSupported } /// - /// Returns the number of pedometer sensors available on the device. + /// Return the number of pedometer sensors available on the system. /// /// 3 /// The count of pedometer sensors. @@ -111,7 +111,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/privilege/healthinfo @@ -122,7 +122,8 @@ public static int Count /// Thrown when the application has no privilege to use the sensor. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular pedometer sensor in case of multiple sensors. + /// Index refers to a particular pedometer sensor in case of multiple sensors. + /// Default value is 0. /// public Pedometer(uint index = 0) : base(index) { @@ -138,7 +139,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the pedometer sensor data. /// /// 3 - public event EventHandler DataUpdated; private static int GetCount() diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs index e6c9b736ff5..20681dea02c 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs @@ -27,14 +27,14 @@ public sealed class PickUpGestureDetector : Sensor private static string GestureDetectorKey = "http://tizen.org/feature/sensor.gesture_recognition"; /// - /// Gets the state of the pick up gesture. + /// Get the state of the pick up gesture as enum type. /// /// 3 - /// The pick up state. + /// The pick up state, . public DetectorState PickUp { get; private set; } = DetectorState.Unknown; /// - /// Returns true or false based on whether the pick up gesture detector is supported by the device. + /// Return true or false based on whether the pick up gesture detector is supported by the system. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of pick up gesture detectors available on the device. + /// Return the number of pick up gesture detectors available on the system. /// /// 3 /// The count of pick up gesture detectors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.gesture_recognition @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular pick up gesture detector in case of multiple sensors. + /// Index refers to a particular pick up gesture detector in case of multiple sensors. + /// Default value is 0. /// public PickUpGestureDetector(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs index 80a1838c4e1..5c4f3703647 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs @@ -27,14 +27,14 @@ public sealed class PressureSensor : Sensor private static string PressureSensorKey = "http://tizen.org/feature/sensor.barometer"; /// - /// Gets the value of the pressure sensor. + /// Get the pressure value from the pressure sensor as float type. /// /// 3 /// Pressure public float Pressure { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the pressure sensor is supported by the device. + /// Return true or false based on whether the pressure sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of pressure sensors available on the device. + /// Return the number of pressure sensors available on the system. /// /// 3 /// The count of pressure sensors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.barometer @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular pressure sensor in case of multiple sensors. + /// Index refers to a particular pressure sensor in case of multiple sensors. + /// Default value is 0. /// public PressureSensor(uint index = 0) : base(index) { @@ -86,7 +87,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the pressure sensor data. /// /// 3 - public event EventHandler DataUpdated; diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs index e1e4aa36a63..c428a9fe500 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs @@ -27,14 +27,14 @@ public sealed class ProximitySensor : Sensor private static string ProximitySensorKey = "http://tizen.org/feature/sensor.proximity"; /// - /// Gets the proximity state. + /// Get the proximity state as enum type. /// /// 3 - /// The proximity state. + /// The proximity state, . public ProximitySensorState Proximity { get; private set; } = ProximitySensorState.Unknown; /// - /// Returns true or false based on whether the proximity sensor is supported by the device. + /// Return true or false based on whether the proximity sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of proximity sensors available on the device. + /// Return the number of proximity sensors available on the system. /// /// 3 /// The count of proximity sensors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.proximity @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular proximity sensor in case of multiple sensors. + /// Index refers to a particular proximity sensor in case of multiple sensors. + /// Default value is 0. /// public ProximitySensor(uint index = 0) : base(index) { @@ -86,7 +87,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the proximity sensor data. /// /// 3 - public event EventHandler DataUpdated; private static int GetCount() diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs index 209cc33c644..5a08af0f487 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs @@ -27,43 +27,44 @@ public sealed class RotationVectorSensor : Sensor private static string RotationVectorKey = "http://tizen.org/feature/sensor.rotation_vector"; private event EventHandler _accuracyChanged; + /// - /// Gets the X component of the rotation vector. + /// Get the X component value of the rotation vector as float type. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the rotation vector. + /// Get the Y component value of the rotation vector as float type. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the rotation vector. + /// Get the Z component value of the rotation vector as float type. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Gets the W component of the rotation vector. + /// Get the W component value of the rotation vector as float type. /// /// 3 /// W public float W { get; private set; } = float.MinValue; /// - /// Gets the accuracy of the rotation vector data. + /// Get the accuracy value of the rotation vector data as enum type. /// /// 3 - /// Accuracy + /// Accuracy, . public SensorDataAccuracy Accuracy { get; private set; } = SensorDataAccuracy.Undefined; /// - /// Returns true or false based on whether the rotation vector sensor is supported by the device. + /// Return true or false based on whether the rotation vector sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -77,7 +78,7 @@ public static bool IsSupported } /// - /// Returns the number of rotation vector sensors available on the device. + /// Return the number of rotation vector sensors available on the system. /// /// 3 /// The count of rotation vector sensors. @@ -91,7 +92,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.rotation_vector @@ -99,7 +100,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular rotation vector sensor in case of multiple sensors. + /// Index refers to a particular rotation vector sensor in case of multiple sensors. + /// Default value is 0. /// public RotationVectorSensor(uint index = 0) : base(index) { @@ -115,11 +117,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the rotation vector sensor data. /// /// 3 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs index d42a2cb4b6f..b87f0c66881 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs @@ -27,14 +27,14 @@ public sealed class RunningActivityDetector : ActivityDetector private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition"; /// - /// Gets the state of the running activity detector. + /// Get the state of the running activity detector as enum type. /// /// 3 - /// The running state. + /// The running state, . public DetectorState Running { get; private set; } = DetectorState.Unknown; /// - /// Returns true or false based on whether the running activity detector is supported by the device. + /// Return true or false based on whether the running activity detector is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of running activity detectors available on the device. + /// Return the number of running activity detectors available on the system. /// /// 3 /// The count of running activity detectors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.activity_recognition @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular running activity detector in case of multiple sensors. + /// Index refers to a particular running activity detector in case of multiple sensors. + /// Default value is 0. /// public RunningActivityDetector(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs index bdeb27eb17c..2bab4494575 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs @@ -27,14 +27,14 @@ public sealed class SleepMonitor : Sensor private static string SleepMonitorKey = "http://tizen.org/feature/sensor.sleep_monitor"; /// - /// Gets the value of the sleep state. + /// Get the value of the sleep state as enum type. /// /// 3 - /// The sleep state. + /// The sleep state, . public SleepMonitorState SleepState { get; private set; } = SleepMonitorState.Unknown; /// - /// Returns true or false based on whether the sleep monitor is supported by the device. + /// Return true or false based on whether the sleep monitor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of sleep monitors available on the device. + /// Return the number of sleep monitors available on the system. /// /// 3 /// The count of sleep monitors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/privilege/healthinfo @@ -73,7 +73,8 @@ public static int Count /// Thrown when the application has no privilege to use the sensor. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular sleep monitor in case of multiple sensors. + /// Index refers to a particular sleep monitor in case of multiple sensors. + /// Default value is 0. /// public SleepMonitor(uint index = 0) : base(index) { @@ -89,7 +90,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the sleep monitor data. /// /// 3 - public event EventHandler DataUpdated; diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs index d72306256b4..f85ab0b771e 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs @@ -27,14 +27,14 @@ public sealed class StationaryActivityDetector : ActivityDetector private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition"; /// - /// Gets the state of the stationary activity detector. + /// Get the state of the stationary activity detector as enum type. /// /// 3 - /// The stationary state. + /// The stationary state, . public DetectorState Stationary { get; private set; } = DetectorState.Unknown; /// - /// Returns true or false based on whether the stationary activity detector is supported by the device. + /// Return true or false based on whether the stationary activity detector is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of stationary activity detectors available on the device. + /// Return the number of stationary activity detectors available on the system. /// /// 3 /// The count of stationary activity detectors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.activity_recognition @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular stationary activity detector in case of multiple sensors. + /// Index refers to a particular stationary activity detector in case of multiple sensors. + /// Default value is 0. /// public StationaryActivityDetector(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs index d9a1df9511d..efbf803569d 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs @@ -27,14 +27,14 @@ public sealed class TemperatureSensor : Sensor private static string TemperatureSensorKey = "http://tizen.org/feature/sensor.temperature"; /// - /// Gets the value of the temperature sensor. + /// Get the value of the temperature sensor as float type. /// /// 3 /// Temperature (Celsius) public float Temperature { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the temperature sensor is supported by the device. + /// Return true or false based on whether the temperature sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of temperature sensors available on the device. + /// Return the number of temperature sensors available on the system. /// /// 3 /// The count of temperature sensors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.temperature @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular temperature sensor in case of multiple sensors. + /// Index refers to a particular temperature sensor in case of multiple sensors. + /// Default value is 0. /// public TemperatureSensor(uint index = 0) : base(index) { @@ -86,7 +87,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the temperature sensor data. /// /// 3 - public event EventHandler DataUpdated; diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs index 53bfb10dbd4..a027068b541 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs @@ -27,14 +27,14 @@ public sealed class UltravioletSensor : Sensor private static string UltravioletSensorKey = "http://tizen.org/feature/sensor.ultraviolet"; /// - /// Gets the value of the ultraviolet sensor. + /// Get the value of the ultraviolet sensor as float type. /// /// 3 /// The ultraviolet index. public float UltravioletIndex { get; private set; } = float.MinValue; /// - /// Returns true or false based on whether the ultraviolet sensor is supported by the device. + /// Return true or false based on whether the ultraviolet sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of ultraviolet sensors available on the device. + /// Return the number of ultraviolet sensors available on the system. /// /// 3 /// The count of ultraviolet sensors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.ultraviolet @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular ultraviolet sensor in case of multiple sensors. + /// Index refers to a particular ultraviolet sensor in case of multiple sensors. + /// Default value is 0. /// public UltravioletSensor(uint index = 0) : base(index) { @@ -86,7 +87,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the ultraviolet sensor data. /// /// 3 - public event EventHandler DataUpdated; diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs index 33c9b126470..e5904bff5db 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs @@ -27,49 +27,49 @@ public sealed class UncalibratedGyroscope : Sensor private static string UncalibratedGyroscopeKey = "http://tizen.org/feature/sensor.gyroscope.uncalibrated"; /// - /// Gets the X component of the acceleration. + /// Get the X component value of the acceleration as float type. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the acceleration. + /// Get the Y component value of the acceleration as float type. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the acceleration. + /// Get the Z component value of the acceleration as float type. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Gets the BiasX component of the uncalibrated gyroscope data. + /// Get the BiasX component value of the uncalibrated gyroscope data as float type. /// /// 3 /// The X bias. public float BiasX { get; private set; } = 0; /// - /// Gets the BiasY component of the uncalibrated gyroscope data. + /// Get the BiasY component value of the uncalibrated gyroscope data as float type. /// /// 3 /// The Y bias. public float BiasY { get; private set; } = 0; /// - /// Gets the BiasZ component of the uncalibrated gyroscope data. + /// Get the BiasZ component value of the uncalibrated gyroscope data as float type. /// /// 3 /// The Z bias. public float BiasZ { get; private set; } = 0; /// - /// Returns true or false based on whether the uncalibrated gyroscope sensor is supported by the device. + /// Return true or false based on whether the uncalibrated gyroscope sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -83,7 +83,7 @@ public static bool IsSupported } /// - /// Returns the number of the uncalibrated gyroscope sensors available on the device. + /// Return the number of the uncalibrated gyroscope sensors available on the system. /// /// 3 /// The count of the uncalibrated gyroscope sensors. @@ -97,7 +97,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.gyroscope.uncalibrated @@ -105,7 +105,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular uncalibrated gyroscope sensor in case of multiple sensors. + /// Index refers to a particular uncalibrated gyroscope sensor in case of multiple sensors. + /// Default value is 0. /// public UncalibratedGyroscope(uint index = 0) : base(index) { @@ -121,7 +122,6 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the uncalibrated gyroscope sensor data. /// /// 3 - public event EventHandler DataUpdated; private static int GetCount() diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs index ee1927dcb51..8feee427692 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs @@ -27,50 +27,51 @@ public sealed class UncalibratedMagnetometer : Sensor private static string UncalibratedMagnetometerKey = "http://tizen.org/feature/sensor.magnetometer.uncalibrated"; private event EventHandler _accuracyChanged; + /// - /// Gets the X component of the acceleration. + /// Get the X component value of the acceleration as float type. /// /// 3 /// X public float X { get; private set; } = float.MinValue; /// - /// Gets the Y component of the acceleration. + /// Get the Y component value of the acceleration as float type. /// /// 3 /// Y public float Y { get; private set; } = float.MinValue; /// - /// Gets the Z component of the acceleration. + /// Get the Z component value of the acceleration as float type. /// /// 3 /// Z public float Z { get; private set; } = float.MinValue; /// - /// Gets the BiasX component of the uncalibrated magnetometer data. + /// Get the BiasX component value of the uncalibrated magnetometer data as float type. /// /// 3 /// The X bias. public float BiasX { get; private set; } = 0; /// - /// Gets the BiasY component of the uncalibrated magnetometer data. + /// Get the BiasY component value of the uncalibrated magnetometer data as float type. /// /// 3 /// The Y bias. public float BiasY { get; private set; } = 0; /// - /// Gets the BiasZ component of the uncalibrated magnetometer data. + /// Get the BiasZ component value of the uncalibrated magnetometer data as float type. /// /// 3 /// The Z bias. public float BiasZ { get; private set; } = 0; /// - /// Returns true or false based on whether the uncalibrated magnetometer sensor is supported by the device. + /// Return true or false based on whether the uncalibrated magnetometer sensor is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -84,7 +85,7 @@ public static bool IsSupported } /// - /// Returns the number of uncalibrated magnetometer sensors available on the device. + /// Return the number of uncalibrated magnetometer sensors available on the system. /// /// 3 /// The count of uncalibrated magnetometer sensors. @@ -98,7 +99,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.magnetometer.uncalibrated @@ -106,7 +107,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular uncalibrated magnetometer sensor in case of multiple sensors. + /// Index refers to a particular uncalibrated magnetometer sensor in case of multiple sensors. + /// Default value is 0. /// public UncalibratedMagnetometer(uint index = 0) : base(index) { @@ -122,11 +124,12 @@ internal override SensorType GetSensorType() /// An event handler for storing the callback functions for the event corresponding to the change in the uncalibrated magnetometer sensor data. /// /// 3 - public event EventHandler DataUpdated; /// /// An event handler for accuracy changed events. + /// If an event is added, a new accuracy change callback is registered for this sensor. + /// If an event is removed, accuracy change callback is unregistered for this sensor. /// /// 3 public event EventHandler AccuracyChanged diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs index a7ecb6188a6..e969e544ed8 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs @@ -27,14 +27,14 @@ public sealed class WalkingActivityDetector : ActivityDetector private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition"; /// - /// Gets the state of the walking activity detector. + /// Get the state of the walking activity detector as enum type. /// /// 3 - /// The walking state. + /// The walking state, . public DetectorState Walking { get; private set; } = DetectorState.Unknown; /// - /// Returns true or false based on whether the walking activity detector is supported by the device. + /// Return true or false based on whether the walking activity detector is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of walking activity detectors available on the device. + /// Return the number of walking activity detectors available on the system. /// /// 3 /// The count of walking activity detectors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.activity_recognition @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular walking activity detector in case of multiple sensors. + /// Index refers to a particular walking activity detector in case of multiple sensors. + /// Default value is 0. /// public WalkingActivityDetector(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs b/src/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs index 1e4966ff6c7..bdbde3e0b87 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs @@ -27,14 +27,14 @@ public sealed class WristUpGestureDetector : Sensor private static string WristUpKey = "http://tizen.org/feature/sensor.wrist_up"; /// - /// Gets the state of the wrist up gesture. + /// Get the state of the wrist up gesture as enum type. /// /// 3 - /// The wrist up state. + /// The wrist up state, . public DetectorState WristUp { get; private set; } = DetectorState.Unknown; /// - /// Returns true or false based on whether the wrist up gesture detector is supported by the device. + /// Return true or false based on whether the wrist up gesture detector is supported by the device. /// /// 3 /// true if supported; otherwise false. @@ -48,7 +48,7 @@ public static bool IsSupported } /// - /// Returns the number of wrist up gesture detectors available on the device. + /// Return the number of wrist up gesture detectors available on the system. /// /// 3 /// The count of wrist up gesture detectors. @@ -62,7 +62,7 @@ public static int Count } /// - /// Initializes a new instance of the class. + /// Initialize a new instance of the class. /// /// 3 /// http://tizen.org/feature/sensor.wrist_up @@ -70,7 +70,8 @@ public static int Count /// Thrown when the sensor is not supported. /// Thrown when the operation is invalid for the current state. /// - /// Index. Default value for this is 0. Index refers to a particular wrist up gesture detector in case of multiple sensors. + /// Index refers to a particular wrist up gesture detector in case of multiple sensors. + /// Default value is 0. /// public WristUpGestureDetector(uint index = 0) : base(index) { diff --git a/src/Tizen.Sensor/Tizen.Sensor/Sensor.cs b/src/Tizen.Sensor/Tizen.Sensor/Sensor.cs index 1812c7ccf53..602ef32bf32 100755 --- a/src/Tizen.Sensor/Tizen.Sensor/Sensor.cs +++ b/src/Tizen.Sensor/Tizen.Sensor/Sensor.cs @@ -52,13 +52,38 @@ public abstract class Sensor : IDisposable /// - /// Read a sensor data synchronously. + /// Read sensor(which inherits this class) data synchronously. /// internal abstract void ReadData(); + + /// + /// Get the type of a sensor which inherits this class. + /// internal abstract SensorType GetSensorType(); + + /// + /// Start to listen the event of a sensor which inherits this class. + /// internal abstract void EventListenStart(); + + /// + /// Stop to listen the event of a sensor which inherits this class. + /// internal abstract void EventListenStop(); + /// + /// Update the internal batch event list using the latest events. + /// + /// + /// It will be called for updating events about the sensor like + /// BatchSensor or Plugin classes which inherits this class. + /// + /// + /// General batch data's raw pointer + /// + /// + /// Number of general batch events + /// internal void updateBatchEvents(IntPtr eventsPtr, uint events_count) { if (events_count >= 1) @@ -73,6 +98,14 @@ internal void updateBatchEvents(IntPtr eventsPtr, uint events_count) } } + /// + /// Return the last element of Batched elements, which is the latest + /// sensor event. + /// + /// + /// If there is no event, default(Interop.SensorEventStruct) will be + /// returned. + /// internal Interop.SensorEventStruct latestEvent() { if (BatchedEvents.Count > 0) @@ -82,6 +115,9 @@ internal Interop.SensorEventStruct latestEvent() return default(Interop.SensorEventStruct); } + /// + /// Create the Sensor object to listen to the sensor events. + /// internal Sensor(uint index) { SensorType type = GetSensorType(); @@ -94,7 +130,7 @@ internal Sensor(uint index) } /// - /// Destroy the Sensor object. + /// Destroy the Sensor object and release all resources. /// ~Sensor() { @@ -102,7 +138,7 @@ internal Sensor(uint index) } /// - /// Property: Gets the name of the sensor. + /// Property: Gets the name of the sensor as a string. /// /// 3 /// The name of the sensor. @@ -116,7 +152,7 @@ public string Name } /// - /// Property: Gets the vendor. + /// Property: Gets the vendor of the sensor as a string. /// /// 3 /// The vendor name of the sensor. @@ -158,7 +194,7 @@ public float MaxValue } /// - /// Property: Gets the resolution. + /// Property: Gets the resolution of the sensor as a float type. /// /// 3 /// The resolution. @@ -172,7 +208,7 @@ public float Resolution } /// - /// Property: Gets the minimum interval. + /// Property: Gets the minimum interval of the sensor. /// /// 3 /// The minimum update interval. @@ -186,7 +222,7 @@ public int MinInterval } /// - /// Property: Gets the FIFO count. + /// Property: Gets the FIFO count of the sensor as int type. /// /// 3 /// The size of the hardware FIFO. @@ -200,7 +236,7 @@ public int FifoCount } /// - /// Property: Gets the maximum batch count. + /// Property: Gets the maximum batch count of the sensor. /// /// 3 /// The maximum batch count. @@ -257,7 +293,8 @@ public uint MaxBatchLatency } /// - /// Sets the pause policy of the sensor. + /// Get the pause policy or set the pause policy of the sensor as the + /// set value. /// /// 3 /// The pause policy. @@ -280,6 +317,9 @@ public SensorPausePolicy PausePolicy /// /// Gets or sets the time span. + /// Set value will be used as its 'Ticks' attribute. + /// Get will return the newly allocated TimeSpan object with the same + /// ticks as the sensor's timestamp. /// /// 3 /// The time span. @@ -298,7 +338,8 @@ public TimeSpan TimeSpan } /// - /// Gets or sets the timestamp. + /// Gets or sets the timestamp of a sensor which inherits the sensor + /// class. /// /// 8 /// Timestamp. @@ -317,10 +358,10 @@ public ulong Timestamp } /// - /// Indicates whether this sensor is sensing. + /// Indicate whether the sensor is sensing or not sensing. /// /// 3 - /// true if this sensor is sensing; otherwise false. + /// true if the sensor is sensing; otherwise false. public bool IsSensing { get @@ -338,6 +379,12 @@ internal IntPtr ListenerHandle } } + /// + /// Check if the sensor type is supported or not by the system. + /// + /// The sensor type to check. + /// The key for the sensor type to check. + /// True if the sensor type is supported, otherwise false. internal static bool CheckIfSupported(SensorType type, String key) { bool isSupported = false; @@ -414,7 +461,7 @@ public void Stop() } /// - /// Destroy the current object. + /// Destroy the current object and release all the resources. /// /// 3 public void Dispose() @@ -453,6 +500,13 @@ internal void SetAttribute(SensorAttribute attribute, int option) } } + /// + /// Gets the handle list of the sensors of a given type and index. + /// + /// + /// A device may have more than one sensors of the given type. + /// In such case, the 'index'th sensor handle will be used. + /// private void GetHandleList(SensorType type, uint index) { IntPtr list; @@ -469,6 +523,10 @@ private void GetHandleList(SensorType type, uint index) Interop.Libc.Free(list); } + /// + /// Get the following sensor properties of the sensor: + /// name, vendor, minimum range, maximum range, resolution, minimum interval, fifo count, maximum batch count + /// private void GetProperty() { int error = (int)SensorError.None; @@ -530,6 +588,9 @@ private void GetProperty() } } + /// + /// Create a sensor listener and store a handle of the listener as an member variable. + /// private void CreateListener() { int error = Interop.SensorListener.CreateListener(_sensorHandle, out _listenerHandle); @@ -540,6 +601,9 @@ private void CreateListener() } } + /// + /// Change the interval between updates for the sensor with the value stored in member variable. + /// private void SetInterval() { if (CheckListenerHandle()) @@ -556,6 +620,20 @@ private void SetInterval() } } + /// + /// Set the desired maximum batch latency of the sensor. + /// Sensors that support batching may allow applications to change their maximum batch latencies. + /// For example, if you set the latency as 10,000 ms, the sensor may store its data + /// up to 10,000 ms, before delivering the data through the HAL. + /// In case of non-batching sensors no error will be occured, + /// but nothing is affected by the input latency value. + /// + /// + /// Even if you set a batch latency, the sensor may not work as you intended, + /// as one sensor can be used by more than one listeners. + /// In addition, some batch sensors may already have fixed batching latency + /// or batching queue size, which cannot be altered by applications. + /// private void SetMaxBatchLatency() { if (CheckListenerHandle()) @@ -569,6 +647,14 @@ private void SetMaxBatchLatency() } } + /// + /// Check if listener handle for the sensor is valid or not. + /// + /// + /// If listener handle is not valid, then it will throw ArgumentException. + /// + /// Thrown when the sensor listener handler is invalid. + /// true if listener handle is valid. private bool CheckListenerHandle() { bool result = false; @@ -584,6 +670,12 @@ private bool CheckListenerHandle() return result; } + /// + /// Check if sensor handle for the sensor is valid or not. + /// If sensor handle is not valid, then it will throw ArgumentException. + /// + /// Thrown when the sensor handler is invalid. + /// true if sensor handle is valid. private bool CheckSensorHandle() { bool result = false; @@ -599,6 +691,14 @@ private bool CheckSensorHandle() return result; } + /// + /// Destroy resources of a listener handle of the sensor. + /// Release all resources allocated for a listener handle. + /// + /// + /// If this function is called while the sensor is still running, + /// that is, then it is implicitly stopped. + /// private void DestroyHandles() { Interop.SensorListener.DestroyListener(_listenerHandle); From d29fcfff63cad217250382549173f1c6b53473f1 Mon Sep 17 00:00:00 2001 From: Michal Bloch Date: Fri, 27 Sep 2024 19:39:15 +0200 Subject: [PATCH 16/31] Tizen.Log: update descriptions of log class/methods The descriptions of the classes and methods of Tizen.Log are updated for the 'summary' tag. Clarified summaries where appropriate and made sure they are 50+ characters in length. Signed-off-by: Michal Bloch --- src/Tizen.Log/Tizen/Log.cs | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Tizen.Log/Tizen/Log.cs b/src/Tizen.Log/Tizen/Log.cs index 1e1c645c1c1..eddd5ecb799 100755 --- a/src/Tizen.Log/Tizen/Log.cs +++ b/src/Tizen.Log/Tizen/Log.cs @@ -157,7 +157,7 @@ public class Log { private static char[] sep = { '\\', '/' }; /// - /// Prints a log message with the VERBOSE priority. + /// Prints a regular log message with the VERBOSE priority. /// /// 3 /// The tag name of the log message. @@ -171,7 +171,7 @@ public static void Verbose(string tag, string message, [CallerFilePath] string f } /// - /// Prints a log message with the DEBUG priority. + /// Prints a regular log message with the DEBUG priority. /// /// 3 /// The tag name of the log message. @@ -185,7 +185,7 @@ public static void Debug(string tag, string message, [CallerFilePath] string fil } /// - /// Prints a log message with the INFO priority. + /// Prints a regular log message with the INFO priority. /// /// 3 /// The tag name of the log message. @@ -199,7 +199,7 @@ public static void Info(string tag, string message, [CallerFilePath] string file } /// - /// Prints a log message with the WARNING priority. + /// Prints a regular log message with the WARNING priority. /// /// 3 /// The tag name of the log message. @@ -213,7 +213,7 @@ public static void Warn(string tag, string message, [CallerFilePath] string file } /// - /// Prints a log message with the ERROR priority. + /// Prints a regular log message with the ERROR priority. /// /// 3 /// The tag name of the log message. @@ -227,7 +227,7 @@ public static void Error(string tag, string message, [CallerFilePath] string fil } /// - /// Prints a log message with the FATAL priority. + /// Prints a regular log message with the FATAL priority. /// /// 3 /// The tag name of the log message. @@ -248,6 +248,7 @@ static unsafe void Print(Interop.Dlog.LogPriority priority, string tag, string m /// /// Provides methods to print log messages to the Tizen logging system. + /// Sends "internal" logs, which end up in a different Dlog buffer than regular logs. /// /// 3 [EditorBrowsable(EditorBrowsableState.Never)] @@ -255,7 +256,7 @@ public class InternalLog { private static char[] sep = { '\\', '/' }; /// - /// Prints a log message with the VERBOSE priority. + /// Prints an internal log message with the VERBOSE priority. /// /// 3 /// The tag name of the log message. @@ -270,7 +271,7 @@ public static void Verbose(string tag, string message, [CallerFilePath] string f } /// - /// Prints a log message with the DEBUG priority. + /// Prints an internal log message with the DEBUG priority. /// /// 3 /// The tag name of the log message. @@ -284,7 +285,7 @@ public static void Debug(string tag, string message, [CallerFilePath] string fil } /// - /// Prints a log message with the INFO priority. + /// Prints an internal log message with the INFO priority. /// /// 3 /// The tag name of the log message. @@ -298,7 +299,7 @@ public static void Info(string tag, string message, [CallerFilePath] string file } /// - /// Prints a log message with the WARNING priority. + /// Prints an internal log message with the WARNING priority. /// /// 3 /// The tag name of the log message. @@ -312,7 +313,7 @@ public static void Warn(string tag, string message, [CallerFilePath] string file } /// - /// Prints a log message with the ERROR priority. + /// Prints an internal log message with the ERROR priority. /// /// 3 /// The tag name of the log message. @@ -326,7 +327,7 @@ public static void Error(string tag, string message, [CallerFilePath] string fil } /// - /// Prints a log message with the FATAL priority. + /// Prints an internal log message with the FATAL priority. /// /// 3 /// The tag name of the log message. @@ -347,6 +348,7 @@ static unsafe void Print(Interop.Dlog.LogID log_id, Interop.Dlog.LogPriority pri /// /// Provides methods to print log messages to the Tizen logging system. + /// Sends "secure" logs, which have extra safety not to appear on release builds. /// /// 3 [EditorBrowsable(EditorBrowsableState.Never)] @@ -354,7 +356,7 @@ public class SecureLog { private static char[] sep = { '\\', '/' }; /// - /// Prints a log message with the VERBOSE priority. + /// Prints a secure log message with the VERBOSE priority. /// /// 3 /// The tag name of the log message. @@ -369,7 +371,7 @@ public static void Verbose(string tag, string message, [CallerFilePath] string f } /// - /// Prints a log message with the DEBUG priority. + /// Prints a secure log message with the DEBUG priority. /// /// 3 /// The tag name of the log message. @@ -383,7 +385,7 @@ public static void Debug(string tag, string message, [CallerFilePath] string fil } /// - /// Prints a log message with the INFO priority. + /// Prints a secure log message with the INFO priority. /// /// 3 /// The tag name of the log message. @@ -397,7 +399,7 @@ public static void Info(string tag, string message, [CallerFilePath] string file } /// - /// Prints a log message with the WARNING priority. + /// Prints a secure log message with the WARNING priority. /// /// 3 /// The tag name of the log message. @@ -411,7 +413,7 @@ public static void Warn(string tag, string message, [CallerFilePath] string file } /// - /// Prints a log message with the ERROR priority. + /// Prints a secure log message with the ERROR priority. /// /// 3 /// The tag name of the log message. @@ -425,7 +427,7 @@ public static void Error(string tag, string message, [CallerFilePath] string fil } /// - /// Prints a log message with the FATAL priority. + /// Prints a secure log message with the FATAL priority. /// /// 3 /// The tag name of the log message. From f44c0c6f999056e1e9212f17df168b0fa46dc76c Mon Sep 17 00:00:00 2001 From: upple Date: Fri, 27 Sep 2024 00:20:50 +0900 Subject: [PATCH 17/31] [Applications.ComponentBased] Enhance API descriptions Signed-off-by: Changgyu Choi --- .../BaseComponent.cs | 37 ++++----- .../ComponentBasedApplication.cs | 76 ++++++++++++++----- .../FrameComponent.cs | 37 +++++---- .../ServiceComponent.cs | 18 +++-- .../WidgetComponent.cs | 42 +++++----- 5 files changed, 137 insertions(+), 73 deletions(-) diff --git a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/BaseComponent.cs b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/BaseComponent.cs index 1940a3ff776..52b9ecbdce3 100755 --- a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/BaseComponent.cs +++ b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/BaseComponent.cs @@ -21,11 +21,11 @@ namespace Tizen.Applications.ComponentBased.Common { /// - /// This is a base-component class. - /// It provides common functions of FrameComponent and ServiceComponent. + /// Represents the base class for components, providing common functionalities for both FrameComponent and ServiceComponent. /// /// - /// This class cannot be registered by ComponentBased applications. + /// This class cannot be registered directly by ComponentBased applications. + /// It serves as a base class to be inherited by other components. /// /// 6 public abstract class BaseComponent @@ -75,26 +75,26 @@ public abstract class BaseComponent public event EventHandler TimeZoneChanged; /// - /// A component instance ID. + /// Gets the unique instance ID of the component. /// It will be created after OnCreate method is invoked. /// /// 6 public string Id { get; private set; } /// - /// A component ID + /// Gets the ID of the component. /// /// 6 public string ComponentId { get; private set; } /// - /// Parent object + /// Gets the parent application object to which the component belongs. /// /// 6 public ComponentBasedApplication Parent { get; private set; } /// - /// Finish current component + /// Finishes the current component. /// /// 6 public void Finish() @@ -128,18 +128,18 @@ internal void Bind(IntPtr handle, string compId, string instanceId, ComponentBas } /// - /// Overrides this method if want to handle behavior to restore the previous status. + /// Override this method to handle restoring the previous state of the component. /// - /// Contents. It can be used only in the callback. To use outside, make a copy. + /// A bundle containing the saved state of the component. It can only be used within the callback. To use it outside, create a copy. /// 6 public virtual void OnRestoreContents(Bundle c) { } /// - /// Overrides this method if want to handle behavior to save current status. + /// Override this method to handle saving the current state of the component. /// - /// Contents. It can be used only in the callback. To use outside, make a copy. + /// A bundle containing the current state of the component. It can only be used within the callback. To use it outside, create a copy. /// 6 public virtual void OnSaveContent(Bundle c) { @@ -181,17 +181,18 @@ internal void OnTimeZoneChangedCallback(string timeZone, string timeZoneId) } /// - /// Sends the launch request asynchronously. + /// Sends a launch request asynchronously. /// /// - /// To use group mode, you must use this function instead of SendLaunchRequestAsync(). + /// Use this method to send a launch request with group mode enabled. + /// If group mode is not required, you can use SendLaunchRequestAsync() instead. /// - /// appcontrol object - /// The callback function to be called when the reply is delivered. - /// A task with the result of the launch request. + /// The AppControl object representing the request details. + /// The callback function to be invoked when the reply is received. + /// A task representing the result of the launch request. /// Thrown when failed because of the argument is invalid. - /// Thrown when fail to set component information to the AppControl. - /// Thrown when the application to run is not found. + /// Thrown when there is a failure in setting the component information in the AppControl. + /// Thrown when the target application is not found. /// Thrown when the launch request is rejected. /// http://tizen.org/privilege/appmanager.launch /// 6 diff --git a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ComponentBasedApplication.cs b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ComponentBasedApplication.cs index 8b6cf709f15..da36a7fad81 100755 --- a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ComponentBasedApplication.cs +++ b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ComponentBasedApplication.cs @@ -20,8 +20,13 @@ namespace Tizen.Applications.ComponentBased.Common { /// - /// The class for supporting multi-components based application model. + /// Represents the base class for a multi-component based application. + /// This class allows the creation and management of multiple application components, such as Frame, Service, and Widget components. /// + /// + /// This abstract class provides the core structure for applications that consist of multiple components. + /// Each component has its own lifecycle, and the framework handles these lifecycles independently. + /// /// 6 public abstract class ComponentBasedApplication : Application { @@ -30,12 +35,24 @@ public abstract class ComponentBasedApplication : Application private Interop.CBApplication.CBAppLifecycleCallbacks _callbacks; /// - /// Initializes the ComponentBasedApplicationBase class. + /// Initializes a new instance of the class with the specified component type information. /// - /// The component type information. - /// The key should be a class type of FrameComponent or SubComponent subclass. - /// The value should be a component id which is declared in tizen-manifest.xml. - /// + /// A dictionary where the key is the component class type (FrameComponent, ServiceComponent or WidgetComponent subclass), + /// and the value is the component ID defined in the tizen-manifest.xml file. + /// + /// This constructor sets up the necessary callbacks for the application lifecycle and registers the provided components. + /// + /// + /// + /// IDictionary<Type, string> components = new Dictionary<Type, string>() + /// { + /// { typeof(MyFrameComponent), "frameComponentId" }, + /// { typeof(MyServiceComponent), "serviceComponentId" } + /// }; + /// ComponentBasedApplication app = new MyApplication(components); + /// app.Run(args); + /// + /// /// 6 public ComponentBasedApplication(IDictionary typeInfo) { @@ -53,11 +70,19 @@ public ComponentBasedApplication(IDictionary typeInfo) } /// - /// Registers a component. + /// Registers a component with the specified type and ID. /// - /// Class type - /// Component ID - /// Thrown when component type is already added or not sub-class of FrameComponent or ServiceComponent + /// The type of the component to register. Must be a subclass of FrameComponent, ServiceComponent, or WidgetComponent. + /// The ID of the component, defined in the tizen-manifest.xml file. + /// Thrown when the component type is already registered or not sub-class of FrameComponent, ServiceComponent or WidgetComponent. + /// + /// This method ensures that only valid component types are registered. The component ID must be unique. + /// + /// + /// + /// app.RegisterComponent(typeof(MyFrameComponent), "frameComponentId"); + /// + /// /// 6 public void RegisterComponent(Type compType, string compId) { @@ -98,8 +123,13 @@ public void RegisterComponent(Type compType, string compId) /// /// Runs the application's main loop. /// - /// Arguments from commandline. + /// The arguments passed from the command line. /// Thrown when component type is already added to the component. + /// + /// + /// app.Run(args); + /// + /// /// 6 public override void Run(string[] args) { @@ -121,7 +151,7 @@ public override void Run(string[] args) } /// - /// Exits the main loop of the application. + /// Exits the application's main loop. /// /// 6 public override void Exit() @@ -166,31 +196,43 @@ private void OnFinishedNative(IntPtr data) } /// - /// This method will be called before running main-loop + /// Called before the main loop starts. /// - /// + /// The arguments passed from the command line. + /// + /// Override this method to handle any initialization logic before the application enters the main event loop. + /// /// 6 protected virtual void OnInit(string[] args) { } /// - /// This method will be called after exiting main-loop + /// Called after the main loop exits. /// + /// + /// Override this method to handle any cleanup logic after the application has finished running. + /// /// 6 protected virtual void OnFinished() { } /// - /// This method will be called to start main-loop + /// Called to start the main loop of the application. /// + /// + /// This is an abstract method that must be implemented by derived classes to define the behavior when the application starts. + /// /// 6 protected abstract void OnRun(); /// - /// This method will be called to exit main-loop + /// Called to exit the main loop of the application. /// + /// + /// Override this method to handle any logic needed before the application exits. + /// /// 6 protected virtual void OnExit() { diff --git a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/FrameComponent.cs b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/FrameComponent.cs index d3b166492dd..5a378791aa5 100644 --- a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/FrameComponent.cs +++ b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/FrameComponent.cs @@ -19,15 +19,19 @@ namespace Tizen.Applications.ComponentBased.Common { /// - /// The class for showing UI module + /// Represents a base class for UI components in the component-based application model. + /// This class provides methods for handling the lifecycle and state of UI components. /// /// 6 public abstract class FrameComponent : BaseComponent { /// - /// Gets the display status of a component. + /// Gets the current display status of the component. /// - /// Thrown when component type is already added to the component. + /// + /// The current of the component. + /// + /// Thrown when the display status cannot be retrieved. /// 6 public DisplayStatus DisplayStatus { @@ -43,31 +47,36 @@ public DisplayStatus DisplayStatus } /// - /// Overrides this method to handle behavior when the component is launched. + /// Called when the component is launched. Override this method to implement custom launch behavior. /// - /// True if a service component is successfully created + /// + /// true if the service component is successfully created; otherwise, false. + /// /// 6 public abstract bool OnCreate(); /// - /// Overrides this method to create window. It will be called before OnCreate method. + /// Called to create the window for the component. Override this method to provide a custom window. + /// This method will be called before method. /// - /// Window object to use + /// + /// An object that represents the created window. + /// /// 6 public abstract IWindowInfo CreateWindowInfo(); /// - /// Overrides this method if want to handle behavior when the component receives the appcontrol message. + /// Called when the component receives an app control message. Override this method to handle app control messages. /// - /// appcontrol object - /// True if it was restarted + /// The object containing the app control data. + /// true if the component was restarted; otherwise, false. /// 6 public virtual void OnStart(AppControl appControl, bool restarted) { } /// - /// Overrides this method if you want to handle the behavior when the component is resumed. + /// Called when the component is resumed. Override this method to handle resume behavior. /// /// 6 public virtual void OnResume() @@ -75,7 +84,7 @@ public virtual void OnResume() } /// - /// Overrides this method if you want to handle the behavior when the component is paused. + /// Called when the component is paused. Override this method to handle pause behavior. /// /// 6 public virtual void OnPause() @@ -83,7 +92,7 @@ public virtual void OnPause() } /// - /// Overrides this method if you want to handle the behavior when the component is stopped. + /// Called when the component is stopped. Override this method to handle stop behavior. /// /// 6 public virtual void OnStop() @@ -91,7 +100,7 @@ public virtual void OnStop() } /// - /// Overrides this method if want to handle behavior when the component is destroyed. + /// Called when the component is destroyed. Override this method to handle destruction behavior. /// /// 6 public virtual void OnDestroy() diff --git a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs index 6dc04f2c3b5..53e0397ed00 100755 --- a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs +++ b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs @@ -19,29 +19,32 @@ namespace Tizen.Applications.ComponentBased.Common { /// - /// The class for showing service module + /// Represents a base class for service components in the component-based application model. + /// This class provides methods for handling the lifecycle and state of service components. /// /// 6 public abstract class ServiceComponent : BaseComponent { /// - /// Overrides this method to handle behavior when the component is created. + /// Called when the service component is created. Override this method to implement custom creation behavior. /// - /// True if a service component is successfully created + /// + /// true if the service component is successfully created; otherwise, false. + /// public abstract bool OnCreate(); /// - /// Overrides this method if want to handle behavior when the component receives the start command message. + /// Called when the service component receives a start command message. Override this method to handle start command behavior. /// - /// appcontrol object - /// True if it was restarted + /// The object containing the app control data. + /// true if the component was restarted; otherwise, false. /// 6 public virtual void OnStartCommand(AppControl appControl, bool restarted) { } /// - /// Overrides this method if want to handle behavior when the component is destroyed. + /// Called when the service component is destroyed. Override this method to handle destruction behavior. /// /// 6 public virtual void OnDestroy() @@ -49,3 +52,4 @@ public virtual void OnDestroy() } } } + diff --git a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/WidgetComponent.cs b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/WidgetComponent.cs index 6f69360135a..a4e83f00b2f 100644 --- a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/WidgetComponent.cs +++ b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/WidgetComponent.cs @@ -19,41 +19,47 @@ namespace Tizen.Applications.ComponentBased.Common { /// - /// The class for showing UI module + /// Represents a base class for widget components in the component-based application model. + /// This class provides methods for handling the lifecycle and state of widget components. /// /// 9 public abstract class WidgetComponent : BaseComponent { - /// - /// Override this method to handle behavior when the component is launched. + /// Called when the widget component is created. Override this method to implement custom creation behavior. /// - /// The width of the widget component instance - /// The height of the widget component instance - /// True if a service component is successfully created + /// The width of the widget component instance. + /// The height of the widget component instance. + /// + /// true if the widget component is successfully created; otherwise, false. + /// /// 9 public abstract bool OnCreate(int width, int height); /// - /// Override this method to create window. It will be called before OnCreate method. + /// Called to create the window for the widget. This method will be called before the method. /// - /// The width of the widget window - /// The height of the widget window - /// Window object to use + /// The width of the widget window. + /// The height of the widget window. + /// + /// An object representing the window to use. + /// /// 9 public abstract IWindowProxy CreateWindowInfo(int width, int height); /// - /// Overrid this method if want to handle behavior when the component is started. + /// Called when the widget component is started. Override this method to handle start behavior. /// - /// True if it was restarted + /// + /// true if the component was restarted; otherwise, false. + /// /// 9 public virtual void OnStart(bool restarted) { } /// - /// Override this method if you want to handle the behavior when the component is resumed. + /// Called when the widget component is resumed. Override this method to handle resume behavior. /// /// 9 public virtual void OnResume() @@ -61,7 +67,7 @@ public virtual void OnResume() } /// - /// Override this method if you want to handle the behavior when the component is paused. + /// Called when the widget component is paused. Override this method to handle pause behavior. /// /// 9 public virtual void OnPause() @@ -69,7 +75,7 @@ public virtual void OnPause() } /// - /// Override this method if you want to handle the behavior when the component is stopped. + /// Called when the widget component is stopped. Override this method to handle stop behavior. /// /// 9 public virtual void OnStop() @@ -77,9 +83,11 @@ public virtual void OnStop() } /// - /// Override this method if want to handle behavior when the component is destroyed. + /// Called when the widget component is destroyed. Override this method to handle destruction behavior. /// - /// True if the instance is permanent + /// + /// true if the instance is permanent; otherwise, false. + /// /// 9 public virtual void OnDestroy(bool permanent) { From 61c30fcaaa82bef30c0b2fc44fce6e4d7237b076 Mon Sep 17 00:00:00 2001 From: upple Date: Fri, 27 Sep 2024 14:17:26 +0900 Subject: [PATCH 18/31] Add missing since_tizen tag Signed-off-by: upple --- .../Tizen.Applications.ComponentBased.Common/ServiceComponent.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs index 53e0397ed00..3d95badcdc5 100755 --- a/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs +++ b/src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/ServiceComponent.cs @@ -31,6 +31,7 @@ public abstract class ServiceComponent : BaseComponent /// /// true if the service component is successfully created; otherwise, false. /// + /// 6 public abstract bool OnCreate(); /// From de9eada650248465cbb49876446dca5a26b589f9 Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:44:45 +0900 Subject: [PATCH 19/31] [Tizen.Core] Enhance API descriptions (#6378) * [Tizen.Core] Enhance API descriptions Signed-off-by: Hwankyu Jhun * [Tizen.Core] Add a missing '/' Signed-off-by: Hwankyu Jhun --------- Signed-off-by: Hwankyu Jhun --- src/Tizen.Core/Tizen.Core/Channel.cs | 34 +++++++++++++++---- src/Tizen.Core/Tizen.Core/ChannelObject.cs | 14 ++++++-- .../Tizen.Core/ChannelReceivedEventArgs.cs | 2 +- src/Tizen.Core/Tizen.Core/ChannelReceiver.cs | 20 ++++++----- src/Tizen.Core/Tizen.Core/ChannelSender.cs | 4 +-- src/Tizen.Core/Tizen.Core/Event.cs | 16 ++++++--- src/Tizen.Core/Tizen.Core/EventObject.cs | 2 +- .../Tizen.Core/EventReceivedEventArgs.cs | 2 +- src/Tizen.Core/Tizen.Core/Task.cs | 23 +++++++------ 9 files changed, 81 insertions(+), 36 deletions(-) diff --git a/src/Tizen.Core/Tizen.Core/Channel.cs b/src/Tizen.Core/Tizen.Core/Channel.cs index 0079e83e7e7..e1727a642cf 100644 --- a/src/Tizen.Core/Tizen.Core/Channel.cs +++ b/src/Tizen.Core/Tizen.Core/Channel.cs @@ -21,28 +21,39 @@ namespace Tizen.Core /// /// The class for managing communication channels between tasks of Tizen Core. /// + /// + /// Channels are essential in inter-task communications because they provide a reliable way to exchange messages and data. + /// By creating a channel, you can establish a connection between two tasks that need to communicate with each other. + /// Once created, both tasks can send and receive messages through the channel. + /// It's important to note that channels have a limited capacity, so make sure to handle message overflows appropriately. + /// Additionally, remember to close the channel once it's no longer needed to avoid resource leaks. + /// /// 12 public class Channel : IDisposable { private bool _disposed = false; /// - /// Constructor for creating a new channel with a sender and a receiver. + /// Creates a new channel with a sender and a receiver. /// + /// + /// This constructor initializes a new channel that enables communication between a sender and a receiver. + /// It throws exceptions if any errors occur during initialization due to insufficient memory or invalid operations. + /// /// Thrown when out of memory. /// Thrown when failed because of an invalid operation. /// + /// In the following code snippet, we attempt to initialize a new channel by calling the constructor. + /// However, if there is not enough memory available, an OutOfMemoryException is thrown. We handle this exception by displaying a message in the console. /// - /// /// try /// { - /// var channel = new Channel(); + /// var channel = new Channel(); /// } /// catch (OutOfMemoryException) /// { - /// Console.WriteLine("Exception occurs"); + /// Console.WriteLine("Exception occurs"); /// } - /// /// /// /// 12 @@ -55,7 +66,7 @@ public Channel() } /// - /// Finalizer of the class Channel. + /// Finalizes an instance of the Channel class. /// ~Channel() { @@ -65,12 +76,21 @@ public Channel() /// /// Gets the channel sender instance. /// + /// + /// This property provides access to the channel sender instance that can be used to send messages through the specified channel. + /// It ensures that only one sender instance per channel exists in order to avoid any conflicts during message transmission. + /// /// 12 public ChannelSender Sender { get; private set; } /// - /// Gets the channel receiver instance. + /// Gets the channel receiver instance. /// + /// + /// This property provides access to the channel receiver instance that handles incoming messages from other applications. + /// By utilizing this instance, you can subscribe to specific channels and receive notifications accordingly. + /// It is crucial to understand the concept of channels in order to effectively utilize this feature. For more details on channels, refer to the official documentation. + /// /// 12 public ChannelReceiver Receiver { get; private set; } diff --git a/src/Tizen.Core/Tizen.Core/ChannelObject.cs b/src/Tizen.Core/Tizen.Core/ChannelObject.cs index a721c60018b..eff18ba1fb7 100644 --- a/src/Tizen.Core/Tizen.Core/ChannelObject.cs +++ b/src/Tizen.Core/Tizen.Core/ChannelObject.cs @@ -24,6 +24,11 @@ namespace Tizen.Core /// /// Represents a channel object used for inter-task communication. /// + /// + /// A channel object provides a mechanism for tasks to communicate with each other in a process. It allows sending messages between tasks without any race conditions. + /// To create a channel object, call the static method 'Create'. Once created, you can send and receive messages through the channel by calling the respective methods on the channel object. + /// When you are done using the channel object, remember to dispose it properly to avoid resource leaks. + /// /// 12 public class ChannelObject : IDisposable { @@ -40,6 +45,10 @@ public class ChannelObject : IDisposable /// The data object. /// Thrown when out of memory. /// Thrown when failed because of an invalid operation. + /// + /// This constructor creates a new channel object with the specified ID and data. It throws an OutOfMemoryException if there isn't enough memory available to allocate the object. + /// Additionally, it may throw an InvalidOperationException if the operation fails due to an invalid condition. + /// /// /// /// @@ -68,7 +77,7 @@ internal ChannelObject(IntPtr handle) } /// - /// Finalizer of the class ChannelObject. + /// Finalizes an instance of the ChannelObject class. /// ~ChannelObject() { @@ -135,7 +144,8 @@ public object Data /// Gets the name of the sender task. /// /// 12 - public string Sender { + public string Sender + { get { Interop.LibTizenCore.TizenCoreChannel.ObjectGetSenderTaskName(_handle, out IntPtr taskName); diff --git a/src/Tizen.Core/Tizen.Core/ChannelReceivedEventArgs.cs b/src/Tizen.Core/Tizen.Core/ChannelReceivedEventArgs.cs index 4c5fdf13eb4..64bf33459ef 100644 --- a/src/Tizen.Core/Tizen.Core/ChannelReceivedEventArgs.cs +++ b/src/Tizen.Core/Tizen.Core/ChannelReceivedEventArgs.cs @@ -19,7 +19,7 @@ namespace Tizen.Core { /// - /// Arguments for the event raised when an object has been received through a channel. + /// Represents the arguments for the event raised when an object has been received through a channel. /// /// 12 public class ChannelReceivedEventArgs : System.EventArgs diff --git a/src/Tizen.Core/Tizen.Core/ChannelReceiver.cs b/src/Tizen.Core/Tizen.Core/ChannelReceiver.cs index c1c62d435be..0c6ae5c6b1b 100644 --- a/src/Tizen.Core/Tizen.Core/ChannelReceiver.cs +++ b/src/Tizen.Core/Tizen.Core/ChannelReceiver.cs @@ -35,7 +35,7 @@ internal ChannelReceiver(IntPtr handle) } /// - /// Finalizer of the class ChannelReceiver. + /// Finalizes an instance of the ChannelReceiver class. /// ~ChannelReceiver() { @@ -43,7 +43,7 @@ internal ChannelReceiver(IntPtr handle) } /// - /// Occurrs whenever the channel object is received in the main loop of the task. + /// Occurs whenever a channel object is received in the main loop of the task. /// /// /// The registered event handler will be invoked when the channel receiver is added to the specific task. @@ -53,8 +53,8 @@ internal ChannelReceiver(IntPtr handle) /// /// var channel = new Channel(); /// var receiver = channel.Receiver; - /// receiver.Received += (s, e) => { - /// Console.WriteLine("OnChannelObjectReceived. Message = {}", (string)e.Data); + /// receiver.Received += (sender, args) => { + /// Console.WriteLine("OnChannelObjectReceived. Message = {0}", (string)args.Data); /// }; /// /// @@ -63,19 +63,23 @@ internal ChannelReceiver(IntPtr handle) public event EventHandler Received; /// - /// Receives the channel object from the sender asynchronously. + /// Asynchronously receives the channel object from the sender. /// /// The received channel object. /// Thrown when out of memory. - /// Thrown when failed because of an invalid operation. + /// Thrown when failed due to an invalid operation. /// /// /// /// var channel = new Channel(); /// var task = TizenCore.Find("Test"); /// task.Send(async () => { - /// var channelObject = await channel.Receiver.Receive(); - /// Console.WriteLine("Message = {}", (string)channelObject.Data); + /// try { + /// var channelObject = await channel.Receiver.Receive(); + /// Console.WriteLine("Message = {}", (string)channelObject.Data); + /// } catch (Exception e) { + /// Console.Error.WriteLine("Failed to receive message: {0}", e.ToString()); + /// } /// }); /// /// diff --git a/src/Tizen.Core/Tizen.Core/ChannelSender.cs b/src/Tizen.Core/Tizen.Core/ChannelSender.cs index ae170bac46d..1156d9ec49e 100644 --- a/src/Tizen.Core/Tizen.Core/ChannelSender.cs +++ b/src/Tizen.Core/Tizen.Core/ChannelSender.cs @@ -19,7 +19,7 @@ namespace Tizen.Core { /// - /// Represents the channel sender used for inter-task communication. + /// Represents the channel sender used for inter-task communication. It provides methods to send messages between tasks in order to facilitate task coordination. /// /// 12 public class ChannelSender : IDisposable @@ -32,7 +32,7 @@ internal ChannelSender(IntPtr handle) } /// - /// Finalizer of the class ChannelSender. + /// Finalizes an instance of the ChannelSender class. /// ~ChannelSender() { diff --git a/src/Tizen.Core/Tizen.Core/Event.cs b/src/Tizen.Core/Tizen.Core/Event.cs index 21755d97df4..f705845e561 100644 --- a/src/Tizen.Core/Tizen.Core/Event.cs +++ b/src/Tizen.Core/Tizen.Core/Event.cs @@ -19,8 +19,13 @@ namespace Tizen.Core { /// - /// Represents the event using for broadcasting events. + /// Represents the event used for broadcasting events. /// + /// + /// This class provides functionality for managing events that are broadcasted across multiple components in an application. + /// It enables communication between different parts of the code without resorting to direct references or global variables. + /// By implementing the IDisposable interface, it ensures proper resource management and prevents memory leaks. + /// /// 12 #pragma warning disable CA1716 public class Event : IDisposable @@ -33,13 +38,16 @@ public class Event : IDisposable /// /// Constructor for creating a new event instance. /// + /// + /// This constructor initializes a new event instance. It may throw exceptions if there are any issues during initialization such as running out of memory or performing an invalid operation. + /// /// Thrown when out of memory. /// Thrown when failed because of an invalid operation. /// + /// Here's an example showing how to create a new event instance: /// - /// + /// Create a new event instance /// var coreEvent = new Event(); - /// /// /// /// 12 @@ -57,7 +65,7 @@ public Event() } /// - /// Finalizer of the class Event. + /// Finalizes an instance of the Event class. /// ~Event() { diff --git a/src/Tizen.Core/Tizen.Core/EventObject.cs b/src/Tizen.Core/Tizen.Core/EventObject.cs index 9012bc9094a..22d2ff5af07 100644 --- a/src/Tizen.Core/Tizen.Core/EventObject.cs +++ b/src/Tizen.Core/Tizen.Core/EventObject.cs @@ -70,7 +70,7 @@ internal EventObject(IntPtr handle) } /// - /// Finalizer of the class EventObject. + /// Finalizes an instance of the EventObject class. /// ~EventObject() { diff --git a/src/Tizen.Core/Tizen.Core/EventReceivedEventArgs.cs b/src/Tizen.Core/Tizen.Core/EventReceivedEventArgs.cs index fb561bbd686..93d91914d81 100644 --- a/src/Tizen.Core/Tizen.Core/EventReceivedEventArgs.cs +++ b/src/Tizen.Core/Tizen.Core/EventReceivedEventArgs.cs @@ -19,7 +19,7 @@ namespace Tizen.Core { /// - /// Arguments for the event raised when the event data is received. + /// Represents the arguments passed to the event handler when the event data is received. /// /// 12 public class EventReceivedEventArgs : System.EventArgs diff --git a/src/Tizen.Core/Tizen.Core/Task.cs b/src/Tizen.Core/Tizen.Core/Task.cs index 4ca4cc81dd4..a6796b368fb 100644 --- a/src/Tizen.Core/Tizen.Core/Task.cs +++ b/src/Tizen.Core/Tizen.Core/Task.cs @@ -43,16 +43,16 @@ public class Task : IDisposable private static int _id = 1; /// - /// Initializes the Task class. + /// Initializes the Task class with the specified ID. /// - /// The ID of the task. + /// The unique identifier for the task. /// Thrown when the is invalid or a Task with that ID already exists. /// Thrown when out of memory. /// Thrown when failed because of an invalid operation. /// - /// The constructor throws an exception when the id already exists. - /// By default, the task creates a thread. However, if the is "main", a thread is not created. - /// The 'main' task will be operated in the main thread. + /// The constructor throws an exception when the ID already exists. + /// By default, the task creates a separate thread. However, if the is set to "main", no separate thread is created. + /// In such case, the 'main' task will operate on the main application thread instead. /// /// /// @@ -87,7 +87,6 @@ internal Task(IntPtr handle) Dispose(false); } - /// /// Posts an action to be executed later. /// @@ -283,12 +282,14 @@ public void RemoveTimer(int id) /// /// Adds a channel receiver to a main loop of the task. /// - /// The channel receiver instance. + /// The channel receiver instance that needs to be added. /// Thrown when the argument is null. /// Thrown when the argument is invalid. /// Thrown when failed because of an invalid operation. /// Thrown when out of memory. /// + /// In the following code snippet, we create a channel, find or spawn a task named "ReceivingTask", and then add the channel receiver to the task's main loop by calling the 'AddChannelReceiver' method. + /// /// /// /// var channel = new Channel(); @@ -514,7 +515,7 @@ public void RemoveEvent(Event coreEvent) /// Emits the event object to all registered event handlers of the task. /// It's similar to Event.Emit(), but EmitAllEvent() sends the event object to every event handler of the task while Event.Emit() sends the event object only to the target event's event handler. /// - /// The event object instance. + /// The event object instance to be sent. /// Thrown when the argument is null. /// Thrown when the argument is invalid. /// Thrown when failed because of an invalid operation. @@ -675,11 +676,13 @@ public bool Running { /// /// Thrown when failed because of an invalid operation. /// + /// Here's an example that demonstrates how to create a Core Task and run its main loop: /// - /// + /// // Create a Core Task named "Runner" /// var coreTask = new TCoreTask("Runner"); - /// coreTask.Run(); /// + /// // Start the main loop of the task + /// coreTask.Run(); /// /// /// 12 From 4e39022aef7f94917fcd9ed6478e2a4dbb52397b Mon Sep 17 00:00:00 2001 From: Unsung Lee Date: Tue, 24 Sep 2024 14:10:56 +0900 Subject: [PATCH 20/31] [Tizen.System.Resource] Update the description of APIs Update the description of Tizen.System.Resource APIs Signed-off-by: Unsung Lee --- .../Resource/Resource.cs | 198 +++++++++++++----- 1 file changed, 141 insertions(+), 57 deletions(-) diff --git a/src/Tizen.System.Resource/Resource/Resource.cs b/src/Tizen.System.Resource/Resource/Resource.cs index 8d4063b6bd1..99700d1c56b 100644 --- a/src/Tizen.System.Resource/Resource/Resource.cs +++ b/src/Tizen.System.Resource/Resource/Resource.cs @@ -25,16 +25,27 @@ namespace Tizen.System [EditorBrowsable(EditorBrowsableState.Never)] public class Resource { - /// - /// Set cpu boosting for the target process (pid/tids). - /// - /// - /// http://tizen.org/privilege/internal/default/partner - /// - /// The target process pid/tids. - /// The cpu boosting level - /// The cpu boosting flag bits - /// The timeout in milliseconds + /// + /// Sets cpu boosting for the target process (pid/tids) to the desired level for as long as required. + /// + /// + /// An internal API, so it can be used only by partner level developers. + /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not. + /// + /// + /// http://tizen.org/privilege/internal/default/partner + /// + /// The target process pid/tids. + /// The cpu boosting level + /// The cpu boosting flag bits + /// The timeout in milliseconds + /// + /// + /// + /// + /// Resource.ResourceSetCpuBoosting(new ResourcePidInfo() { Pid = processInfo.Id }, CpuBoostingLevel.CpuBoostingLevelStrong, 0, -1); + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ResourceSetCpuBoosting (ResourcePidInfo pid, CpuBoostingLevel level, CpuBoostingFlag flags, int timeoutMsec) { @@ -45,13 +56,24 @@ public static void ResourceSetCpuBoosting (ResourcePidInfo pid, CpuBoostingLevel } } - /// - /// Clear cpu boosting for the boosted process (pid/tids). - /// - /// - /// http://tizen.org/privilege/internal/default/partner - /// - /// The target process pid/tids. + /// + /// Clears cpu boosting for the boosted process (pid/tids). + /// + /// + /// An internal API, so it can be used only by partner level developers. + /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not. + /// + /// + /// http://tizen.org/privilege/internal/default/partner + /// + /// The target process pid/tids. + /// + /// + /// + /// + /// Resource.ResourceClearCpuBoosting(new ResourcePidInfo() { Pid = processInfo.Id }); + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ResourceClearCpuBoosting (ResourcePidInfo pid) { @@ -62,14 +84,26 @@ public static void ResourceClearCpuBoosting (ResourcePidInfo pid) } } - /// - /// Get the cpu boosting level for the target process (pid/tids). - /// - /// - /// http://tizen.org/privilege/internal/default/partner - /// - /// The target process pid/tids. - /// The boosting level for the target process (pid/tids). + /// + /// Gets the cpu boosting level for the target process (pid/tids). + /// + /// + /// An internal API, so it can be used only by partner level developers. + /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not. + /// + /// + /// http://tizen.org/privilege/internal/default/partner + /// + /// The target process pid/tids. + /// The boosting level for the target process (pid/tids). + /// + /// + /// + /// + /// CpuBoostingLevelInfo level = new CpuBoostingLevelInfo(); + /// Resource.ResourceGetCpuBoostingLevel(new ResourcePidInfo() { Pid = processInfo.Id }, out level); + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ResourceGetCpuBoostingLevel (ResourcePidInfo pid, out CpuBoostingLevelInfo level) { @@ -85,15 +119,28 @@ public static void ResourceGetCpuBoostingLevel (ResourcePidInfo pid, out CpuBoos } } - /// - /// Set cpu resource inheritance from the source tid to the destination process (pid/tids). - /// - /// - /// http://tizen.org/privilege/internal/default/partner - /// - /// The caller thread tid. - /// The name of destination process. - /// The timeout in milliceconds. + /// + /// Sets cpu resource inheritance from the source tid to the destination process (pid/tids). + /// + /// + /// An internal API, so it can be used only by partner level developers. + /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not. + /// It should be called from source after calling the resource_register_cpu_inheritance_destination() function in the destination. + /// + /// + /// http://tizen.org/privilege/internal/default/partner + /// + /// The caller thread tid. + /// The name of destination process. + /// The timeout in milliceconds. + /// + /// + /// + /// + /// + /// Resource.ResourceSetCpuInheritance(0, "test-destination", 500); + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ResourceSetCpuInheritance (int sourceTid, string destProcess, int timeoutMsec) { @@ -104,14 +151,27 @@ public static void ResourceSetCpuInheritance (int sourceTid, string destProcess, } } - /// - /// Clear cpu resource inheritance from the source tid to the destination process (pid/tids). - /// - /// - /// http://tizen.org/privilege/internal/default/partner - /// - /// The caller thread tid. - /// The name of destination process. + /// + /// Clears cpu resource inheritance from the source tid to the destination process (pid/tids). + /// + /// + /// An internal API, so it can be used only by partner level developers. + /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not. + /// It should be called from source after calling the resource_register_cpu_inheritance_destination() function in the destination. + /// + /// + /// http://tizen.org/privilege/internal/default/partner + /// + /// The caller thread tid. + /// The name of destination process. + /// + /// + /// + /// + /// + /// Resource.ResourceClearCpuInheritance(0, "test-destination"); + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ResourceClearCpuInheritance (int sourceTid, string destProcess) { @@ -122,14 +182,26 @@ public static void ResourceClearCpuInheritance (int sourceTid, string destProces } } - /// - /// Register a destination process (pid/tids) for cpu resource inheritance. - /// - /// - /// http://tizen.org/privilege/internal/default/partner - /// - /// The name of destination process. - /// The destination process pid/tids. + /// + /// Registers a destination process (pid/tids) for cpu resource inheritance. + /// + /// + /// An internal API, so it can be used only by partner level developers. + /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not. + /// + /// + /// http://tizen.org/privilege/internal/default/partner + /// + /// The name of destination process. + /// The destination process pid/tids. + /// + /// + /// + /// + /// + /// Resource.ResourceRegisterCpuInheritanceDestination("test-destination", new ResourcePidInfo() { Pid = processInfo.Id }); + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ResourceRegisterCpuInheritanceDestination (string destProcess, ResourcePidInfo pid) { @@ -140,13 +212,25 @@ public static void ResourceRegisterCpuInheritanceDestination (string destProcess } } - /// - /// Unregister a destination process (pid/tids) for cpu resource inheritance. - /// - /// - /// http://tizen.org/privilege/internal/default/partner - /// - /// The name of destination process. + /// + /// Unregisters a destination process (pid/tids) for cpu resource inheritance. + /// + /// + /// An internal API, so it can be used only by partner level developers. + /// In addition, the developers cannot arbitrary choose whether to enforce this privilege or not. + /// + /// + /// http://tizen.org/privilege/internal/default/partner + /// + /// The name of destination process. + /// + /// + /// + /// + /// + /// Resource.ResourceUnregisterCpuInheritanceDestination("test-destination"); + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ResourceUnregisterCpuInheritanceDestination (string destProcess) { From bad0d77333aef2f273270c905c232d79e0a9f003 Mon Sep 17 00:00:00 2001 From: Unsung Lee Date: Tue, 24 Sep 2024 15:01:08 +0900 Subject: [PATCH 21/31] [Tizen.System.PowerUsage] Update the description of APIs Update the description of Tizen.System.PowerUsage APIs Signed-off-by: Unsung Lee --- src/Tizen.System.PowerUsage/PowerUsage/PowerUsage.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Tizen.System.PowerUsage/PowerUsage/PowerUsage.cs b/src/Tizen.System.PowerUsage/PowerUsage/PowerUsage.cs index aad07402917..ccfdf77bb30 100644 --- a/src/Tizen.System.PowerUsage/PowerUsage/PowerUsage.cs +++ b/src/Tizen.System.PowerUsage/PowerUsage/PowerUsage.cs @@ -218,6 +218,18 @@ public static double GetPowerUsage(PowerUsageResourceType rtype, DateTime start, return batteryUsage; } + /// + /// Gets the battery consumption in mAh (milli-Ampere hour) for specific resource from available data usage handle. + /// + /// 7 + /// Battery consumption data usage handle. + /// Identifier of resource type. BLE, WiFi, CPU etc. + /// Returns the battery usage in mAh(milli-Ampere hour) by a resource. + /// http://tizen.org/feature/battery + /// http://tizen.org/privilege/systemmonitor + /// When an invalid parameter value is set. + /// If the privilege is not set. + /// In case power usage is not supported private static double GetPowerUsage(IntPtr dataHandle, PowerUsageResourceType rtype) { double batteryUsage = 0; From 93e26c47e45556f40c1f6559ea67f0b74287495c Mon Sep 17 00:00:00 2001 From: Unsung Lee Date: Tue, 24 Sep 2024 15:31:56 +0900 Subject: [PATCH 22/31] [Tizen.System.Storage] Update the description of APIs Update the description of Tizen.System.Storage APIs Signed-off-by: Unsung Lee --- src/Tizen.System.Storage/Storage/Storage.cs | 24 +++++++++---------- .../Storage/StorageManager.cs | 14 +++++++++++ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/Tizen.System.Storage/Storage/Storage.cs b/src/Tizen.System.Storage/Storage/Storage.cs index d02665216cc..65170976c37 100644 --- a/src/Tizen.System.Storage/Storage/Storage.cs +++ b/src/Tizen.System.Storage/Storage/Storage.cs @@ -157,32 +157,32 @@ public event EventHandler StorageStateChanged } /// - /// The storage ID. + /// The storage ID. It is the identifier used to determine whether the corresponding storage is internal or external. /// /// 3 /// http://tizen.org/feature/storage.external public int Id { get; } /// - /// The type of storage. + /// The type of storage. It has one of three values: internal, external or extended internal. /// /// 3 /// http://tizen.org/feature/storage.external public StorageArea StorageType { get { return (StorageArea)_storagetype; } } /// - /// The root directory for the storage. + /// The root directory for the storage. It generally has an absolute path. /// /// 3 /// http://tizen.org/feature/storage.external public string RootDirectory { get; } /// - /// The total storage size in bytes. + /// The total storage space in bytes. The type of value is ulong. /// /// 3 /// http://tizen.org/feature/storage.external public ulong TotalSpace { get { return _totalSpace; } } /// - /// The StorageState. + /// The StorageState. It contains information about the mounted state of the storage. /// /// 3 /// http://tizen.org/feature/storage.external @@ -203,7 +203,7 @@ public StorageState State } /// - /// The StorageDevice. + /// The StorageDevice. It indicates information such as sdcard or USB storage. /// /// 5 /// http://tizen.org/feature/storage.external @@ -222,7 +222,7 @@ public StorageDevice DeviceType } /// - /// The type of file system. + /// The type of file system. For example, it can be ext3 or ext4. /// /// 5 /// http://tizen.org/feature/storage.external @@ -241,7 +241,7 @@ public string Fstype } /// - /// The UUID of the file system. + /// The UUID of the file system. It is a unique value that serves as immutable identifier. /// /// 5 /// http://tizen.org/feature/storage.external @@ -260,7 +260,7 @@ public string Fsuuid } /// - /// Information whether this is a primary partition. + /// Information whether this is a primary partition or not. /// /// 5 /// http://tizen.org/feature/storage.external @@ -279,7 +279,7 @@ public bool Primary } /// - /// The flags for the storage status. + /// The flags for the storage status. It is a piece of information representing storage. /// /// 5 /// http://tizen.org/feature/storage.external @@ -320,7 +320,7 @@ public ulong AvaliableSpace } /// - /// The available storage size in bytes. + /// The available storage size in bytes. The type of value is ulong. /// /// 5 /// http://tizen.org/feature/storage.external @@ -340,7 +340,7 @@ public ulong AvailableSpace } /// - /// Absolute path for a given directory type in the storage. + /// Gets the absolute path to the root directory of the given storage. /// /// /// The returned directory path may not exist, so you must make sure that it exists before using it. diff --git a/src/Tizen.System.Storage/Storage/StorageManager.cs b/src/Tizen.System.Storage/Storage/StorageManager.cs index 5bf91578bb8..71bb5e1698e 100644 --- a/src/Tizen.System.Storage/Storage/StorageManager.cs +++ b/src/Tizen.System.Storage/Storage/StorageManager.cs @@ -109,6 +109,19 @@ private static void UnregisterChangedEvent(StorageArea type) /// 5 /// http://tizen.org/feature/storage.external /// Thrown when the storage is not supported. + /// + /// + /// + /// EventHandler callback = (s, e) => + /// { + /// var storage = s as Storage; + /// if (storage == null) return; + /// }; + /// + /// StorageManager.SetChangedEvent(StorageArea.External, callback); + /// StorageManager.UnSetChangedEvent(StorageArea.External, callback); + /// + /// public static void SetChangedEvent(StorageArea type, EventHandler handler) { if (type == StorageArea.Internal) @@ -138,6 +151,7 @@ public static void SetChangedEvent(StorageArea type, EventHandler handler) /// 5 /// http://tizen.org/feature/storage.external /// Thrown when the storage is not supported. + /// public static void UnsetChangedEvent(StorageArea type, EventHandler handler) { if (type == StorageArea.Internal) From f46ebbbf1b0694430d0be3194a09d83c74f6054a Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:02:45 +0900 Subject: [PATCH 23/31] [NUI.Gadget] Enhance API descriptions (#6375) Signed-off-by: Hwankyu Jhun --- src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadget.cs | 50 ++++++-- .../Tizen.NUI/NUIGadgetInfo.cs | 2 +- .../NUIGadgetLifecycleChangedEventArgs.cs | 6 +- .../Tizen.NUI/NUIGadgetManager.cs | 114 ++++++++++++++---- .../Tizen.NUI/NUIGadgetResourceManager.cs | 48 +++++--- 5 files changed, 164 insertions(+), 56 deletions(-) diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadget.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadget.cs index 6a766047b51..2f48cca2ee2 100755 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadget.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadget.cs @@ -22,8 +22,13 @@ namespace Tizen.NUI { /// - /// This class represents a NUIGadget controlled lifecycles. + /// Represents a NUIGadget controlled lifecycle. /// + /// + /// This class provides functionality related to managing the lifecycle of a NUIGadget. + /// It enables developers to handle events such as initialization, activation, deactivation, and destruction of the gadget. + /// By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their gadgets accordingly. + /// /// 10 [EditorBrowsable(EditorBrowsableState.Never)] public abstract class NUIGadget @@ -31,7 +36,11 @@ public abstract class NUIGadget /// /// Initializes the gadget. /// - /// /// The type of the NUIGadget. + /// The type of the NUIGadget. + /// + /// This constructor initializes a new instance of the NUIGadget class based on the specified type. + /// It is important to provide the correct type argument in order to ensure proper functionality and compatibility with other components. + /// /// 10 public NUIGadget(NUIGadgetType type) { @@ -44,7 +53,11 @@ public NUIGadget(NUIGadgetType type) /// /// Gets the class representing information of the current gadget. /// - /// This property is set before the OnCreate() is called, after the instance has been created. + /// + /// This property is set before the OnCreate() is called, after the instance has been created. + /// It provides details about the current gadget such as its ID, name, version, and other relevant information. + /// By accessing this property, developers can retrieve the necessary information about the gadget they are working on. + /// /// 10 public NUIGadgetInfo NUIGadgetInfo { @@ -53,7 +66,7 @@ public NUIGadgetInfo NUIGadgetInfo } /// - /// Gets the type. + /// Gets the type of the NUI gadget. /// /// 10 public NUIGadgetType Type @@ -65,7 +78,10 @@ public NUIGadgetType Type /// /// Gets the class name. /// - /// This property is set before the OnCreate() is called, after the instance has been created. + /// + /// This property is set before the OnCreate() is called, after the instance has been created. + /// It provides access to the name of the class that was used to create the current instance. + /// /// 10 public string ClassName { @@ -74,7 +90,7 @@ public string ClassName } /// - /// Gets the main view. + /// Gets the main view of the NUI gadget.. /// /// 10 public View MainView @@ -84,7 +100,7 @@ public View MainView } /// - /// Gets the lifecycle state. + /// Gets the current lifecycle state of the gadget. /// /// 10 public NUIGadgetLifecycleState State @@ -96,7 +112,11 @@ public NUIGadgetLifecycleState State /// /// Gets the resource manager. /// - /// This property is set before the OnCreate() is called, after the instance has been created. + /// This property is set before the OnCreate() is called, after the instance has been created. + /// It provides access to various resources such as images, sounds, and fonts that can be used in your application. + /// By utilizing the resource manager, you can easily manage and retrieve these resources without having to manually handle their loading and unloading. + /// Additionally, the resource manager ensures efficient memory management by automatically handling the caching and recycling of resources. + /// /// 10 public NUIGadgetResourceManager NUIGadgetResourceManager { @@ -172,8 +192,8 @@ private void NotifyLifecycleChanged() } /// - /// Overrides this method if want to handle behavior when the gedget is started. - /// If 'base.OnCreate()' is not called, the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Created' state will not be emitted. + /// Override this method to define the behavior when the gadget is created. + /// Calling 'base.OnCreate()' is necessary in order to emit the 'NUIGadgetLifecycleChanged' event with the 'NUIGadgetLifecycleState.Created' state. /// /// The main view object. /// 10 @@ -187,15 +207,19 @@ protected virtual Tizen.NUI.BaseComponents.View OnCreate() /// /// Overrides this method if want to handle behavior when the gadget receives the appcontrol message. /// - /// The appcontrol received event argument. + /// + /// This method provides a way to customize the response when the gadget receives an appcontrol message. + /// By overriding this method in your derived class, you can define specific actions based on the incoming arguments. + /// + /// The appcontrol received event argument containing details about the received message. /// 10 protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e) { } /// - /// Overrides this method if want to handle behavior when the gadget is destroyed. - /// If 'base.OnDestroy()' is not called. the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Destroyed' state will not be emitted. + /// Override this method to handle the behavior when the gadget is destroyed. + /// If 'base.OnDestroy()' is not called, the 'NUIGadgetLifecycleChanged' event with the 'NUIGadgetLifecycleState.Destroyed' state will not be emitted. /// /// 10 protected virtual void OnDestroy() diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs index dcd551f43d3..c28aaa88a19 100755 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetInfo.cs @@ -26,7 +26,7 @@ namespace Tizen.NUI { /// - /// This class provides properties to get information the gadget. + /// This class provides properties to retrieve information the gadget. /// /// 10 [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetLifecycleChangedEventArgs.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetLifecycleChangedEventArgs.cs index 2db245cd121..9c9e063f757 100755 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetLifecycleChangedEventArgs.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetLifecycleChangedEventArgs.cs @@ -20,20 +20,20 @@ namespace Tizen.NUI { /// - /// Arguments for the event raised when the NUIGadget lifecycle is changed. + /// Event arguments for the NUIGadget lifecycle change event. /// /// 10 [EditorBrowsable(EditorBrowsableState.Never)] public class NUIGadgetLifecycleChangedEventArgs : EventArgs { /// - /// The NUIGadget object. + /// Gets the NUIGadget object that triggered the event. /// /// 10 public NUIGadget Gadget { get; internal set; } /// - /// The state of the NUIGadget lifecycle. + /// Gets the current state of the NUIGadget lifecycle. /// /// 10 public NUIGadgetLifecycleState State { get; internal set; } diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs index c0289ea0bb4..e7e277d33df 100755 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetManager.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI { /// - /// This class has the methods and events of the NUIGadgetManager. + /// The NUIGadgetManager provides methods and events related to managing gadgets in the NUI. /// /// 10 [EditorBrowsable(EditorBrowsableState.Never)] @@ -109,6 +109,10 @@ private static void OnDeviceOrientationChanged(object sender, DeviceOrientationE /// /// Occurs when the lifecycle of the NUIGadget is changed. /// + /// + /// This event is raised when the state of the NUIGadget changes. + /// It provides information about the current state through the NUIGadgetLifecycleChangedEventArgs argument. + /// /// 10 public static event EventHandler NUIGadgetLifecycleChanged; @@ -137,6 +141,10 @@ private static NUIGadgetInfo Find(string resourceType) /// Loads an assembly of the NUIGadget. /// /// The resource type of the NUIGadget package. + /// + /// This method loads an assembly of the NUIGadget based on the specified resource type. + /// It throws an ArgumentException if the argument is invalid, or an InvalidOperationException if the operation fails due to any reason. + /// /// Thrown when failed because of a invalid argument. /// Thrown when failed because of an invalid operation. /// 10 @@ -149,9 +157,9 @@ public static void Load(string resourceType) /// Loads an assembly of the NUIGadget. /// /// The resource type of the NUIGadget package. - /// The flag if ture, use a default load context. Otherwise, use a new load context. - /// Thrown when failed because of a invalid argument. - /// Thrown when failed because of an invalid operation. + /// Indicates whether to use a default load context or not. + /// Thrown when failed due to an invalid argument. + /// Thrown when failed due to an invalid operation. /// 10 public static void Load(string resourceType, bool useDefaultContext) { @@ -165,10 +173,23 @@ public static void Load(string resourceType, bool useDefaultContext) } /// - /// Unloads the loaded assembly of the NUIGadget. + /// Unloads the specified NUIGadget assembly from memory. /// - /// The resource type of the NUIGadget package. - /// Thrown when failed because of a invalid argument. + /// + /// To use this method properly, the assembly of the gadget must be loaded using Load() with the custom context. + /// + /// The resource type of the NUIGadget package to unload. + /// Thrown when the argument passed is not valid. + /// + /// + /// /// Load an assembly of the NUIGadget. + /// NUIGadgetManager.Load("org.tizen.appfw.gadget.NetworkSetting", false); + /// /// NUIGadgetManager.Add("org.tizen.appfw.gadget.NetworkSetting", "NetworkSettingGadget", false); + /// + /// /// Unload the loaded assembly + /// NUIGadgetManager.Unload("org.tizen.appfw.gadget.NetworkSetting"); + /// + /// /// 10 public static void Unload(string resourceType) { @@ -257,6 +278,9 @@ public static NUIGadget Add(string resourceType, string className) /// /// Adds a NUIGadget to the NUIGadgetManager. /// + /// + /// To use Unload() method, the useDefaultContext must be'false'. + /// /// The resource type of the NUIGadget package. /// The class name of the NUIGadget. /// The flag it true, use a default context. Otherwise, use a new load context. @@ -294,9 +318,9 @@ public static NUIGadget Add(string resourceType, string className, bool useDefau } /// - /// Gets the instance of the running NUIGadgets. + /// Retrieves the instances of currently running NUIGadgets. /// - /// The NUIGadget list. + /// An enumerable list containing all the active NUIGadgets. /// 10 public static IEnumerable GetGadgets() { @@ -304,14 +328,14 @@ public static IEnumerable GetGadgets() } /// - /// Gets the information of the available NUIGadgets. + /// Retrieves information about available NUIGadgets. /// /// - /// This method only returns the available gadget informations, not all installed gadget informations. - /// The resource package of the NUIGadget can set the allowed packages using "allowed-package". - /// When executing an application, the platform mounts the resource package into the resource path of the application. + /// This method provides details on gadgets that are currently accessible rather than listing all installed gadgets. + /// A NUIGadget's resource package may specify which applications have access through the "allowed-packages" setting. + /// During execution, the platform mounts the resource package in the application's resources directory. /// - /// The NUIGadgetInfo list. + /// An enumerable list of NUIGadgetInfo objects. /// 10 public static IEnumerable GetGadgetInfos() { @@ -319,9 +343,15 @@ public static IEnumerable GetGadgetInfos() } /// - /// Removes the NUIGadget from the NUIGadgetManager. + /// Removes the specified NUIGadget from the NUIGadgetManager. /// - /// The NUIGadget object. + /// The NUIGadget object that needs to be removed. + /// + /// This method allows you to remove a specific NUIGadget from the NUIGadgetManager. + /// By passing the NUIGadget object as an argument, you can ensure that only the desired gadget is removed. + /// It is important to note that once a gadget is removed, any references to it become invalid. + /// Therefore, it is crucial to handle the removal process carefully to avoid any potential issues. + /// /// 10 public static void Remove(NUIGadget gadget) { @@ -345,6 +375,10 @@ public static void Remove(NUIGadget gadget) /// /// Removes all NUIGadgets from the NUIGadgetManager. /// + /// + /// This method is called to remove all NUIGadgets that are currently registered in the NUIGadgetManager. + /// It ensures that no more NUIGadgets exist after calling this method. + /// /// 10 public static void RemoveAll() { @@ -355,12 +389,33 @@ public static void RemoveAll() } /// - /// Resumes the running NUIGadget. + /// Resumes the execution of the specified NUIGadget. /// - /// The NUIGadget object. + /// + /// By calling this method, you can resume the execution of the currently suspended NUIGadget. + /// It takes the NUIGadget object as an argument which represents the target gadget that needs to be resumed. + /// + /// The NUIGadget object whose execution needs to be resumed. + /// Thrown if the 'gadget' argument is null. + /// + /// To resume the execution of a specific NUIGadget named 'MyGadget', you can call the following code snippet: + /// + /// + /// // Get the reference to the NUIGadget object + /// NUIGadget MyGadget = ...; + /// + /// // Resume its execution + /// GadgetResume(MyGadget); + /// + /// /// 10 public static void Resume(NUIGadget gadget) { + if (gadget == null) + { + throw new ArgumentNullException(nameof(gadget)); + } + if (!_gadgets.Contains(gadget)) { return; @@ -374,12 +429,21 @@ public static void Resume(NUIGadget gadget) } /// - /// Pauses the running NUIGadget. + /// Pauses the execution of the specified NUIGadget. /// - /// The NUIGadget object. + /// + /// Calling this method pauses the currently executing NUIGadget. It does not affect any other gadgets that may be running simultaneously. + /// + /// The NUIGadget object whose execution needs to be paused. + /// Thrown if the argument 'gadget' is null. /// 10 public static void Pause(NUIGadget gadget) { + if (gadget == null) + { + throw new ArgumentNullException(nameof(gadget)); + } + if (!_gadgets.Contains(gadget)) { return; @@ -393,12 +457,12 @@ public static void Pause(NUIGadget gadget) } /// - /// Sends the appcontrol to the running NUIGadget. + /// Sends the specified application control to the currently running NUIGadget. /// - /// The NUIGadget object. - /// The appcontrol object. - /// Thrown when failed because of a invalid argument. - /// Thrown when failed because the argument is null. + /// The NUIGadget object that will receive the app control. + /// The app control object containing the desired arguments and actions. + /// Thrown if any of the arguments are invalid or missing. + /// Thrown if either 'gadget' or 'appControl' is null. /// 10 public static void SendAppControl(NUIGadget gadget, AppControl appControl) { diff --git a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetResourceManager.cs b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetResourceManager.cs index d99a2c382e8..6f20fba2bfc 100755 --- a/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetResourceManager.cs +++ b/src/Tizen.NUI.Gadget/Tizen.NUI/NUIGadgetResourceManager.cs @@ -25,7 +25,7 @@ namespace Tizen.NUI { /// - /// This class has the methods of the NUIGadgetResourceManager. + /// Manages resources related to NUI gadgets. /// /// 10 [EditorBrowsable(EditorBrowsableState.Never)] @@ -40,8 +40,8 @@ public class NUIGadgetResourceManager /// Initializes the resource manager of the gadget. /// /// The information of the gadget. - /// Thrown when failed because of a invalid argument. - /// 11 + /// Thrown when the argument is not valid. + /// 10 public NUIGadgetResourceManager(NUIGadgetInfo info) { if (info == null) @@ -57,9 +57,9 @@ public NUIGadgetResourceManager(NUIGadgetInfo info) /// /// Initializes the resource manager of the gadget. /// - /// The path of the resource - /// The file name of the resource. - /// The class name of the resource. + /// The path where the resources are located. + /// The name of the DLL containing the resources. + /// The name of the class that represents the resources. /// 10 public NUIGadgetResourceManager(string resourcePath, string resourceDll, string resourceClassName) { @@ -69,10 +69,26 @@ public NUIGadgetResourceManager(string resourcePath, string resourceDll, string } /// - /// Get the value of the specified string resource. + /// Retrieves the value of the specified string resource. /// - /// The name of the resource to retrieve. - /// The value of the resource, or null if name cannot be found in a resource set. + /// The unique identifier for the string resource to retrieve. + /// The value of the requested string resource, or null if no matching resource could be found. + /// + /// This function allows you to access localized string resources by providing their names. + /// It returns the actual value of the requested resource, which can then be displayed to users or used elsewhere in your application logic. + /// If the specified resource does not exist or cannot be found, the function will return null instead. + /// + /// + /// Here's an example demonstrating how to retrieve a string resource named "greeting" from the current context: + /// + /// + /// // Retrieve the greeting message + /// string greetingMessage = GetString("greeting"); + /// + /// // Display the greeting message to the user + /// Console.WriteLine(greetingMessage); + /// + /// /// 10 public string GetString(string name) { @@ -80,12 +96,16 @@ public string GetString(string name) } /// - /// Gets the return value of the string resource localized for the specified culture. + /// Retrieves the localized string resource for the specified culture. /// - /// The name of the resource to retrieve. - /// An object that represents the culture for which the resource is localied. - /// The value of the resource localied for the specified culture, or null if name cannot be found in a resource set. - /// Thrown when failed because of a invalid argument. + /// + /// This method enables you to obtain a localized version of a specific string resource based on the provided culture. + /// It returns the desired resource value or null if the requested resource cannot be found in the resource set. + /// + /// The name of the resource to fetch. + /// An object representing the culture for which the resource needs to be localized. + /// The localized string resource for the specified culture, or null if the resource cannot be found. + /// Thrown when an invalid argument causes failure. /// 10 public string GetString(string name, CultureInfo cultureInfo) { From f5f8876e1f46c9ea9a61108e75165d8c4b852a9f Mon Sep 17 00:00:00 2001 From: JinWang An <35290168+jinwangan@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:43:06 +0900 Subject: [PATCH 24/31] Add doxygen for Tizen.System.SystemSettings (#6388) Signed-off-by: JinWang An --- .../SystemSettings.cs | 68 +++++++++---------- .../SystemSettingsEnums.cs | 12 ++-- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs b/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs index dbabeba6d82..fe76b3143bd 100644 --- a/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs +++ b/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettings.cs @@ -29,7 +29,7 @@ namespace Tizen.System public static class SystemSettings { /// - /// The file path of the current ringtone. + /// This static member variable indicates file path of the current ringtone. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -63,7 +63,7 @@ public static string IncomingCallRingtone } /// - /// The file path of the current home-screen wallpaper. + /// This static member variable indicates file path of the current home-screen wallpaper. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -97,7 +97,7 @@ public static string WallpaperHomeScreen } /// - /// The file path of the current lock-screen wallpaper. + /// This static member variable indicates file path of the current lock-screen wallpaper. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -131,7 +131,7 @@ public static string WallpaperLockScreen } /// - /// The current system font size. + /// This static member variable indicates current system font size. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -165,7 +165,7 @@ public static SystemSettingsFontSize FontSize } /// - /// The current system font type. + /// This static member variable indicates current system font type. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -199,7 +199,7 @@ public static string FontType } /// - /// Indicates whether the motion service is activated. + /// This static member variable indicates whether the motion service is activated. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -232,7 +232,7 @@ public static bool MotionActivationEnabled } /// - /// The file path of the current email alert ringtone. + /// This static member variable indicates file path of the current email alert ringtone. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -265,7 +265,7 @@ public static string EmailAlertRingtone } } /// - /// Indicates whether the USB debugging is enabled. + /// This static member variable indicates whether the USB debugging is enabled. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -298,7 +298,7 @@ public static bool UsbDebuggingEnabled } /// - /// Indicates whether the 3G data network is enabled. + /// This static member variable indicates whether the 3G data network is enabled. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -331,7 +331,7 @@ public static bool Data3GNetworkEnabled } /// - /// Indicates the lock-screen application package name. + /// This static member variable indicates the lock-screen application package name. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -391,7 +391,7 @@ public static string DefaultFontType } /// - /// Indicates the current country setting in the <LANGUAGE>_<REGION> syntax. + /// This static member variable indicates the current country setting in the <LANGUAGE>_<REGION> syntax. /// The country setting is in the ISO 639-2 format, /// and the region setting is in the ISO 3166-1 alpha-2 format. /// @@ -426,7 +426,7 @@ public static string LocaleCountry } /// - /// Indicates the current language setting in the <LANGUAGE>_<REGION> syntax. + /// This static member variable indicates the current language setting in the <LANGUAGE>_<REGION> syntax. /// The language setting is in the ISO 639-2 format, /// and the region setting is in the ISO 3166-1 alpha-2 format. /// @@ -461,7 +461,7 @@ public static string LocaleLanguage } /// - /// Indicates whether the 24-hour clock is used. + /// This static member variable indicates whether the 24-hour clock is used. /// If the value is false, the 12-hour clock is used. /// /// http://tizen.org/privilege/systemsettings.admin @@ -495,7 +495,7 @@ public static bool LocaleTimeFormat24HourEnabled } /// - /// Indicates the current time zone, for example, Pacific/Tahiti. + /// This static member variable indicates the current time zone, for example, Pacific/Tahiti. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -552,7 +552,7 @@ public static int Time } } /// - /// Indicates whether the screen lock sound is enabled on the device, for example, the LCD on or off sound. + /// This static member variable indicates whether the screen lock sound is enabled on the device, for example, the LCD on or off sound. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -577,7 +577,7 @@ public static bool SoundLockEnabled } /// - /// Indicates whether the device is in the silent mode. + /// This static member variable indicates whether the device is in the silent mode. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -602,7 +602,7 @@ public static bool SoundSilentModeEnabled } /// - /// Indicates whether the screen touch sound is enabled on the device. + /// This static member variable indicates whether the screen touch sound is enabled on the device. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -627,7 +627,7 @@ public static bool SoundTouchEnabled } /// - /// Indicates whether the rotation control is automatic. + /// This static member variable indicates whether the rotation control is automatic. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -652,7 +652,7 @@ public static bool DisplayScreenRotationAutoEnabled } /// - /// Indicates the device name. + /// This static member variable indicates the device name. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -676,7 +676,7 @@ public static string DeviceName } } /// - /// Indicates whether the device user has enabled the motion feature. + /// This static member variable indicates whether the device user has enabled the motion feature. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -701,7 +701,7 @@ public static bool MotionEnabled } /// - /// Indicates whether Wi-Fi related notifications are enabled on the device. + /// This static member variable indicates whether Wi-Fi related notifications are enabled on the device. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -727,7 +727,7 @@ public static bool NetworkWifiNotificationEnabled } /// - /// Indicates whether the device is in the flight mode. + /// This static member variable indicates whether the device is in the flight mode. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -752,7 +752,7 @@ public static bool NetworkFlightModeEnabled } /// - /// Indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600. + /// This static member variable indicates the backlight time (in seconds). The following values can be used: 15, 30, 60, 120, 300, and 600. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -785,7 +785,7 @@ public static int ScreenBacklightTime } /// - /// Indicates the file path of the current notification tone set by the user. + /// This static member variable indicates the file path of the current notification tone set by the user. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -819,7 +819,7 @@ public static string SoundNotification } /// - /// Indicates the time period for notification repetitions. + /// This static member variable indicates the time period for notification repetitions. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -852,7 +852,7 @@ public static int SoundNotificationRepetitionPeriod } /// - /// Indicates the current lock state. + /// This static member variable indicates the current lock state. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -919,7 +919,7 @@ public static string AdsId /// - /// Indicates the time period for notification repetitions. + /// This static member variable indicates the time period for notification repetitions. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -945,7 +945,7 @@ public static SystemSettingsUdsState UltraDataSave } /// - /// Indicates whether the accessibility TTS is enabled on the device. + /// This static member variable indicates whether the accessibility TTS is enabled on the device. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -978,7 +978,7 @@ public static bool AccessibilityTtsEnabled } /// - /// Indicates whether the vibration is enabled on the device or not. + /// This static member variable indicates whether the vibration is enabled on the device or not. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -1011,7 +1011,7 @@ public static bool Vibration } /// - /// Indicates whether the automatic time update is enabled on the device or not. + /// This static member variable indicates whether the automatic time update is enabled on the device or not. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -1045,7 +1045,7 @@ public static bool AutomaticTimeUpdate } /// - /// Indicates whether the developer option state is enabled on the device or not. + /// This static member variable indicates whether the developer option state is enabled on the device or not. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -1078,7 +1078,7 @@ public static bool DeveloperOptionState } /// - /// Indicates whether accessibility grayscale is enabled on the device or not. + /// This static member variable indicates whether accessibility grayscale is enabled on the device or not. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -1112,7 +1112,7 @@ public static bool AccessibilityGrayscale } /// - /// Indicates whether accessibility negative color is enabled on the device or not. + /// This static member variable indicates whether accessibility negative color is enabled on the device or not. /// /// http://tizen.org/privilege/systemsettings.admin /// platform @@ -1146,7 +1146,7 @@ public static bool AccessibilityNegativeColor } /// - /// Indicates whether rotary event is enabled on the device. + /// This static member variable indicates whether rotary event is enabled on the device. /// /// http://tizen.org/privilege/systemsettings.admin /// platform diff --git a/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs b/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs index 608bfaeff0f..bd83027c2a4 100755 --- a/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs +++ b/src/Tizen.System.SystemSettings/Tizen.System.SystemSettings/SystemSettingsEnums.cs @@ -17,7 +17,7 @@ namespace Tizen.System { /// - /// Enumeration for all the available system settings. + /// This is enumeration for all the available system settings. /// /// 3 public enum SystemSettingsKeys : int @@ -189,7 +189,7 @@ public enum SystemSettingsKeys : int RotaryEventEnabled } /// - /// Enumeration for the Idle Lock State. + /// This is enumeration for the Idle Lock State. /// /// 3 public enum SystemSettingsIdleLockState : int @@ -208,7 +208,7 @@ public enum SystemSettingsIdleLockState : int LaunchingLock } /// - /// Enumeration for the font size. + /// This is enumeration for the font size. /// /// 3 public enum SystemSettingsFontSize : int @@ -241,15 +241,15 @@ public enum SystemSettingsFontSize : int public enum SystemSettingsUdsState : int { /// - /// UDS Off. + /// UDS(Ultra Data Save) Off. /// UdsOff = 0, /// - /// UDS On. + /// UDS(Ultra Data Save) On. /// UdsOn, /// - /// UDS On and the application is whitelisted. + /// UDS(Ultra Data Save) On and the application is whitelisted. /// UdsOnWhitelisted, } From fb0b6093e3402d691adc191334f2221c3485bf5d Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Wed, 2 Oct 2024 18:33:09 +0900 Subject: [PATCH 25/31] [WebRTC] Fix DataChannel event bug (#6392) * [WebRTC] Fix DataChannel event(BufferedAmountLow) bug --- .../WebRTC/WebRTCDataChannel.Events.cs | 24 ++++++++++++------- .../WebRTC/WebRTCDataChannel.cs | 2 -- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.Events.cs b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.Events.cs index b998669d962..d6cb3c03155 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.Events.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.Events.cs @@ -136,13 +136,18 @@ public event EventHandler ErrorOccurred /// /// Occurs when the buffered data amount is lower than .
- /// If is not set, this event will not be raised. + /// If is not set, this event will not be registered. ///
/// 10 public event EventHandler BufferedAmountLow { add { + if (!_bufferThreshold.HasValue) + { + return; + } + if (_bufferedAmountLowThresholdOccurred == null) { RegisterDataChannelBufferedAmountLowThresholdCallback(); @@ -151,6 +156,11 @@ public event EventHandler BufferedAmountLow } remove { + if (!_bufferThreshold.HasValue) + { + return; + } + _bufferedAmountLowThresholdOccurred -= value; if (_bufferedAmountLowThresholdOccurred == null) { @@ -229,16 +239,12 @@ private void UnregisterDataChannelErrorOccurredCallback() private void RegisterDataChannelBufferedAmountLowThresholdCallback() { - if (_webRtcDataChannelBufferedAmountLowThresholdCallback == null) + _webRtcDataChannelBufferedAmountLowThresholdCallback = (dataChannelHanel, _) => { - _webRtcDataChannelBufferedAmountLowThresholdCallback = (dataChannelHanel, _) => - { - _bufferedAmountLowThresholdOccurred?.Invoke(this, new EventArgs()); - }; - } + _bufferedAmountLowThresholdOccurred?.Invoke(this, new EventArgs()); + }; - NativeDataChannel.SetBufferedAmountLowThresholdCb(_handle, _bufferThreshold.Value, - _webRtcDataChannelBufferedAmountLowThresholdCallback). + NativeDataChannel.SetBufferedAmountLowThresholdCb(_handle, _bufferThreshold.Value, _webRtcDataChannelBufferedAmountLowThresholdCallback). ThrowIfFailed("Failed to set buffered amount low threshold callback."); } diff --git a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.cs b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.cs index fcb1dc7de8e..21a77d49ea9 100755 --- a/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.cs +++ b/src/Tizen.Multimedia.Remoting/WebRTC/WebRTCDataChannel.cs @@ -161,8 +161,6 @@ public uint BufferedAmountLowThreshold ValidateNotDisposed(); _bufferThreshold = value; - - RegisterDataChannelBufferedAmountLowThresholdCallback(); } } From 4dcdce3ba253ac6255378a74d38bc195afda68fe Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Wed, 2 Oct 2024 18:38:05 +0900 Subject: [PATCH 26/31] [MediaPlayer] Improve documentation (#6357) * [MediaPlayer] Improve documentation --- .../Player/AdaptiveVariants.cs | 6 ++-- .../Player/AudioDataDecodedEventArgs.cs | 2 +- .../Player/AudioEffect.cs | 4 +-- .../Player/AudioOffload.cs | 4 +-- .../Player/EqualizerBand.cs | 4 +-- .../Player/MediaBufferSource.cs | 7 ++-- ...MediaStreamBufferStatusChangedEventArgs.cs | 2 +- .../Player/MediaStreamConfiguration.cs | 8 ++--- .../MediaStreamSeekingOccurredEventArgs.cs | 8 ++++- .../Player/MediaStreamSource.cs | 6 ++-- .../Player/MediaUriSource.cs | 8 ++--- .../Player/PlaybackInterruptedEventArgs.cs | 2 +- .../Player/Player.Properties.cs | 35 +++++++++---------- .../Player/Player.cs | 28 +++++++-------- .../Player/PlayerDisplaySettings.cs | 4 +-- .../Player/PlayerEnums.cs | 14 ++++---- .../Player/SubtitleUpdatedEventArgs.cs | 2 +- .../Player/VideoFrameDecodedEventArgs.cs | 2 +- 18 files changed, 75 insertions(+), 71 deletions(-) diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/AdaptiveVariants.cs b/src/Tizen.Multimedia.MediaPlayer/Player/AdaptiveVariants.cs index b24188e5788..aa66f1f0fa8 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/AdaptiveVariants.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/AdaptiveVariants.cs @@ -93,7 +93,7 @@ internal AdaptiveVariants(Player player) } /// - /// Sets the maximum limit of the streaming variant. + /// Sets the maximum limit of adaptive streaming variants. /// /// The has already been disposed of. /// @@ -119,7 +119,7 @@ public void SetMaxLimit(int bandwidth, int width = -1, int height = -1) } /// - /// Gets the maximum limit of the streaming variant. + /// Gets the maximum limit of the adaptive streaming variant. /// /// The containing the variant information. /// The has already been disposed of. @@ -136,7 +136,7 @@ public VariantInfo GetMaxLimit() } /// - /// Retrieves all the available adaptive variants. + /// Retrieves all the available adaptive streaming variants. /// /// /// It returns a list contained all the available adaptive variants. diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/AudioDataDecodedEventArgs.cs b/src/Tizen.Multimedia.MediaPlayer/Player/AudioDataDecodedEventArgs.cs index 17a00850c7e..1f0ac187777 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/AudioDataDecodedEventArgs.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/AudioDataDecodedEventArgs.cs @@ -32,7 +32,7 @@ internal AudioDataDecodedEventArgs(MediaPacket packet) } /// - /// Gets the packet containing the decoded frame. + /// Gets the media packet containing the audio decoded frame. /// /// 6 public MediaPacket Packet { get; } diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/AudioEffect.cs b/src/Tizen.Multimedia.MediaPlayer/Player/AudioEffect.cs index 9815506a3b1..66b670207e4 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/AudioEffect.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/AudioEffect.cs @@ -98,7 +98,7 @@ public void Clear() } /// - /// Gets the number of items. + /// Gets the number of equalizer bands available. /// /// If audio offload is enabled by calling . (Since tizen 6.0) /// -or-
@@ -148,7 +148,7 @@ public Range BandLevelRange } /// - /// Gets the value whether the AudioEffect is available or not. + /// Gets the value indicating whether the AudioEffect is available or not. /// /// This function returns the availability of the . /// It could be unavailable depending on the platform capabilities.
diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/AudioOffload.cs b/src/Tizen.Multimedia.MediaPlayer/Player/AudioOffload.cs index e25c20ea83a..cf474668a61 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/AudioOffload.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/AudioOffload.cs @@ -50,7 +50,7 @@ internal void CheckDisabled() } /// - /// Enables or disables the audio offload. + /// Gets or sets whether the audio offload is enabled. /// /// The value indicating whether or not audio offload is enabled. The default value is false. /// The player lets the hardware decode and render the sound if the audio offload is enabled. @@ -103,7 +103,7 @@ public bool IsEnabled } /// - /// Get a state whether or not the audio offload is activated. + /// Get a value indication whether or not the audio offload is activated. /// /// The value indicating whether or not AudioOffload is activated. /// diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/EqualizerBand.cs b/src/Tizen.Multimedia.MediaPlayer/Player/EqualizerBand.cs index d5c7e5406bb..b359aa05f49 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/EqualizerBand.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/EqualizerBand.cs @@ -85,7 +85,7 @@ public int Level /// - /// Gets the frequency in dB. + /// Gets the frequency in dB of the equalizer band. /// /// /// If audio offload is enabled by calling . (Since tizen 6.0) @@ -105,7 +105,7 @@ public int Frequency } /// - /// Gets the frequency range in dB. + /// Gets the frequency range in dB of the equalizer band. /// /// /// If audio offload is enabled by calling . (Since tizen 6.0) diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/MediaBufferSource.cs b/src/Tizen.Multimedia.MediaPlayer/Player/MediaBufferSource.cs index 0ad90e3ff76..c2d47dafdcb 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/MediaBufferSource.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/MediaBufferSource.cs @@ -33,7 +33,7 @@ public sealed class MediaBufferSource : MediaSource private byte[] _buffer; /// - /// Initializes a new instance of the MediaBufferSource class with an allocated buffer. + /// Initializes a new instance of the MediaBufferSource class with the specified buffer length. /// /// The value indicating the size of the buffer. /// @@ -54,7 +54,7 @@ public MediaBufferSource(int length) } /// - /// Initializes a new instance of the MediaBufferSource class from the buffer. + /// Initializes a new instance of the MediaBufferSource class with the specified buffer. /// /// The source array to be copied into the buffer. /// is null. @@ -65,7 +65,7 @@ public MediaBufferSource(byte[] buffer) : this(buffer, buffer == null ? 0 : buff //TODO remove default parameter. /// - /// Initializes a new instance of the MediaBufferSource class from the buffer + /// Initializes a new instance of the MediaBufferSource class with buffer, length, and optional offset. /// with the specified length and the specified offset. /// /// The source array to be copied into the buffer. @@ -141,4 +141,3 @@ internal override void OnAttached(Player player) } } } - diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamBufferStatusChangedEventArgs.cs b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamBufferStatusChangedEventArgs.cs index dd48e886b80..468a41dfb67 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamBufferStatusChangedEventArgs.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamBufferStatusChangedEventArgs.cs @@ -36,7 +36,7 @@ public MediaStreamBufferStatusChangedEventArgs(MediaStreamBufferStatus status) } /// - /// Gets the status. + /// Gets the current buffer status. /// /// 3 public MediaStreamBufferStatus Status { get; } diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamConfiguration.cs b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamConfiguration.cs index c8d19defb14..602e7e9156e 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamConfiguration.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamConfiguration.cs @@ -59,10 +59,10 @@ internal MediaStreamConfiguration(MediaStreamSource owner, StreamType streamType public event EventHandler SeekingOccurred; /// - /// Gets or sets the max size of the buffer. + /// Gets or sets the maximum size of the buffer for media stream. /// - /// The max size of the buffer. The default is 200000. - /// If the buffer level overflows the max size, will be raised with . + /// The maximum size of the buffer in bytes. The default is 200000. + /// If the buffer level overflows the maximum size, will be raised with . /// The is not assigned to a player. /// is zero. /// @@ -95,7 +95,7 @@ public ulong BufferMaxSize } /// - /// Gets or sets the minimum threshold of the buffer. + /// Gets or sets the minimum threshold of the media stream buffer. /// /// The minimum threshold of the buffer in percentage. The default is zero. /// If the buffer level drops below the threshold value, will be raised with . diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSeekingOccurredEventArgs.cs b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSeekingOccurredEventArgs.cs index e033ed9f6e8..7de8cc98790 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSeekingOccurredEventArgs.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSeekingOccurredEventArgs.cs @@ -35,8 +35,14 @@ public MediaStreamSeekingOccurredEventArgs(ulong offset) } /// - /// Gets the offset. + /// Gets the next new play position as a result of seeking operation. /// + /// + /// The next playback position after SetPlayPositionAsync could be a little bit different with its input position.
+ /// So user should push the next media data using this time offset in nanoseconds. + ///
+ /// + /// /// 3 public ulong Offset { get; } diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSource.cs b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSource.cs index 0bee6d10c89..ea57faa6d78 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSource.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/MediaStreamSource.cs @@ -37,7 +37,7 @@ public sealed class MediaStreamSource : MediaSource private static List _supportedVideoFormats; /// - /// Gets all supported audio types. + /// Gets the supported audio types of the media stream source. /// /// 3 public static IEnumerable SupportedAudioTypes @@ -50,7 +50,7 @@ public static IEnumerable SupportedAudioTypes } /// - /// Gets all supported video types. + /// Gets the supported video types of the media stream source. /// /// 3 public static IEnumerable SupportedVideoTypes @@ -214,7 +214,7 @@ public MediaStreamSource(VideoMediaFormat videoMediaFormat) public MediaStreamConfiguration VideoConfiguration { get; } /// - /// Pushes elementary stream to decode audio or video. + /// Pushes elementary stream to decode audio or video packet. /// /// This source must be set as a source to a player and the player must be in the , /// , or state. diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/MediaUriSource.cs b/src/Tizen.Multimedia.MediaPlayer/Player/MediaUriSource.cs index 240b7a37f03..415a8f17f96 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/MediaUriSource.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/MediaUriSource.cs @@ -20,7 +20,7 @@ namespace Tizen.Multimedia { /// - /// Represents a media source with a uri. + /// Represents a media source with a URI. /// /// /// The internet privilege(http://tizen.org/privilege/internet) must be added if any URLs are used to play from a network. @@ -31,9 +31,10 @@ namespace Tizen.Multimedia /// 3 public sealed class MediaUriSource : MediaSource { - // TODO consider using Uri class. + // TODO consider using URI class. /// - /// Initializes a new instance of the MediaUriSource class with the specified uri. + /// Initializes a new instance of the MediaUriSource class with the specified URI. + /// /// The uri string. /// For HTTP or RSTP, uri should start with "http://" or "rtsp://". /// The default protocol is "file://". @@ -57,4 +58,3 @@ internal override void OnAttached(Player player) } } } - diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/PlaybackInterruptedEventArgs.cs b/src/Tizen.Multimedia.MediaPlayer/Player/PlaybackInterruptedEventArgs.cs index 47475e7a858..679ab19ddac 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/PlaybackInterruptedEventArgs.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/PlaybackInterruptedEventArgs.cs @@ -35,7 +35,7 @@ public PlaybackInterruptedEventArgs(PlaybackInterruptionReason reason) } /// - /// Gets the reason. + /// Gets the reason for the playback interruption. /// /// 3 public PlaybackInterruptionReason Reason { get; } diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs b/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs index 1b5d2f3939a..e60b994b413 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/Player.Properties.cs @@ -193,7 +193,7 @@ public PlayerBufferingTime BufferingTime #endregion /// - /// Gets the state of the player. + /// Gets the current state of the player. /// /// The current state of the player. /// The player has already been disposed of. @@ -258,7 +258,7 @@ public AudioLatencyMode AudioLatencyMode } /// - /// Gets or sets the looping state. + /// Gets or sets a value indicationg whether the media source is played in a loop. /// /// true if the playback is looping; otherwise, false. The default value is false. /// The player has already been disposed of. @@ -286,7 +286,7 @@ public bool IsLooping private PlayerDisplaySettings _displaySettings; /// - /// Gets the display settings. + /// Gets the display settings of the player. /// /// A that specifies the display settings. /// 3 @@ -314,7 +314,7 @@ private void ReplaceDisplay(Display newDisplay) } /// - /// Gets or sets the display. + /// Gets or sets the display of the player. /// /// A that specifies the display. /// @@ -387,7 +387,7 @@ PlayerErrorCode IDisplayable.ApplyEcoreWindow(IntPtr windowHand private PlayerTrackInfo _audioTrack; /// - /// Gets the track info for the audio. + /// Gets the audio track information of the player. /// /// A for audio. /// 3 @@ -406,7 +406,7 @@ public PlayerTrackInfo AudioTrackInfo private PlayerTrackInfo _subtitleTrackInfo; /// - /// Gets the track info for the subtitle. + /// Gets the sutitle track information of the player. /// /// A for the subtitle. /// 3 @@ -425,7 +425,7 @@ public PlayerTrackInfo SubtitleTrackInfo private StreamInfo _streamInfo; /// - /// Gets the stream information. + /// Gets the stream information of the player. /// /// A for this player. /// 3 @@ -444,7 +444,7 @@ public StreamInfo StreamInfo private AudioEffect _audioEffect; /// - /// Gets the audio effect. + /// Gets the audio effect of the player. /// /// http://tizen.org/feature/multimedia.custom_audio_effect /// The required feature is not supported. @@ -463,7 +463,7 @@ public AudioEffect AudioEffect } /// - /// Gets or sets the mute state. + /// Gets or sets a value indicationg whether the audio output of the player is muted. /// /// true if the player is muted; otherwise, false. /// The player has already been disposed of. @@ -486,7 +486,7 @@ public bool Muted } /// - /// Gets or sets the current volume. + /// Gets or sets the current volume of the player. /// /// Valid volume range is from 0 to 1.0, inclusive. /// The player has already been disposed of. @@ -520,7 +520,7 @@ public float Volume } /// - /// Gets or sets the audio-only state. + /// Gets or sets a value indicating whether the player is in audio only mode. /// /// true if the playback is audio-only mode; otherwise, false. The default value is false. /// The must be in the , @@ -547,7 +547,7 @@ public bool IsAudioOnly } /// - /// Gets or sets the player's replaygain state. + /// Gets or sets a value indicating whether the replay gain is enabled. /// /// If the replaygain status is true, replaygain is applied (if contents has a replaygain tag); /// otherwise, the replaygain is not affected by tag and properties. @@ -585,8 +585,7 @@ public bool ReplayGain } /// - /// Enables or disables controlling the pitch of audio. - /// Gets the status of controlling the pitch of audio. + /// Gets or sets a value indicating whether the audio pitch control is enabled. /// /// The value indicating whether or not AudioPitch is enabled. The default is false. /// This function is used for audio content only. @@ -628,7 +627,7 @@ public bool AudioPitchEnabled } /// - /// Gets or sets the pitch of audio. + /// Gets or sets the pitch of the audio. /// /// The audio stream pitch value. The default is 1. /// Enabling pitch control could increase the CPU usage on some devices. @@ -783,7 +782,7 @@ public CodecType VideoCodecType private SphericalVideo _sphericalVideo; /// - /// Gets the spherical video settings. + /// Gets the spherical video porperties of the player. /// /// 5 public SphericalVideo SphericalVideo @@ -802,7 +801,7 @@ public SphericalVideo SphericalVideo private AdaptiveVariants _adaptiveVariants; /// - /// Gets the adaptive variants settings. + /// Gets the adaptive variants of the player. /// /// 5 public AdaptiveVariants AdaptiveVariants @@ -821,7 +820,7 @@ public AdaptiveVariants AdaptiveVariants private AudioOffload _audioOffload; /// - /// Gets the setting for audio offload. + /// Gets the audio offload settings of the player. /// /// 6 public AudioOffload AudioOffload diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs index 3b3e2c2e105..0ec788b05e1 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/Player.cs @@ -184,7 +184,7 @@ internal void ValidateNotDisposed() #region Methods /// - /// Gets the streaming download progress. + /// Gets the download progress of the streaming contents. /// /// The containing current download progress. /// The player must be in the , , @@ -211,7 +211,7 @@ public DownloadProgress GetDownloadProgress() } /// - /// Sets the subtitle path for playback. + /// Sets the subtitle file path for playback. /// /// The absolute path of the subtitle file, it can be NULL in the state. /// Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported. @@ -247,7 +247,7 @@ public void SetSubtitle(string path) } /// - /// Removes the subtitle path. + /// Clears the the subtitle path of the media player. /// /// The player must be in the state. /// The player has already been disposed of. @@ -262,7 +262,7 @@ public void ClearSubtitle() } /// - /// Sets the offset for the subtitle. + /// Sets the seek offset for the subtitle. /// /// The value indicating a desired offset in milliseconds. /// The player must be in the or state. @@ -410,7 +410,7 @@ public virtual async Task PrepareAsync(CancellationToken cancellationToken) } /// - /// Unprepares the player. + /// Unprepares the media player. /// /// /// The most recently used source is reset and is no longer associated with the player. Playback is no longer possible. @@ -450,7 +450,7 @@ protected virtual void OnUnprepared() } /// - /// Starts or resumes playback. + /// Starts or resumes playing the media content. /// /// /// Sound can be mixed with other sounds if you don't control the stream focus using .
@@ -505,7 +505,7 @@ public virtual void Stop() } /// - /// Pauses the player. + /// Pauses playing the media content. /// /// /// The player must be in the state. @@ -570,7 +570,7 @@ public void SetSource(MediaSource source) } /// - /// Captures a video frame, asynchronously. + /// Captures the current frame of the video being played, asynchronously. /// /// A task that represents the asynchronous capture operation. /// http://tizen.org/feature/multimedia.raw_video @@ -607,7 +607,7 @@ public async Task CaptureVideoAsync() } /// - /// Gets the play position in milliseconds. + /// Gets the current playback position in milliseconds of the media. /// /// The current position in milliseconds. /// The player must be in the , , @@ -673,7 +673,7 @@ private async Task SetPlayPosition(long position, bool accurate, bool nanosecond } /// - /// Sets the seek position for playback, asynchronously. + /// Sets the playback position in milliseconds of the player, asynchronously. /// /// The value indicating a desired position in milliseconds. /// The value indicating whether the operation performs with accuracy. @@ -701,7 +701,7 @@ public async Task SetPlayPositionAsync(int position, bool accurate) } /// - /// Gets the play position in nanoseconds. + /// Gets the current playback position in nanoseconds of the media. /// /// The current position in nanoseconds. /// The player must be in the , , @@ -725,7 +725,7 @@ public long GetPlayPositionNanoseconds() } /// - /// Sets the seek position in nanoseconds for playback, asynchronously. + /// Sets the playback position in nanoseconds of the player, asynchronously. /// /// The value indicating a desired position in nanoseconds. /// The value indicating whether the operation performs with accuracy. @@ -753,7 +753,7 @@ public async Task SetPlayPositionNanosecondsAsync(long position, bool accurate) } /// - /// Sets the playback rate. + /// Sets the playback rate of the player. /// /// The value for the playback rate. Valid range is -5.0 to 5.0, inclusive. /// @@ -793,7 +793,7 @@ public void SetPlaybackRate(float rate) } /// - /// Applies the audio stream policy. + /// Applies the specified audio stream policy to the player. /// /// The to apply. /// diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs index 38b8a947a24..b8c889befc0 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerDisplaySettings.cs @@ -53,7 +53,7 @@ protected PlayerDisplaySettings(Player player) protected Player Player { get; } /// - /// Gets or sets the . + /// Gets or sets the of the player. /// /// /// Operation failed; internal error. @@ -134,7 +134,7 @@ public Rotation Rotation } /// - /// Sets the roi(region of interest). + /// Sets the ROI(Region Of Interest) for the video display. /// /// The region. /// diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerEnums.cs b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerEnums.cs index 137fc1a5865..27378e44466 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/PlayerEnums.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/PlayerEnums.cs @@ -38,7 +38,7 @@ public enum PlayerError InternalError = ErrorCode.InvalidOperation, /// - /// No space. + /// No space on the device. /// NoSpaceOnDevice = PlayerErrorCode.NoSpaceOnDevice, @@ -269,32 +269,32 @@ public enum PlaybackInterruptionReason public enum StreamMetadataKey { /// - /// Album. + /// The album name of the media content /// Album, /// - /// Artists. + /// The artist(s) of the media content. /// Artist, /// - /// Author. + /// The author(s) of the media content. /// Author, /// - /// Genre. + /// The genre(s) of the media content. /// Genre, /// - /// Title. + /// The title of the media content. /// Title, /// - /// Year. + /// The year of the media content. /// Year } diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/SubtitleUpdatedEventArgs.cs b/src/Tizen.Multimedia.MediaPlayer/Player/SubtitleUpdatedEventArgs.cs index f3ee00a62ab..b46489e700f 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/SubtitleUpdatedEventArgs.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/SubtitleUpdatedEventArgs.cs @@ -30,7 +30,7 @@ internal SubtitleUpdatedEventArgs(uint duration, string text) } /// - /// Gets the duration of the updated subtitle. + /// Gets the duration in milliseconds of the updated subtitle. /// /// 3 public uint Duration { get; } diff --git a/src/Tizen.Multimedia.MediaPlayer/Player/VideoFrameDecodedEventArgs.cs b/src/Tizen.Multimedia.MediaPlayer/Player/VideoFrameDecodedEventArgs.cs index 89e97d2c5ca..cb978a69cc4 100644 --- a/src/Tizen.Multimedia.MediaPlayer/Player/VideoFrameDecodedEventArgs.cs +++ b/src/Tizen.Multimedia.MediaPlayer/Player/VideoFrameDecodedEventArgs.cs @@ -32,7 +32,7 @@ internal VideoFrameDecodedEventArgs(MediaPacket packet) } /// - /// Gets the packet containing the decoded frame. + /// Gets the media packet containing the decoded frame. /// /// 3 public MediaPacket Packet { get; } From aa8798d8e5d327201b3822857090c5eeb6e02418 Mon Sep 17 00:00:00 2001 From: sukhyungkang <35091460+sukhyungkang@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:48:31 +0900 Subject: [PATCH 27/31] [Notification] Add PairingType for do not disturb app (#6391) Signed-off-by: SukhyungKang Co-authored-by: pjh9216 --- .../Interop/Interop.Notification.cs | 15 +++++ .../Notification.cs | 3 + .../NotificationBinder.cs | 19 ++++++ .../NotificationManager.cs | 61 +++++++++++++++++++ 4 files changed, 98 insertions(+) diff --git a/src/Tizen.Applications.Notification/Interop/Interop.Notification.cs b/src/Tizen.Applications.Notification/Interop/Interop.Notification.cs index 44e6f7e6e19..46988c4ce1d 100644 --- a/src/Tizen.Applications.Notification/Interop/Interop.Notification.cs +++ b/src/Tizen.Applications.Notification/Interop/Interop.Notification.cs @@ -238,6 +238,21 @@ internal static class Notification [DllImport(Libraries.Notification, EntryPoint = "notification_get_check_box")] internal static extern NotificationError GetCheckBox(NotificationSafeHandle handle, out bool flag, out bool checkedValue); + /* apis for do not disturb app */ + internal delegate void DisturbCallback(IntPtr userData); + + [DllImport(Libraries.Notification, EntryPoint = "notification_register_do_not_disturb_app")] + internal static extern NotificationError RegisterDndApp(DisturbCallback cb, IntPtr userData); + + [DllImport(Libraries.Notification, EntryPoint = "notification_unregister_do_not_disturb_app")] + internal static extern NotificationError UnRegisterDndApp(); + + [DllImport(Libraries.Notification, EntryPoint = "notification_set_pairing_type")] + internal static extern NotificationError SetPairingType(NotificationSafeHandle handle, bool pairing); + + [DllImport(Libraries.Notification, EntryPoint = "notification_get_pairing_type")] + internal static extern NotificationError GetPairingType(NotificationSafeHandle handle, out bool pairing); + internal static NotificationError GetText(NotificationSafeHandle handle, NotificationText type, out string text) { NotificationError ret; diff --git a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs index 019ea0a9a7e..e5b573b2bd0 100755 --- a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs +++ b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs @@ -212,6 +212,9 @@ public int Count [EditorBrowsable(EditorBrowsableState.Never)] public bool CheckedValue { get; set; } = false; + [EditorBrowsable(EditorBrowsableState.Never)] + public bool PairingType { get; set; } = false; + /// /// Gets or sets NotificationSafeHandle. /// diff --git a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationBinder.cs b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationBinder.cs index b847e6917a3..750914b164e 100755 --- a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationBinder.cs +++ b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationBinder.cs @@ -62,6 +62,11 @@ internal static void BindObject(Notification notification) { Interop.Notification.SetCheckBox(notification.Handle, notification.CheckBox, notification.CheckedValue); } + + if (notification.PairingType == true) + { + Interop.Notification.SetPairingType(notification.Handle, notification.PairingType); + } } internal static void BindSafeHandle(Notification notification) @@ -91,6 +96,7 @@ internal static void BindSafeHandle(Notification notification) BindSafeHandleTag(notification); BindSafeHandleAction(notification); BindSafeHandleCheckBox(notification); + BindSafeHandlePairingType(notification); } private static void BindNotificationSafeHandle(Notification notification) @@ -250,5 +256,18 @@ private static void BindSafeHandleCheckBox(Notification notification) notification.CheckBox = checkbox; notification.CheckedValue = checkedValue; } + + private static void BindSafeHandlePairingType(Notification notification) + { + NotificationError ret; + bool pairingType= false; + + ret = Interop.Notification.GetPairingType(notification.Handle, out pairingType); + if (ret != NotificationError.None) { + Log.Error(Notification.LogTag, "Failed to get paring type info"); + } + + notification.PairingType = pairingType; + } } } diff --git a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationManager.cs b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationManager.cs index aadca4ec6b9..2474f7b97a0 100644 --- a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationManager.cs +++ b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationManager.cs @@ -29,6 +29,10 @@ public static class NotificationManager private static Interop.Notification.ResponseEventCallback responseEventCallback; + // for disturb app + private static event EventHandler ResponseDisturbHandler; + private static Interop.Notification.DisturbCallback disturbCallback; + private static void ResponseEventCallback(IntPtr ptr, int type, IntPtr userData) { IntPtr cloned; @@ -48,6 +52,12 @@ private static void ResponseEventCallback(IntPtr ptr, int type, IntPtr userData) ResponseEventHandler?.Invoke(null, eventArgs); } + // for disturb app + private static void DisturbCallback(IntPtr userData) + { + ResponseDisturbHandler?.Invoke(null, EventArgs.Empty); + } + /// /// The event handler for receiving a response event from the notification viewers /// @@ -559,5 +569,56 @@ public static Notification MakeNotification(NotificationSafeHandle handle) return notification; } + + /// + /// The event handler to get + /// + /// 12 + [EditorBrowsable(EditorBrowsableState.Never)] + public static event EventHandler DisturbReceived + { + add + { + if (disturbCallback == null) + { + disturbCallback = new Interop.Notification.DisturbCallback(DisturbCallback); + } + + ResponseDisturbHandler += value; + } + + remove + { + if (ResponseDisturbHandler != null && ResponseDisturbHandler.GetInvocationList().Length > 0) + { + NotificationError ret = Interop.Notification.UnRegisterDndApp(); + if (ret != NotificationError.None) + { + throw NotificationErrorFactory.GetException(ret, "register do not disturb app failed"); + } + + ResponseDisturbHandler -= value; + } + } + } + + /// + /// Register do not disturb app + /// + /// 12 + [EditorBrowsable(EditorBrowsableState.Never)] + public static void RegisterDoNotDisturbApp() + { + if (ResponseDisturbHandler != null && ResponseDisturbHandler.GetInvocationList().Length > 0) + { + NotificationError ret = Interop.Notification.RegisterDndApp(disturbCallback, IntPtr.Zero); + if (ret != NotificationError.None) + { + throw NotificationErrorFactory.GetException(ret, "register do not disturb app failed"); + } + } else { + throw NotificationErrorFactory.GetException(NotificationError.InvalidOperation, "Disturb callback not exist"); + } + } } } From 01c4437e913870c458bcc9e072297400dd41f8a9 Mon Sep 17 00:00:00 2001 From: sukhyungkang <35091460+sukhyungkang@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:42:05 +0900 Subject: [PATCH 28/31] [Notification] fix notification when pairing type is set (#6394) Signed-off-by: SukhyungKang --- .../Tizen.Applications.Notifications/Notification.cs | 2 +- .../NotificationEventArgsBinder.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs index e5b573b2bd0..dbe43211294 100755 --- a/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs +++ b/src/Tizen.Applications.Notification/Tizen.Applications.Notifications/Notification.cs @@ -528,7 +528,7 @@ internal Notification Build() Bundle bundle = new Bundle(new SafeBundleHandle(extension, false)); foreach (string key in bundle.Keys) { - if (key.StartsWith("_NOTIFICATION_EXTENSION_EVENT_")) + if (key.StartsWith("_NOTIFICATION_EXTENSION_EVENT_") || key.StartsWith("_NOTIFICATION_TYPE_PAIRING_")) continue; SafeBundleHandle sbh; diff --git a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationEventArgsBinder.cs b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationEventArgsBinder.cs index 7fb9d7238cc..1156f866b10 100755 --- a/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationEventArgsBinder.cs +++ b/src/Tizen.Applications.NotificationEventListener/Tizen.Applications.NotificationEventListener/NotificationEventArgsBinder.cs @@ -172,7 +172,7 @@ internal static NotificationEventArgs BindObject(IntPtr notification, bool data) Bundle bundle = new Bundle(new SafeBundleHandle(extension, false)); foreach (string key in bundle.Keys) { - if (key.StartsWith("_NOTIFICATION_EXTENSION_EVENT_")) + if (key.StartsWith("_NOTIFICATION_EXTENSION_EVENT_") || key.StartsWith("_NOTIFICATION_TYPE_PAIRING_")) continue; SafeBundleHandle sbh; From 0bc0495fd1d752aac9fdac37e089d68ed7976a70 Mon Sep 17 00:00:00 2001 From: Haesu Gwon Date: Tue, 8 Oct 2024 16:44:23 +0900 Subject: [PATCH 29/31] [AudioIO] Add new internal API for play audio with repetitions (#6395) * [AudioIO] Add new internal API for play audio with repetitions --- .../Interop/Interop.WavPlayer.cs | 4 ++ .../WavPlayer/WavPlayer.cs | 51 +++++++++++++++++-- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/src/Tizen.Multimedia.AudioIO/Interop/Interop.WavPlayer.cs b/src/Tizen.Multimedia.AudioIO/Interop/Interop.WavPlayer.cs index 0712ee1c430..7c7299690e5 100644 --- a/src/Tizen.Multimedia.AudioIO/Interop/Interop.WavPlayer.cs +++ b/src/Tizen.Multimedia.AudioIO/Interop/Interop.WavPlayer.cs @@ -29,6 +29,10 @@ internal static partial class WavPlayer internal static extern WavPlayerError Start(string filePath, AudioStreamPolicyHandle streamInfoHandle, WavPlayerCompletedCallback completedCallback, IntPtr userData, out int id); + [DllImport(Libraries.WavPlayer, EntryPoint = "wav_player_start_loop")] + internal static extern WavPlayerError StartLoop(string filePath, AudioStreamPolicyHandle streamInfoHandle, uint count, + WavPlayerCompletedCallback completedCallback, IntPtr userData, out int id); + [DllImport(Libraries.WavPlayer, EntryPoint = "wav_player_stop")] internal static extern WavPlayerError Stop(int id); } diff --git a/src/Tizen.Multimedia.AudioIO/WavPlayer/WavPlayer.cs b/src/Tizen.Multimedia.AudioIO/WavPlayer/WavPlayer.cs index 5c159d5cbff..3dcfb24c26e 100644 --- a/src/Tizen.Multimedia.AudioIO/WavPlayer/WavPlayer.cs +++ b/src/Tizen.Multimedia.AudioIO/WavPlayer/WavPlayer.cs @@ -15,6 +15,7 @@ */ using System; +using System.ComponentModel; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -85,20 +86,62 @@ public static Task StartAsync(string path, AudioStreamPolicy streamPolicy, } return cancellationToken.IsCancellationRequested ? Task.FromCanceled(cancellationToken) : - StartAsyncCore(path, streamPolicy, cancellationToken); + StartAsyncCore(path, streamPolicy, 1, cancellationToken); } - private static async Task StartAsyncCore(string path, AudioStreamPolicy streamPolicy, + /// + /// Plays a wav file based on the specified with given repetition number. + /// + /// If loopCount is 0, it means infinite loops + /// A task that represents the asynchronous operation. + /// A file path to play. + /// A . + /// A number of repetitions. + /// A cancellation token which can be used to stop. + /// + /// is null. + /// -or- + /// is null. + /// + /// An internal error occurs. + /// does not exists. + /// The format of is not supported. + /// has already been disposed of. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Task StartAsync(string path, AudioStreamPolicy streamPolicy, uint loopCount, + CancellationToken cancellationToken) + { + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + + if (streamPolicy == null) + { + throw new ArgumentNullException(nameof(streamPolicy)); + } + + if (File.Exists(path) == false) + { + throw new FileNotFoundException("File does not exists.", path); + } + + return cancellationToken.IsCancellationRequested ? Task.FromCanceled(cancellationToken) : + StartAsyncCore(path, streamPolicy, loopCount, cancellationToken); + } + + private static async Task StartAsyncCore(string path, AudioStreamPolicy streamPolicy, uint loopCount, CancellationToken cancellationToken) { + int id = 0; var tcs = new TaskCompletionSource(); Native.WavPlayerCompletedCallback cb = (id_, _) => tcs.TrySetResult(true); using (var cbKeeper = ObjectKeeper.Get(cb)) { - Native.Start(path, streamPolicy.Handle, cb, IntPtr.Zero, out var id). - Validate("Failed to play."); + Native.StartLoop(path, streamPolicy.Handle, loopCount, cb, IntPtr.Zero, out id). + Validate("Failed to play with loop."); using (RegisterCancellationAction(tcs, cancellationToken, id)) { From b1fd412561e0ccda9e2f8c33027624c94e5b0de8 Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Thu, 10 Oct 2024 15:30:04 +0900 Subject: [PATCH 30/31] [Tizen.System.Device] Enhance API description Add more detailed APIs description. Signed-off-by: Yunhee Seo --- src/Tizen.System/Device/Battery.cs | 42 +++++++++++- src/Tizen.System/Device/Display.cs | 44 +++++++++++-- src/Tizen.System/Device/Haptic.cs | 35 +++++++++- src/Tizen.System/Device/IR.cs | 14 +++- src/Tizen.System/Device/Led.cs | 34 +++++++++- .../Device/PerformanceController.cs | 4 ++ src/Tizen.System/Device/Power.cs | 66 +++++++++++++++++-- 7 files changed, 221 insertions(+), 18 deletions(-) diff --git a/src/Tizen.System/Device/Battery.cs b/src/Tizen.System/Device/Battery.cs index 79627db053f..94bc5bbc5db 100755 --- a/src/Tizen.System/Device/Battery.cs +++ b/src/Tizen.System/Device/Battery.cs @@ -76,11 +76,20 @@ public static class Battery { private static readonly object s_lock = new object(); /// - /// Gets the battery charge percentage. + /// Gets the current device's invalid battery charge percentage as an interger value. /// + /// + /// It returns an integer value from 0 to 100 that indicates remaining battery charge as a percentage of the maximum level. + /// /// 3 /// It returns an integer value from 0 to 100 that indicates the remaining /// battery charge as a percentage of the maximum level. + /// + /// + /// Console.WriteLine("battery Percent is: {0}", Tizen.System.Battery.Percent); + /// + /// + /// public static int Percent { get @@ -95,9 +104,25 @@ public static int Percent } } /// - /// Gets the current battery level. + /// Gets the current device's battery level status as a BatteryLevelStatus. /// + /// + /// Retrieves the current battery level status based on remaining battery capacity. + /// /// 3 + /// The battery level status. + /// + /// + /// using Tizen.System; + /// ... + /// BatteryLevelStatus status = Battery.Level; + /// if (Battery.Percent == 0 && status == BatteryLevelStatus.Empty) + /// ... + /// ... + /// + /// + /// + /// public static BatteryLevelStatus Level { get @@ -112,9 +137,20 @@ public static BatteryLevelStatus Level } } /// - /// Gets the current charging state. + /// Gets the current device's charging state which the battery is charging. /// + /// + /// Checks whether the battery is currently being charged or not. + /// /// 3 + /// + /// + /// using Tizen.System; + /// bool charging = Battery.IsCharging; + /// ... + /// + /// + /// public static bool IsCharging { get diff --git a/src/Tizen.System/Device/Display.cs b/src/Tizen.System/Device/Display.cs index 533669d8823..3a6962a7823 100644 --- a/src/Tizen.System/Device/Display.cs +++ b/src/Tizen.System/Device/Display.cs @@ -75,9 +75,21 @@ private Display(int deviceNumber) } /// - /// The number of available display devices. + /// The number of available display devices connected to current device. /// + /// + /// Retrieves the number of display devices connected to the system. + /// /// 3 + /// + /// + /// using Tizen.System; + /// ... + /// Console.WriteLine("Total number of Displays are: {0}", Display.NumberOfDisplays); + /// + /// + /// + /// public static int NumberOfDisplays { get @@ -120,6 +132,9 @@ private static IReadOnlyList GetAllDisplayes() /// /// The maximum brightness value that can be set for the specific display. /// + /// + /// Retrieves the maximum brightness level of a specific display device. + /// /// 3 /// /// @@ -142,7 +157,7 @@ public int MaxBrightness } /// - /// The brightness value of the display. + /// The brightness value of the specific display device. /// /// /// The brightness value should be less than or equal to the MaxBrightness value. @@ -150,12 +165,15 @@ public int MaxBrightness /// 3 /// When an invalid parameter value is set. /// If the privilege is not set. + /// In case of any system error. + /// This exception can be due to device not supported. /// /// /// Display display = Display.Displays[0]; /// Console.WriteLine("Display current Brightness is: {0}", display.Brightness); /// /// + /// public int Brightness { get @@ -179,9 +197,27 @@ public int Brightness } } /// - /// The current device display state. + /// The current device display state, including normal, dim, and off states. /// + /// + /// When the display state is set, it should be checked the profile version and supported display state. + /// /// 3 + /// + /// + /// using Tizen.System; + /// ... + /// DisplayState current = Display.State; + /// Console.WriteLine("Display current state is: {0}", current); + /// ... + /// Display.State = DisplayState.Normal; + /// ... + /// + /// + /// + /// + /// + /// public static DisplayState State { get @@ -218,7 +254,7 @@ public static DisplayState State /// { /// Console.WriteLine("Display State is: {0}", args.State); /// } - /// Battery.StateChanged += handler; + /// Display.StateChanged += handler; /// await Task.Delay(20000); /// } /// diff --git a/src/Tizen.System/Device/Haptic.cs b/src/Tizen.System/Device/Haptic.cs index 42d86cddba0..c196445c14d 100755 --- a/src/Tizen.System/Device/Haptic.cs +++ b/src/Tizen.System/Device/Haptic.cs @@ -73,9 +73,20 @@ private Vibrator(int id) Dispose(false); } /// - /// Gets the number of the available vibrators. + /// Gets the number of the available vibrators available on the current device. /// + /// + /// Retrieves the total number of vibrators available on the device. + /// /// 3 + /// + /// + /// using Tizen.System; + /// ... + /// Console.WriteLine("Total number of Vibrators are: {0}", Vibrator.NumberOfVibrators); + /// ... + /// + /// public static int NumberOfVibrators { get @@ -121,6 +132,9 @@ private static IReadOnlyList GetAllVibrators() /// Vibrates during the specified time with a constant intensity. /// This function can be used to start monotonous vibration for the specified time. /// + /// + /// To prevent unexpected sleep (suspend) during vibration, please check and use Power module. + /// /// 3 /// The play duration in milliseconds. /// The amount of the intensity variation (0 ~ 100). @@ -143,7 +157,8 @@ private static IReadOnlyList GetAllVibrators() /// } ///
///
- + /// + /// public void Vibrate(int duration, int feedback) { IntPtr effect; @@ -187,6 +202,7 @@ public void Vibrate(int duration, int feedback) /// } /// ///
+ /// public void Stop() { if (_hapticHandle != IntPtr.Zero) @@ -202,7 +218,22 @@ public void Stop() /// Dispose API for closing the internal resources. /// This function can be used to stop all the effects started by Vibrate(). /// + /// + /// Internally, it disconnects the connection to the vibrator by Vibrate(). + /// /// 3 + /// + /// + /// using Tizen.System; + /// ... + /// Vibrator vibrator = Vibrator.Vibrators[0]; + /// vibrator.Vibrate(2000, 70); + /// ... + /// vibrator.Stop(); + /// vibrator.Dispose(); + /// + /// + /// public void Dispose() { Dispose(true); diff --git a/src/Tizen.System/Device/IR.cs b/src/Tizen.System/Device/IR.cs index 67b02746223..fd9f59a2a2b 100755 --- a/src/Tizen.System/Device/IR.cs +++ b/src/Tizen.System/Device/IR.cs @@ -38,7 +38,18 @@ public static class IR /// /// Gets the information whether the IR module is available. /// + /// + /// Gets the boolean value whether the IR module is available on the device. + /// /// 3 + /// true if the IR module is available, otherwise false. + /// + /// + /// using Tizen.System; + /// ... + /// Console.WriteLine("IR availability for this device is: {0}", IR.IsAvailable); + /// + /// public static bool IsAvailable { get @@ -54,7 +65,7 @@ public static bool IsAvailable } /// - /// Transmits the IR command. + /// Transmits IR command with the specified carrier frequency and pattern. /// /// 3 /// @@ -81,6 +92,7 @@ public static bool IsAvailable /// } /// ///
+ /// public static void Transmit(int carrierFreequency, IList pattern) { int[] patternArray = pattern.ToArray(); diff --git a/src/Tizen.System/Device/Led.cs b/src/Tizen.System/Device/Led.cs index 5f100e76117..f853a891ae2 100755 --- a/src/Tizen.System/Device/Led.cs +++ b/src/Tizen.System/Device/Led.cs @@ -46,10 +46,20 @@ public static class Led /// /// Gets the maximum brightness value of the LED that is located next to the camera. /// + /// + /// Retrieves the maximum brightness level of the back camera flash. + /// /// 3 /// When an invalid parameter value is set. /// If the privilege is not set. /// In case the device does not support this behavior. + /// + /// + /// using Tizen.System; + /// ... + /// Console.WriteLine("Led MaxBrightness is: {0}", Led.MaxBrightness); + /// + /// public static int MaxBrightness { get @@ -107,7 +117,7 @@ public static int Brightness } /// - /// Plays the LED that is located at the front of the device. + /// Plays the custom effect of the service LED that is located to the front of a device. /// /// 3 /// Turn on time in milliseconds. @@ -131,6 +141,7 @@ public static int Brightness /// } /// ///
+ /// public static void Play(int on, int off, Color color) { //looks like only blink option is supported. So hard coded to default blink option. @@ -142,8 +153,11 @@ public static void Play(int on, int off, Color color) } /// - /// Stops the LED that is located at the front of the device. + /// Stops the custom effect of the service LED that is located to the front of a device. /// + /// + /// The custom effect was started by Led.Play(int,int,Color). + /// /// 3 /// If the privilege is not set. /// In case of any system error. @@ -161,7 +175,7 @@ public static void Play(int on, int off, Color color) /// } /// ///
- + /// public static void Stop() { DeviceError res = (DeviceError)Interop.Device.DeviceLedStopCustom(); @@ -177,6 +191,20 @@ public static void Stop() /// StateChanged is raised when the LED state is changed. /// /// 3 + /// + /// + /// public static async Task LedEventHandler() + /// { + /// EventHandler<LedBrightnessChangedEventArgs> handler = null; + /// handler = (object sender, LedBrightnessChangedEventArgs args) => + /// { + /// Console.WriteLine("battery Level is: {0}", args.Brightness); + /// } + /// Led.BrightnessChanged += handler; + /// await Task.Delay(20000); + /// } + /// + /// public static event EventHandler BrightnessChanged { add diff --git a/src/Tizen.System/Device/PerformanceController.cs b/src/Tizen.System/Device/PerformanceController.cs index 88206eb5e8a..684f1f73dcb 100644 --- a/src/Tizen.System/Device/PerformanceController.cs +++ b/src/Tizen.System/Device/PerformanceController.cs @@ -44,6 +44,10 @@ public static class PerformanceController /// /// Increase the cpu clock within timeout. /// + /// + /// The timeout parameter specifies the duration of the CPU boost in milliseconds. + /// If the timeout value exceeds 3000 milliseconds, it will automatically be set to 3000 milliseconds. + /// /// Performance Control Type /// Cpu clock increasing duration in milliseconds. /// When an invalid parameter value is set. diff --git a/src/Tizen.System/Device/Power.cs b/src/Tizen.System/Device/Power.cs index 7c194a03f81..bb770b1396f 100644 --- a/src/Tizen.System/Device/Power.cs +++ b/src/Tizen.System/Device/Power.cs @@ -362,6 +362,9 @@ public static void ReleaseCpuLock() /// /// If the process dies, then every lock will be removed. /// + /// + /// http://tizen.org/privilege/display.state + /// /// 5 /// /// The power type to request lock. @@ -378,6 +381,8 @@ public static void ReleaseCpuLock() /// Tizen.System.Power.RequestLock(Tizen.System.Power.PowerLock.Cpu, 2000); /// ///
+ /// + /// public static void RequestLock(PowerLock type, int timeout) { DeviceError res = (DeviceError)Interop.Device.DevicePowerRequestLock((Interop.Device.PowerLock)type, timeout); @@ -387,8 +392,14 @@ public static void RequestLock(PowerLock type, int timeout) } } /// - /// Releases the lock state. + /// Releases the given specific power lock type which was locked before. /// + /// + /// Releases the lock of specific power lock type that was previously acquired using Power.RequestLock(PowerLock,int). + /// + /// + /// http://tizen.org/privilege/display.state + /// /// 5 /// /// The power type to request lock. @@ -401,6 +412,8 @@ public static void RequestLock(PowerLock type, int timeout) /// Tizen.System.Power.ReleaseLock(Tizen.System.Power.PowerLock.Cpu); /// /// + /// + /// public static void ReleaseLock(PowerLock type) { DeviceError res = (DeviceError)Interop.Device.DevicePowerReleaseLock((Interop.Device.PowerLock)type); @@ -410,8 +423,11 @@ public static void ReleaseLock(PowerLock type) } } /// - /// Power off the device. + /// Requests the current device's power state change to be changed to powered off. /// + /// + /// It operates synchronously and powers off the current device. + /// /// http://tizen.org/privilege/reboot /// platform /// If the privilege is not set. @@ -421,6 +437,7 @@ public static void ReleaseLock(PowerLock type) /// Tizen.System.Power.PowerOff(); /// /// + /// 9 [EditorBrowsable(EditorBrowsableState.Never)] public static void PowerOff() { @@ -431,8 +448,11 @@ public static void PowerOff() } } /// - /// Reboot the device. + /// Sends a request to the deviced Rebooting the current device. /// + /// + /// It operates asynchronously. + /// /// http://tizen.org/privilege/reboot /// platform /// If the privilege is not set. @@ -442,6 +462,8 @@ public static void PowerOff() /// Tizen.System.Power.Reboot(null); /// /// + /// + /// 9 [EditorBrowsable(EditorBrowsableState.Never)] public static void Reboot(string reason) { @@ -472,6 +494,9 @@ public static void Reboot(string reason) /// } /// /// + /// + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ConfirmWaitCallback(UInt64 wait_callback_id) { @@ -508,6 +533,9 @@ public static void ConfirmWaitCallback(UInt64 wait_callback_id) /// } /// /// + /// + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void CancelWaitCallback(UInt64 wait_callback_id) { @@ -555,6 +583,8 @@ public static void CancelWaitCallback(UInt64 wait_callback_id) /// /// /// + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static void ChangeState(PowerState state, int timeout_sec) { @@ -590,7 +620,7 @@ public static int CheckRebootAllowed() #if !PROFILE_TV /// - /// Get wakeup reason. + /// Gets the reason for the last device wakeup based on the scenario. /// /// /// This api is not supported at TV profile. @@ -603,6 +633,7 @@ public static int CheckRebootAllowed() /// PowerTransitionReason transition_reason = Power.GetWakeupReason(); /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static PowerTransitionReason GetWakeupReason() { @@ -627,8 +658,11 @@ public static PowerTransitionReason GetWakeupReason() #endif /// - /// Gets the status of power lock. + /// Gets the status of power lock is locked or not based on specific power lock type. /// + /// + /// Retrieves the status of a power lock. + /// /// 10 /// Type of power lock. /// When an invalid parameter value is set. @@ -638,6 +672,8 @@ public static PowerTransitionReason GetWakeupReason() /// PowerLockState lock_state = Power.GetLockState(PowerLock.Cpu); /// /// + /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static PowerLockState GetLockState(PowerLock type) { @@ -672,6 +708,7 @@ public static PowerLockState GetLockState(PowerLock type) /// Power.StartStateChangeRequestCallback += PowerStateChangeRequestCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler StartStateChangeRequestCallback { @@ -738,6 +775,7 @@ public static event EventHandler NormalStateCh /// Power.SleepStateChangeRequestCallback += PowerStateChangeRequestCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler SleepStateChangeRequestCallback { @@ -772,6 +810,7 @@ public static event EventHandler SleepStateCha /// Power.PoweroffStateChangeRequestCallback += PowerStateChangeRequestCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler PoweroffStateChangeRequestCallback { @@ -805,6 +844,7 @@ public static event EventHandler PoweroffState /// Power.RebootStateChangeRequestCallback += PowerStateChangeRequestCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler RebootStateChangeRequestCallback { @@ -838,6 +878,7 @@ public static event EventHandler RebootStateCh /// Power.ExitStateChangeRequestCallback += PowerStateChangeRequestCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler ExitStateChangeRequestCallback { @@ -977,6 +1018,7 @@ private static void PowerStateChangeRequestEventTrigger(PowerState power_state, /// Power.StartStateWaitCallback += PowerStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler StartStateWaitCallback { @@ -1020,6 +1062,7 @@ public static event EventHandler StartStateWaitCallback /// Power.NormalStateWaitCallback += PowerStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler NormalStateWaitCallback { @@ -1063,6 +1106,7 @@ public static event EventHandler NormalStateWaitCallbac /// Power.SleepStateWaitCallback += PowerStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler SleepStateWaitCallback { @@ -1107,6 +1151,7 @@ public static event EventHandler SleepStateWaitCallback /// Power.PoweroffStateWaitCallback += PowerStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler PoweroffStateWaitCallback { @@ -1150,6 +1195,7 @@ public static event EventHandler PoweroffStateWaitCallb /// Power.RebootStateWaitCallback += PowerStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler RebootStateWaitCallback { @@ -1193,6 +1239,7 @@ public static event EventHandler RebootStateWaitCallbac /// Power.ExitStateWaitCallback += PowerStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler ExitStateWaitCallback { @@ -1367,6 +1414,7 @@ private static void PowerStateChangeEventListenerStop(PowerState state) /// Power.TransientResumingEarlyStateWaitCallback += PowerTransientStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler TransientResumingEarlyStateWaitCallback { @@ -1409,6 +1457,7 @@ public static event EventHandler TransientResu /// Power.TransientResumingStateWaitCallback += PowerTransientStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler TransientResumingStateWaitCallback { @@ -1451,6 +1500,7 @@ public static event EventHandler TransientResu /// Power.TransientResumingLateStateWaitCallback += PowerTransientStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler TransientResumingLateStateWaitCallback { @@ -1493,6 +1543,7 @@ public static event EventHandler TransientResu /// Power.TransientSuspendingEarlyStateWaitCallback += PowerTransientStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler TransientSuspendingEarlyStateWaitCallback { @@ -1535,6 +1586,7 @@ public static event EventHandler TransientSusp /// Power.TransientSuspendingStateWaitCallback += PowerTransientStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler TransientSuspendingStateWaitCallback { @@ -1577,6 +1629,7 @@ public static event EventHandler TransientSusp /// Power.TransientSuspendingLateStateWaitCallback += PowerTransientStateWaitCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler TransientSuspendingLateStateWaitCallback { @@ -1744,6 +1797,7 @@ private static void PowerTransientStateChangeEventListenerStop(PowerTransientSta /// Power.CpuLockStateChangedCallback += PowerLockStateChangeCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler CpuLockStateChangedCallback { @@ -1785,6 +1839,7 @@ public static event EventHandler CpuLockStateCha /// Power.DisplayNormalLockStateChangedCallback += PowerLockStateChangeCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler DisplayNormalLockStateChangedCallback { @@ -1826,6 +1881,7 @@ public static event EventHandler DisplayNormalLo /// Power.DisplayDimLockStateChangedCallback += PowerLockStateChangeCallback; /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public static event EventHandler DisplayDimLockStateChangedCallback { From de01ce5b38b559035eff9ba41b61258a234ea017 Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Thu, 10 Oct 2024 16:37:16 +0900 Subject: [PATCH 31/31] [Tizen.System.Feedback] Enhance API description Add more detailed APIs description. Signed-off-by: Yunhee Seo --- .../Feedback/Feedback.cs | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/Tizen.System.Feedback/Feedback/Feedback.cs b/src/Tizen.System.Feedback/Feedback/Feedback.cs index 6365ea0c83b..9b17ffda1aa 100755 --- a/src/Tizen.System.Feedback/Feedback/Feedback.cs +++ b/src/Tizen.System.Feedback/Feedback/Feedback.cs @@ -413,6 +413,7 @@ public Feedback() /// bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap"); /// /// + /// public bool IsSupportedPattern(FeedbackType type, String pattern) { bool supported = false; @@ -446,7 +447,7 @@ public bool IsSupportedPattern(FeedbackType type, String pattern) } /// - /// Plays a specific feedback pattern. + /// Plays specific type of reactions that are pre-defined feedback pattern. /// /// /// To play Vibration type, app should have http://tizen.org/privilege/haptic privilege. @@ -469,6 +470,8 @@ public bool IsSupportedPattern(FeedbackType type, String pattern) /// feedback.Play(FeedbackType.All, "Tap"); /// /// + /// + /// public void Play(FeedbackType type, String pattern) { int number; @@ -503,7 +506,7 @@ public void Play(FeedbackType type, String pattern) } /// - /// Stops to play the feedback. + /// Stops various types of reactions from the feedback module. /// /// /// To stop vibration, the application should have http://tizen.org/privilege/haptic privilege. @@ -524,6 +527,7 @@ public void Play(FeedbackType type, String pattern) /// Feedback1.Stop(); /// /// + /// public void Stop() { Interop.Feedback.FeedbackError res = (Interop.Feedback.FeedbackError)Interop.Feedback.Stop(); @@ -549,7 +553,7 @@ public void Stop() } /// - /// Gets the count of theme can be used according to feedback type. + /// Gets the number of themes supported as described in the configuration. /// /// /// Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. @@ -568,6 +572,7 @@ public void Stop() /// uint coundOfTheme = feedback.GetCountOfThemeInternal(FeedbackType.Sound); /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public uint GetCountOfThemeInternal(FeedbackType type) { @@ -596,7 +601,7 @@ public uint GetCountOfThemeInternal(FeedbackType type) } /// - /// Gets the id of theme selected. + /// Gets the current id of the theme selected from available themes described in the conf file. /// /// /// Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. @@ -614,6 +619,7 @@ public uint GetCountOfThemeInternal(FeedbackType type) /// uint idOfTheme = feedback.GetThemeIdInternal(FeedbackType.Sound); /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public uint GetThemeIdInternal(FeedbackType type) { @@ -640,7 +646,7 @@ public uint GetThemeIdInternal(FeedbackType type) } /// - /// Sets the id of theme according to feedback type. + /// Sets the current id of the theme from available themes described in the conf file. /// /// /// Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. @@ -661,6 +667,7 @@ public uint GetThemeIdInternal(FeedbackType type) /// feedback.SetThemeIdInternal(FeedbackType.Sound, idOfTheme); /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public void SetThemeIdInternal(FeedbackType type, uint idOfTheme) { @@ -687,7 +694,7 @@ public void SetThemeIdInternal(FeedbackType type, uint idOfTheme) } /// - /// Stops the current feedback playing by feedback type + /// Stops reactions of various types according to the feedback type. /// /// /// To stop vibration, the application should have http://tizen.org/privilege/haptic privilege. @@ -706,6 +713,7 @@ public void SetThemeIdInternal(FeedbackType type, uint idOfTheme) /// feedback.StopTypeInternal(FeedbackType.Vibration); /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public void StopTypeInternal(FeedbackType type) { @@ -734,11 +742,12 @@ public void StopTypeInternal(FeedbackType type) } /// - /// Gets the id array of theme supported. + /// Gets the array of theme ids supported described in the conf file. /// /// /// Now this internal API works for FeedbackType.Sound only, FeedbackType.Vibration is not supported. /// The theme id is positive value as defined in the conf file. + /// Gets all theme ids as defined in the conf file. /// /// 10 /// The feedback type. @@ -752,6 +761,7 @@ public void StopTypeInternal(FeedbackType type) /// uint[] getThemeIds = feedback.GetThemeIdsInternal(FeedbackType.Sound); /// /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public uint[] GetThemeIdsInternal(FeedbackType type) {