Symple module

Presence

Symple presence message indicating a peer's online status.

Presence

#include <icy/symple/presence.h>

Inherits: Message

Symple presence message indicating a peer's online status.

Presence messages carry peer data in the data field. When probe is true the recipient should respond with their own presence.

Public Methods

ReturnNameDescription
PresenceConstructs a presence message with type set to "presence".
PresenceConstructs a presence message from a JSON value.
PresenceCopy constructor.
boolisProbeReturns true if this is a presence probe request. Recipients of a probe should send back their own presence.
voidsetProbeSets or clears the probe flag on this presence message.

Presence

Presence()

Constructs a presence message with type set to "presence".


Presence

Presence(const json::Value & root)

Constructs a presence message from a JSON value.

Parameters

  • root JSON object to initialise from.

Presence

Presence(const Presence & root)

Copy constructor.

Parameters

  • root Source presence message.

isProbe

bool isProbe()

Returns true if this is a presence probe request. Recipients of a probe should send back their own presence.


setProbe

void setProbe(bool flag)

Sets or clears the probe flag on this presence message.

Parameters

  • flag True to mark this as a probe.