Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Content.Download] Update API document #6340

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
namespace Tizen.Content.Download
{
/// <summary>
/// The CacheManager class provides the functions to manage cache properties.
/// The CacheManager class provides the functions to manage cache properties,
/// allowing downloaded content to be reused without redownloading.
/// </summary>
/// <since_tizen> 11 </since_tizen>
public static class CacheManager
{

/// <summary>
/// Clears per app download cache.
/// Clears all cached data related to downloads, resetting the cache to its initial state.
/// </summary>
/// <since_tizen> 11 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal Notification(int requestId)
}

/// <summary>
/// Title of the notification.
/// Title text that is set to be displayed in the download notification.
/// If a user tries to get before the setting, an empty string is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
Expand Down Expand Up @@ -67,7 +67,7 @@ public string Title
}

/// <summary>
/// Description of the notification.
/// Description text to be displayed in the download notification.
/// If a user tries to get before the setting, an empty string is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
Expand Down Expand Up @@ -101,8 +101,8 @@ public string Description
}

/// <summary>
/// Type of the notification.
/// If a user tries to get before the setting, the default NotificationType none is returned.
/// Type of notification to be displayed during the download process.
/// If a user tries to get before the setting, <see cref="NotificationType.None"/> is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down
64 changes: 36 additions & 28 deletions src/Tizen.Content.Download/Tizen.Content.Download/Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class Request : IDisposable
private bool _disposed = false;

/// <summary>
/// Creates a Request object.
/// Creates a Request object that can be used to control the download process.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="url">The URL to download.</param>
Expand Down Expand Up @@ -66,12 +66,12 @@ public Request(string url)
}

/// <summary>
/// Creates a Request object.
/// Creates a Request object, taking parameters to specify the URL, download location, file name, and network type.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="url">The URL to download</param>
/// <param name="destinationPath">The directory path where downloaded file is stored.</param>
/// <param name="fileName">The name of the downloaded file.</param>
/// <param name="destinationPath">The directory path where the downloaded file will be saved.</param>
/// <param name="fileName">The desired file name for the downloaded content.</param>
/// <param name="type">The network type which the download request must adhere to.</param>
/// <privilege>http://tizen.org/privilege/download</privilege>
/// <feature>http://tizen.org/feature/network.wifi</feature>
Expand Down Expand Up @@ -122,11 +122,12 @@ public Request(string url, string destinationPath, string fileName, NetworkType
}

/// <summary>
/// Creates a Request object.
/// Creates a Request object, taking parameters to specify the URL,
/// download location, file name, network type and any additional HTTP headers required for the request.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="url">The URL to download.</param>
/// <param name="destinationPath">The directory path where the downloaded file is stored.</param>
/// <param name="destinationPath">The directory path where the downloaded file will be saved.</param>
/// <param name="fileName">The name of the downloaded file.</param>
/// <param name="type">The network type which the download request must adhere to.</param>
/// <param name="httpHeaders">HTTP header fields for the download request.</param>
Expand Down Expand Up @@ -187,7 +188,7 @@ public Request(string url, string destinationPath, string fileName, NetworkType
}

/// <summary>
/// An event that occurs when the download state changes.
/// An event that occurs when the download state changes, such as when the download starts, pauses, completes, or fails.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down Expand Up @@ -215,7 +216,7 @@ public event EventHandler<StateChangedEventArgs> StateChanged
}

/// <summary>
/// An event that occurs when the download progress changes.
/// An event that occurs when the download progress changes to track the progress of the download.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down Expand Up @@ -243,7 +244,7 @@ public event EventHandler<ProgressChangedEventArgs> ProgressChanged
}

/// <summary>
/// The absolute path where the file will be downloaded.
/// The absolute file path of the downloaded content.
/// If you try to get this property value before calling Start(), an empty string is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
Expand Down Expand Up @@ -294,7 +295,7 @@ public string MimeType
}

/// <summary>
/// The current state of the download.
/// The current state of the download, such as whether it is in progress, paused, canceled, or completed.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand All @@ -318,7 +319,7 @@ public DownloadState State

/// <summary>
/// The content name of the downloaded file.
/// This can be defined with reference of the HTTP response header data. The content name can be received when the HTTP response header is received.
/// This can be received when HTTP response header is received.
/// If you try to get this property value before calling Start(), an empty string is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
Expand All @@ -342,7 +343,7 @@ public string ContentName
}

/// <summary>
/// The total size of the downloaded content.
/// The size of the content being downloaded.
/// This information is received from the server. If the server does not send the total size of the content, the content size is set to zero.
/// If you try to get this property value before calling Start(), 0 is returned.
/// </summary>
Expand All @@ -367,13 +368,13 @@ public ulong ContentSize
}

