diff --git TelepathyQt/presence.cpp TelepathyQt/presence.cpp index 823067d..2ad6383 100644 --- TelepathyQt/presence.cpp +++ TelepathyQt/presence.cpp @@ -371,6 +371,15 @@ PresenceSpec PresenceSpec::error(PresenceSpec::SimpleStatusFlags flags) return PresenceSpec(QLatin1String("error"), spec); } +PresenceSpec PresenceSpec::unset(PresenceSpec::SimpleStatusFlags flags) +{ + SimpleStatusSpec spec; + spec.type = ConnectionPresenceTypeUnset; + spec.maySetOnSelf = flags & MaySetOnSelf; + spec.canHaveMessage = flags & CanHaveStatusMessage; + return PresenceSpec(QLatin1String("unset"), spec); +} + PresenceSpec &PresenceSpec::operator=(const PresenceSpec &other) { this->mPriv = other.mPriv; diff --git TelepathyQt/presence.h TelepathyQt/presence.h index 31fd056..67c9d98 100644 --- TelepathyQt/presence.h +++ TelepathyQt/presence.h @@ -102,6 +102,7 @@ public: static PresenceSpec offline(SimpleStatusFlags flags = CanHaveStatusMessage); static PresenceSpec unknown(SimpleStatusFlags flags = CanHaveStatusMessage); static PresenceSpec error(SimpleStatusFlags flags = CanHaveStatusMessage); + static PresenceSpec unset(SimpleStatusFlags flags = CanHaveStatusMessage); bool isValid() const { return mPriv.constData() != 0; }