Home · Modules · All Classes · All Namespaces
call-stream.h
1 
23 #ifndef _TelepathyQt_call_stream_h_HEADER_GUARD_
24 #define _TelepathyQt_call_stream_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-stream.h>
31 
32 #include <TelepathyQt/Constants>
33 #include <TelepathyQt/DBusProxy>
34 #include <TelepathyQt/OptionalInterfaceFactory>
35 #include <TelepathyQt/PendingOperation>
36 #include <TelepathyQt/Types>
37 #include <TelepathyQt/SharedPtr>
38 
39 namespace Tp
40 {
41 
42 typedef QList<CallStreamPtr> CallStreams;
43 
44 class TP_QT_EXPORT CallStream : public StatefulDBusProxy,
45  public OptionalInterfaceFactory<CallStream>
46 {
47  Q_OBJECT
48  Q_DISABLE_COPY(CallStream)
49 
50 public:
51  ~CallStream();
52 
53  CallContentPtr content() const;
54 
55  Contacts remoteMembers() const;
56  bool canRequestReceiving() const;
57 
58  SendingState localSendingState() const;
59  SendingState remoteSendingState(const ContactPtr &contact) const;
60 
61  PendingOperation *requestSending(bool send);
62  PendingOperation *requestReceiving(const ContactPtr &contact, bool receive);
63 
64 Q_SIGNALS:
65  void localSendingStateChanged(Tp::SendingState localSendingState,
66  const Tp::CallStateReason &reason);
67  void remoteSendingStateChanged(
68  const QHash<Tp::ContactPtr, Tp::SendingState> &remoteSendingStates,
69  const Tp::CallStateReason &reason);
70  void remoteMembersRemoved(const Tp::Contacts &remoteMembers,
71  const Tp::CallStateReason &reason);
72 
73 private Q_SLOTS:
74  TP_QT_NO_EXPORT void gotMainProperties(Tp::PendingOperation *op);
75  TP_QT_NO_EXPORT void gotRemoteMembersContacts(Tp::PendingOperation *op);
76 
77  TP_QT_NO_EXPORT void onRemoteMembersChanged(const Tp::ContactSendingStateMap &updates,
78  const Tp::HandleIdentifierMap &identifiers,
79  const Tp::UIntList &removed,
80  const Tp::CallStateReason &reason);
81  TP_QT_NO_EXPORT void onLocalSendingStateChanged(uint, const Tp::CallStateReason &reason);
82 
83 private:
84  friend class CallChannel;
85  friend class CallContent;
86 
87  TP_QT_NO_EXPORT static const Feature FeatureCore;
88 
89  TP_QT_NO_EXPORT CallStream(const CallContentPtr &content, const QDBusObjectPath &streamPath);
90 
91  struct Private;
92  friend struct Private;
93  Private *mPriv;
94 };
95 
96 } // Tp
97 
98 #endif
The StatefulDBusProxy class is a base class representing a remote object whose API is stateful.
Definition: dbus-proxy.h:96
Definition: build/TelepathyQt/_gen/types.h:109
QList< CallStreamPtr > CallStreams
Definition: call-stream.h:42
Definition: build/TelepathyQt/_gen/types.h:1313
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
The CallStream class provides an object representing a Telepathy Call.Stream.
Definition: call-stream.h:44
Definition: build/TelepathyQt/_gen/types.h:336
The OptionalInterfaceFactory class is a helper class for high-level D-Bus proxy classes willing to of...
Definition: optional-interface-factory.h:65
The CallContent class provides an object representing a Telepathy Call.Content.
Definition: call-content.h:39
The CallChannel class provides an object representing a Telepathy channel of type Call.
Definition: call-channel.h:35
Definition: build/TelepathyQt/_gen/types.h:1677
Definition: abstract-adaptor.cpp:31
SendingState
Definition: build/TelepathyQt/_gen/constants.h:4529
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45