Home · All Classes · All Namespaces · Modules · Functions · Files
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 PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
The RefCounted class is a base class for shared objects used by SharedPtr.
Definition: shared-ptr.h:42
The ContactManager class is responsible for managing contacts.
Definition: contact-manager.h:50
The Features class represents a list of Feature.
Definition: feature.h:61
The PendingContacts class is used by ContactManager when creating/updating Contact objects...
Definition: pending-contacts.h:46
Helper container for safe management of handle lifetimes. Every handle in a ReferencedHandles contain...
Definition: referenced-handles.h:47
Definition: abstract-adaptor.cpp:31
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
The ContactFactory class is responsible for constructing Contact objects according to application-def...
Definition: contact-factory.h:44


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7