Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » How do i accept a persence subscription request
How do i accept a persence subscription request [message #618913] Thu, 16 August 2007 14:26 Go to next message
Rakesh is currently offline RakeshFriend
Messages: 6
Registered: July 2009
Junior Member
I am using XMPP with ECF to create a chat program (and subsequently put
ECF for more complex uses.)

I have managed to build most of my chat program. But what I still am not
able to do is to accept subscription requests from other chat users.

I am able to see subscription requests using a subscription listener. But
when I get the subscription request, how do i accept it?

Thanks,
Rakesh
Re: How do i accept a persence subscription request [message #618915 is a reply to message #618913] Fri, 17 August 2007 10:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: remy.suen.gmail.com

Rakesh wrote:
> I have managed to build most of my chat program. But what I still am not
> able to do is to accept subscription requests from other chat users.
>
> I am able to see subscription requests using a subscription listener.
> But when I get the subscription request, how do i accept it?

Very interesting, it does seem like we do not expose any such APIs. It
may be that the intent was that when you got a notification, you would
have your own dialog that would accept (which in that case you'd
subscribe to them) or you'd reject (in this case you'd block them).

We have no APIs for blocking people at the moment, though.

This wasn't something I caught while reviewing the presence APIs,
unfortunately.

Regards,
Rem
Re: How do i accept a persence subscription request [message #618999 is a reply to message #618913] Fri, 17 August 2007 11:35 Go to previous messageGo to next message
Rakesh is currently offline RakeshFriend
Messages: 6
Registered: July 2009
Junior Member
I have got the answer to my question. See this link:
http://dev.eclipse.org/newslists/news.eclipse.technology.ecf /msg00099.html

Extract from this post:
"
The steps to the subscription process seem to be as follows:
1) The requesting client calls addRosterEntry on the IPresenceSender with
indications about who to add.
2) The authorizing client receives a handleSubscribeRequest event on the
ISubscribeListener with the IPresence object flagged as SUBSCRIBE.
3) To authorize a subscription, the authorizing client calls
sendPresenceUpdate on the IPresenceSender with the IPresence object
flagged as SUBSCRIBED.
4) To deny authorization the authorizing client can call
sendPresenceUpdate with the IPresence flagged as UNAVAILABLE.
5) The requesting client receives a handleSubscribed event on its
ISubscribeListener with the IPresence object flagged to indicate the
outcome.
"
Re: How do i accept a persence subscription request [message #619002 is a reply to message #618913] Fri, 17 August 2007 11:37 Go to previous messageGo to next message
Rakesh is currently offline RakeshFriend
Messages: 6
Registered: July 2009
Junior Member
Got the answer. See this link:
http://dev.eclipse.org/newslists/news.eclipse.technology.ecf /msg00099.html

"
The steps to the subscription process seem to be as follows:
1) The requesting client calls addRosterEntry on the IPresenceSender with
indications about who to add.
2) The authorizing client receives a handleSubscribeRequest event on the
ISubscribeListener with the IPresence object flagged as SUBSCRIBE.
3) To authorize a subscription, the authorizing client calls
sendPresenceUpdate on the IPresenceSender with the IPresence object
flagged as SUBSCRIBED.
4) To deny authorization the authorizing client can call
sendPresenceUpdate with the IPresence flagged as UNAVAILABLE.
5) The requesting client receives a handleSubscribed event on its
ISubscribeListener with the IPresence object flagged to indicate the
outcome.
"
Re: How do i accept a persence subscription request [message #619005 is a reply to message #618999] Fri, 17 August 2007 12:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: remy.suen.gmail.com

Rakesh wrote:
> I have got the answer to my question. See this link:
> http://dev.eclipse.org/newslists/news.eclipse.technology.ecf /msg00099.html

Interesting. Thank you for this link, Rakesh. I didn't go through the
whole discussion since it's rather long but did notice a few API
comments he made that were confusing / seemingly useless to me at the
time when I was reviewing the presence API several months ago.

http://dev.eclipse.org/mhonarc/lists/ecf-dev/msg00543.html
https://bugs.eclipse.org/bugs/show_bug.cgi?id=167363

One thing that's always bothered me about the presence APIs is that it's
modeled too closely to the Smack APIs.

Regards,
Rem
Re: How do i accept a persence subscription request [message #619008 is a reply to message #619005] Fri, 17 August 2007 15:27 Go to previous message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Remy Chi Jian Suen wrote:
> Rakesh wrote:
>> I have got the answer to my question. See this link:
>> http://dev.eclipse.org/newslists/news.eclipse.technology.ecf /msg00099.html
>>
>
> Interesting. Thank you for this link, Rakesh. I didn't go through the
> whole discussion since it's rather long but did notice a few API
> comments he made that were confusing / seemingly useless to me at the
> time when I was reviewing the presence API several months ago.
>
> http://dev.eclipse.org/mhonarc/lists/ecf-dev/msg00543.html
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=167363
>
> One thing that's always bothered me about the presence APIs is that it's
> modeled too closely to the Smack APIs.

As people can probably tell by last year's discussion referenced above,
the similarity to the Smack APIs has become less and less true over
time. That trend will continue as the committers move the APIs forward.

So, Rakesh my question to you is, do you want a separate/additional/new
API for responding to subscription requests? If so, could you describe
your use case a little further, and/or file an enhancement request
against the presence API for this?

Thanks,

Scott
Previous Topic:webcam streaming
Next Topic:IChatRoomManager and IChatRoomInfo
Goto Forum:
  


Current Time: Thu Apr 25 02:20:29 GMT 2024

Powered by FUDForum. Page generated in 0.03417 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top