Telepathy::Client::ContactManager Class Reference
[Connection proxies]

#include <TelepathyQt4/Client/ContactManager>

Collaboration diagram for Telepathy::Client::ContactManager:

Collaboration graph
[legend]

List of all members.

Classes

struct  ContactListChannel

Signals

void presencePublicationRequested (const Telepathy::Client::Contacts &contacts)

Public Member Functions

Connectionconnection () const
bool isSupported () const
QSet< Contact::FeaturesupportedFeatures () const
Contacts allKnownContacts () const
bool canRequestPresenceSubscription () const
bool subscriptionRequestHasMessage () const
PendingOperationrequestPresenceSubscription (const QList< QSharedPointer< Contact > > &contacts, const QString &message=QString())
bool canRemovePresenceSubscription () const
bool subscriptionRemovalHasMessage () const
bool canRescindPresenceSubscriptionRequest () const
bool subscriptionRescindingHasMessage () const
PendingOperationremovePresenceSubscription (const QList< QSharedPointer< Contact > > &contacts, const QString &message=QString())
bool canAuthorizePresencePublication () const
bool publicationAuthorizationHasMessage () const
PendingOperationauthorizePresencePublication (const QList< QSharedPointer< Contact > > &contacts, const QString &message=QString())
bool publicationRejectionHasMessage () const
bool canRemovePresencePublication () const
bool publicationRemovalHasMessage () const
PendingOperationremovePresencePublication (const QList< QSharedPointer< Contact > > &contacts, const QString &message=QString())
bool canBlockContacts () const
PendingOperationblockContacts (const QList< QSharedPointer< Contact > > &contacts, bool value=true)
PendingContactscontactsForHandles (const UIntList &handles, const QSet< Contact::Feature > &features=QSet< Contact::Feature >())
PendingContactscontactsForHandles (const ReferencedHandles &handles, const QSet< Contact::Feature > &features=QSet< Contact::Feature >())
PendingContactscontactsForIdentifiers (const QStringList &identifiers, const QSet< Contact::Feature > &features=QSet< Contact::Feature >())
PendingContactsupgradeContacts (const QList< QSharedPointer< Contact > > &contacts, const QSet< Contact::Feature > &features)

Friends

struct Private
class Connection
class PendingContacts
class Contact


Member Function Documentation

Contacts Telepathy::Client::ContactManager::allKnownContacts (  )  const

Return a list of relevant contacts (a reasonable guess as to what should be displayed as "the contact list").

This may include any or all of: contacts whose presence the user receives, contacts who are allowed to see the user's presence, contacts stored in some persistent contact list on the server, contacts who the user has blocked from communicating with them, or contacts who are relevant in some other way.

User interfaces displaying a contact list will probably want to filter this list and display some suitable subset of it.

On protocols where there is no concept of presence or a centrally-stored contact list (like IRC), this method may return an empty list.

Returns:
Some contacts

PendingOperation * Telepathy::Client::ContactManager::authorizePresencePublication ( const QList< QSharedPointer< Contact > > &  contacts,
const QString &  message = QString() 
)

If the given contacts have asked the user to publish presence to them, grant permission for this publication to take place.

Parameters:
contacts Contacts who should be allowed to receive the user's presence A message from the user which is either transmitted to the contacts, or ignored, depending on the protocol
Returns:
A pending operation which will return when an attempt has been made to authorize publication of the user's presence to the contacts

References TELEPATHY_ERROR_NOT_IMPLEMENTED.

PendingOperation * Telepathy::Client::ContactManager::blockContacts ( const QList< QSharedPointer< Contact > > &  contacts,
bool  value = true 
)

Set whether the given contacts are blocked. Blocked contacts cannot send messages to the user; depending on the protocol, blocking a contact may have other effects.

Parameters:
contacts Contacts who should be added to, or removed from, the list of blocked contacts
value If true, add the contacts to the list of blocked contacts; if false, remove them from the list
Returns:
A pending operation which will return when an attempt has been made to take the requested action

References TELEPATHY_ERROR_NOT_IMPLEMENTED.

bool Telepathy::Client::ContactManager::canAuthorizePresencePublication (  )  const

Return true if the publication of the user's presence to contacts can be authorized.

