Ejemplo n.º 1
0
    public static void OnUriRead(Gnome.Vfs.Handle handle, Gnome.Vfs.Result result,
                                 byte [] buffer, ulong bytesRequested, ulong bytesRead)
    {
        Console.WriteLine("Async.Read result\t= {0} ({1})", Gnome.Vfs.Vfs.ResultToString(result), result);

        if (result != Gnome.Vfs.Result.Ok)
        {
            return;
        }

        Console.WriteLine("bytesRequested\t\t= {0}", bytesRequested);
        Console.WriteLine("bytesRead\t\t= {0}", bytesRead);

        Console.Write("bytes\t\t\t= ");
        for (int i = 0; i < (int)bytesRead; i++)
        {
            Console.Write((char)buffer [i]);
        }
        Console.WriteLine();

        Gnome.Vfs.AsyncReadCallback readCallback = new Gnome.Vfs.AsyncReadCallback(OnUriRead);

        byte [] buf = new byte [128];
        Gnome.Vfs.Async.Read(handle, out buf [0], 128, readCallback);
    }
Ejemplo n.º 2
0
    static void OnUriOpen(Gnome.Vfs.Handle handle, Gnome.Vfs.Result result)
    {
        Console.WriteLine("Async.Open result\t= {0} ({1})", Gnome.Vfs.Vfs.ResultToString(result), result);

        Gnome.Vfs.AsyncReadCallback readCallback = new Gnome.Vfs.AsyncReadCallback(OnUriRead);

        byte [] buffer = new byte [128];
        Gnome.Vfs.Async.Read(handle, out buffer [0], 128, readCallback);
    }
Ejemplo n.º 3
0
        public static void OnUriRead (Gnome.Vfs.Handle handle, Gnome.Vfs.Result result, 
                                      byte [] buffer, ulong bytesRequested, ulong bytesRead)
        {
                Console.WriteLine ("Async.Read result\t= {0} ({1})", Gnome.Vfs.Vfs.ResultToString(result), result);
        
                if (result != Gnome.Vfs.Result.Ok)
                        return;

                Console.WriteLine ("bytesRequested\t\t= {0}", bytesRequested);
                Console.WriteLine ("bytesRead\t\t= {0}", bytesRead);

                Console.Write("bytes\t\t\t= ");
                for (int i = 0; i < (int) bytesRead; i++)
                        Console.Write ((char) buffer [i]);
                Console.WriteLine ();

                Gnome.Vfs.AsyncReadCallback readCallback = new Gnome.Vfs.AsyncReadCallback (OnUriRead);

                byte [] buf = new byte [128];
                Gnome.Vfs.Async.Read (handle, out buf [0], 128, readCallback);
        }
Ejemplo n.º 4
0
        static void OnUriOpen (Gnome.Vfs.Handle handle, Gnome.Vfs.Result result)
        {
                Console.WriteLine ("Async.Open result\t= {0} ({1})", Gnome.Vfs.Vfs.ResultToString (result), result);
        
                Gnome.Vfs.AsyncReadCallback readCallback = new Gnome.Vfs.AsyncReadCallback (OnUriRead);

                byte [] buffer = new byte [128];
                Gnome.Vfs.Async.Read (handle, out buffer [0], 128, readCallback);
        }