PresenceMixinStatusAvailableFunc


Description:

[ CCode ( has_target = false ) ]
public delegate bool PresenceMixinStatusAvailableFunc (Object obj, uint which)

Signature of a callback to be used to determine if a given presence status can be set on the connection.

Most users of this mixin do not need to supply an implementation of this callback: the value of self is enough to determine whether this is a user-settable presence, so null should be passed to tp_presence_mixin_class_init for this callback.

One place where this callback may be needed is on XMPP: not all server implementation support the user becoming invisible. So an XMPP implementation would implement this function, so that—once connected—the hidden status is only available if the server supports it. Before the connection is connected, this callback should return true for every status that might possibly be supported: this allows the user to at least try to sign in as invisible.

Parameters:

obj

An instance of a BaseConnection subclass implementing the presence interface with this mixin

which

An index into the array of PresenceStatusSpec provided to tp_presence_mixin_class_init

Returns:

true if the status can be set on this connection; false if not.


Namespace: TelepathyGLib
Package: telepathy-glib