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 | List of all members
Tp::ContactSearchChannel Class Reference

The ContactSearchChannel class represents a Telepathy channel of type ContactSearch. More...

#include <TelepathyQt/ContactSearchChannel>

Inherits Tp::Channel.

Classes

class  SearchStateChangeDetails
 The ContactSearchChannel::SearchStateChangeDetails class provides a wrapper around the details for a search state change. More...
 

Public Types

typedef QHash< ContactPtr, Contact::InfoFieldsSearchResult
 
- Public Types inherited from Tp::OptionalInterfaceFactory< Channel >
enum  InterfaceSupportedChecking
 

Signals

void searchStateChanged (Tp::ChannelContactSearchState state, const QString &errorName, const Tp::ContactSearchChannel::SearchStateChangeDetails &details)
 
void searchResultReceived (const Tp::ContactSearchChannel::SearchResult &result)
 
- Signals inherited from Tp::Channel
void groupFlagsChanged (Tp::ChannelGroupFlags flags, Tp::ChannelGroupFlags added, Tp::ChannelGroupFlags removed)
 
void groupCanAddContactsChanged (bool canAddContacts)
 
void groupCanRemoveContactsChanged (bool canRemoveContacts)
 
void groupCanRescindContactsChanged (bool canRescindContacts)
 
void groupMembersChanged (const Tp::Contacts &groupMembersAdded, const Tp::Contacts &groupLocalPendingMembersAdded, const Tp::Contacts &groupRemotePendingMembersAdded, const Tp::Contacts &groupMembersRemoved, const Tp::Channel::GroupMemberChangeDetails &details)
 
void groupHandleOwnersChanged (const Tp::HandleOwnerMap &owners, const Tp::UIntList &added, const Tp::UIntList &removed)
 
void groupSelfContactChanged ()
 
void conferenceChannelMerged (const Tp::ChannelPtr &channel)
 
void conferenceChannelRemoved (const Tp::ChannelPtr &channel, const Tp::Channel::GroupMemberChangeDetails &details)
 
- Signals inherited from Tp::DBusProxy
void invalidated (Tp::DBusProxy *proxy, const QString &errorName, const QString &errorMessage)
 
- Signals inherited from Tp::Object
void propertyChanged (const QString &propertyName)
 

Public Member Functions

virtual ~ContactSearchChannel ()
 
ChannelContactSearchState searchState () const
 
uint limit () const
 
QStringList availableSearchKeys () const
 
QString server () const
 
PendingOperationsearch (const QString &searchKey, const QString &searchTerm)
 
PendingOperationsearch (const ContactSearchMap &searchTerms)
 
void continueSearch ()
 
void stopSearch ()
 
- Public Member Functions inherited from Tp::Channel
virtual ~Channel ()
 
ConnectionPtr connection () const
 
QVariantMap immutableProperties () const
 
QString channelType () const
 
HandleType targetHandleType () const
 
uint targetHandle () const
 
QString targetId () const
 
ContactPtr targetContact () const
 
bool isRequested () const
 
ContactPtr initiatorContact () const
 
PendingOperationrequestClose ()
 
