On Mon, Mar 29, 2010 at 07:34, PulkoMandy <pulkomandy@xxxxxxxxx> wrote: >On Mon, Mar 29, 2010 at 07:18, Christophe Huriaux <c.huriaux@xxxxxxxxx> wrote: >> Additionally, I read the overview of the IMKit and understood how it >> is implemented : it handle all the IM connections through a server and >> the forward events to connected applications. IMHO, the Services Kit >> would not need a single application grouping all the services stuff, >> as it doesn't need persistent connections to web services, this is why >> I'm thinking of multiple applications using multiple add-ons (each of >> them providing unique stuff for each web services), based on the "raw" >> Services API which gather the low level client part of web services, >> such as forging SOAP or REST request and decoding the responses, >> encoding/decoding URL, ... > > The point in using add-ons is to allow the app to use the service kit > regardless of the service that's actually used in the end. For example, you > could make a blog post in an app without having to know if it's going to be > posted in skyblog or blogspot or somewhere else. Picture storing and > pastewall services are examples of services that are available at multiple > places. > >> A server could be used to save various user account informations >> (login, password and so on) required to authenticate the user on the >> various services implemented, but I don't now if it would really be >> useful. > > I don't think you need a server for that. A "roster" class can do it. > Basically, it's a static class living in a library, that provides a > convenient starting point to get various information available in this > library. See > http://haiku.it.su.se:8180/source/xref/headers/os/locale/LocaleRoster.h for > an example of such a class (handling the internationalization stuff in > haiku). There are some others in the others kits in Haiku. > > Such a class is needed to know which add-on you are going to instanciate. > For example, let's imagine an app that would send some text to a pastewall > service. The process would be : > > * Start the app > * Request the WebServiceRoster to see if there is an available pastewall > service with a known login > * Get the addon allowing to post to this service (let's say PastebinAddOn) > * Give the text to paste and eventually the settings to the add on > * Let the add on submit all the stuff to the website and give us the url > * Display the url, add it to the clipboard, and let the user exit the app > > This is quite a simple sequence, I guess one may want more complex services > for uploading a gallery of pictures to Picasa along with comments and > everything... but let's start simple :) This was some older text I found from last year ... hopefully it adds to the overall picture =-=-=-= Basically the first thing to do is get a library to use http, ftp, etc... Similar in concept to Qt's QHttp, QFtp classes. Then a json parser is needed, but in the short-term a xml parser could be used. Ideally a XML Kit and a JSON kit would be created, again Qt's QJson could be some inspiration. After that you have the base stuff to start the work. //www.freelists.org/post/haiku/GSoC-Web-Services-Kit-OS-integration --mmadia