Re: A silly question about subscriptions
From: Rami Saarinen <rami.saarinen@xxxxxxxxxxx>
Date: Mon, 20 Mar 2006 21:20:45 +0100
Jakob Schroeter wrote:
>>However, I was trying to find out to make a "auto authorization" feature
>>to my bot, but did not find a way to do so. I did add the subsription
>>listener. Well that was not it. So I added the rosterListener, but that
>>was not it either. (Meaning that the virtual functions were not called
>>upon "authorization request").
> 
> 
> Either should do. RosterManager/RosterListener is just a bit higher up in the 
> chain than SubscriptionHandler.
> Did you register the handlers properly with the respective sending objects?

Well I suppose I did. I had my bot to subclass both the MessageHandler
and SubsrcriptionHandler and in the constructor I have the:

 connection = new Client(...)
 connection->registerSubscriptionHandler( this );

(and, later on, also):
 connection->rosterManager()->registerRosterListener(this,true);


"Because i decided to have a child, and here you are a group of three
species of bird only found in new zealand."
                -- says my MegaHAL chatterbot

"You can lead a horse to water, but you are a stupid bloody moron with
no right to exist as a sentient being."
                -- also MegaHAL

... I could just play around with it all day long. :)

-- 
Rami Saarinen



-- 
gloox-dev mailing list
to unsubscribe:
send a message with subject 'unsubscribe gloox-dev' to minimalist@xxxxxxxxxx