denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Getting gio working for Denemo


From: Richard Shann
Subject: Re: [Denemo-devel] Getting gio working for Denemo
Date: Fri, 15 May 2009 19:07:02 +0100

On Fri, 2009-05-15 at 18:07 +0100, Richard Shann wrote:
> I have had a very quick response from someone on the gtk-devel list
> saying we need a package called gvfs, which I will now install & test
> again,
I've done this. I installed the packages - there is a server and
backends, and ran the program again - I did not start any demon, but I
guess one is started by the installer, as now the g_file_read() call
hangs. (There is an asynchronous version of this function, but the page
is fetchable, so I think that this should return at least after a
while).
I'll ask some more on gtk-app-devel list.
Richard



> Richard
> 
> On Fri, 2009-05-15 at 07:46 -0500, Jeremiah Benham wrote:
> > On Fri, May 15, 2009 at 12:53:07PM +0100, Richard Shann wrote:
> > > I've been trying to get installation of Denemo commands directly from
> > > denemo.org.
> > > As a first step I included the following code in Denemo:
> > > 
> > >   GError *err = NULL;
> > >   GFile * file=g_file_new_for_uri
> > > ("http://www.rshann.plus.com/denemo.html";);
> > >   GFileInputStream *stream =  g_file_read(file, NULL, &err);
> > >   if (err != NULL)
> > >     {
> > >       g_warning ("The opening of uri gave %s", err->message);
> > >       if(err) g_error_free (err);
> > >       err = NULL;
> > >     } else {
> > > #define COUNT (10000)
> > >       gchar *buffer = g_malloc0(COUNT);
> > >       gsize numbytes;
> > >       gboolean success = g_input_stream_read_all(stream, buffer,
> > >                                            COUNT,
> > >                                            &numbytes,NULL,NULL);
> > >       g_print("Read ***********\n%s\n*********** end of read", buffer);
> > >       
> > >     }
> > > 
> > > This works for files on the local disk (i.e. "file:///home...." ) but
> > > gives
> > > 
> > > Operation not supported
> > > 
> > > for the page on the internet. Under the documentation is just the
> > > statement that it means it is not supported by the backend. But whether
> > > this is the case for Debian Lenny I don't know. Can someone try the code
> > > on their distro (you need to include gio/gio.h and link with -lgio-2.0),
> > > in case it is just Lenny being behind the times.
> > 
> > I can test this out tonight after work. So you probably won't get the 
> > answer until tommorow due to time zones. 
> > 
> > Jeremiah 
> > > 
> > > Richard
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Denemo-devel mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/denemo-devel
> 
> 
> 
> _______________________________________________
> Denemo-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/denemo-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]