[JDEV] jsm mod_example entry point question
Michael Bauer
bauer at jabber.com
Thu Aug 2 11:11:13 CDT 2001
Anyone done anything with Jabber and Video?
-----Original Message-----
From: Alexander N. Spitzer [mailto:aspitzer at 3plex.com]
Sent: Thursday, August 02, 2001 9:33 AM
To: Thomas Charron
Cc: jdev at jabber.org
Subject: Re: [JDEV] jsm mod_example entry point question
thanks a lot!!!! I looked at the bunch of the documentation on jabber.org,
but most of it was long winded, and useless...
Great, thanks again!!!
-alex
-----------------------------------------------------------------
Alexander N. Spitzer Email: aspitzer at 3plex.com
Unix Systems Engineer Phone: 617.349.9361
http://www.3plex.com eFax : 509.752.4680
On Thu, 2 Aug 2001, Thomas Charron wrote:
> Quoting "Alexander N. Spitzer" <aspitzer at 3plex.com>:
> > void mod_transcript(jsmi si)
> > {
> > printf("----> TEST: in mod_transcript\n");
> > js_mapi_register(si,e_SERVER,mod_transcript_server,NULL);
> > }
> > QUESTION:
> > How do I get it so that mod_transcript is instantiated upon all
> > message
> > arrivals... I thought (and CLEARLY I AM WRONG) that all messages pass
> > through all the jsm modules, and each module decides whether or not to
> > act
> > on it... This does not appear to be the case, because I never see
> > "----> TEST: in mod_transcript_server" in any transactions...
> > What do I have to do to register mod_transcript with all traffic (or
> > at
> > least "chat" traffic?)
>
> Registering with e_SERVER will mean you will only get messages
specifically
> targeted AT the server, aka, jabber.org/something, or just plain
jabber.org.
> To test it, go ahead and send a message to yourserver/something, and sure
> enough, you'll see it. I belive, IIRC, that two others are needed to do
what
> you need to do:
>
> js_mapi_register(si,e_DELIVER, mod_filter_handler, NULL);
>
> Will be called before message delivery (Incoming)
>
> js_mapi_register(si,e_OFFLINE, mod_filter_handler, NULL);
>
> Will be called when user is offline. Offline equiv to e_DELIVER
(Incoming)
>
> js_mapi_register(si,e_SESSION, mod_filter_session, NULL);
>
> Will be called when logical sessions are created. In this case,
mod_filter
> session then does this:
>
> js_mapi_session(es_OUT,m->s,mod_filter_out,NULL);
>
> This will then call the mod_filter_out function when that session sends
an
> outgoing message.
>
> These examples are taken from mod_filter, simply becouse its the first
one I
> saw that I knew related to your question.
>
>
> ---
> Thomas Charron
> << Wanted: One decent sig >>
> << Preferably litle used >>
>
_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list