This is always true, unless the protocol has no concept of authorizing publication (in which case contacts' publication status can never be Contact::PresenceStateAsk).

bool Telepathy::Client::ContactManager::canBlockContacts (  )  const

Return whether this protocol has a list of blocked contacts.

Returns:
Whether blockContacts is likely to succeed

bool Telepathy::Client::ContactManager::canRemovePresencePublication (  )  const

Return true if the publication of the user's presence to contacts can be removed, even after permission has been given.

(Rejecting requests for presence to be published is always allowed.)

Returns:
Whether removePresencePublication and Contact::removePresencePublication are likely to succeed for contacts with subscription state Contact::PresenceStateYes

bool Telepathy::Client::ContactManager::canRemovePresenceSubscription (  )  const

Return whether the user can stop receiving the presence of a contact whose presence they have subscribed to.

Returns:
Whether removePresenceSubscription and Contact::removePresenceSubscription are likely to succeed for contacts with subscription state Contact::PresenceStateYes

bool Telepathy::Client::ContactManager::canRequestPresenceSubscription (  )  const

Return whether subscribing to additional contacts' presence is supported on this channel.

In some protocols, the list of contacts whose presence can be seen is fixed, so we can't subscribe to the presence of additional contacts.

Notably, in link-local XMPP, you can see the presence of everyone on the local network, and trying to add more subscriptions would be meaningless.

Returns:
Whether Contact::requestPresenceSubscription and requestPresenceSubscription are likely to succeed

bool Telepathy::Client::ContactManager::canRescindPresenceSubscriptionRequest (  )  const

Return whether the user can cancel a request to subscribe to a contact's presence before that contact has responded.

Returns:
Whether removePresenceSubscription and Contact::removePresenceSubscription are likely to succeed for contacts with subscription state Contact::PresenceStateAsk

Connection * Telepathy::Client::ContactManager::connection (  )  const

Referenced by isSupported().

PendingContacts * Telepathy::Client::ContactManager::contactsForHandles ( const ReferencedHandles handles,
const QSet< Contact::Feature > &  features = QSet<Contact::Feature>() 
)

PendingContacts * Telepathy::Client::ContactManager::contactsForHandles ( const UIntList handles,
const QSet< Contact::Feature > &  features = QSet<Contact::Feature>() 
)

PendingContacts * Telepathy::Client::ContactManager::contactsForIdentifiers ( const QStringList &  identifiers,
const QSet< Contact::Feature > &  features = QSet<Contact::Feature>() 
)

bool Telepathy::Client::ContactManager::isSupported (  )  const

void Telepathy::Client::ContactManager::presencePublicationRequested ( const Telepathy::Client::Contacts contacts  )  [signal]

bool Telepathy::Client::ContactManager::publicationAuthorizationHasMessage (  )  const

Return whether a message can be sent when authorizing a request from a contact that the user's presence is published to them.

If no message will actually be sent, user interfaces should avoid prompting the user for a message, and use an empty string for the message argument.

Returns:
Whether the message argument to Contact::authorizePresencePublication and authorizePresencePublication is actually used, for contacts with subscription state Contact::PresenceStateAsk

References Telepathy::ChannelGroupFlagMessageAccept.

bool Telepathy::Client::ContactManager::publicationRejectionHasMessage (  )  const

Return whether a message can be sent when rejecting a request from a contact that the user's presence is published to them.

If no message will actually be sent, user interfaces should avoid prompting the user for a message, and use an empty string for the message argument.

Returns:
Whether the message argument to Contact::removePresencePublication and removePresencePublication is actually used, for contacts with subscription state Contact::PresenceStateAsk

References Telepathy::ChannelGroupFlagMessageReject.

bool Telepathy::Client::ContactManager::publicationRemovalHasMessage (  )  const

Return whether a message can be sent when revoking earlier permission that the user's presence is published to a contact.

If no message will actually be sent, user interfaces should avoid prompting the user for a message, and use an empty string for the message argument.

Returns:
Whether the message argument to Contact::removePresencePublication and removePresencePublication is actually used, for contacts with subscription state Contact::PresenceStateYes

References Telepathy::ChannelGroupFlagMessageRemove.

PendingOperation * Telepathy::Client::ContactManager::removePresencePublication ( const QList< QSharedPointer< Contact > > &  contacts,
const QString &  message = QString() 
)

If the given contacts have asked the user to publish presence to them, deny this request (this should always succeed, unless a network error occurs).

If the given contacts already have permission to receive the user's presence, attempt to revoke that permission (this might not be supported by the protocol - canRemovePresencePublication indicates whether it is likely to succeed).

Parameters:
contacts Contacts who should no longer be allowed to receive the user's presence A message from the user which is either transmitted to the contacts, or ignored, depending on the protocol
Returns:
A pending operation which will return when an attempt has been made to remove any publication of the user's presence to the contacts

References TELEPATHY_ERROR_NOT_IMPLEMENTED.

PendingOperation * Telepathy::Client::ContactManager::removePresenceSubscription ( const QList< QSharedPointer< Contact > > &  contacts,
const QString &  message = QString() 
)

Attempt to stop receiving the presence of the given contacts, or cancel a request to subscribe to their presence that was previously sent.

Parameters:
contacts Contacts whose presence is no longer required A message from the user which is either transmitted to the contacts, or ignored, depending on the protocol
Returns:
A pending operation which will return when an attempt has been made to remove any subscription to the contacts' presence

References TELEPATHY_ERROR_NOT_IMPLEMENTED.

PendingOperation * Telepathy::Client::ContactManager::requestPresenceSubscription ( const QList< QSharedPointer< Contact > > &  contacts,
const QString &  message = QString() 
)

Attempt to subscribe to the presence of the given contacts.

This operation is sometimes called "adding contacts to the buddy list" or "requesting authorization".

On most protocols, the contacts will need to give permission before the user will be able to receive their presence: if so, they will be in presence state Contact::PresenceStateAsk until they authorize or deny the request.

The returned PendingOperation will return successfully when a request to subscribe to the contacts' presence has been submitted, or fail if this cannot happen. In particular, it does not wait for the contacts to give permission for the presence subscription.

Parameters:
contacts Contacts whose presence is desired
message A message from the user which is either transmitted to the contacts, or ignored, depending on the protocol
Returns:
A pending operation which will return when an attempt has been made to subscribe to the contacts' presence

References TELEPATHY_ERROR_NOT_IMPLEMENTED.

bool Telepathy::Client::ContactManager::subscriptionRemovalHasMessage (  )  const

Return whether a message can be sent when removing an existing subscription to the presence of a contact.

If no message will actually be sent, user interfaces should avoid prompting the user for a message, and use an empty string for the message argument.

Returns:
Whether the message argument to Contact::removePresenceSubscription and removePresenceSubscription is actually used, for contacts with subscription state Contact::PresenceStateYes

References Telepathy::ChannelGroupFlagMessageRemove.

bool Telepathy::Client::ContactManager::subscriptionRequestHasMessage (  )  const

Return whether a message can be sent when subscribing to contacts' presence.

If no message will actually be sent, user interfaces should avoid prompting the user for a message, and use an empty string for the message argument.

Returns:
Whether the message argument to Contact::requestPresenceSubscription and requestPresenceSubscription is actually used

References Telepathy::ChannelGroupFlagMessageAdd.

bool Telepathy::Client::ContactManager::subscriptionRescindingHasMessage (  )  const

Return whether a message can be sent when cancelling a request to subscribe to the presence of a contact.

If no message will actually be sent, user interfaces should avoid prompting the user for a message, and use an empty string for the message argument.

Returns:
Whether the message argument to Contact::removePresenceSubscription and removePresenceSubscription is actually used, for contacts with subscription state Contact::PresenceStateAsk

References Telepathy::ChannelGroupFlagMessageRescind.

QSet< Contact::Feature > Telepathy::Client::ContactManager::supportedFeatures (  )  const

PendingContacts * Telepathy::Client::ContactManager::upgradeContacts ( const QList< QSharedPointer< Contact > > &  contacts,
const QSet< Contact::Feature > &  features 
)


Friends And Related Function Documentation

friend class Connection [friend]

friend class Contact [friend]

friend class PendingContacts [friend]

friend struct Private [friend]


Generated on Thu Mar 5 18:52:06 2009 for TelepathyQt4-0.1.1 by  doxygen 1.5.8