public void Start(DriveStartFlags flags, MountOperation mount_operation, Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_drive_start(Handle, (int)flags, mount_operation == null ? IntPtr.Zero : mount_operation.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public void Eject(MountUnmountFlags flags, Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_drive_eject(Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public void PollForMedia(Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_drive_poll_for_media(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public void LoadAsync(int size, Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_loadable_icon_load_async(Handle, size, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public void GuessContentType(bool force_rescan, Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_mount_guess_content_type(Handle, force_rescan, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public void ReadLineAsync(int io_priority, Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_data_input_stream_read_line_async(Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public static void EjectWithOperation (this GLib.Mount m, MountUnmountFlags flags, GLib.MountOperation operation, Cancellable cancellable, AsyncReadyCallback callback) { m.MaybeEmptyTrashWithAction (() => { NativeInterop.EjectWithOperation (m, flags, operation, cancellable, callback); }); }
public void ReadAsync(byte[] buffer, ulong count, int io_priority, Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_input_stream_read_async(Handle, buffer, new UIntPtr(count), io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public void InitAsync(int io_priority, Cancellable cancellable, AsyncReadyCallback cb) { var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_async_initable_init_async(Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
public void ReadUntilAsync(string stop_chars, int io_priority, Cancellable cancellable, AsyncReadyCallback cb) { IntPtr native_stop_chars = GLib.Marshaller.StringToPtrGStrdup(stop_chars); var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_data_input_stream_read_until_async(Handle, native_stop_chars, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); GLib.Marshaller.Free(native_stop_chars); }
public void QueryInfoAsync(string attributes, int io_priority, Cancellable cancellable, AsyncReadyCallback cb) { IntPtr native_attributes = GLib.Marshaller.StringToPtrGStrdup(attributes); var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); g_file_io_stream_query_info_async(Handle, native_attributes, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); GLib.Marshaller.Free(native_attributes); }
static void cancelled_cb(IntPtr cancellable) { try { Cancellable cancellable_managed = GLib.Object.GetObject(cancellable, false) as Cancellable; cancellable_managed.OnCancelled(); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, false); } }
static void Cancelled_cb(IntPtr inst) { try { Cancellable __obj = GLib.Object.GetObject(inst, false) as Cancellable; __obj.OnCancelled(); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException(e, false); } }
public string[] GuessContentTypeSync(bool force_rescan, Cancellable cancellable) { var error = IntPtr.Zero; var raw_ret = g_mount_guess_content_type_sync(Handle, force_rescan, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); string[] ret = GLib.Marshaller.NullTermPtrToStringArray(raw_ret, false); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public InputStream Load(int size, string type, Cancellable cancellable) { var error = IntPtr.Zero; var raw_ret = g_loadable_icon_load(Handle, size, GLib.Marshaller.StringToPtrGStrdup(type), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); var ret = GLib.Object.GetObject(raw_ret) as InputStream; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe short ReadInt16(Cancellable cancellable) { var error = IntPtr.Zero; short raw_ret = g_data_input_stream_read_int16(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); short ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe long Fill(long count, Cancellable cancellable) { var error = IntPtr.Zero; var raw_ret = g_buffered_input_stream_fill(Handle, new IntPtr(count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); long ret = (long)raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public bool Seek(long offset, GLib.SeekType type, Cancellable cancellable) { var error = IntPtr.Zero; bool raw_ret = g_seekable_seek(Handle, offset, type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); bool ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe long Splice(InputStream source, OutputStreamSpliceFlags flags, Cancellable cancellable) { var error = IntPtr.Zero; var raw_ret = g_output_stream_splice(Handle, source == null ? IntPtr.Zero : source.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); long ret = (long)raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public bool Truncate(long offset, Cancellable cancellable) { var error = IntPtr.Zero; bool raw_ret = g_seekable_truncate(Handle, offset, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); bool ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe bool Close(Cancellable cancellable) { var error = IntPtr.Zero; bool raw_ret = g_input_stream_close(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); bool ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe bool PutUint32(uint data, Cancellable cancellable) { var error = IntPtr.Zero; bool raw_ret = g_data_output_stream_put_uint32(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); bool ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe new byte ReadByte(Cancellable cancellable) { var error = IntPtr.Zero; byte raw_ret = g_data_input_stream_read_byte(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); byte ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe ulong ReadUint64(Cancellable cancellable) { var error = IntPtr.Zero; ulong raw_ret = g_data_input_stream_read_uint64(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); ulong ret = raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe long Read(byte[] buffer, ulong count, Cancellable cancellable) { var error = IntPtr.Zero; var raw_ret = g_input_stream_read(Handle, buffer, new UIntPtr(count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); long ret = (long)raw_ret; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public static unsafe FileMonitor File(File file, FileMonitorFlags flags, Cancellable cancellable) { var error = IntPtr.Zero; var raw_ret = g_file_monitor_file(file == null ? IntPtr.Zero : file.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); var ret = GLib.Object.GetObject(raw_ret) as FileMonitor; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe bool ReadAll(byte[] buffer, ulong count, out ulong bytes_read, Cancellable cancellable) { UIntPtr native_bytes_read; var error = IntPtr.Zero; bool raw_ret = g_input_stream_read_all(Handle, buffer, new UIntPtr(count), out native_bytes_read, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); bool ret = raw_ret; bytes_read = (ulong)native_bytes_read; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe FileInfo QueryInfo(string attributes, Cancellable cancellable) { IntPtr native_attributes = GLib.Marshaller.StringToPtrGStrdup(attributes); var error = IntPtr.Zero; var raw_ret = g_file_io_stream_query_info(Handle, native_attributes, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); var ret = GLib.Object.GetObject(raw_ret) as FileInfo; GLib.Marshaller.Free(native_attributes); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe bool PutString(string str, Cancellable cancellable) { IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup(str); var error = IntPtr.Zero; bool raw_ret = g_data_output_stream_put_string(Handle, native_str, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); bool ret = raw_ret; GLib.Marshaller.Free(native_str); if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe string ReadLine(out ulong length, Cancellable cancellable) { UIntPtr native_length; var error = IntPtr.Zero; var raw_ret = g_data_input_stream_read_line(Handle, out native_length, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); length = (ulong)native_length; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }
public unsafe string ReadUntil(string stop_chars, out ulong length, Cancellable cancellable) { IntPtr native_stop_chars = GLib.Marshaller.StringToPtrGStrdup(stop_chars); UIntPtr native_length; var error = IntPtr.Zero; var raw_ret = g_data_input_stream_read_until(Handle, native_stop_chars, out native_length, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); GLib.Marshaller.Free(native_stop_chars); length = (ulong)native_length; if (error != IntPtr.Zero) { throw new GLib.GException(error); } return(ret); }