mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
require Priority, Cancellable arguments, remove extra members
This commit is contained in:
parent
2df9f36599
commit
8f910672e2
7 changed files with 30 additions and 102 deletions
|
|
@ -15,7 +15,7 @@ use glib::{object::IsA, Bytes, Priority};
|
|||
/// * calculate bytes processed on chunk load
|
||||
pub fn from_stream_async(
|
||||
base_io_stream: impl IsA<IOStream>,
|
||||
cancelable: Option<Cancellable>,
|
||||
cancelable: Cancellable,
|
||||
priority: Priority,
|
||||
bytes_in_chunk: usize,
|
||||
bytes_total_limit: usize,
|
||||
|
|
@ -38,7 +38,7 @@ pub fn from_stream_async(
|
|||
pub fn read_all_from_stream_async(
|
||||
memory_input_stream: MemoryInputStream,
|
||||
base_io_stream: impl IsA<IOStream>,
|
||||
cancelable: Option<Cancellable>,
|
||||
cancelable: Cancellable,
|
||||
priority: Priority,
|
||||
bytes: (usize, usize, usize),
|
||||
callback: (
|
||||
|
|
@ -52,7 +52,7 @@ pub fn read_all_from_stream_async(
|
|||
base_io_stream.input_stream().read_bytes_async(
|
||||
bytes_in_chunk,
|
||||
priority,
|
||||
cancelable.clone().as_ref(),
|
||||
Some(&cancelable.clone()),
|
||||
move |result| match result {
|
||||
Ok(bytes) => {
|
||||
// Update bytes total
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue