#include <TelepathyQt4/Client/Account>
If the Telepathy account is deleted from the AccountManager, this object will not be deleted automatically; however, it will emit invalidated() and will cease to be useful.
Telepathy::Client::Account::Account | ( | AccountManager * | am, | |
const QString & | objectPath, | |||
QObject * | parent = 0 | |||
) |
Telepathy::Client::Account::~Account | ( | ) | [virtual] |
Class destructor.
AccountManager * Telepathy::Client::Account::manager | ( | ) | const |
Get the AccountManager from which this Account was created.
bool Telepathy::Client::Account::isValidAccount | ( | ) | const |
Get whether this is a valid account.
If true, this account is considered by the account manager to be complete and usable. If false, user action is required to make it usable, and it will never attempt to connect (for instance, this might be caused by the absence of a required parameter).
true
if the account is valid, false
otherwise. bool Telepathy::Client::Account::isEnabled | ( | ) | const |
Get whether this account is enabled.
Gives the users the possibility to prevent an account from being used. This flag does not change the validity of the account.
true
if the account is enabled, false
otherwise. PendingOperation * Telepathy::Client::Account::setEnabled | ( | bool | value | ) |
Set whether this account is enabled.
value | Whether this account should be enabled or disabled. |
References propertiesInterface(), and TELEPATHY_INTERFACE_ACCOUNT.
QString Telepathy::Client::Account::cmName | ( | ) | const |
QString Telepathy::Client::Account::protocol | ( | ) | const |
QString Telepathy::Client::Account::displayName | ( | ) | const |
PendingOperation * Telepathy::Client::Account::setDisplayName | ( | const QString & | value | ) |
Set this account display name.
value | Account display name. |
References propertiesInterface(), and TELEPATHY_INTERFACE_ACCOUNT.
QString Telepathy::Client::Account::icon | ( | ) | const |
PendingOperation * Telepathy::Client::Account::setIcon | ( | const QString & | value | ) |
Set this account icon.
value | Account icon name. |
References propertiesInterface(), and TELEPATHY_INTERFACE_ACCOUNT.
QString Telepathy::Client::Account::nickname | ( | ) | const |
PendingOperation * Telepathy::Client::Account::setNickname | ( | const QString & | value | ) |
Set the account nickname.
value | Account nickname. |
References propertiesInterface(), and TELEPATHY_INTERFACE_ACCOUNT.
const Telepathy::Avatar & Telepathy::Client::Account::avatar | ( | ) | const |
Get this account avatar.
Note that in order to make this method works you should call Account::becomeReady(FeatureAvatar) and wait for it to finish successfully.
References FeatureAvatar, and Telepathy::warning().
PendingOperation * Telepathy::Client::Account::setAvatar | ( | const Telepathy::Avatar & | avatar | ) |
Set this account avatar.
avatar | The avatar's MIME type and data. |
References avatarInterface(), propertiesInterface(), TELEPATHY_ERROR_NOT_IMPLEMENTED, and TELEPATHY_INTERFACE_ACCOUNT_INTERFACE_AVATAR.
QVariantMap Telepathy::Client::Account::parameters | ( | ) | const |
PendingOperation * Telepathy::Client::Account::updateParameters | ( | const QVariantMap & | set, | |
const QStringList & | unset | |||
) |
Update this account parameters.
set | Parameters to set. | |
unset | Parameters to unset. |
References baseInterface().
ProtocolInfo * Telepathy::Client::Account::protocolInfo | ( | ) | const |
Get the protocol info for this account protocol.
Note that in order to make this method works you should call Account::becomeReady(FeatureProtocolInfo) and wait for it to finish successfully.
References FeatureProtocolInfo, and Telepathy::warning().
bool Telepathy::Client::Account::connectsAutomatically | ( | ) | const |
Get whether this account should be put online automatically whenever possible.
true
if it should try to connect automatically, false
otherwise. PendingOperation * Telepathy::Client::Account::setConnectsAutomatically | ( | bool | value | ) |
Set whether this account should be put online automatically whenever possible.
value | Value indicating if this account should be put online whenever possible. |
References propertiesInterface(), and TELEPATHY_INTERFACE_ACCOUNT.
Telepathy::ConnectionStatus Telepathy::Client::Account::connectionStatus | ( | ) | const |
Get the connection status of this account.
Telepathy::ConnectionStatusReason Telepathy::Client::Account::connectionStatusReason | ( | ) | const |
Get the connection status reason of this account.
bool Telepathy::Client::Account::haveConnection | ( | ) | const |
Return whether this account have a connection object that can be retrieved using connection().
true
if a connection object can be retrieved, false
otherwise QSharedPointer< Connection > Telepathy::Client::Account::connection | ( | ) | const |
Get the Connection object for this account.
Note that the Connection object won't be cached by account, and should be done by the application itself.
Remember to call Connection::becomeReady on the new connection, to make sure it is ready before using it.
References Telepathy::Client::DBusProxy::dbusConnection(), and Telepathy::Client::DBusProxy::objectPath().
Telepathy::SimplePresence Telepathy::Client::Account::automaticPresence | ( | ) | const |
Set the presence status that this account should have if it is brought online.
PendingOperation * Telepathy::Client::Account::setAutomaticPresence | ( | const Telepathy::SimplePresence & | value | ) |
Set the presence status that this account should have if it is brought online.
value | Presence status to set when this account is put online. |
References propertiesInterface(), and TELEPATHY_INTERFACE_ACCOUNT.
Telepathy::SimplePresence Telepathy::Client::Account::currentPresence | ( | ) | const |
Get the actual presence of this account.
Telepathy::SimplePresence Telepathy::Client::Account::requestedPresence | ( | ) | const |
Get the requested presence of this account.
When this is changed, the account manager should attempt to manipulate the connection manager to make CurrentPresence match RequestedPresence as closely as possible.
PendingOperation * Telepathy::Client::Account::setRequestedPresence | ( | const Telepathy::SimplePresence & | value | ) |
Set the requested presence.
value | The requested presence. |
References propertiesInterface(), and TELEPATHY_INTERFACE_ACCOUNT.
QString Telepathy::Client::Account::uniqueIdentifier | ( | ) | const |
Get the unique identifier for this account.
This identifier should be unique per AccountManager implementation, i.e. at least per QDBusConnection.
References Telepathy::Client::DBusProxy::objectPath().
QString Telepathy::Client::Account::connectionObjectPath | ( | ) | const |
QString Telepathy::Client::Account::normalizedName | ( | ) | const |
PendingOperation * Telepathy::Client::Account::remove | ( | ) |
Delete this account.
References baseInterface().
bool Telepathy::Client::Account::isReady | ( | Features | features = 0 |
) | const |
Return whether this object has finished its initial setup.
This is mostly useful as a sanity check, in code that shouldn't be run until the object is ready. To wait for the object to be ready, call becomeReady() and connect to the finished signal on the result.
features | The features which should be tested |
true
if the object has finished its initial setup for basic functionality plus the given features Referenced by becomeReady().
PendingReadyAccount * Telepathy::Client::Account::becomeReady | ( | Features | requestedFeatures = 0 |
) |
Return a pending ready account which will succeed when this object finishes its initial setup, or will fail if a fatal error occurs during this initial setup.
requestedFeatures | The features which should be enabled. |
References Telepathy::debug(), FeatureAvatar, FeatureProtocolInfo, isReady(), Telepathy::Client::DBusProxy::isValid(), Telepathy::Client::PendingReadyAccount::requestedFeatures(), Telepathy::Client::PendingOperation::setFinished(), Telepathy::Client::PendingOperation::setFinishedWithError(), TELEPATHY_ERROR_NOT_AVAILABLE, and TELEPATHY_ERROR_NOT_IMPLEMENTED.
QStringList Telepathy::Client::Account::interfaces | ( | ) | const |
Referenced by optionalInterface().
Telepathy::Client::Account::optionalInterface | ( | InterfaceSupportedChecking | check = CheckInterfaceSupported |
) | const [inline] |
Get a pointer to a valid instance of a given Account optional interface class, associated with the same remote object the Account is associated with, and destroyed at the same time the Account is destroyed.
If the list returned by interfaces() doesn't contain the name of the interface requested 0
is returned. This check can be bypassed by specifying BypassInterfaceCheck for check
, in which case a valid instance is always returned.
If the object is not ready, the list returned by interfaces() isn't guaranteed to yet represent the full set of interfaces supported by the remote object. Hence the check might fail even if the remote object actually supports the requested interface; using BypassInterfaceCheck is suggested when the Account is not suitably ready.
Interface | Class of the optional interface to get. |
check | Should an instance be returned even if it can't be determined that the remote object supports the requested interface. |
0
. References interfaces().
DBus::propertiesInterface * Telepathy::Client::Account::propertiesInterface | ( | ) | const [inline] |
Convenience function for getting a Properties interface proxy. The Account interface relies on properties, so this interface is always assumed to be present.
References Telepathy::Client::DBusProxy::BypassInterfaceCheck.
Referenced by setAutomaticPresence(), setAvatar(), setConnectsAutomatically(), setDisplayName(), setEnabled(), setIcon(), setNickname(), and setRequestedPresence().
AccountInterfaceAvatarInterface * Telepathy::Client::Account::avatarInterface | ( | InterfaceSupportedChecking | check = CheckInterfaceSupported |
) | const [inline] |
Convenience function for getting a Avatar interface proxy.
Referenced by setAvatar().
void Telepathy::Client::Account::displayNameChanged | ( | const QString & | ) | [signal] |
void Telepathy::Client::Account::iconChanged | ( | const QString & | ) | [signal] |
void Telepathy::Client::Account::nicknameChanged | ( | const QString & | ) | [signal] |
void Telepathy::Client::Account::normalizedNameChanged | ( | const QString & | ) | [signal] |
void Telepathy::Client::Account::validityChanged | ( | bool | ) | [signal] |
void Telepathy::Client::Account::stateChanged | ( | bool | ) | [signal] |
void Telepathy::Client::Account::connectsAutomaticallyPropertyChanged | ( | bool | ) | [signal] |
void Telepathy::Client::Account::parametersChanged | ( | const QVariantMap & | ) | [signal] |
void Telepathy::Client::Account::automaticPresenceChanged | ( | const Telepathy::SimplePresence & | ) | const [signal] |
void Telepathy::Client::Account::currentPresenceChanged | ( | const Telepathy::SimplePresence & | ) | const [signal] |
void Telepathy::Client::Account::requestedPresenceChanged | ( | const Telepathy::SimplePresence & | ) | const [signal] |
void Telepathy::Client::Account::avatarChanged | ( | const Telepathy::Avatar & | ) | [signal] |
void Telepathy::Client::Account::connectionStatusChanged | ( | Telepathy::ConnectionStatus | , | |
Telepathy::ConnectionStatusReason | ||||
) | [signal] |
void Telepathy::Client::Account::haveConnectionChanged | ( | bool | haveConnection | ) | [signal] |
AccountInterface * Telepathy::Client::Account::baseInterface | ( | ) | const [protected] |
Get the AccountInterface for this Account. This method is protected since the convenience methods provided by this class should generally be used instead of calling D-Bus methods directly.
Referenced by remove(), and updateParameters().
friend struct Private [friend] |
Reimplemented from Telepathy::Client::StatelessDBusProxy.