Home · All Classes · All Namespaces · Modules · Functions · Files |
The ContactSearchChannel class represents a Telepathy channel of type ContactSearch. More...
#include <TelepathyQt4/ContactSearchChannel>
Inherits Tp::Channel.
The ContactSearchChannel class represents a Telepathy channel of type ContactSearch.
typedef QHash<ContactPtr, Contact::InfoFields> Tp::ContactSearchChannel::SearchResult |
Tp::ContactSearchChannel::~ContactSearchChannel | ( | ) | [virtual] |
Class destructor.
Tp::ContactSearchChannel::ContactSearchChannel | ( | const ConnectionPtr & | connection, | |
const QString & | objectPath, | |||
const QVariantMap & | immutableProperties, | |||
const Feature & | coreFeature | |||
) | [protected] |
Construct a new ContactSearchChannel object.
connection | Connection owning this channel, and specifying the service. | |
objectPath | The channel object path. | |
immutableProperties | The channel immutable properties. | |
coreFeature | The core feature of the channel type, if any. The corresponding introspectable should depend on ContactSearchChannel::FeatureCore. |
ContactSearchChannelPtr Tp::ContactSearchChannel::create | ( | const ConnectionPtr & | connection, | |
const QString & | objectPath, | |||
const QVariantMap & | immutableProperties | |||
) | [static] |
Create a new ContactSearchChannel object.
connection | Connection owning this channel, and specifying the service. | |
objectPath | The channel object path. | |
immutableProperties | The channel immutable properties. |
Reimplemented from Tp::Channel.
ChannelContactSearchState Tp::ContactSearchChannel::searchState | ( | ) | const |
Return the current search state of this channel.
Change notification is via the searchStateChanged() signal.
This method requires ContactSearchChannel::FeatureCore to be ready.
uint Tp::ContactSearchChannel::limit | ( | ) | const |
Return the maximum number of results that should be returned by calling search(), where 0 represents no limit.
For example, if the terms passed to search() match Antonius, Bridget and Charles and this property is 2, the search service will only return Antonius and Bridget.
This method requires ContactSearchChannel::FeatureCore to be ready.
QStringList Tp::ContactSearchChannel::availableSearchKeys | ( | ) | const |
Return the set of search keys supported by this channel.
Example values include [""] (for protocols where several address fields are implicitly searched) or ["x-n-given", "x-n-family", "nickname", "email"] (for XMPP XEP-0055, without extensibility via Data Forms).
This method requires ContactSearchChannel::FeatureCore to be ready.
QString Tp::ContactSearchChannel::server | ( | ) | const |
Return the DNS name of the server being searched by this channel.
This method requires ContactSearchChannel::FeatureCore to be ready.
PendingOperation * Tp::ContactSearchChannel::search | ( | const QString & | searchKey, | |
const QString & | searchTerm | |||
) |
Send a request to start a search for contacts on this connection.
This may only be called while the searchState() is ChannelContactSearchStateNotStarted; a valid search request will cause the searchStateChanged() signal to be emitted with the state ChannelContactSearchStateInProgress.
Search results are signalled by searchResultReceived().
This method requires ContactSearchChannel::FeatureCore to be ready.
This is an overloaded method for search(const ContactSearchMap &searchTerms).
searchKey | The search key. | |
searchTerm | The search term. |
PendingOperation * Tp::ContactSearchChannel::search | ( | const ContactSearchMap & | terms | ) |
Send a request to start a search for contacts on this connection.
This may only be called while the searchState() is ChannelContactSearchStateNotStarted; a valid search request will cause the searchStateChanged() signal to be emitted with the state ChannelContactSearchStateInProgress.
Search results are signalled by searchResultReceived().
This method requires ContactSearchChannel::FeatureCore to be ready.
terms | The search terms. |
void Tp::ContactSearchChannel::continueSearch | ( | ) |
Request that a search which searchState() is ChannelContactSearchStateMoreAvailable move back to state ChannelContactSearchStateInProgress and continue listing up to limit() more results.
void Tp::ContactSearchChannel::stopSearch | ( | ) |
Stop the current search.
This may not be called while the searchState() is ChannelContactSearchStateNotStarted. If called while the searchState() is ChannelContactSearchStateInProgress, searchStateChanged() will be emitted, with the state ChannelContactSearchStateFailed and the error TP_QT4_ERROR_CANCELLED.
void Tp::ContactSearchChannel::searchStateChanged | ( | Tp::ChannelContactSearchState | state, | |
const QString & | errorName, | |||
const Tp::ContactSearchChannel::SearchStateChangeDetails & | details | |||
) | [signal] |
Emitted when the value of searchState() changes.
state | The new state. | |
errorName | The name of the error if any. | |
details | The details for the state change. |
void Tp::ContactSearchChannel::searchResultReceived | ( | const Tp::ContactSearchChannel::SearchResult & | result | ) | [signal] |
Emitted when a result for a search is received. It can be emitted multiple times until the searchState() goes to ChannelContactSearchStateCompleted or ChannelContactSearchStateFailed.
result | The search result. |
const Feature Tp::ContactSearchChannel::FeatureCore [static] |
Feature representing the core that needs to become ready to make the ContactSearchChannel object usable.
Note that this feature must be enabled in order to use most ContactSearchChannel methods. See specific methods documentation for more details.
When calling isReady(), becomeReady(), this feature is implicitly added to the requested features.
Reimplemented from Tp::Channel.
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation |
Telepathy-Qt4 0.6.5
|