// Copyright (c) 2024 Vuplex Inc. All rights reserved. // // Licensed under the Vuplex Commercial Software Library License, you may // not use this file except in compliance with the License. You may obtain // a copy of the License at // // https://vuplex.com/commercial-library-license // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using System; namespace Vuplex.WebView { /// /// Event args for IWithDownloads.DownloadProgressChanged. /// public class DownloadChangedEventArgs : EventArgs { public DownloadChangedEventArgs(string contentType, string filePath, string id, float progress, ProgressChangeType type, string url) { ContentType = contentType; FilePath = filePath; Id = id; Progress = progress; Type = type; Url = url; } /// /// The mime type indicated by the Content-Type response header, /// or `null` if no content type was specified. /// public readonly string ContentType; /// /// The full file path of the downloaded file. Files are downloaded to /// Application.temporaryCachePath, but you can move them to a different /// location after they finish downloading. /// public readonly string FilePath; /// /// An identifier for the file, which can be used to track the /// file's download progress across multiple invocations of the DownloadProgressChanged event. /// public readonly string Id; /// /// The estimated download progress, normalized to a float between 0 and 1. /// Note that not all platforms support intermediate progress updates. /// public readonly float Progress; /// /// The download progress event type. Note that not all platforms /// support the Updated event type. /// public readonly ProgressChangeType Type; /// /// The URL from which the file was downloaded. /// public readonly string Url; } }