public class OperationSetGeolocationJabberImpl extends java.lang.Object implements OperationSetGeolocation
Constructor and Description |
---|
OperationSetGeolocationJabberImpl(ProtocolProviderServiceJabberImpl provider)
Constuctor
|
Modifier and Type | Method and Description |
---|---|
void |
addGeolocationListener(GeolocationListener listener)
Registers a listener that would get notifications any time a contact
refreshed its geolocation via Presence.
|
void |
publishGeolocation(java.util.Map<java.lang.String,java.lang.String> geolocation)
Broadcast our current Geolocation trough this provider using a Jabber
presence message.
|
java.util.Map<java.lang.String,java.lang.String> |
queryContactGeolocation(java.lang.String contactIdentifier)
Retrieve the geolocation of the given contact.
|
void |
removeGeolocationListener(GeolocationListener listener)
Remove a listener that would get notifications any time a contact
refreshed its geolocation via Presence.
|
public OperationSetGeolocationJabberImpl(ProtocolProviderServiceJabberImpl provider)
provider
- ProtocolProviderServiceJabberImplpublic void publishGeolocation(java.util.Map<java.lang.String,java.lang.String> geolocation)
publishGeolocation
in interface OperationSetGeolocation
geolocation
- our current Geolocation ready to be sentpublic java.util.Map<java.lang.String,java.lang.String> queryContactGeolocation(java.lang.String contactIdentifier)
Note: Currently not implemented because we can not actively poll the server for the presence of a given contact ?
queryContactGeolocation
in interface OperationSetGeolocation
contactIdentifier
- the Contact we want to retrieve its
geolocation by its identifier.public void addGeolocationListener(GeolocationListener listener)
addGeolocationListener
in interface OperationSetGeolocation
listener
- the ContactGeolocationPresenceListener to
registerpublic void removeGeolocationListener(GeolocationListener listener)
removeGeolocationListener
in interface OperationSetGeolocation
listener
- the ContactGeolocationPresenceListener to
register
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.