Home · All Classes · All Namespaces · Modules · Functions · Files
contact-factory.h
00001 
00023 #ifndef _TelepathyQt4_contact_factory_h_HEADER_GUARD_
00024 #define _TelepathyQt4_contact_factory_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/Contact>
00031 #include <TelepathyQt4/Feature>
00032 #include <TelepathyQt4/Global>
00033 #include <TelepathyQt4/Types>
00034 
00035 #include <QSet>
00036 #include <QtGlobal>
00037 
00038 namespace Tp
00039 {
00040 
00041 class ContactManager;
00042 class ReferencedHandles;
00043 
00044 class TELEPATHY_QT4_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


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.8.0