[jdev] Initial presence and contact capabilities

Senko Rasic senko.rasic at collabora.co.uk
Thu Dec 4 04:57:11 CST 2008


Hi,

consider the following scenario:
1. user is offline
2. user wants to call some contact in roster via Jingle (or
   actually do anything which requires knowledge of contact's
   capabilities) which is in his/her roster
3. users's client comes online, requests roster, sends initial
   presence, etc.
4. user's server sends out presence probes, and presence from
   contacts comes in
5. after presence from contact is received, capabilities can be
   discovered and the user's action can proceed

The trouble is that there's no way of knowing when 4. finishes,
so the client doesn't know if a particular contact's presence
is unavailable, or just wasn't received yet.

The only workaround I can think of is to introduce arbitrary
timeout, and wait until the presence is received (in which
case we can proceed to 5.) or it times out (in which case
we treat the contact as offline at the moment).

Is there a better way, or standard practice how to do this?

Regards,
Senko

-- 
Senko Rasic at Collabora <senko.rasic at collabora.co.uk>



More information about the JDev mailing list