Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ChannelTypeContactSearchAdaptor Class Reference

#include <TelepathyQt/_gen/svc-channel.h>

Inheritance diagram for Tp::Service::ChannelTypeContactSearchAdaptor:
Inheritance graph
[legend]

Public Slots

void Search (const Tp::ContactSearchMap &terms, const QDBusMessage &dbusMessage)
 
void More (const QDBusMessage &dbusMessage)
 
void Stop (const QDBusMessage &dbusMessage)
 

Signals

void SearchStateChanged (uint state, const QString &error, const QVariantMap &details)
 
void SearchResultReceived (const Tp::ContactSearchResultMap &result)
 

Public Member Functions

uint SearchState () const
 
uint Limit () const
 
QStringList AvailableSearchKeys () const
 
QString Server () const
 
- Public Member Functions inherited from Tp::AbstractAdaptor
 AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
 
 ~AbstractAdaptor ()
 
QDBusConnection dbusConnection () const
 
QObjectadaptee () const
 
- Public Member Functions inherited from QDBusAbstractAdaptor
 ~QDBusAbstractAdaptor ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual ~QObject ()
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *receiver, const char *method)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 
 QObject (QObject *parent, const char *name)
 
void insertChild (QObject *object)
 
void removeChild (QObject *object)
 
bool isA (const char *className) const
 
const char * className () const
 
const char * name () const
 
const char * name (const char *defaultName) const
 
void setName (const char *name)
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
- Protected Member Functions inherited from QDBusAbstractAdaptor
 QDBusAbstractAdaptor (QObject *obj)
 
void setAutoRelaySignals (bool enable)
 
bool autoRelaySignals () const
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Type.ContactSearch".

Member Function Documentation

§ SearchState()

uint Tp::Service::ChannelTypeContactSearchAdaptor::SearchState ( ) const

Return the value of the exported D-Bus object property SearchState of type uint.

Adaptees should export this property as a Qt property named 'searchState' with type uint.

The current state of this search channel object. Change notification is via SearchStateChanged.

Returns
The value of exported property SearchState.

§ Limit()

uint Tp::Service::ChannelTypeContactSearchAdaptor::Limit ( ) const

Return the value of the exported D-Bus object property Limit of type uint.

Adaptees should export this property as a Qt property named 'limit' with type uint.

If supported by the protocol, the maximum number of results that should be returned, where 0 represents no limit. If the protocol does not support limiting results, this should be 0.

For example, if the terms passed to Search() match Antonius, Bridget and Charles and this property is 2, the search service SHOULD only return Antonius and Bridget.

This property SHOULD be requestable if and only if the protocol supports specifying a limit; implementations SHOULD use 0 as the default if possible, or a protocol-specific sensible default otherwise.

Returns
The value of exported property Limit.

§ AvailableSearchKeys()

QStringList Tp::Service::ChannelTypeContactSearchAdaptor::AvailableSearchKeys ( ) const

Return the value of the exported D-Bus object property AvailableSearchKeys of type QStringList.

Adaptees should export this property as a Qt property named 'availableSearchKeys' with type QStringList.

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). It can be in the NewChannels signal for round-trip reduction.

Returns
The value of exported property AvailableSearchKeys.

§ Server()

QString Tp::Service::ChannelTypeContactSearchAdaptor::Server ( ) const

Return the value of the exported D-Bus object property Server of type QString.

Adaptees should export this property as a Qt property named 'server' with type QString.

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, the empty string. XEP 0055 defines a mechanism for XMPP clients to search services of their choice for contacts, such as users.jabber.org (the "Jabber User Directory"). This property SHOULD be requestable if and only if the protocol supports querying multiple different servers; implementations SHOULD use a sensible default if possible if this property is not specified in a channel request. This allows a client to perform searches on a protocol it knows nothing about without requiring the user to guess a valid server's hostname.

Returns
The value of exported property Server.

§ Search

void Tp::Service::ChannelTypeContactSearchAdaptor::Search ( const Tp::ContactSearchMap terms,
const QDBusMessage dbusMessage 
)
slot

Begins a call to the exported D-Bus method Search on this object.

Adaptees should export this method as a Qt slot with the following signature: void search(const Tp::ContactSearchMap& terms, const Tp::Service::ChannelTypeContactSearchAdaptor::SearchContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Send a request to start a search for contacts on this connection. This may only be called while the SearchState is Not_Started; a valid search request will cause the SearchStateChanged signal to be emitted with the state In_Progress.

Parameters
terms
A dictionary mapping search key names to the desired values

§ More

void Tp::Service::ChannelTypeContactSearchAdaptor::More ( const QDBusMessage dbusMessage)
slot

Begins a call to the exported D-Bus method More on this object.

Adaptees should export this method as a Qt slot with the following signature: void more(const Tp::Service::ChannelTypeContactSearchAdaptor::MoreContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Request that a search in SearchState More_Available move back to state In_Progress and continue listing up to Limit more results.

§ Stop

void Tp::Service::ChannelTypeContactSearchAdaptor::Stop ( const QDBusMessage dbusMessage)
slot

Begins a call to the exported D-Bus method Stop on this object.

Adaptees should export this method as a Qt slot with the following signature: void stop(const Tp::Service::ChannelTypeContactSearchAdaptor::StopContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Stop the current search. This may not be called while the SearchState is Not_Started. If called while the SearchState is In_Progress, SearchStateChanged() will be emitted, with the state Failed and the error org.freedesktop.Telepathy.Error.Cancelled.

Calling this method on a search in state Completed or Failed succeeds, but has no effect.

Specifying Stop to succeed when the search has finished means that clients who call Stop just before receiving SearchStateChanged() don't have to handle a useless error.

Depending on the protocol, the connection manager may not be able to prevent the server from sending further results after this method returns; if this is the case, it MUST ignore any further results.

§ SearchStateChanged

void Tp::Service::ChannelTypeContactSearchAdaptor::SearchStateChanged ( uint  state,
const QString error,
const QVariantMap &  details 
)
signal

Represents the exported D-Bus signal SearchStateChanged on this object.

Adaptees should export this signal as a Qt signal with the following signature: void searchStateChanged(uint state, const QString& error, const QVariantMap& details);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters
state
The new search state
error If the new state is Failed, the name of a D-Bus error describing what went wrong. Otherwise, the empty string.
details

Additional information about the state transition, which may include the following well-known keys:

debug-message (s)
Debugging information on the change, corresponding to the message part of a D-Bus error message, which SHOULD NOT be displayed to users under normal circumstances

This argument allows for future extensions. For instance, if moving to state Failed because the server rejected one of our search terms, we could define a key that indicates which terms were invalid.

§ SearchResultReceived

void Tp::Service::ChannelTypeContactSearchAdaptor::SearchResultReceived ( const Tp::ContactSearchResultMap result)
signal

Represents the exported D-Bus signal SearchResultReceived on this object.

Adaptees should export this signal as a Qt signal with the following signature: void searchResultReceived(const Tp::ContactSearchResultMap& result);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters
result
A mapping from contact identifier to an array of fields 
representing information about this contact.


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