Home · All Classes · All Namespaces · Modules · Functions · Files |
#include <TelepathyQt4/ConnectionManager>
Inherits Tp::AbstractInterface.
Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol."
Tp::Client::ProtocolInterface::ProtocolInterface | ( | const QString & | busName, | |
const QString & | objectPath, | |||
QObject * | parent = 0 |
|||
) |
Creates a ProtocolInterface associated with the given object on the session bus.
busName | Name of the service the object is on. | |
objectPath | Path to the object on the service. | |
parent | Passed to the parent class constructor. |
Tp::Client::ProtocolInterface::ProtocolInterface | ( | const QDBusConnection & | connection, | |
const QString & | busName, | |||
const QString & | objectPath, | |||
QObject * | parent = 0 |
|||
) |
Creates a ProtocolInterface associated with the given object on the given bus.
connection | The bus via which the object can be reached. | |
busName | Name of the service the object is on. | |
objectPath | Path to the object on the service. | |
parent | Passed to the parent class constructor. |
Tp::Client::ProtocolInterface::ProtocolInterface | ( | Tp::DBusProxy * | proxy | ) |
Creates a ProtocolInterface associated with the same object as the given proxy.
proxy | The proxy to use. It will also be the QObject::parent() for this object. |
Tp::Client::ProtocolInterface::ProtocolInterface | ( | const Tp::Client::ConnectionManagerInterface & | mainInterface | ) | [explicit] |
Creates a ProtocolInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.
mainInterface | The proxy to use. |
Tp::Client::ProtocolInterface::ProtocolInterface | ( | const Tp::Client::ConnectionManagerInterface & | mainInterface, | |
QObject * | parent | |||
) |
Creates a ProtocolInterface associated with the same object as the given proxy. However, a different parent object can be specified.
mainInterface | The proxy to use. | |
parent | Passed to the parent class constructor. |
static QLatin1String Tp::Client::ProtocolInterface::staticInterfaceName | ( | ) | [inline, static] |
Returns the name of the interface "org.freedesktop.Telepathy.Protocol", which this class represents.
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyInterfaces | ( | ) | const [inline] |
Asynchronous getter for the remote object property Interfaces
of type QStringList
.
A list of interfaces supported by this Protocol object.
This property should not be confused with ConnectionInterfaces , which refers to the interfaces of connections to this protocol.
Connection managers with a .manager
file (as described as part of the ConnectionManagerInterface interface) MUST cache this property in the protocol's section of the .manager
file, using the key Interfaces
. The corresponding value is a list of D-Bus interface names, each followed by a semicolon.
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyParameters | ( | ) | const [inline] |
Asynchronous getter for the remote object property Parameters
of type Tp::ParamSpecList
.
The parameters which must or may be provided to the ConnectionManagerInterface::RequestConnection() method when connecting to the given protocol.
Connection managers with a .manager
file (as described as part of the ConnectionManagerInterface interface) MUST cache this property in the protocol's section of the .manager
file via keys of the form param-p
and default-p
, as documented in the ConnectionManagerInterface interface.
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyConnectionInterfaces | ( | ) | const [inline] |
Asynchronous getter for the remote object property ConnectionInterfaces
of type QStringList
.
A list of interface names which might be in the ConnectionInterface::Interfaces property of a ConnectionInterface to this protocol. Whether a Connection will have all, some or none of these interfaces depends on server capabilities.
This property should not be confused with Interfaces .
Connection managers with a .manager
file MUST cache this property in the protocol's section of the .manager
file, using the key ConnectionInterfaces
. The corresponding value is a list of D-Bus interface names, each followed by a semicolon.
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyRequestableChannelClasses | ( | ) | const [inline] |
Asynchronous getter for the remote object property RequestableChannelClasses
of type Tp::RequestableChannelClassList
.
A list of channel classes which might be requestable from a ConnectionInterface to this protocol (i.e. they will, or might, appear in the Connection's ConnectionInterfaceRequestsInterface::RequestableChannelClasses property).
Whether a Connection will have all, some or none of these requestable channel classes depends on server capabilities; similarly, individual contacts are not guaranteed to support all of these channel classes.
Connection managers with a .manager
file MUST cache this property in the protocol's section of the .manager
file, using the key RequestableChannelClasses
. The corresponding value is a list of opaque strings, each followed by a semicolon; each of those strings is the name of a group in the .manager
file which represents a channel class.
The names of the groups representing channel classes are not significant, and MUST NOT be interpreted. When writing .manager files, authors MAY choose mnemonic group names, generate group names mechanically (e.g. with an incrementing integer), or use some combination of these.
Each group representing a channel class has a key allowed
which is a list of D-Bus property names representing allowed parameters. Any other keys that do not contain a space MUST be ignored. Any key containing a space represents a fixed property; the key has the form "propertyname type
", and the value is encoded in the same way as for the default-p
keys described in the ConnectionManagerInterface documentation.
Connection managers that have channel classes whose fixed properties are not representable in this form SHOULD NOT have .manager
files.
For instance, this .manager
file could represent a connection manager that supports 1-1 Text messages and StreamedMedia audio calls:
[Protocol jabber] param-account=s required param-password=s required RequestableChannelClasses=rcc0;rcc1; [rcc0] org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text org.freedesktop.Telepathy.Channel.TargetHandleType u=1 allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID; [rcc1] org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamedMedia org.freedesktop.Telepathy.Channel.TargetHandleType u=1 allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.StreamedMedia.InitialAudio;
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyVCardField | ( | ) | const [inline] |
Asynchronous getter for the remote object property VCardField
of type QString
.
The name of the most common vCard field used for this protocol's contact identifiers, normalized to lower case, or the empty string if there is no such field.
For example, this would be x-jabber
for Jabber/XMPP (including Google Talk), or tel
for the PSTN.
A more exhaustive list of addressable vCard fields can be found in the Protocol's Addressing interface's org.freedesktop.Telepathy.Protocol.Interface.Addressing.DRAFT.AddressableVCardFields .
It is not necessarily valid to interpret contacts' identifiers as values of this vCard field. For instance, telepathy-sofiasip supports contacts whose identifiers are of the form sip:jenny@example.com or tel:8675309, which would not normally both be represented by any single vCard field. Arbitrary handles/identifiers as vCard fields are represented through the Connection's org.freedesktop.Telepathy.Connection.Interface.Addressing.DRAFT contact attributes.
This is taken from Mission Control profiles as used on Maemo 5. One valid use of this field is to answer the question: given a contact's vCard containing an X-JABBER field, how can you communicate with the contact? By iterating through protocols looking for an x-jabber VCardField, one can build up a list of protocols that handle x-jabber, then offer the user a list of accounts for those protocols and/or the option to create a new account for one of those protocols.
Connection managers with a .manager
file MUST cache this property in the protocol's section of the .manager
file if it is non-empty, using the key VCardField
. The corresponding value is a string, following the syntax of the "localestring" type from the Desktop Entry Specification.
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyEnglishName | ( | ) | const [inline] |
Asynchronous getter for the remote object property EnglishName
of type QString
.
The name of the protocol in a form suitable for display to users, such as "AIM" or "Yahoo!", or the empty string if none is available.
This is effectively in the C locale (international English); user interfaces requiring a localized protocol name SHOULD look one up in their own message catalog based on either the Telepathy Protocol
name or this property, but SHOULD use this English version as a fallback if no translated version can be found.
Many protocols are named after a company or product which isn't translated in non-English locales. This also provides a fallback display name, for UIs with no prior knowledge of a particular protocol.
If this property's value is empty, clients MAY fall back to using the Telepathy Protocol
name, possibly with its capitalization adjusted.
Connection managers with a .manager
file MUST cache this property in the protocol's section of the .manager
file if it is non-empty, using the key EnglishName
. The corresponding value is a string, following the syntax of the "localestring" type from the Desktop Entry Specification.
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyIcon | ( | ) | const [inline] |
Asynchronous getter for the remote object property Icon
of type QString
.
The name of an icon in the system's icon theme, such as "im-msn", or the empty string.
This can be used as a default if the AccountInterface::Icon property is not set on an Account, or used by the AccountManagerInterface to choose a default icon if none is set during account creation.
If this property's value is empty, clients MAY fall back to generating a name based on the Protocol
name.
Connection managers with a .manager
file MUST cache this property in the protocol's section of the .manager
file if it is non-empty, using the key Icon
. The corresponding value is a string, following the syntax of the "localestring" type from the Desktop Entry Specification.
Tp::PendingVariant* Tp::Client::ProtocolInterface::requestPropertyAuthenticationTypes | ( | ) | const [inline] |
Asynchronous getter for the remote object property AuthenticationTypes
of type QStringList
.
A list of D-Bus interfaces which provide information as to what kind of authentication channels can possibly appear before the connection reaches the CONNECTED state.
These can either be channel types, or where the channel type isn't enough information to be useful, interfaces indicating a specific use of a channel type. For example, ChannelTypeServerTLSConnectionInterface channels are obviously about TLS certificates so the channel type would appear in this list. However, a ChannelTypeServerAuthenticationInterface channel type alone does not explain enough about the authentication type in use as it is merely a base for the channel interfaces that appear in said channels. In this case, CMs should use the value of the ChannelTypeServerAuthenticationInterface::AuthenticationMethod property in this list.
For example, if a protocol's AuthenticationTypes contains two values:
[ ... ChannelTypeServerTLSConnectionInterface , ... ChannelInterfaceSASLAuthenticationInterface ]
This tells a client that before the connection status reached CONNECTED, a ChannelTypeServerTLSConnectionInterface could appear carrying a TLS certificate. It also tells the client that before the connection status reaches CONNECTED, a ChannelTypeServerAuthenticationInterface channel could also appear, where ChannelTypeServerAuthenticationInterface::AuthenticationMethod = ChannelInterfaceSASLAuthenticationInterface . A hypothetical future Channel.Interface.Captcha interface would also appear in this list if the CM might require the user solve a captcha before connecting.
Tp::PendingVariantMap* Tp::Client::ProtocolInterface::requestAllProperties | ( | ) | const [inline] |
Request all of the DBus properties on the interface.
QDBusPendingReply<QString> Tp::Client::ProtocolInterface::IdentifyAccount | ( | const QVariantMap & | parameters, | |
int | timeout = -1 |
|||
) | [inline, slot] |
Begins a call to the D-Bus method IdentifyAccount
on the remote object.
Return a string which uniquely identifies the account to which the given parameters would connect.
For many protocols, this would return the well-known 'account' parameter. However, for IRC the returned string would be composed from the 'account' (i.e. nickname) and 'server' parameters. AccountManager implementations can use this to form the account-specific part of an Account's object path.
Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
parameters | A set of parameters as would be provided to RequestConnection | |
timeout | The timeout in milliseconds. |
An opaque string suitable for use as the account-specific part of an Account's object path. This is not necessarily globally unique, but should represent a "best-effort" identification of the account. For a pathological case, consider a user signing in as 'me@example.com' with 'server' set to either jabber1.example.com or jabber2.example.com. Both of these should result in me@example.com being returned from this method, even if the user can actually be signed in to those two servers simultaneously.
QDBusPendingReply<QString> Tp::Client::ProtocolInterface::NormalizeContact | ( | const QString & | contactID, | |
int | timeout = -1 |
|||
) | [inline, slot] |
Begins a call to the D-Bus method NormalizeContact
on the remote object.
Attempt to normalize the given contact ID. Where possible, this SHOULD return the same thing that would be returned by InspectHandles(RequestHandles(CONTACT, [Contact_ID])) on a connected ConnectionInterface .
If full normalization requires network activity or is otherwise impossible to do without a ConnectionInterface , this method SHOULD perform a best-effort normalization.
One common example of a best-effort offline normalization differing from the ideal normalization is XMPP.
On XMPP, contacts' JIDs should normally have the resource removed during normalization, but for contacts in a MUC (chatroom), the resource is an integral part of the JID - so the contact JID alice@example.com/Empathy should normalize to alice@example.com, but the in-MUC JID wonderland@conference.example.com/Alice should normalize to itself.
While online, the connection manager has enough context to know which chatrooms the user is in, and can infer from that whether to remove resources, but the best-effort normalization performed while offline does not have this context, so the best that can be done is to remove the resource from all JIDs.
This method MAY simply raise NotImplemented on some protocols.
In link-local XMPP, you can't talk to someone who isn't present on your local network, so normalizing identifiers in advance is meaningless.
Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.
contactID | The identifier of a contact in this protocol | |
timeout | The timeout in milliseconds. |
The identifier of a contact in this protocol, normalized as much as possible
void Tp::Client::ProtocolInterface::invalidate | ( | Tp::DBusProxy * | proxy, | |
const QString & | error, | |||
const QString & | message | |||
) | [protected, virtual] |
Reimplemented from Tp::AbstractInterface.
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation |
Telepathy-Qt4 0.6.5
|