PendingOperationrequestLeave (const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
 
bool isConference () const
 
Contacts conferenceInitialInviteeContacts () const
 
QList< ChannelPtr > conferenceChannels () const
 
QList< ChannelPtr > conferenceInitialChannels () const
 
QHash< uint, ChannelPtr > conferenceOriginalChannels () const
 
bool supportsConferenceMerging () const
 
PendingOperationconferenceMergeChannel (const ChannelPtr &channel)
 
bool supportsConferenceSplitting () const
 
PendingOperationconferenceSplitChannel ()
 
ChannelGroupFlags groupFlags () const
 
bool groupCanAddContacts () const
 
bool groupCanAddContactsWithMessage () const
 
bool groupCanAcceptContactsWithMessage () const
 
PendingOperationgroupAddContacts (const QList< ContactPtr > &contacts, const QString &message=QString())
 
bool groupCanRescindContacts () const
 
bool groupCanRescindContactsWithMessage () const
 
bool groupCanRemoveContacts () const
 
bool groupCanRemoveContactsWithMessage () const
 
bool groupCanRejectContactsWithMessage () const
 
bool groupCanDepartWithMessage () const
 
PendingOperationgroupRemoveContacts (const QList< ContactPtr > &contacts, const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
 
Contacts groupContacts (bool includeSelfContact=true) const
 
Contacts groupLocalPendingContacts (bool includeSelfContact=true) const
 
Contacts groupRemotePendingContacts (bool includeSelfContact=true) const
 
GroupMemberChangeDetails groupLocalPendingContactChangeInfo (const ContactPtr &contact) const
 
GroupMemberChangeDetails groupSelfContactRemoveInfo () const
 
bool groupAreHandleOwnersAvailable () const
 
HandleOwnerMap groupHandleOwners () const
 
bool groupIsSelfContactTracked () const
 
ContactPtr groupSelfContact () const
 
- Public Member Functions inherited from Tp::StatefulDBusProxy
 StatefulDBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
 
virtual ~StatefulDBusProxy ()
 
- Public Member Functions inherited from Tp::DBusProxy
 DBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
 
virtual ~DBusProxy ()
 
QDBusConnection dbusConnection () const
 
QString busName () const
 
QString objectPath () const
 
bool isValid () const
 
QString invalidationReason () const
 
QString invalidationMessage () const
 
- Public Member Functions inherited from Tp::Object
virtual ~Object ()
 
- Public Member Functions inherited from Tp::RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
- Public Member Functions inherited from Tp::ReadyObject
 ReadyObject (RefCounted *object, const Feature &featureCore)
 
 ReadyObject (DBusProxy *proxy, const Feature &featureCore)
 
virtual ~ReadyObject ()
 
virtual bool isReady (const Features &features=Features()) const
 
virtual PendingReadybecomeReady (const Features &requestedFeatures=Features())
 
virtual Features requestedFeatures () const
 
virtual Features actualFeatures () const
 
virtual Features missingFeatures () const
 
- Public Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
 OptionalInterfaceFactory (Channel *this_)
 
 ~OptionalInterfaceFactory ()
 
QStringList interfaces () const
 
bool hasInterface (const QString &name) const
 
Interface * optionalInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
 
Interface * interface () const
 

Static Public Member Functions

static ContactSearchChannelPtr create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
 
- Static Public Member Functions inherited from Tp::Channel
static ChannelPtr create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
 
- Static Public Member Functions inherited from Tp::StatefulDBusProxy
static QString uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique)
 
static QString uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique, QString &error, QString &message)
 

Static Public Attributes

static const Feature FeatureCore
 
- Static Public Attributes inherited from Tp::Channel
static const Feature FeatureCore
 
static const Feature FeatureConferenceInitialInviteeContacts
 

Protected Member Functions

 ContactSearchChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature)
 
- Protected Member Functions inherited from Tp::Channel
 Channel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature)
 
Client::ChannelInterfacebaseInterface () const
 
bool groupSelfHandleIsLocalPending () const
 
- Protected Member Functions inherited from Tp::DBusProxy
void setBusName (const QString &busName)
 
void invalidate (const QString &reason, const QString &message)
 
void invalidate (const QDBusError &error)
 
- Protected Member Functions inherited from Tp::Object
 Object ()
 
void notify (const char *propertyName)
 
- Protected Member Functions inherited from Tp::ReadyObject
ReadinessHelperreadinessHelper () const
 
- Protected Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
void setInterfaces (const QStringList &interfaces)
 

Additional Inherited Members

- Protected Slots inherited from Tp::Channel
PendingOperationgroupAddSelfHandle ()
 

Detailed Description

The ContactSearchChannel class represents 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,
const Feature coreFeature 
)
protected

Construct a new ContactSearchChannel object.

Parameters
connectionConnection owning this channel, and specifying the service.
objectPathThe channel object path.
immutablePropertiesThe channel immutable properties.
coreFeatureThe core feature of the channel type, if any. The corresponding introspectable should depend on ContactSearchChannel::FeatureCore.

Member Function Documentation

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

Create a new ContactSearchChannel object.

Parameters
connectionConnection owning this channel, and specifying the service.
objectPathThe channel object path.
immutablePropertiesThe channel immutable properties.
Returns
A ContactSearchChannelPtr object pointing to the newly created ContactSearchChannel object.
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.

Returns
The current search state as ChannelContactSearchState.
See also
searchStateChanged()
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.

Returns
The maximum number of results, or 0 if there is no limit.
See also
availableSearchKeys(), 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 ready.

Returns
The supported search keys.
See also
limit(), search()
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.

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 ready.

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

Parameters
searchKeyThe search key.
searchTermThe search term.
Returns
A PendingOperation which will emit PendingOperation::finished when the search has started.
See also
searchState(), searchStateChanged(), searchResultReceived()
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.

Parameters
termsThe search terms.
Returns
A PendingOperation which will emit PendingOperation::finished when the search has started.
See also
searchState(), searchStateChanged(), searchResultReceived()
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_QT_ERROR_CANCELLED.

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

Emitted when the value of searchState() changes.

Parameters
stateThe new state.
errorNameThe name of the error if any.
detailsThe details for the state change.
See also
searchState()
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.

Parameters
resultThe search result.
See also
searchState()

Member Data Documentation

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.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7