Global Presence

George Kiagiadakis kiagiadakis.george at gmail.com
Sun Aug 7 11:49:17 UTC 2011


On Sat, Aug 6, 2011 at 10:35 PM, David Edmundson
<david at davidedmundson.co.uk> wrote:
> Rather than talking, I've just attached a bodged header file for a
> class that calculates this.
>
> /** Retrieves the current 'global presence' based on the current
> status of all the accounts*/
>
> class GlobalPresence
> {
>    public:
>        //FIXME account set or AccountManager?
>        GlobalPresence(const Tp::AccountSet &accounts);
>        virtual ~GlobalPresence();
>
>        /** The current global presence, this will return the most
> 'online' presence */
>        //online > away > extended away > busy > offline
>
>        //FIXME maybe this will make more sense as a simplePresenceType?
>        Tp::Presence globalPresence() const;
>
>        /** Returns Tp::Connecting if any account is connecting
>         *  Otherwise Connected if any account is connected.
>         *  Disconnected Otherwise
>         */
>        Tp::ConnectionStatus globalConnectionStatus() const;
>
>        /** Try setting all accounts to the given presence
>         * This may fail, watch the status of account for details.
>         */
>        void setGlobalPresence(const Tp::Presence presence);
>
>    signals:
>        globalPresenceChanged();
>        globalConnectionStatusChanged();
> }


Where is this code going? In the dataengine?, the contact list?, both
perhaps?, in libktelepathy?...

I was thinking that it would make a lot of sense to have something
like that in tp-qt4/tp-glib and possibly mention this behaviour in the
spec as well, so that other clients (empathy) have the same concept of
global presence. Any thoughts?

Also, regarding the order: online > away > extended away > busy > offline
I think that "busy" is more online than "away", as it indicates that
you are there, probably working, in contrast to "away", which means
you are not there.


More information about the KDE-Telepathy mailing list