Home · All Classes · All Namespaces · Modules · Functions · Files
call-stream.h
00001 
00023 #ifndef _TelepathyQt_call_stream_h_HEADER_GUARD_
00024 #define _TelepathyQt_call_stream_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TP_QT_HEADER
00027 #error IN_TP_QT_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt/_gen/cli-call-stream.h>
00031 
00032 #include <TelepathyQt/Constants>
00033 #include <TelepathyQt/DBusProxy>
00034 #include <TelepathyQt/OptionalInterfaceFactory>
00035 #include <TelepathyQt/PendingOperation>
00036 #include <TelepathyQt/Types>
00037 #include <TelepathyQt/SharedPtr>
00038 
00039 namespace Tp
00040 {
00041 
00042 typedef QList<CallStreamPtr> CallStreams;
00043 
00044 class TP_QT_EXPORT CallStream : public StatefulDBusProxy,
00045                     public OptionalInterfaceFactory<CallStream>
00046 {
00047     Q_OBJECT
00048     Q_DISABLE_COPY(CallStream)
00049 
00050 public:
00051     ~CallStream();
00052 
00053     CallContentPtr content() const;
00054 
00055     Contacts remoteMembers() const;
00056     bool canRequestReceiving() const;
00057 
00058     SendingState localSendingState() const;
00059     SendingState remoteSendingState(const ContactPtr &contact) const;
00060 
00061     PendingOperation *requestSending(bool send);
00062     PendingOperation *requestReceiving(const ContactPtr &contact, bool receive);
00063 
00064 Q_SIGNALS:
00065     void localSendingStateChanged(Tp::SendingState localSendingState,
00066             const Tp::CallStateReason &reason);
00067     void remoteSendingStateChanged(
00068             const QHash<Tp::ContactPtr, Tp::SendingState> &remoteSendingStates,
00069             const Tp::CallStateReason &reason);
00070     void remoteMembersRemoved(const Tp::Contacts &remoteMembers,
00071             const Tp::CallStateReason &reason);
00072 
00073 private Q_SLOTS:
00074     TP_QT_NO_EXPORT void gotMainProperties(Tp::PendingOperation *op);
00075     TP_QT_NO_EXPORT void gotRemoteMembersContacts(Tp::PendingOperation *op);
00076 
00077     TP_QT_NO_EXPORT void onRemoteMembersChanged(const Tp::ContactSendingStateMap &updates,
00078             const Tp::HandleIdentifierMap &identifiers,
00079             const Tp::UIntList &removed,
00080             const Tp::CallStateReason &reason);
00081     TP_QT_NO_EXPORT void onLocalSendingStateChanged(uint, const Tp::CallStateReason &reason);
00082 
00083 private:
00084     friend class CallChannel;
00085     friend class CallContent;
00086 
00087     TP_QT_NO_EXPORT static const Feature FeatureCore;
00088 
00089     TP_QT_NO_EXPORT CallStream(const CallContentPtr &content, const QDBusObjectPath &streamPath);
00090 
00091     struct Private;
00092     friend struct Private;
00093     Private *mPriv;
00094 };
00095 
00096 } // Tp
00097 
00098 #endif


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