Liblinphone  5.3.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
linphone::Alert Class Reference

Object that represents an alert. More...

#include <alert.hh>

Inheritance diagram for linphone::Alert:

Public Types

enum  Type {
  Type::QoSCameraMisfunction,
  Type::QoSCameraLowFramerate,
  Type::QoSVideoStalled,
  Type::QoSHighLossLateRate,
  Type::QoSHighRemoteLossRate,
  Type::QoSBurstOccured,
  Type::QoSRetransmissionFailures,
  Type::QoSLowDownloadBandwidthEstimation,
  Type::QoSLowQualityReceivedVideo,
  Type::QoSLowQualitySentVideo,
  Type::QoSLowSignal,
  Type::QoSLostSignal
}
 All kinds of alerts. More...
 

Public Member Functions

LINPHONECXX_PUBLIC Alert (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneAlert * cPtr ()
 
LINPHONECXX_PUBLIC void addListener (const std::shared_ptr< AlertListener > &listener)
 Add an application listener to the Alert instance. More...
 
LINPHONECXX_PUBLIC void removeListener (const std::shared_ptr< AlertListener > &listener)
 Remove a previously added listener from the Alert instance. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CallgetCall () const
 Return the call from the alert. More...
 
LINPHONECXX_PUBLIC time_t getEndTime () const
 Return the end time of the alert. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::DictionarygetInformations () const
 Return more informations about the alerts. More...
 
LINPHONECXX_PUBLIC time_t getStartTime () const
 Return the start time of the alert. More...
 
LINPHONECXX_PUBLIC bool getState () const
 Return the state of the alert. More...
 
LINPHONECXX_PUBLIC Type getType () const
 Return the type of the alert. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Alertclone () const
 Clone the given alert. More...
 
LINPHONECXX_PUBLIC void notifyOnTerminated ()
 Notify the alert if it is terminated.
 

Static Public Member Functions

static LINPHONECXX_PUBLIC std::string typeToString (Type type)
 Provide a string describing the alert type. More...
 

Detailed Description

Object that represents an alert.

Alerts are raised at run-time when particular conditions are met, for example bad network quality. The full list of available alert types is described by the Type enum. An application is notified of new alerts through the CoreListener interface. Once raised, the application may use the AlertListener interface to get notified when the alert stops. For each kind of alert, a Dictionary is filled with relevant informations, returned by getInformations(). The keys available are documented per-type in Type enum.

Member Enumeration Documentation

◆ Type

enum linphone::Alert::Type
strong

All kinds of alerts.

Enumerator
QoSCameraMisfunction 

Camera is not working.

QoSCameraLowFramerate 

Camera is capturing low framerate.

QoSVideoStalled 

Video decoding has stopped for a given period (10 s by default).

QoSHighLossLateRate 

A received media stream suffers from high loss or late rate.

QoSHighRemoteLossRate 

A report of high loss rate is received from remote party.

QoSBurstOccured 

Packet Burst phenomenon.

QoSRetransmissionFailures 

Loss rate is significant but retransmissions fail to arrive on time.

QoSLowDownloadBandwidthEstimation 

Low bandwidth detected.

QoSLowQualityReceivedVideo 

Low quality (bitrate) video received.

QoSLowQualitySentVideo 

Low quality video is being sent.

QoSLowSignal 

The operating system reports a low radio signal (wifi or mobile)

QoSLostSignal 

The operating system reports a loss of radio signal (wifi or mobile).

Member Function Documentation

◆ addListener()

LINPHONECXX_PUBLIC void linphone::Alert::addListener ( const std::shared_ptr< AlertListener > &  listener)

Add an application listener to the Alert instance.

Parameters
listenerthe application listener

◆ clone()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::Alert> linphone::Alert::clone ( ) const

Clone the given alert.

Returns
A new alert with exactly same informations that param.

◆ getCall()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::Call> linphone::Alert::getCall ( ) const

Return the call from the alert.

Returns
A Call from the alert.

◆ getEndTime()

LINPHONECXX_PUBLIC time_t linphone::Alert::getEndTime ( ) const

Return the end time of the alert.

Returns
the end time of the alert.

◆ getInformations()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Dictionary> linphone::Alert::getInformations ( ) const

Return more informations about the alerts.

Returns
A Dictionary containing informations about the current alert.

◆ getStartTime()

LINPHONECXX_PUBLIC time_t linphone::Alert::getStartTime ( ) const

Return the start time of the alert.

Returns
the start time of the alert.

◆ getState()

LINPHONECXX_PUBLIC bool linphone::Alert::getState ( ) const

Return the state of the alert.

Returns
true if and only if the alert is active.

◆ getType()

LINPHONECXX_PUBLIC Type linphone::Alert::getType ( ) const

Return the type of the alert.

Returns
A Type corresponding to the current alert.

◆ removeListener()

LINPHONECXX_PUBLIC void linphone::Alert::removeListener ( const std::shared_ptr< AlertListener > &  listener)

Remove a previously added listener from the Alert instance.

Parameters
listenerthe application listener

◆ typeToString()

static LINPHONECXX_PUBLIC std::string linphone::Alert::typeToString ( Type  type)
static

Provide a string describing the alert type.

Parameters
typethe Type
Returns
a string

The documentation for this class was generated from the following file: