Home · All Classes · All Namespaces · Modules · Functions · Files
call-content.h
1 
23 #ifndef _TelepathyQt_call_content_h_HEADER_GUARD_
24 #define _TelepathyQt_call_content_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/_gen/cli-call-content.h>
31 
32 #include <TelepathyQt/CallStream>
33 
34 namespace Tp
35 {
36 
37 typedef QList<CallContentPtr> CallContents;
38 
39 class TP_QT_EXPORT CallContent : public StatefulDBusProxy,
40  public OptionalInterfaceFactory<CallContent>
41 {
42  Q_OBJECT
43  Q_DISABLE_COPY(CallContent)
44 
45 public:
46  ~CallContent();
47 
48  CallChannelPtr channel() const;
49 
50  QString name() const;
51  MediaStreamType type() const;
52  CallContentDisposition disposition() const;
53  CallStreams streams() const;
54 
55  PendingOperation *remove();
56 
57  bool supportsDTMF() const;
58  PendingOperation *startDTMFTone(DTMFEvent event);
59  PendingOperation *stopDTMFTone();
60 
61 Q_SIGNALS:
62  void streamAdded(const Tp::CallStreamPtr &stream);
63  void streamRemoved(const Tp::CallStreamPtr &stream, const Tp::CallStateReason &reason);
64 
65 private Q_SLOTS:
66  TP_QT_NO_EXPORT void gotMainProperties(Tp::PendingOperation *op);
67  TP_QT_NO_EXPORT void onStreamsAdded(const Tp::ObjectPathList &streamPath);
68  TP_QT_NO_EXPORT void onStreamsRemoved(const Tp::ObjectPathList &streamPath,
69  const Tp::CallStateReason &reason);
70  TP_QT_NO_EXPORT void onStreamReady(Tp::PendingOperation *op);
71 
72 private:
73  friend class CallChannel;
74  friend class PendingCallContent;
75 
76  TP_QT_NO_EXPORT static const Feature FeatureCore;
77 
78  TP_QT_NO_EXPORT CallContent(const CallChannelPtr &channel,
79  const QDBusObjectPath &contentPath);
80 
81  struct Private;
82  friend struct Private;
83  Private *mPriv;
84 };
85 
86 class TP_QT_EXPORT PendingCallContent : public PendingOperation
87 {
88  Q_OBJECT
89  Q_DISABLE_COPY(PendingCallContent)
90 
91 public:
93 
94  CallContentPtr content() const;
95 
96 private Q_SLOTS:
97  TP_QT_NO_EXPORT void gotContent(QDBusPendingCallWatcher *watcher);
98 
99  TP_QT_NO_EXPORT void onContentReady(Tp::PendingOperation *op);
100  TP_QT_NO_EXPORT void onContentRemoved(const Tp::CallContentPtr &content);
101 
102 private:
103  friend class CallChannel;
104 
105  TP_QT_NO_EXPORT PendingCallContent(const CallChannelPtr &channel,
106  const QString &contentName, MediaStreamType type, MediaStreamDirection direction);
107 
108  struct Private;
109  friend struct Private;
110  Private *mPriv;
111 };
112 
113 } // Tp
114 
115 #endif
MediaStreamDirection
Definition: build/TelepathyQt/_gen/constants.h:2777
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
DTMFEvent
Definition: build/TelepathyQt/_gen/constants.h:3121
Definition: build/TelepathyQt/_gen/types.h:84
The CallContent class provides an object representing a Telepathy Call.Content.
Definition: call-content.h:39
QList< CallContentPtr > CallContents
Definition: call-content.h:37
MediaStreamType
Definition: build/TelepathyQt/_gen/constants.h:2716
QList< CallStreamPtr > CallStreams
Definition: call-stream.h:42
The StatefulDBusProxy class is a base class representing a remote object whose API is stateful...
Definition: dbus-proxy.h:96
The CallChannel class provides an object representing a Telepathy channel of type Call...
Definition: call-channel.h:35
Definition: build/TelepathyQt/_gen/types.h:329
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
CallContentDisposition
Definition: build/TelepathyQt/_gen/constants.h:4241
Definition: abstract-adaptor.cpp:31
Definition: call-content.h:86
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41


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