Home · All Classes · All Namespaces · Modules · Functions · Files
Classes | Public Types | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions
Tp::Contact Class Reference

The Contact class represents a Telepathy contact. More...

#include <TelepathyQt4/Contact>

Inherits Tp::Object.

List of all members.

Classes

Public Types

Signals

Public Member Functions

Static Public Attributes

Protected Member Functions


Detailed Description

The Contact class represents a Telepathy contact.


Member Enumeration Documentation

Enumerator:
PresenceStateNo 
PresenceStateAsk 
PresenceStateYes 

Constructor & Destructor Documentation

Tp::Contact::~Contact ( )
Tp::Contact::Contact ( ContactManager manager,
const ReferencedHandles handle,
const Features requestedFeatures,
const QVariantMap &  attributes 
) [protected]

Member Function Documentation

ContactManagerPtr Tp::Contact::manager ( ) const
ReferencedHandles Tp::Contact::handle ( ) const
QString Tp::Contact::id ( ) const
Features Tp::Contact::requestedFeatures ( ) const
Features Tp::Contact::actualFeatures ( ) const
QString Tp::Contact::alias ( ) const
bool Tp::Contact::isAvatarTokenKnown ( ) const
QString Tp::Contact::avatarToken ( ) const
AvatarData Tp::Contact::avatarData ( ) const
void Tp::Contact::requestAvatarData ( )

Request avatar image

Force the request of the avatar data. This method returns directly, emitting avatarTokenChanged and avatarDataChanged signals once the token and data are fetched from server.

This is only useful if the avatar token is unknown; see isAvatarTokenKnown(). It happens in the case of offline XMPP contacts, because the server does not send the token for them and an explicit request of the avatar data is needed.

Presence Tp::Contact::presence ( ) const
ContactCapabilities Tp::Contact::capabilities ( ) const

Return the capabilities for this contact.

User interfaces can use this information to show or hide UI components.

Change notification is advertised through capabilitiesChanged().

If ContactManager::supportedFeatures() contains Contact::FeatureCapabilities, the returned object will be a ContactCapabilities object, where CapabilitiesBase::isSpecificToContact() will be true; if that feature isn't present, this returned object is the subset of Contact::manager()::connection()::capabilities() and CapabilitiesBase::isSpecificToContact() will be false.

This method requires Contact::FeatureCapabilities to be enabled.

Returns:
An object representing the contact capabilities.
LocationInfo Tp::Contact::location ( ) const

Return the location for this contact.

Change notification is advertised through locationUpdated().

This method requires Contact::FeatureLocation to be enabled.

Returns:
An object representing the contact location which will return false for LocationInfo::isValid() if FeatureLocation is not ready.
bool Tp::Contact::isContactInfoKnown ( ) const

Return whether the information for this contact has been received

With some protocols (notably XMPP) information is not pushed from the server and must be requested explicitely using refreshInfo() or requestInfo(). This method can be used to know if the information is received from the server or if an explicit request is needed.

Returns:
true if the information is known; false otherwise.
Contact::InfoFields Tp::Contact::infoFields ( ) const

Return the information for this contact.

Change notification is advertised through infoFieldsChanged().

Note that this method only return cached information. In order to refresh the information use refreshInfo().

This method requires Contact::FeatureInfo to be enabled.

Returns:
An object representing the contact information.
PendingOperation * Tp::Contact::refreshInfo ( )

Refresh information for the given contact.

Once the information is retrieved infoFieldsChanged() will be emitted.

This method requires Contact::FeatureInfo to be enabled.

Returns:
A PendingOperation, which will emit PendingOperation::finished when the call has finished.
See also:
infoFieldsChanged()
PendingContactInfo * Tp::Contact::requestInfo ( )

Request information for the given contact.

This method is useful for UIs that don't care about notification of changes in the contact information but want to show the contact information (e.g. right-click on a contact and show the contact info).

