Ejemplo n.º 1
0
        public unsafe long Splice(GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, GLib.Cancellable cancellable)
        {
            IntPtr error   = IntPtr.Zero;
            IntPtr 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);
        }
Ejemplo n.º 2
0
 public void SpliceAsync(GLib.InputStream source, GLib.OutputStreamSpliceFlags flags, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     g_output_stream_splice_async(Handle, source == null ? IntPtr.Zero : source.Handle, (int)flags, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }