Home · Modules · All Classes · All Namespaces
Public Types | Signals | Public Member Functions | List of all members
Tp::StreamedMediaStream Class Reference

The StreamedMediaStream class represents a Telepathy streamed media stream. More...

#include <TelepathyQt/StreamedMediaStream>

Inherits Tp::Object, and Tp::ReadyObject.

Public Types

enum  SendingState { SendingStateNone, SendingStatePendingSend, SendingStateSending }
 

Signals

void localSendingStateChanged (Tp::StreamedMediaStream::SendingState localSendingState)
 
void remoteSendingStateChanged (Tp::StreamedMediaStream::SendingState remoteSendingState)
 
- Signals inherited from Tp::Object
void propertyChanged (const QString &propertyName)
 

Public Member Functions

 ~StreamedMediaStream ()
 
StreamedMediaChannelPtr channel () const
 
uint id () const
 
ContactPtr contact () const
 
MediaStreamState state () const
 
MediaStreamType type () const
 
SendingState localSendingState () const
 
SendingState remoteSendingState () const
 
bool sending () const
 
bool receiving () const
 
bool localSendingRequested () const
 
bool remoteSendingRequested () const
 
MediaStreamDirection direction () const
 
MediaStreamPendingSend pendingSend () const
 
PendingOperationrequestSending (bool send)
 
PendingOperationrequestReceiving (bool receive)
 
PendingOperationrequestDirection (MediaStreamDirection direction)
 
PendingOperationrequestDirection (bool send, bool receive)
 
PendingOperationstartDTMFTone (DTMFEvent event)
 
PendingOperationstopDTMFTone ()
 
- Public Member Functions inherited from Tp::Object
virtual ~Object ()
 
- Public Member Functions inherited from Tp::RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 

Additional Inherited Members

- Protected Member Functions inherited from Tp::Object
 Object ()
 
void notify (const char *propertyName)
 

Detailed Description

The StreamedMediaStream class represents a Telepathy streamed media stream.

Instances of this class cannot be constructed directly; the only way to get one is via StreamedMediaChannel.

Member Enumeration Documentation

◆ SendingState

Enumerator
SendingStateNone 
SendingStatePendingSend 
SendingStateSending 

Constructor & Destructor Documentation

◆ ~StreamedMediaStream()

Tp::StreamedMediaStream::~StreamedMediaStream ( )

Class destructor.

Member Function Documentation

◆ channel()

StreamedMediaChannelPtr Tp::StreamedMediaStream::channel ( ) const

Return the channel owning this media stream.

Returns
A pointer to the StreamedMediaChannel object.

◆ id()

uint Tp::StreamedMediaStream::id ( ) const

Return the id of this media stream.

Returns
An integer representing the media stream id.

◆ contact()

ContactPtr Tp::StreamedMediaStream::contact ( ) const

Return the contact who this media stream is with.

Returns
A pointer to the Contact object.

◆ state()

MediaStreamState Tp::StreamedMediaStream::state ( ) const

Return the state of this media stream.

Returns
The state as MediaStreamState.

◆ type()

MediaStreamType Tp::StreamedMediaStream::type ( ) const

Return the type of this media stream.

Returns
The type as MediaStreamType.

◆ localSendingState()

StreamedMediaStream::SendingState Tp::StreamedMediaStream::localSendingState ( ) const

Return the media stream local sending state.

Returns
The local sending state as StreamedMediaStream::SendingState.
See also
localSendingStateChanged()

◆ remoteSendingState()

StreamedMediaStream::SendingState Tp::StreamedMediaStream::remoteSendingState ( ) const

Return the media stream remote sending state.

Returns
The remote sending state as StreamedMediaStream::SendingState.
See also
remoteSendingStateChanged()

◆ sending()

bool Tp::StreamedMediaStream::sending ( ) const

Return whether media is being sent on this media stream.

Returns
true if media is being sent, false otherwise.
See also
localSendingStateChanged()

◆ receiving()

bool Tp::StreamedMediaStream::receiving ( ) const

Return whether media is being received on this media stream.

Returns
true if media is being received, false otherwise.
See also
remoteSendingStateChanged()

◆ localSendingRequested()

bool Tp::StreamedMediaStream::localSendingRequested ( ) const

Return whether the local user has been asked to send media by the remote user on this media stream.