Returns:
A PendingContactInfo, which will emit PendingContactInfo::finished when the information has been retrieved or an error occurred.
bool Tp::Contact::isSubscriptionStateKnown ( ) const
bool Tp::Contact::isSubscriptionRejected ( ) const
Contact::PresenceState Tp::Contact::subscriptionState ( ) const
bool Tp::Contact::isPublishStateKnown ( ) const
bool Tp::Contact::isPublishCancelled ( ) const
Contact::PresenceState Tp::Contact::publishState ( ) const
QString Tp::Contact::publishStateMessage ( ) const
PendingOperation * Tp::Contact::requestPresenceSubscription ( const QString &  message = QString())
PendingOperation * Tp::Contact::removePresenceSubscription ( const QString &  message = QString())
PendingOperation * Tp::Contact::authorizePresencePublication ( const QString &  message = QString())
PendingOperation * Tp::Contact::removePresencePublication ( const QString &  message = QString())
bool Tp::Contact::isBlocked ( ) const
PendingOperation * Tp::Contact::block ( bool  value = true)
QStringList Tp::Contact::groups ( ) const

Return the names of the user-defined contact list groups to which the contact belongs.

This method requires Connection::FeatureRosterGroups to be enabled.

Returns:
List of user-defined contact list groups names for a given contact.
See also:
addToGroup(), removedFromGroup()
PendingOperation * Tp::Contact::addToGroup ( const QString &  group)

Attempt to add the contact to the user-defined contact list group named group.

This method requires Connection::FeatureRosterGroups to be enabled.

Parameters:
groupGroup name.
Returns:
A pending operation which will return when an attempt has been made to add the contact to the user-defined contact list group.
PendingOperation * Tp::Contact::removeFromGroup ( const QString &  group)

Attempt to remove the contact from the user-defined contact list group named group.

This method requires Connection::FeatureRosterGroups to be enabled.

Parameters:
groupGroup name.
Returns:
A pending operation which will return when an attempt has been made to remove the contact from the user-defined contact list group.
void Tp::Contact::aliasChanged ( const QString &  alias) [signal]
void Tp::Contact::avatarTokenChanged ( const QString &  avatarToken) [signal]
void Tp::Contact::avatarDataChanged ( const Tp::AvatarData avatarData) [signal]
void Tp::Contact::presenceChanged ( const Tp::Presence presence) [signal]

This signal is emitted when the value of presence() of this contact changes.

Parameters:
presenceThe new presence.
See also:
presence()
void Tp::Contact::capabilitiesChanged ( const Tp::ContactCapabilities caps) [signal]
void Tp::Contact::locationUpdated ( const Tp::LocationInfo location) [signal]
void Tp::Contact::infoFieldsChanged ( const Tp::Contact::InfoFields infoFields) [signal]

This signal is emitted when the value of infoFields() of this contact changes.

Parameters:
InfoFieldsThe new info.
See also:
infoFields()
void Tp::Contact::subscriptionStateChanged ( Tp::Contact::PresenceState  state) [signal]

This signal is emitted whenever the value of subscriptionState() changes.

Parameters:
stateThe new subscription state.
void Tp::Contact::subscriptionStateChanged ( Tp::Contact::PresenceState  state,
const Tp::Channel::GroupMemberChangeDetails details 
) [signal]
void Tp::Contact::publishStateChanged ( Tp::Contact::PresenceState  state,
const QString &  message 
) [signal]
void Tp::Contact::publishStateChanged ( Tp::Contact::PresenceState  state,
const Tp::Channel::GroupMemberChangeDetails details 
) [signal]
Deprecated:
Use publishStateChanged(Tp::Contact::PresenceState state) instead.
void Tp::Contact::blockStatusChanged ( bool  blocked) [signal]

This signal is emitted whenever the value of isBlocked() changes.

Parameters:
statusThe new block status.
void Tp::Contact::blockStatusChanged ( bool  blocked,
const Tp::Channel::GroupMemberChangeDetails details 
) [signal]
void Tp::Contact::addedToGroup ( const QString &  group) [signal]
void Tp::Contact::removedFromGroup ( const QString &  group) [signal]
void Tp::Contact::augment ( const Features requestedFeatures,
const QVariantMap &  attributes 
) [protected, virtual]
void Tp::Contact::connectNotify ( const char *  signalName) [protected]

Member Data Documentation


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.0