Files
cefsharp/CefSharp/Callback/IResourceReadCallback.cs
T
amaitland 7eff7d17c0 ResourceHandler - Add new methods and callbacks
Now uses IResourceHandler.Open to call IResourceHandler.ProcessRequestAsync
IResourceHandler.ProcessRequestAsync now returns CefReturnValue instead of bool as there are three states
2019-06-25 19:24:57 +10:00

34 lines
1.4 KiB
C#

// Copyright © 2019 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
namespace CefSharp.Callback
{
/// <summary>
/// Callback for asynchronous continuation of <see cref="IResourceHandler.Read(System.IO.Stream, int, out int, IResourceReadCallback)"/>.
/// </summary>
public interface IResourceReadCallback : IDisposable
{
/// <summary>
/// Callback for asynchronous continuation of <see cref="IResourceHandler.Read(System.IO.Stream, int, out int, IResourceReadCallback)"/>. If bytesRead == 0
/// the response will be considered complete.
/// </summary>
/// <param name="bytesRead">
/// If bytesRead == 0 the response will be considered complete.
/// If bytesRead &gt; 0 then <see cref="IResourceHandler.Read(System.IO.Stream, int, out int, IResourceReadCallback)"/> will be called again until the request is complete (based on either the
/// result or the expected content length). If bytesRead &lt; 0 then the
/// request will fail and the bytesRead value will be treated as the error
/// code.
/// </param>
void Continue(int bytesRead);
/// <summary>
/// Gets a value indicating whether the callback has been disposed of.
/// </summary>
bool IsDisposed { get; }
}
}