Returns
true if the local user has been asked to send media by the remote user, false otherwise.
See also
localSendingStateChanged()

◆ remoteSendingRequested()

bool Tp::StreamedMediaStream::remoteSendingRequested ( ) const

Return whether the remote user has been asked to send media by the local user on this media stream.

Returns
true if the remote user has been asked to send media by the local user, false otherwise.
See also
remoteSendingStateChanged()

◆ direction()

MediaStreamDirection Tp::StreamedMediaStream::direction ( ) const

Return the direction of this media stream.

Returns
The direction as MediaStreamDirection.
See also
localSendingState(), remoteSendingState(), localSendingStateChanged(), remoteSendingStateChanged(), sending(), receiving()

◆ pendingSend()

MediaStreamPendingSend Tp::StreamedMediaStream::pendingSend ( ) const

Return the pending send flags of this media stream.

Returns
The pending send flags as MediaStreamPendingSend.
See also
localSendingStateChanged()

◆ requestSending()

PendingOperation * Tp::StreamedMediaStream::requestSending ( bool  send)

Request that media starts or stops being sent on this media stream.

Returns
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also
localSendingStateChanged(), requestDirection()

◆ requestReceiving()

PendingOperation * Tp::StreamedMediaStream::requestReceiving ( bool  receive)

Request that the remote contact stops or starts sending on this media stream.

Returns
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also
remoteSendingStateChanged(), requestDirection()

◆ requestDirection() [1/2]

PendingOperation * Tp::StreamedMediaStream::requestDirection ( MediaStreamDirection  direction)

Request a change in the direction of this media stream. In particular, this might be useful to stop sending media of a particular type, or inform the peer that you are no longer using media that is being sent to you.

Parameters
directionThe new direction.
Returns
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also
localSendingStateChanged(), remoteSendingStateChanged()

◆ requestDirection() [2/2]

PendingOperation * Tp::StreamedMediaStream::requestDirection ( bool  send,
bool  receive 
)

Request a change in the direction of this media stream.

In particular, this might be useful to stop sending media of a particular type, or inform the peer that you are no longer using media that is being sent to you.

Returns
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also
requestDirection(Tp::MediaStreamDirection direction), localSendingStateChanged(), remoteSendingStateChanged()

◆ startDTMFTone()

PendingOperation * Tp::StreamedMediaStream::startDTMFTone ( DTMFEvent  event)

Start sending a DTMF tone on this media stream.

Where possible, the tone will continue until stopDTMFTone() is called. On certain protocols, it may only be possible to send events with a predetermined length. In this case, the implementation may emit a fixed-length tone, and the stopDTMFTone() method call should return TP_QT_ERROR_NOT_AVAILABLE.

If the channel() does not support the TP_QT_IFACE_CHANNEL_INTERFACE_DTMF interface, the resulting PendingOperation will fail with error code TP_QT_ERROR_NOT_IMPLEMENTED.

Parameters
eventA numeric event code from the DTMFEvent enum.
Returns
A PendingOperation which will emit PendingOperation::finished when the request finishes.
See also
stopDTMFTone()

◆ stopDTMFTone()

PendingOperation * Tp::StreamedMediaStream::stopDTMFTone ( )

Stop sending any DTMF tone which has been started using the startDTMFTone() method.

If there is no current tone, the resulting PendingOperation will finish successfully.

If continuous tones are not supported by this media stream, the resulting PendingOperation will fail with error code TP_QT_ERROR_NOT_AVAILABLE.

If the channel() does not support the TP_QT_IFACE_CHANNEL_INTERFACE_DTMF interface, the resulting PendingOperation will fail with error code TP_QT_ERROR_NOT_IMPLEMENTED.

Returns
A PendingOperation which will emit PendingOperation::finished when the request finishes.
See also
startDTMFTone()

◆ localSendingStateChanged

void Tp::StreamedMediaStream::localSendingStateChanged ( Tp::StreamedMediaStream::SendingState  localSendingState)
signal

Emitted when the local sending state of this media stream changes.

Parameters
localSendingStateThe new local sending state of this media stream.
See also
localSendingState()

◆ remoteSendingStateChanged

void Tp::StreamedMediaStream::remoteSendingStateChanged ( Tp::StreamedMediaStream::SendingState  remoteSendingState)
signal