Home · All Classes · All Namespaces · Modules · Functions · Files
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions

Tp::ContactSearchChannel Class Reference
[Channel proxies]

The ContactSearchChannel class provides an object representing a Telepathy channel of type ContactSearch. More...

#include <TelepathyQt4/ContactSearchChannel>

Inherits Tp::Channel.

List of all members.

Classes

Public Types

Signals

Public Member Functions

Static Public Member Functions

Static Public Attributes

Protected Member Functions


Detailed Description

The ContactSearchChannel class provides an object representing a Telepathy channel of type ContactSearch.


Member Typedef Documentation


Constructor & Destructor Documentation

Tp::ContactSearchChannel::~ContactSearchChannel (  )  [virtual]

Class destructor.

Tp::ContactSearchChannel::ContactSearchChannel ( const ConnectionPtr connection,
const QString &  objectPath,
const QVariantMap &  immutableProperties 
) [protected]

Construct a new contact search channel associated with the given objectPath on the same service as the given connection.

Parameters:
connection Connection owning this channel, and specifying the service.
objectPath Path to the object on the service.
immutableProperties The immutable properties of the channel.

Member Function Documentation

ContactSearchChannelPtr Tp::ContactSearchChannel::create ( const ConnectionPtr connection,
const QString &  objectPath,
const QVariantMap &  immutableProperties 
) [static]

Create a new ContactSearchChannel object.

Parameters:
connection Connection owning this channel, and specifying the service.
objectPath The object path of this channel.
immutableProperties The immutable properties of this channel.
Returns:
A ContactSearchChannelPtr object pointing to the newly created ContactSearchChannel object.

Reimplemented from Tp::Channel.

ChannelContactSearchState Tp::ContactSearchChannel::searchState (  )  const

Return the current search state of this channel.

Change notification is via searchStateChanged().

Returns:
The current search state of this channel.
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 enabled.

Returns:
The maximum number of results that should be returned by calling search().
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 enabled.

Returns:
The search keys supported by this channel.
QString Tp::ContactSearchChannel::server (  )  const

Return the DNS name of the server being searched by this channel.

This method requires ContactSearchChannel::FeatureCore to be enabled.

Returns:
For protocols which support searching for contacts on multiple servers with different DNS names (like XMPP), the DNS name of the server being searched by this channel, e.g. "characters.shakespeare.lit". Otherwise, an empty string.
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 enabled.

This is an overloaded method for search(const ContactSearchMap &searchTerms).

Parameters:
searchKey The search key.
searchTerm The search term.
Returns:
A PendingOperation, which will emit PendingOperation::finished when the search has started.
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 enabled.

Returns:
A PendingOperation, which will emit PendingOperation::finished when the search has started.
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 TELEPATHY_ERROR_CANCELLED.

Returns:
A PendingOperation, which will emit PendingOperation::finished when the call has finished.
void Tp::ContactSearchChannel::searchStateChanged ( Tp::ChannelContactSearchState  state,
const QString &  errorName,
const Tp::ContactSearchChannel::SearchStateChangeDetails details 
) [signal]

This signal is emitted when the value of searchState() of this channel changes.

Parameters:
state The new state.
errorName The name of the error if any.
details The details for the state change.
See also:
searchState()
void Tp::ContactSearchChannel::searchResultReceived ( const Tp::ContactSearchChannel::SearchResult result  )  [signal]

This signal is emitted when a result for a search is received. It can be emitted multiple times until the searchState() goes to ChannelContactSearchStateCompleted or ChannelContactSearchStateFailed.

Parameters:
result The search result.
See also:
searchState()

Member Data Documentation

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-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.4.4