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

profile-manager.h

    00001
    00023 #ifndef _TelepathyQt_profile_manager_h_HEADER_GUARD_
    00024 #define _TelepathyQt_profile_manager_h_HEADER_GUARD_
    00025
    00026 #ifndef IN_TP_QT_HEADER
    00027 #error IN_TP_QT_HEADER
    00028 #endif
    00029
    00030 #include <TelepathyQt/Object>
    00031 #include <TelepathyQt/Profile>
    00032 #include <TelepathyQt/ReadyObject>
    00033 #include <TelepathyQt/Types>
    00034
    00035 #include <QDBusConnection>
    00036 #include <QObject>
    00037
    00038 namespace Tp
    00039 {
    00040
    00041 class PendingOperation;
    00042
    00043 class TP_QT_EXPORT ProfileManager : public Object, public ReadyObject
    00044 {
    00045     Q_OBJECT
    00046     Q_DISABLE_COPY(ProfileManager);
    00047
    00048 public:
    00049     static const Feature FeatureCore;
    00050     static const Feature FeatureFakeProfiles;
    00051
    00052     static ProfileManagerPtr create(const QDBusConnection &bus = QDBusConnection::sessionBus());
    00053
    00054     ~ProfileManager();
    00055
    00056     QList<ProfilePtr> profiles() const;
    00057     QList<ProfilePtr> profilesForCM(const QString &cmName) const;
    00058     QList<ProfilePtr> profilesForProtocol(const QString &protocolName) const;
    00059     ProfilePtr profileForService(const QString &serviceName) const;
    00060
    00061 private Q_SLOTS:
    00062     TP_QT_NO_EXPORT void onCmNamesRetrieved(Tp::PendingOperation *op);
    00063     TP_QT_NO_EXPORT void onCMsReady(Tp::PendingOperation *op);
    00064
    00065 private:
    00066     ProfileManager(const QDBusConnection &bus);
    00067
    00068     struct Private;
    00069     friend struct Private;
    00070     Private *mPriv;
    00071 };
    00072
    00073 } // Tp
    00074
    00075 #endif