From: jeremy-jang <35089715+jeremy-jang@users.noreply.github.com> Date: Wed, 20 Nov 2024 07:47:31 +0000 (+0900) Subject: [Packagemanager] Enhance API descriptions (#6358) X-Git-Tag: submit/tizen/20241120.150846~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e4b6d19fe67f5b97878c9ca44b6616f5d663403;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Packagemanager] Enhance API descriptions (#6358) Signed-off-by: Sangyoon Jang Co-authored-by: hjhun <36876573+hjhun@users.noreply.github.com> --- diff --git a/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs b/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs index 9f01052a4..4c7f79321 100755 --- a/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs +++ b/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs @@ -59,6 +59,30 @@ namespace Tizen.Applications /// Event type of the request. /// Current event state of the request. /// Progress for the request being processed by the package manager (in percent). + /// + /// The RequestEventCallback function provides information about the current status of a package request. It is called every time there is an update in the package request process. By monitoring the arguments passed to this function, you can keep track of the progress and events related to the package request. + /// + /// + /// + /// private static void OnRequestEventCallback(string type, string packageId, PackageEventType eventType, PackageEventState eventState, int progress) + /// { + /// switch (eventType) + /// { + /// case PackageEventType.Installing: + /// Console.WriteLine($"Package '{packageId}' is currently installing."); + /// break; + /// case PackageEventType.Updating: + /// Console.WriteLine($"Package '{packageId}' is currently updating."); + /// break; + /// case PackageEventType.Removing: + /// Console.WriteLine($"Package '{packageId}' is currently removing."); + /// break; + /// default: + /// throw new ArgumentException($"Unknown event type: {eventType}"); + /// } + /// } + /// + /// /// 3 public delegate void RequestEventCallback(string type, string packageId, PackageEventType eventType, PackageEventState eventState, int progress); @@ -72,9 +96,9 @@ namespace Tizen.Applications private delegate Interop.PackageManager.ErrorCode InstallPackagesMethod(SafePackageManagerRequestHandle requestHandle, string[] pkgPaths, int pathsCount, out int requestID); /// - /// InstallProgressChanged event. This event occurs when a package is getting installed and the progress of the request to the package manager is changed. + /// InstallProgressChanged event. Occurs when a package is being installed and the progress of the request to the package manager changes. /// - /// Thrown when subscribing to package manager event failed. + /// Thrown when subscribing to package manager event fails. /// 3 public static event EventHandler InstallProgressChanged { @@ -122,7 +146,7 @@ namespace Tizen.Applications UnregisterPackageManagerEventIfNeeded(); UnsetPackageManagerEventStatus(); } - } + } } /// @@ -286,8 +310,8 @@ namespace Tizen.Applications /// /// The ID of the application. /// Returns the ID of the package. - /// It returns null if the input is null. - /// Thrown when input application ID does not exist. + /// If the input is null, it returns null. + /// Thrown when the input application ID does not exist. /// Thrown when there is not enough memory to continue the execution of the method. /// Thrown when an application does not have the privilege to access this method. /// http://tizen.org/privilege/packagemanager.info @@ -346,6 +370,10 @@ namespace Tizen.Applications /// /// Clears all the application's internal and external cache directories. /// + /// + /// This method clears both the internal and external cache directories of the application. It ensures that any cached files are removed from the device storage. + /// By calling this method, you can free up valuable space on the device and improve its performance. However, note that this operation may take some time depending on the amount of cached data present in the directories. + /// /// Thrown when there is not enough memory to continue the execution of the method. /// Thrown when the method fails due to an internal IO error. /// Thrown when an application does not have the privilege to access this method. @@ -368,13 +396,13 @@ namespace Tizen.Applications /// /// /// All files under data, shared/data, and shared/trusted in the internal storage are removed. - /// And, if the external storage exists, then all files under data and shared/trusted in the external storage are removed. + /// And, if the external storage exists, then all files under data and shared/trusted in the external storage are also removed. /// /// ID of the package. /// Thrown when there is not enough memory to continue the execution of the method. - /// Thrown when the method failed due to an internal IO error. - /// Thrown when an application does not have the privilege to access this method. - /// Thrown when the method failed due to an internal system error. + /// Thrown when the method fails due to an internal IO error. + /// Thrown when an application does not have the required privileges to access this method. + /// Thrown when the method fails due to an internal system error. /// http://tizen.org/privilege/packagemanager.admin /// platform /// 3 @@ -533,10 +561,9 @@ namespace Tizen.Applications /// /// Absolute path for the package to be installed. /// Optional parameter to indicate special installation mode. - /// Returns true if the installation request is successful, otherwise false. + /// True if the installation request is successful, otherwise false. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of the installation, the caller should check the progress using the InstallProgressChanged event. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -554,8 +581,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event or eventCallback. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -573,8 +599,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -592,8 +617,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -612,8 +636,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event or eventCallback. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -632,8 +655,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event or eventCallback. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -652,8 +674,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -673,8 +694,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event or eventCallback. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -691,8 +711,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event or eventCallback. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -710,8 +729,7 @@ namespace Tizen.Applications /// Optional parameter to indicate special installation mode. /// Returns true if installation request is successful, false otherwise. /// - /// The 'true' means that the request for installation is successful. - /// To check the result of installation, the caller should check the progress using the InstallProgressChanged event or eventCallback. + /// True indicates that the installation request was successful. However, to determine whether the actual installation was completed successfully, the caller must monitor the progress by subscribing to the InstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -878,8 +896,7 @@ namespace Tizen.Applications /// ID of the package to be uninstalled. /// Returns true if the uninstallation request is successful, false otherwise. /// - /// The 'true' means that the request for uninstallation is successful. - /// To check the result of uninstallation, the caller should check the progress using the UninstallProgressChanged event. + /// The return value 'true' indicates that the uninstallation request was successfully made. However, in order to determine whether the actual uninstallation process completed without any errors, the caller needs to monitor the progress through the UninstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -896,8 +913,7 @@ namespace Tizen.Applications /// Optional - Package type for the package to be uninstalled. /// Returns true if the uninstallation request is successful, false otherwise. /// - /// The 'true' means that the request for uninstallation is successful. - /// To check the result of uninstallation, the caller should check the progress using the UninstallProgressChanged event. + /// The return value 'true' indicates that the uninstallation request was successfully made. However, in order to determine whether the actual uninstallation process completed without any errors, the caller needs to monitor the progress through the UninstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -914,8 +930,7 @@ namespace Tizen.Applications /// Optional - The event callback will be invoked only for the current request. /// Returns true if the uninstallation request is successful, false otherwise. /// - /// The 'true' means that the request for uninstallation is successful. - /// To check the result of uninstallation, the caller should check the progress using the UninstallProgressChanged event or eventCallback. + /// The return value 'true' indicates that the uninstallation request was successfully made. However, in order to determine whether the actual uninstallation process completed without any errors, the caller needs to monitor the progress through the UninstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -933,8 +948,7 @@ namespace Tizen.Applications /// Optional - The event callback will be invoked only for the current request. /// Returns true if the uninstallation request is successful, false otherwise. /// - /// The 'true' means that the request for uninstallation is successful. - /// To check the result of uninstallation, the caller should check the progress using the UninstallProgressChanged event or eventCallback. + /// The return value 'true' indicates that the uninstallation request was successfully made. However, in order to determine whether the actual uninstallation process completed without any errors, the caller needs to monitor the progress through the UninstallProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -1005,8 +1019,8 @@ namespace Tizen.Applications /// Storage package should be moved to. /// Returns true if the move request is successful, false otherwise. /// - /// The 'true' means that the request for move is successful. - /// To check the result of move, the caller should check the progress using the MoveProgressChanged event. + /// The return value 'true' indicates that the move request was successfully made. + /// To determine whether the actual move operation completed successfully, the caller needs to monitor the progress by handling the MoveProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -1024,8 +1038,8 @@ namespace Tizen.Applications /// Storage package should be moved to. /// Returns true if the move request is successful, false otherwise. /// - /// The 'true' means that the request for move is successful. - /// To check the result of move, the caller should check the progress using the MoveProgressChanged event. + /// The return value 'true' indicates that the move request was successfully made. + /// To determine whether the actual move operation completed successfully, the caller needs to monitor the progress by handling the MoveProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -1043,8 +1057,8 @@ namespace Tizen.Applications /// Optional - The event callback will be invoked only for the current request. /// Returns true if move request is successful, false otherwise. /// - /// The 'true' means that the request for move is successful. - /// To check the result of move, the caller should check the progress using the MoveProgressChanged event. + /// The return value 'true' indicates that the move request was successfully made. + /// To determine whether the actual move operation completed successfully, the caller needs to monitor the progress by handling the MoveProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform @@ -1063,8 +1077,8 @@ namespace Tizen.Applications /// Optional - The event callback will be invoked only for the current request. /// Returns true if move request is successful, false otherwise. /// - /// The 'true' means that the request for move is successful. - /// To check the result of move, the caller should check the progress using the MoveProgressChanged event. + /// The return value 'true' indicates that the move request was successfully made. + /// To determine whether the actual move operation completed successfully, the caller needs to monitor the progress by handling the MoveProgressChanged event. /// /// http://tizen.org/privilege/packagemanager.admin /// platform