On Friday September 8 2006 09:30, Salvatore Iovene wrote:
> On Fri, 2006-09-08 at 00:05 +0200, Jakob Schroeter wrote:
> > On Thursday September 7 2006 23:56, Brian Arandez wrote:
> > > On 09 8, 06, at 5:27 AM, Salvatore Iovene wrote:
> > > > On Tue, 2006-09-05 at 16:59 +0300, Salvatore iovene wrote:
> > > >> Hello,
> > > >> where can I find an example on how to handle subscription requests?
> > > >> I see that there's the SubscriptionHandler class. Do I need to
> > > >> subclass
> > > >> it and then reimplement the handleSubscription method?
> > > >> And what then?
> > > >
> > > > Hi,
> > > > can anybody help about it, please?
> > > > Thanks...
> > > >
> > > > --
> > > > Salvatore Iovene
> > > > http://www.iovene.com
> > >
> > > Hi. have you tried checking the src/tests/roster_test.cpp?
> > >
> > > specifically:
> > >
> > > virtual bool subscriptionRequest( const std::string& jid, const
> > > std::string& /*msg*/ );
> > >
> > > nothing too complex... but it provides a great foundation on the
> > > basics.
>
> I have tried that and those methods don't get ever called.
>
> > Yeah, this, and don't forget to Client::registerSubscriptionHandler().
>
> handleSubscription gets called, instead. How do I then use the Stanza to
> understand what type of request it was?
Mea culpa, subscriptionRequest() (and unsubscriptionRequest()) is from
RosterListener, of course.
The RosterManager builds on top of SubscriptionHandler, though. Stanza::type()
and subtype() tell which kind of subscription request you received.
Jakob
Attachment:
pgpm3n97bfbFO.pgp
Description: PGP signature
--
gloox-dev mailing list
to unsubscribe:
send a message with subject 'unsubscribe gloox-dev' to minimalist@xxxxxxxxxx