/// <summary>
/// The HTTP status code when a download exception occurs.
/// The HTTP status code when the download exception occurs.
/// If you try to get this property value before calling Start(), 0 is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
/// <remarks>
/// The state of the download request must be DownlodState.Failed.
/// The state of the download request must be <see cref="DownloadState.Failed"/>.
/// </remarks>
/// <exception cref="ArgumentException">Thrown when it is failed due to an invalid parameter.</exception>
/// <exception cref="InvalidOperationException">Thrown when it is failed due to an invalid operation.</exception>
Expand All @@ -394,13 +395,14 @@ public int HttpStatus
}

/// <summary>
/// The ETag value from the HTTP response header when making a HTTP request for resume.
/// The ETag (Entity Tag) from the server response for the download request when making a HTTP request for resume.
/// If you try to get this property value before calling Start() or if any other error occurs, an empty string is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
/// <remarks>
/// The ETag value is either available or not dependent on the web server. If not available, then, on getting the property, a null value is returned.
/// The ETag is a unique identifier assigned by the server to the content, which can be used to check for updates or changes to the file.
/// It is either available or not dependent on the web server. If not available, then, on getting the property, a null value is returned.
/// After the download is started, it can get the ETag value.
/// </remarks>
/// <exception cref="ArgumentException">Thrown when it is failed due to an invalid parameter.</exception>
Expand Down Expand Up @@ -441,7 +443,7 @@ public Notification NotificationProperties
}

/// <summary>
/// The full path of the temporary file stores the downloaded content.
/// The temporary file path where the downloaded content is being stored.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand All @@ -467,7 +469,7 @@ public string TemporaryPath
}

/// <summary>
/// The URL to download.
/// The URL for the file to be downloaded.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down Expand Up @@ -502,9 +504,10 @@ public string Url
}

/// <summary>
/// The allowed network type for downloading the file.
/// The allowed network type that is set for the download.
/// The file will be downloaded only under the allowed network.
/// If you try to get this property value before setting or if any other error occurs, the default value NetworkType All is returned.
/// If you try to get this property value before setting or if any other error occurs,
/// <see cref="NetworkType.All"/> is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down Expand Up @@ -542,7 +545,9 @@ public NetworkType AllowedNetworkType
}

/// <summary>
/// The file will be downloaded to the set the destination file path. The downloaded file is saved to an auto-generated file name in the destination. If the destination is not specified, the file will be downloaded to the default storage.
/// The file path where the downloaded content will be saved on the device.
/// The downloaded file is saved to an auto-generated file name in the destination.
/// If the destination is not specified, the file will be downloaded to the default storage.
/// If you try to get this property value before setting or if any other error occurs, an empty string is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
Expand Down Expand Up @@ -577,7 +582,9 @@ public string DestinationPath
}

/// <summary>
/// The file will be saved in the specified destination or the default storage with the set file name. If the file name is not specified, the downloaded file will be saved with an auto-generated file name in the destination.
/// The name to be used for the downloaded content.
/// The file will be saved in the specified destination or the default storage.
/// If the file name is not specified, the downloaded content will be saved with an auto-generated file name in the destination.
/// If you try to get this property value before setting or if any other error occurs, an empty string is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
Expand Down Expand Up @@ -612,8 +619,9 @@ public string FileName
}

/// <summary>
/// Enables or disables auto download.
/// If this option is enabled, the previous downloading item is restarted automatically as soon as the download daemon is restarted. The download progress continues after the client process is terminated.
/// Enables or disables automatic downloading of the file.
/// If this option is enabled, the previous downloading item is restarted automatically as soon as the download daemon is restarted.
/// The download progress continues after the client process is terminated.
/// If you try to get this property value before setting, the default value false is returned.
/// </summary>
/// <since_tizen> 3 </since_tizen>
Expand Down Expand Up @@ -648,7 +656,7 @@ public bool AutoDownload
}

/// <summary>
/// The HTTP header field and value pairs to the download request.
/// The HTTP header field and value pairs that was added to the download request.
/// The HTTP header &lt;field,value&gt; pair is the &lt;key,value&gt; pair in the dictionary HttpHeaders.
/// The given HTTP header field will be included with the HTTP request of the download request.
/// If you try to get this property value before setting, an empty dictionary is returned.
Expand Down Expand Up @@ -720,7 +728,7 @@ public void Start()
}

/// <summary>
/// Pauses the download request.
/// Pauses an ongoing download.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand All @@ -740,7 +748,7 @@ public void Pause()
}

/// <summary>
/// Cancels the download request.
/// Cancels an active download.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down Expand Up @@ -846,7 +854,7 @@ private void UnregisterProgressChangedEvent()
}

/// <summary>
/// Enabled state of the cache feature.
/// Enables or disables the use of cache for the download.
/// </summary>
/// <since_tizen> 11 </since_tizen>
/// <privilege>http://tizen.org/privilege/download</privilege>
Expand Down
Loading