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

account.h

    00001
    00023 #ifndef _TelepathyQt_account_h_HEADER_GUARD_
    00024 #define _TelepathyQt_account_h_HEADER_GUARD_
    00025
    00026 #ifndef IN_TP_QT_HEADER
    00027 #error IN_TP_QT_HEADER
    00028 #endif
    00029
    00030 #include <TelepathyQt/_gen/cli-account.h>
    00031
    00032 #include <TelepathyQt/ChannelRequestHints>
    00033 #include <TelepathyQt/Connection>
    00034 #include <TelepathyQt/ConnectionCapabilities>
    00035 #include <TelepathyQt/ConnectionFactory>
    00036 #include <TelepathyQt/ContactFactory>
    00037 #include <TelepathyQt/ChannelFactory>
    00038 #include <TelepathyQt/ChannelDispatcherInterface>
    00039 #include <TelepathyQt/DBus>
    00040 #include <TelepathyQt/DBusProxy>
    00041 #include <TelepathyQt/FileTransferChannelCreationProperties>
    00042 #include <TelepathyQt/OptionalInterfaceFactory>
    00043 #include <TelepathyQt/Presence>
    00044 #include <TelepathyQt/PresenceSpec>
    00045 #include <TelepathyQt/ProtocolInfo>
    00046 #include <TelepathyQt/ReadinessHelper>
    00047 #include <TelepathyQt/Types>
    00048 #include <TelepathyQt/Constants>
    00049 #include <TelepathyQt/SharedPtr>
    00050
    00051 #include <QSet>
    00052 #include <QString>
    00053 #include <QStringList>
    00054 #include <QVariantMap>
    00055
    00056 namespace Tp
    00057 {
    00058
    00059 class Account;
    00060 class Connection;
    00061 class PendingChannel;
    00062 class PendingChannelRequest;
    00063 class PendingConnection;
    00064 class PendingOperation;
    00065 class PendingReady;
    00066 class PendingStringList;
    00067
    00068 class TP_QT_EXPORT Account : public StatelessDBusProxy,
    00069                 public OptionalInterfaceFactory<Account>
    00070 {
    00071     Q_OBJECT
    00072     Q_DISABLE_COPY(Account)
    00073     Q_PROPERTY(bool valid READ isValidAccount NOTIFY validityChanged)
    00074     Q_PROPERTY(bool enabled READ isEnabled NOTIFY stateChanged)
    00075     Q_PROPERTY(QString cmName READ cmName)
    00076     Q_PROPERTY(QString protocolName READ protocolName)
    00077     Q_PROPERTY(QString serviceName READ serviceName NOTIFY serviceNameChanged)
    00078     Q_PROPERTY(ProfilePtr profile READ profile NOTIFY profileChanged)
    00079     Q_PROPERTY(QString displayName READ displayName NOTIFY displayNameChanged)
    00080     Q_PROPERTY(QString iconName READ iconName NOTIFY iconNameChanged)
    00081     Q_PROPERTY(QString nickname READ nickname NOTIFY nicknameChanged)
    00082     Q_PROPERTY(AvatarSpec avatarRequirements READ avatarRequirements)
    00083     Q_PROPERTY(Avatar avatar READ avatar NOTIFY avatarChanged)
    00084     Q_PROPERTY(QVariantMap parameters READ parameters NOTIFY parametersChanged)
    00085     Q_PROPERTY(ProtocolInfo protocolInfo READ protocolInfo)
    00086     Q_PROPERTY(ConnectionCapabilities capabilities READ capabilities NOTIFY capabilitiesChanged)
    00087     Q_PROPERTY(bool hasBeenOnline READ hasBeenOnline)
    00088     Q_PROPERTY(bool connectsAutomatically READ connectsAutomatically NOTIFY connectsAutomaticallyPropertyChanged)
    00089     Q_PROPERTY(ConnectionStatus connectionStatus READ connectionStatus NOTIFY connectionStatusChanged)
    00090     Q_PROPERTY(ConnectionStatusReason connectionStatusReason READ connectionStatusReason)
    00091     Q_PROPERTY(QString connectionError READ connectionError)
    00092     Q_PROPERTY(Tp::Connection::ErrorDetails connectionErrorDetails READ connectionErrorDetails)
    00093     Q_PROPERTY(ConnectionPtr connection READ connection NOTIFY connectionChanged)
    00094     Q_PROPERTY(bool changingPresence READ isChangingPresence NOTIFY changingPresence)
    00095     Q_PROPERTY(Presence automaticPresence READ automaticPresence NOTIFY automaticPresenceChanged)
    00096     Q_PROPERTY(Presence currentPresence READ currentPresence NOTIFY currentPresenceChanged)
    00097     Q_PROPERTY(Presence requestedPresence READ requestedPresence NOTIFY requestedPresenceChanged)
    00098     Q_PROPERTY(bool online READ isOnline NOTIFY onlinenessChanged)
    00099     Q_PROPERTY(QString uniqueIdentifier READ uniqueIdentifier)
    00100     Q_PROPERTY(QString normalizedName READ normalizedName NOTIFY normalizedNameChanged)
    00101
    00102 public:
    00103     static const Feature FeatureCore;
    00104     static const Feature FeatureAvatar;
    00105     static const Feature FeatureProtocolInfo;
    00106     static const Feature FeatureCapabilities;
    00107     static const Feature FeatureProfile;
    00108
    00109     static AccountPtr create(const QString &busName, const QString &objectPath,
    00110             const ConnectionFactoryConstPtr &connectionFactory =
    00111                 ConnectionFactory::create(QDBusConnection::sessionBus()),
    00112             const ChannelFactoryConstPtr &channelFactory =
    00113                 ChannelFactory::create(QDBusConnection::sessionBus()),
    00114             const ContactFactoryConstPtr &contactFactory =
    00115                 ContactFactory::create());
    00116     static AccountPtr create(const QDBusConnection &bus,
    00117             const QString &busName, const QString &objectPath,
    00118             const ConnectionFactoryConstPtr &connectionFactory,
    00119             const ChannelFactoryConstPtr &channelFactory,
    00120             const ContactFactoryConstPtr &contactFactory =
    00121                 ContactFactory::create());
    00122     virtual ~Account();
    00123
    00124     ConnectionFactoryConstPtr connectionFactory() const;
    00125     ChannelFactoryConstPtr channelFactory() const;
    00126     ContactFactoryConstPtr contactFactory() const;
    00127
    00128     bool isValidAccount() const;
    00129
    00130     bool isEnabled() const;
    00131     PendingOperation *setEnabled(bool value);
    00132
    00133     QString cmName() const;
    00134
    00135     QString protocolName() const;
    00136
    00137     QString serviceName() const;
    00138     PendingOperation *setServiceName(const QString &value);
    00139
    00140     ProfilePtr profile() const;
    00141
    00142     QString displayName() const;
    00143     PendingOperation *setDisplayName(const QString &value);
    00144
    00145     QString iconName() const;
    00146     PendingOperation *setIconName(const QString &value);
    00147
    00148     QString nickname() const;
    00149     PendingOperation *setNickname(const QString &value);
    00150
    00151     AvatarSpec avatarRequirements() const;
    00152     // TODO: We probably want to expose the avatar file name once we have the avatar token and MC
    00153     //       starts sharing the cache used by tp-qt and tp-glib and use Tp::AvatarData to represent
    00154     //       it as used in Tp::Contact
    00155     const Avatar &avatar() const;
    00156     PendingOperation *setAvatar(const Avatar &avatar);
    00157
    00158     QVariantMap parameters() const;
    00159     PendingStringList *updateParameters(const QVariantMap &set,
    00160             const QStringList &unset);
    00161
    00162     ProtocolInfo protocolInfo() const;
    00163
    00164     ConnectionCapabilities capabilities() const;
    00165
    00166     bool connectsAutomatically() const;
    00167     PendingOperation *setConnectsAutomatically(bool value);
    00168
    00169     bool hasBeenOnline() const;
    00170
    00171     ConnectionStatus connectionStatus() const;
    00172     ConnectionStatusReason connectionStatusReason() const;
    00173     QString connectionError() const;
    00174     Connection::ErrorDetails connectionErrorDetails() const;
    00175     ConnectionPtr connection() const;
    00176
    00177     bool isChangingPresence() const;
    00178
    00179     PresenceSpecList allowedPresenceStatuses(bool includeAllStatuses = false) const;
    00180     uint maxPresenceStatusMessageLength() const;
    00181
    00182     // TODO: Add overload methods to set presence from a Profile::Presence
    00183     // TODO: Add usablePresences() that would return a list of presences that could be set on the
    00184     //       account
    00185     Presence automaticPresence() const;
    00186     PendingOperation *setAutomaticPresence(const Presence &presence);
    00187
    00188     Presence currentPresence() const;
    00189
    00190     Presence requestedPresence() const;
    00191     PendingOperation *setRequestedPresence(const Presence &presence);
    00192
    00193     bool isOnline() const;
    00194
    00195     QString uniqueIdentifier() const;
    00196
    00197     QString normalizedName() const;
    00198
    00199     PendingOperation *reconnect();
    00200
    00201     PendingOperation *remove();
    00202
    00203     bool supportsRequestHints() const;
    00204     bool requestsSucceedWithChannel() const;
    00205
    00206     PendingChannelRequest *ensureTextChat(
    00207             const QString &contactIdentifier,
    00208             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00209             const QString &preferredHandler = QString(),
    00210             const ChannelRequestHints &hints = ChannelRequestHints());
    00211     PendingChannelRequest *ensureTextChat(
    00212             const ContactPtr &contact,
    00213             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00214             const QString &preferredHandler = QString(),
    00215             const ChannelRequestHints &hints = ChannelRequestHints());
    00216
    00217     PendingChannelRequest *ensureTextChatroom(
    00218             const QString &roomName,
    00219             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00220             const QString &preferredHandler = QString(),
    00221             const ChannelRequestHints &hints = ChannelRequestHints());
    00222
    00223     PendingChannelRequest *ensureAudioCall(
    00224             const QString &contactIdentifier,
    00225             const QString &initialAudioContentName = QString(),
    00226             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00227             const QString &preferredHandler = QString(),
    00228             const ChannelRequestHints &hints = ChannelRequestHints());
    00229     PendingChannelRequest *ensureAudioCall(
    00230             const ContactPtr &contact,
    00231             const QString &initialAudioContentName = QString(),
    00232             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00233             const QString &preferredHandler = QString(),
    00234             const ChannelRequestHints &hints = ChannelRequestHints());
    00235     PendingChannelRequest *ensureVideoCall(
    00236             const QString &contactIdentifier,
    00237             const QString &initialVideoContentName = QString(),
    00238             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00239             const QString &preferredHandler = QString(),
    00240             const ChannelRequestHints &hints = ChannelRequestHints());
    00241     PendingChannelRequest *ensureVideoCall(
    00242             const ContactPtr &contact,
    00243             const QString &initialVideoContentName = QString(),
    00244             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00245             const QString &preferredHandler = QString(),
    00246             const ChannelRequestHints &hints = ChannelRequestHints());
    00247     PendingChannelRequest *ensureAudioVideoCall(
    00248             const QString &contactIdentifier,
    00249             const QString &initialAudioContentName = QString(),
    00250             const QString &initialVideoContentName = QString(),
    00251             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00252             const QString &preferredHandler = QString(),
    00253             const ChannelRequestHints &hints = ChannelRequestHints());
    00254     PendingChannelRequest *ensureAudioVideoCall(
    00255             const ContactPtr &contact,
    00256             const QString &initialAudioContentName = QString(),
    00257             const QString &initialVideoContentName = QString(),
    00258             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00259             const QString &preferredHandler = QString(),
    00260             const ChannelRequestHints &hints = ChannelRequestHints());
    00261
    00262     PendingChannelRequest *ensureStreamedMediaCall(
    00263             const QString &contactIdentifier,
    00264             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00265             const QString &preferredHandler = QString(),
    00266             const ChannelRequestHints &hints = ChannelRequestHints());
    00267     PendingChannelRequest *ensureStreamedMediaCall(
    00268             const ContactPtr &contact,
    00269             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00270             const QString &preferredHandler = QString(),
    00271             const ChannelRequestHints &hints = ChannelRequestHints());
    00272     PendingChannelRequest *ensureStreamedMediaAudioCall(
    00273             const QString &contactIdentifier,
    00274             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00275             const QString &preferredHandler = QString(),
    00276             const ChannelRequestHints &hints = ChannelRequestHints());
    00277     PendingChannelRequest *ensureStreamedMediaAudioCall(
    00278             const ContactPtr &contact,
    00279             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00280             const QString &preferredHandler = QString(),
    00281             const ChannelRequestHints &hints = ChannelRequestHints());
    00282     PendingChannelRequest *ensureStreamedMediaVideoCall(
    00283             const QString &contactIdentifier,
    00284             bool withAudio = true,
    00285             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00286             const QString &preferredHandler = QString(),
    00287             const ChannelRequestHints &hints = ChannelRequestHints());
    00288     PendingChannelRequest *ensureStreamedMediaVideoCall(
    00289             const ContactPtr &contact,
    00290             bool withAudio = false,
    00291             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00292             const QString &preferredHandler = QString(),
    00293             const ChannelRequestHints &hints = ChannelRequestHints());
    00294
    00295     PendingChannelRequest *createFileTransfer(
    00296             const QString &contactIdentifier,
    00297             const FileTransferChannelCreationProperties &properties,
    00298             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00299             const QString &preferredHandler = QString(),
    00300             const ChannelRequestHints &hints = ChannelRequestHints());
    00301     PendingChannelRequest *createFileTransfer(
    00302             const ContactPtr &contact,
    00303             const FileTransferChannelCreationProperties &properties,
    00304             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00305             const QString &preferredHandler = QString(),
    00306             const ChannelRequestHints &hints = ChannelRequestHints());
    00307
    00308     PendingChannelRequest *createStreamTube(
    00309             const QString &contactIdentifier,
    00310             const QString &service,
    00311             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00312             const QString &preferredHandler = QString(),
    00313             const ChannelRequestHints &hints = ChannelRequestHints());
    00314     PendingChannelRequest *createStreamTube(
    00315             const ContactPtr &contact,
    00316             const QString &service,
    00317             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00318             const QString &preferredHandler = QString(),
    00319             const ChannelRequestHints &hints = ChannelRequestHints());
    00320
    00321     PendingChannelRequest *createConferenceStreamedMediaCall(
    00322             const QList<ChannelPtr> &channels,
    00323             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00324             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00325             const QString &preferredHandler = QString(),
    00326             const ChannelRequestHints &hints = ChannelRequestHints());
    00327     PendingChannelRequest *createConferenceStreamedMediaCall(
    00328             const QList<ChannelPtr> &channels,
    00329             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00330             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00331             const QString &preferredHandler = QString(),
    00332             const ChannelRequestHints &hints = ChannelRequestHints());
    00333
    00334     PendingChannelRequest *createConferenceTextChat(
    00335             const QList<ChannelPtr> &channels,
    00336             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00337             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00338             const QString &preferredHandler = QString(),
    00339             const ChannelRequestHints &hints = ChannelRequestHints());
    00340     PendingChannelRequest *createConferenceTextChat(
    00341             const QList<ChannelPtr> &channels,
    00342             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00343             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00344             const QString &preferredHandler = QString(),
    00345             const ChannelRequestHints &hints = ChannelRequestHints());
    00346
    00347     PendingChannelRequest *createConferenceTextChatroom(
    00348             const QString &roomName,
    00349             const QList<ChannelPtr> &channels,
    00350             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00351             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00352             const QString &preferredHandler = QString(),
    00353             const ChannelRequestHints &hints = ChannelRequestHints());
    00354     PendingChannelRequest *createConferenceTextChatroom(
    00355             const QString &roomName,
    00356             const QList<ChannelPtr> &channels,
    00357             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00358             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00359             const QString &preferredHandler = QString(),
    00360             const ChannelRequestHints &hints = ChannelRequestHints());
    00361
    00362     PendingChannelRequest *createContactSearch(
    00363             const QString &server,
    00364             uint limit = 0,
    00365             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00366             const QString &preferredHandler = QString(),
    00367             const ChannelRequestHints &hints = ChannelRequestHints());
    00368
    00369     PendingChannel *ensureAndHandleTextChat(
    00370             const QString &contactIdentifier,
    00371             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00372     PendingChannel *ensureAndHandleTextChat(
    00373             const ContactPtr &contact,
    00374             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00375
    00376     PendingChannel *ensureAndHandleTextChatroom(
    00377             const QString &roomName,
    00378             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00379
    00380     PendingChannel *ensureAndHandleAudioCall(
    00381             const QString &contactIdentifier,
    00382             const QString &initialAudioContentName = QString(),
    00383             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00384     PendingChannel *ensureAndHandleAudioCall(
    00385             const ContactPtr &contact,
    00386             const QString &initialAudioContentName = QString(),
    00387             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00388     PendingChannel *ensureAndHandleVideoCall(
    00389             const QString &contactIdentifier,
    00390             const QString &initialVideoContentName = QString(),
    00391             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00392     PendingChannel *ensureAndHandleVideoCall(
    00393             const ContactPtr &contact,
    00394             const QString &initialVideoContentName = QString(),
    00395             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00396     PendingChannel *ensureAndHandleAudioVideoCall(
    00397             const QString &contactIdentifier,
    00398             const QString &initialAudioContentName = QString(),
    00399             const QString &initialVideoContentName = QString(),
    00400             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00401     PendingChannel *ensureAndHandleAudioVideoCall(
    00402             const ContactPtr &contact,
    00403             const QString &initialAudioContentName = QString(),
    00404             const QString &initialVideoContentName = QString(),
    00405             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00406
    00407     PendingChannel *ensureAndHandleStreamedMediaCall(
    00408             const QString &contactIdentifier,
    00409             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00410     PendingChannel *ensureAndHandleStreamedMediaCall(
    00411             const ContactPtr &contact,
    00412             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00413
    00414     PendingChannel *ensureAndHandleStreamedMediaAudioCall(
    00415             const QString &contactIdentifier,
    00416             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00417     PendingChannel *ensureAndHandleStreamedMediaAudioCall(
    00418             const ContactPtr &contact,
    00419             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00420
    00421     PendingChannel *ensureAndHandleStreamedMediaVideoCall(
    00422             const QString &contactIdentifier,
    00423             bool withAudio = true,
    00424             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00425     PendingChannel *ensureAndHandleStreamedMediaVideoCall(
    00426             const ContactPtr &contact,
    00427             bool withAudio = true,
    00428             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00429
    00430     PendingChannel *createAndHandleFileTransfer(
    00431             const QString &contactIdentifier,
    00432             const FileTransferChannelCreationProperties &properties,
    00433             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00434     PendingChannel *createAndHandleFileTransfer(
    00435             const ContactPtr &contact,
    00436             const FileTransferChannelCreationProperties &properties,
    00437             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00438
    00439     PendingChannel *createAndHandleStreamTube(
    00440             const QString &contactIdentifier,
    00441             const QString &service,
    00442             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00443     PendingChannel *createAndHandleStreamTube(
    00444             const ContactPtr &contact,
    00445             const QString &service,
    00446             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00447
    00448     PendingChannel *createAndHandleConferenceTextChat(
    00449             const QList<ChannelPtr> &channels,
    00450             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00451             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00452     PendingChannel *createAndHandleConferenceTextChat(
    00453             const QList<ChannelPtr> &channels,
    00454             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00455             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00456
    00457     PendingChannel *createAndHandleConferenceTextChatroom(
    00458             const QString &roomName,
    00459             const QList<ChannelPtr> &channels,
    00460             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00461             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00462     PendingChannel *createAndHandleConferenceTextChatroom(
    00463             const QString &roomName,
    00464             const QList<ChannelPtr> &channels,
    00465             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00466             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00467
    00468     PendingChannel *createAndHandleConferenceStreamedMediaCall(
    00469             const QList<ChannelPtr> &channels,
    00470             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00471             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00472     PendingChannel *createAndHandleConferenceStreamedMediaCall(
    00473             const QList<ChannelPtr> &channels,
    00474             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00475             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00476
    00477     PendingChannel *createAndHandleContactSearch(
    00478             const QString &server = QString(),
    00479             uint limit = 0,
    00480             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00481
    00482     // advanced
    00483     PendingChannelRequest *createChannel(
    00484             const QVariantMap &requestedProperties,
    00485             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00486             const QString &preferredHandler = QString(),
    00487             const ChannelRequestHints &hints = ChannelRequestHints());
    00488
    00489     PendingChannelRequest *ensureChannel(
    00490             const QVariantMap &requestedProperties,
    00491             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00492             const QString &preferredHandler = QString(),
    00493             const ChannelRequestHints &hints = ChannelRequestHints());
    00494
    00495     PendingChannel *createAndHandleChannel(
    00496             const QVariantMap &requestedProperties,
    00497             const QDateTime &userActionTime);
    00498     PendingChannel *ensureAndHandleChannel(
    00499             const QVariantMap &requestedProperties,
    00500             const QDateTime &userActionTime);
    00501
    00502 Q_SIGNALS:
    00503     void removed();
    00504     void serviceNameChanged(const QString &serviceName);
    00505     void profileChanged(const Tp::ProfilePtr &profile);
    00506     void displayNameChanged(const QString &displayName);
    00507     void iconNameChanged(const QString &iconName);
    00508     void nicknameChanged(const QString &nickname);
    00509     void normalizedNameChanged(const QString &normalizedName);
    00510     void validityChanged(bool validity);
    00511     void stateChanged(bool state);
    00512     void capabilitiesChanged(const Tp::ConnectionCapabilities &capabilities);
    00513     void connectsAutomaticallyPropertyChanged(bool connectsAutomatically);
    00514     void firstOnline();
    00515     void parametersChanged(const QVariantMap &parameters);
    00516     void changingPresence(bool value);
    00517     void automaticPresenceChanged(const Tp::Presence &automaticPresence);
    00518     void currentPresenceChanged(const Tp::Presence &currentPresence);
    00519     void requestedPresenceChanged(const Tp::Presence &requestedPresence);
    00520     void onlinenessChanged(bool online);
    00521     void avatarChanged(const Tp::Avatar &avatar);
    00522     void connectionStatusChanged(Tp::ConnectionStatus status);
    00523     void connectionChanged(const Tp::ConnectionPtr &connection);
    00524
    00525 protected:
    00526     friend class PendingChannelRequest; // to access dispatcherInterface()
    00527
    00528     Account(const QDBusConnection &bus,
    00529             const QString &busName, const QString &objectPath,
    00530             const ConnectionFactoryConstPtr &connectionFactory,
    00531             const ChannelFactoryConstPtr &channelFactory,
    00532             const ContactFactoryConstPtr &contactFactory,
    00533             const Feature &coreFeature);
    00534
    00535     Client::AccountInterface *baseInterface() const;
    00536     Client::ChannelDispatcherInterface *dispatcherInterface() const;
    00537
    00538 private Q_SLOTS:
    00539     TP_QT_NO_EXPORT void onDispatcherIntrospected(Tp::PendingOperation *op);
    00540     TP_QT_NO_EXPORT void gotMainProperties(QDBusPendingCallWatcher *);
    00541     TP_QT_NO_EXPORT void gotAvatar(QDBusPendingCallWatcher *);
    00542     TP_QT_NO_EXPORT void onAvatarChanged();
    00543     TP_QT_NO_EXPORT void onConnectionManagerReady(Tp::PendingOperation *);
    00544     TP_QT_NO_EXPORT void onConnectionReady(Tp::PendingOperation *);
    00545     TP_QT_NO_EXPORT void onPropertyChanged(const QVariantMap &delta);
    00546     TP_QT_NO_EXPORT void onRemoved();
    00547     TP_QT_NO_EXPORT void onConnectionBuilt(Tp::PendingOperation *);
    00548
    00549 private:
    00550     struct Private;
    00551     friend struct Private;
    00552
    00553     Private *mPriv;
    00554 };
    00555
    00556 } // Tp
    00557
    00558 #endif