[final report] week 12: libsoup / gnio / ftp
- From: Gabriel CORVALAN CORNEJO <just the boss gmail com>
- To: gnome-soc-list gnome org
- Subject: [final report] week 12: libsoup / gnio / ftp
- Date: Wed, 19 Aug 2009 22:06:52 +0200
Hello !
That's yet my last report for my Google Summer of Code 2009.
Indeed, I have finish hacking the ligweather using my SoupURILoader, and it works great ! ( You can take a loot at my screenshot, it show that libgweather use my SoupURILoader instead of the old hack with libsoup session )
So, about my work, a lot is done, but there is some more work to do ( some bug fix, clean the code ... ).
Actually, it works like that :
- call the soup_uri_loader_new to create a new instance of this magic loader
- the UriLoader add some internal protocols, but everybody can add a new one, writing a SoupProtocol subclass and adding it with soup_uri_loader_add_protocol
- call the soup_uri_loader_load_uri to start a new load, it can be local or remote loading, as SoupProtocolFile or SoupProtocolFTP
- the UriLoader return a GInputStream, in fact, it's a SoupInputStream ( a InputStream with some extra features )
- the stream can be use as any other stream, but we can get some information using SoupInputStream methods :
- we can get some information on the stream, a GFileInfo * is stored in a property
- if the stream point to a directory, a GList of children is created too
- now, if a protocol can use the same connection, we can keep it open, we must just check if it's busy or not, a method is created to do that ( it's used by FTP, but not for File )
- if we unref the loader, each remote connection are closed too
I think this API is very simple, a good abstraction about protocol is what we need here.
I still working on this URILoader, a lot more work can be done around it.
About this GSoC, I am very happy, my mentor (Dan Winship -- Thanks !!!) was great, he helps me a lot.
( about the libgweather patch, I will send it on the bugzilla, as that you'll can see why my API is so simple ).
Thanks to the GNOME community, you rocks! :)
Gabriel CORVALAN CORNEJO
Attachment:
libgweather-uri-loader.png
Description: PNG image
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]