Home · All Classes · All Namespaces · Modules · Functions · Files

Account Class Reference
[Account proxies]

#include <TelepathyQt4/Account>

Inherits Tp::StatelessDBusProxy, OptionalInterfaceFactory< Account >, Tp::ReadyObject, and Tp::RefCounted.

List of all members.

Signals

Public Member Functions

Static Public Member Functions

Static Public Attributes

Protected Member Functions


Detailed Description

Object representing a Telepathy account.

If the account is deleted from the AccountManager, this object will not be deleted automatically; however, it will emit invalidated() and will cease to be useful.


Constructor & Destructor Documentation

~Account (  )  [virtual]

Class destructor.

Account ( const QString &  busName,
const QString &  objectPath 
) [protected]

Construct a new Account object.

Parameters:
busName The account's well-known bus name (sometimes called a "service name").
objectPath Account object path.

Account ( const QDBusConnection &  bus,
const QString &  busName,
const QString &  objectPath 
) [protected]

Construct a new Account object.

Parameters:
bus QDBusConnection to use
busName The account's well-known bus name (sometimes called a "service name").
objectPath Account object path.


Member Function Documentation

AccountPtr create ( const QDBusConnection &  bus,
const QString &  busName,
const QString &  objectPath 
) [static]

AccountPtr create ( const QString &  busName,
const QString &  objectPath 
) [static]

bool 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).

Returns:
true if the account is valid, false otherwise.

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

Returns:
true if the account is enabled, false otherwise.

PendingOperation * setEnabled ( bool  value  ) 

Set whether this account is enabled.

Parameters:
value Whether this account should be enabled or disabled.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

QString cmName (  )  const

Get this account connection manager name.

Returns:
Account connection manager name.

QString protocol (  )  const

Get this account protocol name.

Returns:
Account protocol name.

QString displayName (  )  const

Get this account display name.

Returns:
Account display name.

PendingOperation * setDisplayName ( const QString &  value  ) 

Set this account display name.

Parameters:
value Account display name.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

QString icon (  )  const

Get this account icon name.

Returns:
Account icon name.

PendingOperation * setIcon ( const QString &  value  ) 

Set this account icon.

Parameters:
value Account icon name.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

QString nickname (  )  const

Get this account nickname.

Returns:
Account nickname.

PendingOperation * setNickname ( const QString &  value  ) 

Set the account nickname.

Parameters:
value Account nickname.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

const Avatar & 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.

Returns:
Account avatar.

PendingOperation * setAvatar ( const Avatar avatar  ) 

Set this account avatar.

Parameters:
avatar The avatar's MIME type and data.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

QVariantMap parameters (  )  const

Get this account parameters.

Returns:
Account parameters.

PendingStringList * updateParameters ( const QVariantMap &  set,
const QStringList &  unset 
)

Update this account parameters.

On success, the pending operation returned by this method will produce a list of strings, which are the names of parameters whose changes will not take effect until the account is disconnected and reconnected (for instance by calling Account::reconnect()).

Parameters:
set Parameters to set.
unset Parameters to unset.
Returns:
A PendingStringList which will emit PendingOperation::finished when the call has finished

PendingOperation * reconnect (  ) 

If this account is currently connected, disconnect and reconnect it. If it is currently trying to connect, cancel the attempt to connect and start another. If it is currently disconnected, do nothing.

Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

ProtocolInfo * 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.

Returns:
ProtocolInfo for this account protocol.

bool connectsAutomatically (  )  const

Get whether this account should be put online automatically whenever possible.

Returns:
true if it should try to connect automatically, false otherwise.

PendingOperation * setConnectsAutomatically ( bool  value  ) 

Set whether this account should be put online automatically whenever possible.

Parameters:
value Value indicating if this account should be put online whenever possible.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

bool hasBeenOnline (  )  const

Check whether this account has ever been put online successfully.

This property cannot change from true to false, only from false to true. When the account successfully goes online for the first time, or when it is detected that this has already happened, the firstOnline() signal is emitted.

Returns:
Whether the account has even been online.

ConnectionStatus connectionStatus (  )  const

Get the connection status of this account.

Returns:
Value indication the status of this account conneciton.

ConnectionStatusReason connectionStatusReason (  )  const

Get the connection status reason of this account.

Returns:
Value indication the status reason of this account conneciton.

bool haveConnection (  )  const

Return whether this account has a connection object that can be retrieved using connection().

Returns:
true if a connection object can be retrieved, false otherwise

ConnectionPtr connection (  )  const

Get the Connection object for this account.

The Connection object will not be cached by the Account instance; applications should do this themselves.

Remember to call Connection::becomeReady on the new connection to make sure it is ready before using it.

Returns:
Connection object, or a null ConnectionPtr if the account does not currently have a Connection or if an error occurred.

SimplePresence automaticPresence (  )  const

Get the presence status that this account will have set on it by the account manager if it brings it online automatically.

Returns:
Presence status that will be set by the account manager if this account is brought online automatically by it.

PendingOperation * setAutomaticPresence ( const SimplePresence value  ) 

Set the presence status that this account should have if it is brought online automatically by the account manager.

Parameters:
value Presence status to set when this account is brought online automatically by the account manager.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also:
setRequestedPresence()

SimplePresence currentPresence (  )  const

Get the actual presence of this account.

Returns:
The actual presence of this account.
See also:
requestedPresence(), automaticPresence()

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

Returns:
The requested presence of this account.
See also:
currentPresence(), automaticPresence()

PendingOperation * setRequestedPresence ( const SimplePresence value  ) 

Set the requested presence.

Parameters:
value The requested presence.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also:
setAutomaticPresence()

QString uniqueIdentifier (  )  const

Get the unique identifier for this account.

This identifier should be unique per AccountManager implementation, i.e. at least per QDBusConnection.

Returns:
Account unique identifier.

QString connectionObjectPath (  )  const

Get the connection object path of this account.

Returns:
Account connection object path.

QString normalizedName (  )  const

PendingOperation * remove (  ) 

Delete this account.

Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.

PendingChannelRequest * ensureTextChat ( const QString &  contactIdentifier,
QDateTime  userActionTime = QDateTime::currentDateTime(),
const QString &  preferredHandler = QString() 
)

Start a request to ensure that a text channel with the given contact contactIdentifier exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:
contactIdentifier The identifier of the contact to chat with.
userActionTime The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
preferredHandler Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.
See also:
ensureChannel(), createChannel()

PendingChannelRequest * ensureTextChat ( const ContactPtr contact,
QDateTime  userActionTime = QDateTime::currentDateTime(),
const QString &  preferredHandler = QString() 
)

Start a request to ensure that a text channel with the given contact contact exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:
contact The contact to chat with.
userActionTime The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
preferredHandler Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.
See also:
ensureChannel(), createChannel()

PendingChannelRequest * ensureTextChatroom ( const QString &  roomName,
QDateTime  userActionTime = QDateTime::currentDateTime(),
const QString &  preferredHandler = QString() 
)

Start a request to ensure that a text chat room with the given room name roomName exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:
roomName The name of the chat room.
userActionTime The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
preferredHandler Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.
See also:
ensureChannel(), createChannel()

PendingChannelRequest * ensureMediaCall ( const QString &  contactIdentifier,
QDateTime  userActionTime = QDateTime::currentDateTime(),
const QString &  preferredHandler = QString() 
)

Start a request to ensure that a media channel with the given contact contactIdentifier exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:
contactIdentifier The identifier of the contact to call.
userActionTime The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
preferredHandler Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.
See also:
ensureChannel(), createChannel()

PendingChannelRequest * ensureMediaCall ( const ContactPtr contact,
QDateTime  userActionTime = QDateTime::currentDateTime(),
const QString &  preferredHandler = QString() 
)

Start a request to ensure that a media channel with the given contact contact exists, creating it if necessary.

See ensureChannel() for more details.

Parameters:
contact The contact to call.
userActionTime The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
preferredHandler Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.
See also:
ensureChannel(), createChannel()

PendingChannelRequest * createChannel ( const QVariantMap &  request,
QDateTime  userActionTime = QDateTime::currentDateTime(),
const QString &  preferredHandler = QString() 
)

Start a request to create a channel. This initially just creates a PendingChannelRequest object, which can be used to track the success or failure of the request, or to cancel it.

Helper methods for text chat, text chat room and media call are provided and should be used if appropriate.

Parameters:
request A dictionary containing desirable properties.
userActionTime The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
preferredHandler Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.
See also:
createChannel()

PendingChannelRequest * ensureChannel ( const QVariantMap &  request,
QDateTime  userActionTime = QDateTime::currentDateTime(),
const QString &  preferredHandler = QString() 
)

Start a request to ensure that a channel exists, creating it if necessary. This initially just creates a PendingChannelRequest object, which can be used to track the success or failure of the request, or to cancel it.

Helper methods for text chat, text chat room and media call are provided and should be used if appropriate.

Parameters:
request A dictionary containing desirable properties.
userActionTime The time at which user action occurred, or QDateTime() if this channel request is for some reason not involving user action.
preferredHandler Either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.
See also:
createChannel()

DBus::propertiesInterface * 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.

AccountInterfaceAvatarInterface * avatarInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a Avatar interface proxy.

void displayNameChanged ( const QString &   )  [signal]

void iconChanged ( const QString &   )  [signal]

void nicknameChanged ( const QString &   )  [signal]

void normalizedNameChanged ( const QString &   )  [signal]

void validityChanged ( bool   )  [signal]

void stateChanged ( bool   )  [signal]

void connectsAutomaticallyPropertyChanged ( bool   )  [signal]

void firstOnline (  )  [signal]

void parametersChanged ( const QVariantMap &   )  [signal]

void automaticPresenceChanged ( const Tp::SimplePresence  )  const [signal]

void currentPresenceChanged ( const Tp::SimplePresence  )  const [signal]

void requestedPresenceChanged ( const Tp::SimplePresence  )  const [signal]

void avatarChanged ( const Tp::Avatar  )  [signal]

void connectionStatusChanged ( Tp::ConnectionStatus  ,
Tp::ConnectionStatusReason   
) [signal]

void haveConnectionChanged ( bool  haveConnection  )  [signal]

Client::AccountInterface * 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.

Returns:
A pointer to the existing AccountInterface for this Account.


Member Data Documentation

const Feature FeatureCore [static]

const Feature FeatureAvatar [static]

const Feature FeatureProtocolInfo [static]


Copyright © 2009 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.1.10