LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
LC::Azoth::ISupportGeolocation Class Referenceabstract

Interface for accounts supporting geolocation data. More...

#include "isupportgeolocation.h"

Public Member Functions

virtual ~ISupportGeolocation ()
 
virtual void SetGeolocationInfo (const GeolocationInfo_t &info)=0
 Publishes the given geolocation info. More...
 
virtual GeolocationInfo_t GetUserGeolocationInfo (QObject *entry, const QString &variant) const =0
 Returns info for the given entry and variant. More...
 
virtual void geolocationInfoChanged (const QString &variant, QObject *entry)=0
 Notifies about info change of another entry. More...
 

Detailed Description

Interface for accounts supporting geolocation data.

This interface can be implemented by account objects to advertise the support for both publishing the current user geolocation data and fetching other users' data.

The geolocation concept in Azoth is based on the XMPP XEP-0080: User Location (http://xmpp.org/extensions/xep-0080.html).

See also
IAccount

Definition at line 97 of file isupportgeolocation.h.

Constructor & Destructor Documentation

◆ ~ISupportGeolocation()

virtual LC::Azoth::ISupportGeolocation::~ISupportGeolocation ( )
inlinevirtual

Definition at line 100 of file isupportgeolocation.h.

Member Function Documentation

◆ geolocationInfoChanged()

virtual void LC::Azoth::ISupportGeolocation::geolocationInfoChanged ( const QString &  variant,
QObject *  entry 
)
pure virtual

Notifies about info change of another entry.

This signal should be emitted whenever geolocation information is changed for the given variant of the given contact list entry. The only exception is if the variant goes offline. In this case, there is no need to emit this signal.

Note
This function is expected to be a signal.
Parameters
[out]variantThe variant for which the event occurred.
[out]entryThe entry whose geolocation information has been changed.

◆ GetUserGeolocationInfo()

virtual GeolocationInfo_t LC::Azoth::ISupportGeolocation::GetUserGeolocationInfo ( QObject *  entry,
const QString &  variant 
) const
pure virtual

Returns info for the given entry and variant.

If the user identified by an entry doesn't exist, or it has no variant, or the given combination of user and variant doesn't publish geolocation information, an empty map should be returned. The only exception is an empty variant, in this case this function should return last published info, or info from the highest priority variant, or whatever is appropriate.

Parameters
[in]entryThe entry for which to return the info.
[in]variantThe variant of the entry for which to return the info.
Returns
The geolocation information for the given entry and variant.

◆ SetGeolocationInfo()

virtual void LC::Azoth::ISupportGeolocation::SetGeolocationInfo ( const GeolocationInfo_t info)
pure virtual

Publishes the given geolocation info.

If the info map is empty, geolocation info publishing should be effectively canceled.

Parameters
[in]infoThe geolocation info to publish.

The documentation for this class was generated from the following file: