RE: [JDEV] Doc on MIO API for Transport dev available?---> Modul e API or Transport API exists ?
Thanks for this help, I started to write my own module and everything seems to be ok. The Jabberd API doc is useful, but some doc on the jsm (the Module API) and the structures it uses would be great (mapi, jpacket...). Do you know of there is some doc on the Service API, used to develop transports ? Stephane -Message d'origine- De : DJ Adams [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 20 juin 2001 01:36 À : [EMAIL PROTECTED] Objet : Re: [JDEV] Doc on MIO API for Transport dev available?---> Modul e API or Transport API exists ? The JSM modules all follow the same pattern. The function that is called when the module is loaded is the one specified in the load part of the configuration, e.g. ./jsm/jsm.so ./jsm/jsm.so ./jsm/jsm.so ./jsm/jsm.so ... the tagname (e.g. 'mod_time') is the name of the function ('mod_time()') called. This function usually is to be found, by convention, at the end of the source file, and returns a void: void mod_xyz(jsmi si) { js_mapi_register(e_ ...) ... } This function registers handlers for the master events (e_SERVER, e_AUTH, and so on). The e_SESSION master event has 'sub-events' es_IN, es_OUT and so on (see jsm/jsm.h), and handlers for these sub-events (session events) are set up in a beautifully fractal way - the handler function for the e_SESSION event actually sets handlers for the es_* events using js_mapi_session() : mreturn xyz_abc(...) { js_mapi_session(es_ ...) } The rest of the functions do the actual work. You might want to have a look at jsm/modules/mod_example.c as it's got some useful comments in the code. Good luck! dj ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re: [JDEV] Doc on MIO API for Transport dev available?---> Modul e API or Transport API exists ?
On Tue, Jun 19, 2001 at 05:52:33PM +0200, Riviere Stéphane wrote: > Hi, > > Thanks for the answer, the Jabberd API will be very helpful ! > My main question is (in fact) : when the server loads a module, which > function(s) does it call on that module. I suppose there must be some sort > of Module API :-) > > I watched at the different modules and saw they all have a function with a > mreturn myfunction (jsmi si) > prototype. That function registers functions (using the js_mapi_register or > js_mapi_session) which have a protype like : > mreturn myhandlingfunction (mapi m, void *arg) The JSM modules all follow the same pattern. The function that is called when the module is loaded is the one specified in the load part of the configuration, e.g. ./jsm/jsm.so ./jsm/jsm.so ./jsm/jsm.so ./jsm/jsm.so ... the tagname (e.g. 'mod_time') is the name of the function ('mod_time()') called. This function usually is to be found, by convention, at the end of the source file, and returns a void: void mod_xyz(jsmi si) { js_mapi_register(e_ ...) ... } This function registers handlers for the master events (e_SERVER, e_AUTH, and so on). The e_SESSION master event has 'sub-events' es_IN, es_OUT and so on (see jsm/jsm.h), and handlers for these sub-events (session events) are set up in a beautifully fractal way - the handler function for the e_SESSION event actually sets handlers for the es_* events using js_mapi_session() : mreturn xyz_abc(...) { js_mapi_session(es_ ...) } The rest of the functions do the actual work. You might want to have a look at jsm/modules/mod_example.c as it's got some useful comments in the code. Good luck! dj ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re: [JDEV] Doc on MIO API for Transport dev available?
On Tue, Jun 19, 2001 at 08:52:39AM -0500, Peter Saint-Andre wrote: > Yes, sorry about that, I removed that document from my website, but all it > contained was a redirection to the documents Keith Minkler created at the > URL below. Wow. And I thought it was going to be the revealing moment showing you were a closet C hacker after all ;-) dj ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re: [JDEV] Doc on MIO API for Transport dev available?---> Module API or Transport API exists ?
Hi, Thanks for the answer, the Jabberd API will be very helpful ! My main question is (in fact) : when the server loads a module, which function(s) does it call on that module. I suppose there must be some sort of Module API :-) I watched at the different modules and saw they all have a function with a mreturn myfunction (jsmi si) prototype. That function registers functions (using the js_mapi_register or js_mapi_session) which have a protype like : mreturn myhandlingfunction (mapi m, void *arg) Is that all I need to know to write a new module ? I'll make some tests with a do-nothing modules, and why not write a Module-mini-HOWTO if I managed to write a working module :-) Stéphane RIVIERE From: Benoit Orihuela <[EMAIL PROTECTED]> Date: Tue, 19 Jun 2001 12:11:57 +0200 To: [EMAIL PROTECTED] Subject: Re: [JDEV] Doc on MIO API for Transport dev available? Reply-To: [EMAIL PROTECTED] Hi, > http://www.saint-andre.com/jabber/docs/mio.html ) is no more valid :-( > Has this doc been moved on the docs.jabber.org site ? the MIO API is described here : http://docs.jabber.org/server/html/jabberd.html > Does any other doc for 1.4 transport development exist ? to my knowledge, there is no specific documentation for transport development. (by "transport", i mean aim-t, icq-t, ...) regards, Benoit. -- Benoit Orihuela IDEALX S.A.S. -- email : [EMAIL PROTECTED] tél : (0)3.20.60.83.01 Equipe Grands Projets Direction Recherche & Développement ATOS ORIGIN Activité Multimédia http://www.atosorigin.com ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re: [JDEV] Doc on MIO API for Transport dev available?
Yes, sorry about that, I removed that document from my website, but all it contained was a redirection to the documents Keith Minkler created at the URL below. Peter On Tue, 19 Jun 2001, Benoit Orihuela wrote: > Hi, > > > > http://www.saint-andre.com/jabber/docs/mio.html ) is no more valid :-( > > Has this doc been moved on the docs.jabber.org site ? > the MIO API is described here : > http://docs.jabber.org/server/html/jabberd.html > > > Does any other doc for 1.4 transport development exist ? > to my knowledge, there is no specific documentation for transport > development. (by "transport", i mean aim-t, icq-t, ...) > > regards, > > Benoit. > > -- > Benoit Orihuela > IDEALX S.A.S. > ___ > jdev mailing list > [EMAIL PROTECTED] > http://mailman.jabber.org/listinfo/jdev > ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
Re: [JDEV] Doc on MIO API for Transport dev available?
Hi, > http://www.saint-andre.com/jabber/docs/mio.html ) is no more valid :-( > Has this doc been moved on the docs.jabber.org site ? the MIO API is described here : http://docs.jabber.org/server/html/jabberd.html > Does any other doc for 1.4 transport development exist ? to my knowledge, there is no specific documentation for transport development. (by "transport", i mean aim-t, icq-t, ...) regards, Benoit. -- Benoit Orihuela IDEALX S.A.S. ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev
[JDEV] Doc on MIO API for Transport dev available?
Hi, I found in the Jdev archive (Wed, 29 Nov 2000 12:05:04 -0700 ) that Peter Saint-Andre started to write a doc on the MIO API for 1.4 server. But the given URL (refering to his own site http://www.saint-andre.com/jabber/docs/mio.html ) is no more valid :-( Has this doc been moved on the docs.jabber.org site ? Does any other doc for 1.4 transport development exist ? Thanks for your help. Cordially Stéphane RIVIERE -- email : [EMAIL PROTECTED] tél : (0)3.20.60.83.01 Equipe Grands Projets Direction Recherche & Développement ATOS ORIGIN Activité Multimédia http://www.atosorigin.com ___ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev