Base class for Connection implementations.
More...
#include <TelepathyQt/BaseConnection>
Inherits Tp::DBusService.
|
typedef Callback4
< BaseChannelPtr, const
QString &, uint, uint,
DBusError * > | CreateChannelCallback |
| |
typedef Callback3< UIntList,
uint, const QStringList
&, DBusError * > | RequestHandlesCallback |
| |
typedef Callback1< void,
DBusError * > | ConnectCallback |
| |
typedef Callback3< QStringList,
uint, const Tp::UIntList
&, DBusError * > | InspectHandlesCallback |
| |
|
| virtual | ~BaseConnection () |
| |
| QString | cmName () const |
| |
| QString | protocolName () const |
| |
| QVariantMap | parameters () const |
| |
| uint | status () const |
| |
| QVariantMap | immutableProperties () const |
| |
| void | setStatus (uint newStatus, uint reason) |
| |
| void | setCreateChannelCallback (const CreateChannelCallback &cb) |
| |
| Tp::BaseChannelPtr | createChannel (const QString &channelType, uint targetHandleType, uint targetHandle, uint initiatorHandle, bool suppressHandler, DBusError *error) |
| |
| void | setRequestHandlesCallback (const RequestHandlesCallback &cb) |
| |
| UIntList | requestHandles (uint handleType, const QStringList &identifiers, DBusError *error) |
| |
| void | setSelfHandle (uint selfHandle) |
| |
| uint | selfHandle () const |
| |
| void | setConnectCallback (const ConnectCallback &cb) |
| |
| void | setInspectHandlesCallback (const InspectHandlesCallback &cb) |
| |
| Tp::ChannelInfoList | channelsInfo () |
| |
| Tp::ChannelDetailsList | channelsDetails () |
| |
| BaseChannelPtr | ensureChannel (const QString &channelType, uint targetHandleType, uint targetHandle, bool &yours, uint initiatorHandle, bool suppressHandler, DBusError *error) |
| |
| void | addChannel (BaseChannelPtr channel) |
| |
QList
< AbstractConnectionInterfacePtr > | interfaces () const |
| |
| AbstractConnectionInterfacePtr | interface (const QString &interfaceName) const |
| |
| bool | plugInterface (const AbstractConnectionInterfacePtr &interface) |
| |
| virtual QString | uniqueName () const |
| |
| bool | registerObject (DBusError *error=NULL) |
| |
| | DBusService (const QDBusConnection &dbusConnection) |
| |
| virtual | ~DBusService () |
| |
| QDBusConnection | dbusConnection () const |
| |
| QString | busName () const |
| |
| QString | objectPath () const |
| |
| DBusObject * | dbusObject () const |
| |
| bool | isRegistered () const |
| |
| virtual | ~Object () |
| |
| | RefCounted () |
| |
| virtual | ~RefCounted () |
| |
|
| static BaseConnectionPtr | create (const QString &cmName, const QString &protocolName, const QVariantMap ¶meters) |
| |
| template<typename BaseConnectionSubclass > |
static SharedPtr
< BaseConnectionSubclass > | create (const QString &cmName, const QString &protocolName, const QVariantMap ¶meters) |
| |
| static BaseConnectionPtr | create (const QDBusConnection &dbusConnection, const QString &cmName, const QString &protocolName, const QVariantMap ¶meters) |
| |
| template<typename BaseConnectionSubclass > |
static SharedPtr
< BaseConnectionSubclass > | create (const QDBusConnection &dbusConnection, const QString &cmName, const QString &protocolName, const QVariantMap ¶meters) |
| |
Base class for Connection implementations.
| Tp::BaseConnection::~BaseConnection |
( |
| ) |
|
|
virtual |
| Tp::BaseConnection::BaseConnection |
( |
const QDBusConnection & |
dbusConnection, |
|
|
const QString & |
cmName, |
|
|
const QString & |
protocolName, |
|
|
const QVariantMap & |
parameters |
|
) |
| |
|
protected |
Construct a BaseConnection.
- Parameters
-
| dbusConnection | The D-Bus connection that will be used by this object. |
| cmName | The name of the connection manager associated with this connection. |
| protocolName | The name of the protocol associated with this connection. |
| parameters | The parameters of this connection. |
| static BaseConnectionPtr Tp::BaseConnection::create |
( |
const QString & |
cmName, |
|
|
const QString & |
protocolName, |
|
|
const QVariantMap & |
parameters |
|
) |
| |
|
inlinestatic |
template<typename BaseConnectionSubclass >
| static SharedPtr<BaseConnectionSubclass> Tp::BaseConnection::create |
( |
const QString & |
cmName, |
|
|
const QString & |
protocolName, |
|
|
const QVariantMap & |
parameters |
|
) |
| |
|
inlinestatic |
| static BaseConnectionPtr Tp::BaseConnection::create |
( |
const QDBusConnection & |
dbusConnection, |
|
|
const QString & |
cmName, |
|
|
const QString & |
protocolName, |
|
|
const QVariantMap & |
parameters |
|
) |
| |
|
inlinestatic |
template<typename BaseConnectionSubclass >
| static SharedPtr<BaseConnectionSubclass> Tp::BaseConnection::create |
( |
const QDBusConnection & |
dbusConnection, |
|
|
const QString & |
cmName, |
|
|
const QString & |
protocolName, |
|
|
const QVariantMap & |
parameters |
|
) |
| |
|
inlinestatic |
| QString Tp::BaseConnection::cmName |
( |
| ) |
const |
Return the name of the connection manager associated with this connection.
- Returns
- The name of the connection manager associated with this connection.
| QString Tp::BaseConnection::protocolName |
( |
| ) |
const |
Return the name of the protocol associated with this connection.
- Returns
- The name of the protocol associated with this connection.
| QVariantMap Tp::BaseConnection::parameters |
( |
| ) |
const |
Return the parameters of this connection.
- Returns
- The parameters of this connection.
| uint Tp::BaseConnection::status |
( |
| ) |
const |
| QVariantMap Tp::BaseConnection::immutableProperties |
( |
| ) |
const |
|
virtual |
Return the immutable properties of this connection object.
Immutable properties cannot change after the object has been registered on the bus with registerObject().
- Returns
- The immutable properties of this connection object.
Implements Tp::DBusService.
| void Tp::BaseConnection::setStatus |
( |
uint |
newStatus, |
|
|
uint |
reason |
|
) |
| |
| Tp::BaseChannelPtr Tp::BaseConnection::createChannel |
( |
const QString & |
channelType, |
|
|
uint |
targetHandleType, |
|
|
uint |
targetHandle, |
|
|
uint |
initiatorHandle, |
|
|
bool |
suppressHandler, |
|
|
DBusError * |
error |
|
) |
| |
| UIntList Tp::BaseConnection::requestHandles |
( |
uint |
handleType, |
|
|
const QStringList & |
identifiers, |
|
|
DBusError * |
error |
|
) |
| |
| void Tp::BaseConnection::setSelfHandle |
( |
uint |
selfHandle | ) |
|
| uint Tp::BaseConnection::selfHandle |
( |
| ) |
const |
| BaseChannelPtr Tp::BaseConnection::ensureChannel |
( |
const QString & |
channelType, |
|
|
uint |
targetHandleType, |
|
|
uint |
targetHandle, |
|
|
bool & |
yours, |
|
|
uint |
initiatorHandle, |
|
|
bool |
suppressHandler, |
|
|
DBusError * |
error |
|
) |
| |
| void Tp::BaseConnection::addChannel |
( |
BaseChannelPtr |
channel | ) |
|
| QList< AbstractConnectionInterfacePtr > Tp::BaseConnection::interfaces |
( |
| ) |
const |
Return a list of interfaces that have been plugged into this Protocol D-Bus object with plugInterface().
This property is immutable and cannot change after this Protocol object has been registered on the bus with registerObject().
- Returns
- A list containing all the Protocol interface implementation objects.
- See also
- plugInterface(), interface()
| AbstractConnectionInterfacePtr Tp::BaseConnection::interface |
( |
const QString & |
interfaceName | ) |
const |
Return a pointer to the interface with the given name.
- Parameters
-
| interfaceName | The D-Bus name of the interface, ex. TP_QT_IFACE_CONNECTION_INTERFACE_ADDRESSING. |
- Returns
- A pointer to the AbstractConnectionInterface object that implements the D-Bus interface with the given name, or a null pointer if such an interface has not been plugged into this object.
- See also
- plugInterface(), interfaces()
| bool Tp::BaseConnection::plugInterface |
( |
const AbstractConnectionInterfacePtr & |
interface | ) |
|
Plug a new interface into this Connection D-Bus object.
This property is immutable and cannot change after this Protocol object has been registered on the bus with registerObject().
- Parameters
-
- Returns
true on success or false otherwise
- See also
- interfaces(), interface()
| QString Tp::BaseConnection::uniqueName |
( |
| ) |
const |
|
virtual |
Return a unique name for this connection.
- Returns
- A unique name for this connection.
| bool Tp::BaseConnection::registerObject |
( |
DBusError * |
error = NULL | ) |
|
Register this connection object on the bus.
If error is passed, any D-Bus error that may occur will be stored there.
- Parameters
-
| error | A pointer to an empty DBusError where any possible D-Bus error will be stored. |
- Returns
true on success and false if there was an error or this connection object is already registered.
- See also
- isRegistered()
| void Tp::BaseConnection::disconnected |
( |
| ) |
|
|
signal |
Emitted when this connection has been disconnected.
| bool Tp::BaseConnection::registerObject |
( |
const QString & |
busName, |
|
|
const QString & |
objectPath, |
|
|
DBusError * |
error |
|
) |
| |
|
protectedvirtual |