Home · All Classes · All Namespaces · Modules · Functions · Files
call-content.h
00001 
00023 #ifndef _TelepathyQt_call_content_h_HEADER_GUARD_
00024 #define _TelepathyQt_call_content_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-content.h>
00031 
00032 #include <TelepathyQt/CallStream>
00033 
00034 namespace Tp
00035 {
00036 
00037 typedef QList<CallContentPtr> CallContents;
00038 
00039 class TP_QT_EXPORT CallContent : public StatefulDBusProxy,
00040                     public OptionalInterfaceFactory<CallContent>
00041 {
00042     Q_OBJECT
00043     Q_DISABLE_COPY(CallContent)
00044 
00045 public:
00046     ~CallContent();
00047 
00048     CallChannelPtr channel() const;
00049 
00050     QString name() const;
00051     MediaStreamType type() const;
00052     CallContentDisposition disposition() const;
00053     CallStreams streams() const;
00054 
00055     PendingOperation *remove();
00056 
00057     bool supportsDTMF() const;
00058     PendingOperation *startDTMFTone(DTMFEvent event);
00059     PendingOperation *stopDTMFTone();
00060 
00061 Q_SIGNALS:
00062     void streamAdded(const Tp::CallStreamPtr &stream);
00063     void streamRemoved(const Tp::CallStreamPtr &stream, const Tp::CallStateReason &reason);
00064 
00065 private Q_SLOTS:
00066     TP_QT_NO_EXPORT void gotMainProperties(Tp::PendingOperation *op);
00067     TP_QT_NO_EXPORT void onStreamsAdded(const Tp::ObjectPathList &streamPath);
00068     TP_QT_NO_EXPORT void onStreamsRemoved(const Tp::ObjectPathList &streamPath,
00069             const Tp::CallStateReason &reason);
00070     TP_QT_NO_EXPORT void onStreamReady(Tp::PendingOperation *op);
00071 
00072 private:
00073     friend class CallChannel;
00074     friend class PendingCallContent;
00075 
00076     TP_QT_NO_EXPORT static const Feature FeatureCore;
00077 
00078     TP_QT_NO_EXPORT CallContent(const CallChannelPtr &channel,
00079             const QDBusObjectPath &contentPath);
00080 
00081     struct Private;
00082     friend struct Private;
00083     Private *mPriv;
00084 };
00085 
00086 class TP_QT_EXPORT PendingCallContent : public PendingOperation
00087 {
00088     Q_OBJECT
00089     Q_DISABLE_COPY(PendingCallContent)
00090 
00091 public:
00092     ~PendingCallContent();
00093 
00094     CallContentPtr content() const;
00095 
00096 private Q_SLOTS:
00097     TP_QT_NO_EXPORT void gotContent(QDBusPendingCallWatcher *watcher);
00098 
00099     TP_QT_NO_EXPORT void onContentReady(Tp::PendingOperation *op);
00100     TP_QT_NO_EXPORT void onContentRemoved(const Tp::CallContentPtr &content);
00101 
00102 private:
00103     friend class CallChannel;
00104 
00105     TP_QT_NO_EXPORT PendingCallContent(const CallChannelPtr &channel,
00106             const QString &contentName, MediaStreamType type, MediaStreamDirection direction);
00107 
00108     struct Private;
00109     friend struct Private;
00110     Private *mPriv;
00111 };
00112 
00113 } // Tp
00114 
00115 #endif


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