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

contact-factory.h

    00001
    00023 #ifndef _TelepathyQt_contact_factory_h_HEADER_GUARD_
    00024 #define _TelepathyQt_contact_factory_h_HEADER_GUARD_
    00025
    00026 #ifndef IN_TP_QT_HEADER
    00027 #error IN_TP_QT_HEADER
    00028 #endif
    00029
    00030 #include <TelepathyQt/Contact>
    00031 #include <TelepathyQt/Feature>
    00032 #include <TelepathyQt/Global>
    00033 #include <TelepathyQt/Types>
    00034
    00035 #include <QSet>
    00036 #include <QtGlobal>
    00037
    00038 namespace Tp
    00039 {
    00040
    00041 class ContactManager;
    00042 class ReferencedHandles;
    00043
    00044 class TP_QT_EXPORT ContactFactory : public RefCounted
    00045 {
    00046     Q_DISABLE_COPY(ContactFactory)
    00047
    00048 public:
    00049     static ContactFactoryPtr create(const Features &features = Features());
    00050
    00051     virtual ~ContactFactory();
    00052
    00053     Features features() const;
    00054
    00055     void addFeature(const Feature &feature);
    00056     void addFeatures(const Features &features);
    00057
    00058 protected:
    00059     ContactFactory(const Features &features);
    00060
    00061     virtual ContactPtr construct(ContactManager *manager, const ReferencedHandles &handle,
    00062             const Features &features, const QVariantMap &attributes) const;
    00063     virtual PendingOperation *prepare(const ContactPtr &contact) const;
    00064
    00065 private:
    00066     friend class ContactManager;
    00067     friend class PendingContacts;
    00068
    00069     struct Private;
    00070     friend struct Private;
    00071     Private *mPriv;
    00072 };
    00073
    00074 } // Tp
    00075
    00076 #endif