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

account.h

    00001
    00023 #ifndef _TelepathyQt4_account_h_HEADER_GUARD_
    00024 #define _TelepathyQt4_account_h_HEADER_GUARD_
    00025
    00026 #ifndef IN_TELEPATHY_QT4_HEADER
    00027 #error IN_TELEPATHY_QT4_HEADER
    00028 #endif
    00029
    00030 #include <TelepathyQt4/_gen/cli-account.h>
    00031
    00032 #include <TelepathyQt4/ChannelRequestHints>
    00033 #include <TelepathyQt4/Connection>
    00034 #include <TelepathyQt4/ConnectionCapabilities>
    00035 #include <TelepathyQt4/ConnectionFactory>
    00036 #include <TelepathyQt4/ContactFactory>
    00037 #include <TelepathyQt4/ChannelFactory>
    00038 #include <TelepathyQt4/ChannelDispatcherInterface>
    00039 #include <TelepathyQt4/DBus>
    00040 #include <TelepathyQt4/DBusProxy>
    00041 #include <TelepathyQt4/FileTransferChannelCreationProperties>
    00042 #include <TelepathyQt4/OptionalInterfaceFactory>
    00043 #include <TelepathyQt4/Presence>
    00044 #include <TelepathyQt4/PresenceSpec>
    00045 #include <TelepathyQt4/ProtocolInfo>
    00046 #include <TelepathyQt4/ReadinessHelper>
    00047 #include <TelepathyQt4/Types>
    00048 #include <TelepathyQt4/Constants>
    00049 #include <TelepathyQt4/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 TELEPATHY_QT4_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-qt4 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     // TODO ABI break: collapse all of the overloads without a hints arg with the corresponding
    00207     // hints versions and add a default param for the hints args
    00208
    00209     PendingChannelRequest *ensureTextChat(
    00210             const QString &contactIdentifier,
    00211             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00212             const QString &preferredHandler = QString());
    00213     PendingChannelRequest *ensureTextChat(
    00214             const QString &contactIdentifier,
    00215             const QDateTime &userActionTime,
    00216             const QString &preferredHandler,
    00217             const ChannelRequestHints &hints);
    00218
    00219     PendingChannelRequest *ensureTextChat(
    00220             const ContactPtr &contact,
    00221             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00222             const QString &preferredHandler = QString());
    00223     PendingChannelRequest *ensureTextChat(
    00224             const ContactPtr &contact,
    00225             const QDateTime &userActionTime,
    00226             const QString &preferredHandler,
    00227             const ChannelRequestHints &hints);
    00228
    00229     PendingChannelRequest *ensureTextChatroom(
    00230             const QString &roomName,
    00231             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00232             const QString &preferredHandler = QString());
    00233     PendingChannelRequest *ensureTextChatroom(
    00234             const QString &roomName,
    00235             const QDateTime &userActionTime,
    00236             const QString &preferredHandler,
    00237             const ChannelRequestHints &hints);
    00238
    00239     PendingChannelRequest *ensureStreamedMediaCall(
    00240             const QString &contactIdentifier,
    00241             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00242             const QString &preferredHandler = QString());
    00243     PendingChannelRequest *ensureStreamedMediaCall(
    00244             const QString &contactIdentifier,
    00245             const QDateTime &userActionTime,
    00246             const QString &preferredHandler,
    00247             const ChannelRequestHints &hints);
    00248
    00249     PendingChannelRequest *ensureStreamedMediaCall(
    00250             const ContactPtr &contact,
    00251             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00252             const QString &preferredHandler = QString());
    00253     PendingChannelRequest *ensureStreamedMediaCall(
    00254             const ContactPtr &contact,
    00255             const QDateTime &userActionTime,
    00256             const QString &preferredHandler,
    00257             const ChannelRequestHints &hints);
    00258
    00259     PendingChannelRequest *ensureStreamedMediaAudioCall(
    00260             const QString &contactIdentifier,
    00261             QDateTime userActionTime = QDateTime::currentDateTime(),
    00262             const QString &preferredHandler = QString());
    00263     PendingChannelRequest *ensureStreamedMediaAudioCall(
    00264             const QString &contactIdentifier,
    00265             const QDateTime &userActionTime,
    00266             const QString &preferredHandler,
    00267             const ChannelRequestHints &hints);
    00268
    00269     PendingChannelRequest *ensureStreamedMediaAudioCall(
    00270             const ContactPtr &contact,
    00271             QDateTime userActionTime = QDateTime::currentDateTime(),
    00272             const QString &preferredHandler = QString());
    00273     PendingChannelRequest *ensureStreamedMediaAudioCall(
    00274             const ContactPtr &contact,
    00275             const QDateTime &userActionTime,
    00276             const QString &preferredHandler,
    00277             const ChannelRequestHints &hints);
    00278
    00279     PendingChannelRequest *ensureStreamedMediaVideoCall(
    00280             const QString &contactIdentifier,
    00281             bool withAudio = true,
    00282             QDateTime userActionTime = QDateTime::currentDateTime(),
    00283             const QString &preferredHandler = QString());
    00284     PendingChannelRequest *ensureStreamedMediaVideoCall(
    00285             const QString &contactIdentifier,
    00286             bool withAudio,
    00287             const QDateTime &userActionTime,
    00288             const QString &preferredHandler,
    00289             const ChannelRequestHints &hints);
    00290
    00291     PendingChannelRequest *ensureStreamedMediaVideoCall(
    00292             const ContactPtr &contact,
    00293             bool withAudio = true,
    00294             QDateTime userActionTime = QDateTime::currentDateTime(),
    00295             const QString &preferredHandler = QString());
    00296     PendingChannelRequest *ensureStreamedMediaVideoCall(
    00297             const ContactPtr &contact,
    00298             bool withAudio,
    00299             const QDateTime &userActionTime,
    00300             const QString &preferredHandler,
    00301             const ChannelRequestHints &hints);
    00302
    00303     PendingChannelRequest *createFileTransfer(
    00304             const QString &contactIdentifier,
    00305             const FileTransferChannelCreationProperties &properties,
    00306             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00307             const QString &preferredHandler = QString());
    00308     PendingChannelRequest *createFileTransfer(
    00309             const QString &contactIdentifier,
    00310             const FileTransferChannelCreationProperties &properties,
    00311             const QDateTime &userActionTime,
    00312             const QString &preferredHandler,
    00313             const ChannelRequestHints &hints);
    00314
    00315     PendingChannelRequest *createFileTransfer(
    00316             const ContactPtr &contact,
    00317             const FileTransferChannelCreationProperties &properties,
    00318             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00319             const QString &preferredHandler = QString());
    00320     PendingChannelRequest *createFileTransfer(
    00321             const ContactPtr &contact,
    00322             const FileTransferChannelCreationProperties &properties,
    00323             const QDateTime &userActionTime,
    00324             const QString &preferredHandler,
    00325             const ChannelRequestHints &hints);
    00326
    00327     PendingChannelRequest *createStreamTube(
    00328             const QString &contactIdentifier,
    00329             const QString &service,
    00330             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00331             const QString &preferredHandler = QString(),
    00332             const ChannelRequestHints &hints = ChannelRequestHints());
    00333     PendingChannelRequest *createStreamTube(
    00334             const ContactPtr &contact,
    00335             const QString &service,
    00336             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00337             const QString &preferredHandler = QString(),
    00338             const ChannelRequestHints &hints = ChannelRequestHints());
    00339
    00340     PendingChannelRequest *createConferenceStreamedMediaCall(
    00341             const QList<ChannelPtr> &channels,
    00342             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00343             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00344             const QString &preferredHandler = QString());
    00345     PendingChannelRequest *createConferenceStreamedMediaCall(
    00346             const QList<ChannelPtr> &channels,
    00347             const QStringList &initialInviteeContactsIdentifiers,
    00348             const QDateTime &userActionTime,
    00349             const QString &preferredHandler,
    00350             const ChannelRequestHints &hints);
    00351
    00352     PendingChannelRequest *createConferenceStreamedMediaCall(
    00353             const QList<ChannelPtr> &channels,
    00354             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00355             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00356             const QString &preferredHandler = QString());
    00357     PendingChannelRequest *createConferenceStreamedMediaCall(
    00358             const QList<ChannelPtr> &channels,
    00359             const QList<ContactPtr> &initialInviteeContacts,
    00360             const QDateTime &userActionTime,
    00361             const QString &preferredHandler,
    00362             const ChannelRequestHints &hints);
    00363
    00364     PendingChannelRequest *createConferenceTextChat(
    00365             const QList<ChannelPtr> &channels,
    00366             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00367             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00368             const QString &preferredHandler = QString());
    00369     PendingChannelRequest *createConferenceTextChat(
    00370             const QList<ChannelPtr> &channels,
    00371             const QList<ContactPtr> &initialInviteeContacts,
    00372             const QDateTime &userActionTime,
    00373             const QString &preferredHandler,
    00374             const ChannelRequestHints &hints);
    00375
    00376     PendingChannelRequest *createConferenceTextChat(
    00377             const QList<ChannelPtr> &channels,
    00378             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00379             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00380             const QString &preferredHandler = QString());
    00381     PendingChannelRequest *createConferenceTextChat(
    00382             const QList<ChannelPtr> &channels,
    00383             const QStringList &initialInviteeContactsIdentifiers,
    00384             const QDateTime &userActionTime,
    00385             const QString &preferredHandler,
    00386             const ChannelRequestHints &hints);
    00387
    00388     TELEPATHY_QT4_DEPRECATED PendingChannelRequest *createConferenceTextChatRoom(
    00389             const QString &roomName,
    00390             const QList<ChannelPtr> &channels,
    00391             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00392             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00393             const QString &preferredHandler = QString());
    00394     PendingChannelRequest *createConferenceTextChatroom(
    00395             const QString &roomName,
    00396             const QList<ChannelPtr> &channels,
    00397             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00398             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00399             const QString &preferredHandler = QString(),
    00400             const ChannelRequestHints &hints = ChannelRequestHints());
    00401
    00402     TELEPATHY_QT4_DEPRECATED PendingChannelRequest *createConferenceTextChatRoom(
    00403             const QString &roomName,
    00404             const QList<ChannelPtr> &channels,
    00405             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00406             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00407             const QString &preferredHandler = QString());
    00408     PendingChannelRequest *createConferenceTextChatroom(
    00409             const QString &roomName,
    00410             const QList<ChannelPtr> &channels,
    00411             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00412             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00413             const QString &preferredHandler = QString(),
    00414             const ChannelRequestHints &hints = ChannelRequestHints());
    00415
    00416     PendingChannelRequest *createContactSearch(
    00417             const QString &server = QString(),
    00418             uint limit = 0,
    00419             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00420             const QString &preferredHandler = QString());
    00421     PendingChannelRequest *createContactSearch(
    00422             const QString &server,
    00423             uint limit,
    00424             const QDateTime &userActionTime,
    00425             const QString &preferredHandler,
    00426             const ChannelRequestHints &hints);
    00427
    00428     PendingChannel *ensureAndHandleTextChat(
    00429             const QString &contactIdentifier,
    00430             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00431     PendingChannel *ensureAndHandleTextChat(
    00432             const ContactPtr &contact,
    00433             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00434
    00435     PendingChannel *ensureAndHandleTextChatroom(
    00436             const QString &roomName,
    00437             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00438
    00439     PendingChannel *ensureAndHandleStreamedMediaCall(
    00440             const QString &contactIdentifier,
    00441             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00442     PendingChannel *ensureAndHandleStreamedMediaCall(
    00443             const ContactPtr &contact,
    00444             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00445
    00446     PendingChannel *ensureAndHandleStreamedMediaAudioCall(
    00447             const QString &contactIdentifier,
    00448             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00449     PendingChannel *ensureAndHandleStreamedMediaAudioCall(
    00450             const ContactPtr &contact,
    00451             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00452
    00453     PendingChannel *ensureAndHandleStreamedMediaVideoCall(
    00454             const QString &contactIdentifier,
    00455             bool withAudio = true,
    00456             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00457     PendingChannel *ensureAndHandleStreamedMediaVideoCall(
    00458             const ContactPtr &contact,
    00459             bool withAudio = true,
    00460             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00461
    00462     PendingChannel *createAndHandleFileTransfer(
    00463             const QString &contactIdentifier,
    00464             const FileTransferChannelCreationProperties &properties,
    00465             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00466     PendingChannel *createAndHandleFileTransfer(
    00467             const ContactPtr &contact,
    00468             const FileTransferChannelCreationProperties &properties,
    00469             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00470
    00471     PendingChannel *createAndHandleStreamTube(
    00472             const QString &contactIdentifier,
    00473             const QString &service,
    00474             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00475     PendingChannel *createAndHandleStreamTube(
    00476             const ContactPtr &contact,
    00477             const QString &service,
    00478             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00479
    00480     PendingChannel *createAndHandleConferenceTextChat(
    00481             const QList<ChannelPtr> &channels,
    00482             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00483             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00484     PendingChannel *createAndHandleConferenceTextChat(
    00485             const QList<ChannelPtr> &channels,
    00486             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00487             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00488
    00489     PendingChannel *createAndHandleConferenceTextChatroom(
    00490             const QString &roomName,
    00491             const QList<ChannelPtr> &channels,
    00492             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00493             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00494     PendingChannel *createAndHandleConferenceTextChatroom(
    00495             const QString &roomName,
    00496             const QList<ChannelPtr> &channels,
    00497             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00498             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00499
    00500     PendingChannel *createAndHandleConferenceStreamedMediaCall(
    00501             const QList<ChannelPtr> &channels,
    00502             const QStringList &initialInviteeContactsIdentifiers = QStringList(),
    00503             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00504     PendingChannel *createAndHandleConferenceStreamedMediaCall(
    00505             const QList<ChannelPtr> &channels,
    00506             const QList<ContactPtr> &initialInviteeContacts = QList<ContactPtr>(),
    00507             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00508
    00509     PendingChannel *createAndHandleContactSearch(
    00510             const QString &server = QString(),
    00511             uint limit = 0,
    00512             const QDateTime &userActionTime = QDateTime::currentDateTime());
    00513
    00514     // advanced
    00515     PendingChannelRequest *createChannel(
    00516             const QVariantMap &requestedProperties,
    00517             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00518             const QString &preferredHandler = QString());
    00519     PendingChannelRequest *createChannel(
    00520             const QVariantMap &requestedProperties,
    00521             const QDateTime &userActionTime,
    00522             const QString &preferredHandler,
    00523             const ChannelRequestHints &hints);
    00524
    00525     PendingChannelRequest *ensureChannel(
    00526             const QVariantMap &requestedProperties,
    00527             const QDateTime &userActionTime = QDateTime::currentDateTime(),
    00528             const QString &preferredHandler = QString());
    00529     PendingChannelRequest *ensureChannel(
    00530             const QVariantMap &requestedProperties,
    00531             const QDateTime &userActionTime,
    00532             const QString &preferredHandler,
    00533             const ChannelRequestHints &hints);
    00534
    00535     PendingChannel *createAndHandleChannel(
    00536             const QVariantMap &requestedProperties,
    00537             const QDateTime &userActionTime);
    00538     PendingChannel *ensureAndHandleChannel(
    00539             const QVariantMap &requestedProperties,
    00540             const QDateTime &userActionTime);
    00541
    00542 Q_SIGNALS:
    00543     void removed();
    00544     void serviceNameChanged(const QString &serviceName);
    00545     void profileChanged(const Tp::ProfilePtr &profile);
    00546     void displayNameChanged(const QString &displayName);
    00547     void iconNameChanged(const QString &iconName);
    00548     void nicknameChanged(const QString &nickname);
    00549     void normalizedNameChanged(const QString &normalizedName);
    00550     void validityChanged(bool validity);
    00551     void stateChanged(bool state);
    00552     void capabilitiesChanged(const Tp::ConnectionCapabilities &capabilities);
    00553     void connectsAutomaticallyPropertyChanged(bool connectsAutomatically);
    00554     void firstOnline();
    00555     void parametersChanged(const QVariantMap &parameters);
    00556     void changingPresence(bool value);
    00557     void automaticPresenceChanged(const Tp::Presence &automaticPresence);
    00558     void currentPresenceChanged(const Tp::Presence &currentPresence);
    00559     void requestedPresenceChanged(const Tp::Presence &requestedPresence);
    00560     void onlinenessChanged(bool online);
    00561     void avatarChanged(const Tp::Avatar &avatar);
    00562     void connectionStatusChanged(Tp::ConnectionStatus status);
    00563     void connectionChanged(const Tp::ConnectionPtr &connection);
    00564
    00565 protected:
    00566     friend class PendingChannelRequest; // to access dispatcherInterface()
    00567
    00568     Account(const QDBusConnection &bus,
    00569             const QString &busName, const QString &objectPath,
    00570             const ConnectionFactoryConstPtr &connectionFactory,
    00571             const ChannelFactoryConstPtr &channelFactory,
    00572             const ContactFactoryConstPtr &contactFactory,
    00573             const Feature &coreFeature);
    00574
    00575     Client::AccountInterface *baseInterface() const;
    00576     Client::ChannelDispatcherInterface *dispatcherInterface() const;
    00577
    00578 private Q_SLOTS:
    00579     TELEPATHY_QT4_NO_EXPORT void onDispatcherIntrospected(Tp::PendingOperation *op);
    00580     TELEPATHY_QT4_NO_EXPORT void gotMainProperties(QDBusPendingCallWatcher *);
    00581     TELEPATHY_QT4_NO_EXPORT void gotAvatar(QDBusPendingCallWatcher *);
    00582     TELEPATHY_QT4_NO_EXPORT void onAvatarChanged();
    00583     TELEPATHY_QT4_NO_EXPORT void onConnectionManagerReady(Tp::PendingOperation *);
    00584     TELEPATHY_QT4_NO_EXPORT void onConnectionReady(Tp::PendingOperation *);
    00585     TELEPATHY_QT4_NO_EXPORT void onPropertyChanged(const QVariantMap &delta);
    00586     TELEPATHY_QT4_NO_EXPORT void onRemoved();
    00587     TELEPATHY_QT4_NO_EXPORT void onConnectionBuilt(Tp::PendingOperation *);
    00588
    00589 private:
    00590     struct Private;
    00591     friend struct Private;
    00592
    00593     Private *mPriv;
    00594 };
    00595
    00596 } // Tp
    00597
    00598 #endif