Home · Modules · All Classes · All Namespaces
contact-factory.h
1 
23 #ifndef _TelepathyQt_contact_factory_h_HEADER_GUARD_
24 #define _TelepathyQt_contact_factory_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/Contact>
31 #include <TelepathyQt/Feature>
32 #include <TelepathyQt/Global>
33 #include <TelepathyQt/Types>
34 
35 #include <QSet>
36 #include <QtGlobal>
37 
38 namespace Tp
39 {
40 
41 class ContactManager;
42 class ReferencedHandles;
43 
44 class TP_QT_EXPORT ContactFactory : public RefCounted
45 {
46  Q_DISABLE_COPY(ContactFactory)
47 
48 public:
49  static ContactFactoryPtr create(const Features &features = Features());
50 
51  virtual ~ContactFactory();
52 
53  Features features() const;
54 
55  void addFeature(const Feature &feature);
56  void addFeatures(const Features &features);
57 
58 protected:
59  ContactFactory(const Features &features);
60 
61  virtual ContactPtr construct(ContactManager *manager, const ReferencedHandles &handle,
62  const Features &features, const QVariantMap &attributes) const;
63  virtual PendingOperation *prepare(const ContactPtr &contact) const;
64 
65 private:
66  friend class ContactManager;
67  friend class PendingContacts;
68 
69  struct Private;
70  friend struct Private;
71  Private *mPriv;
72 };
73 
74 } // Tp
75 
76 #endif
The ContactManager class is responsible for managing contacts.
Definition: contact-manager.h:50
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
Helper container for safe management of handle lifetimes. Every handle in a ReferencedHandles contain...
Definition: referenced-handles.h:47
The PendingContacts class is used by ContactManager when creating/updating Contact objects.
Definition: pending-contacts.h:46
The RefCounted class is a base class for shared objects used by SharedPtr.
Definition: shared-ptr.h:42
The Features class represents a list of Feature.
Definition: feature.h:61
Definition: abstract-adaptor.cpp:31
The ContactFactory class is responsible for constructing Contact objects according to application-def...
Definition: contact-factory.h:44
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45