Liblinphone: linphone::Alert Class Reference

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 class | Type { QoSCameraMisfunction , QoSCameraLowFramerate , QoSVideoStalled , QoSHighLossLateRate , QoSHighRemoteLossRate , QoSBurstOccured , QoSRetransmissionFailures , QoSLowDownloadBandwidthEstimation , QoSLowQualityReceivedVideo , QoSLowQualitySentVideo , QoSLowSignal , 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.
LINPHONECXX_PUBLIC void | removeListener (const std::shared_ptr< AlertListener > &listener)
| Remove a previously added listener from the Alert instance.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Call > | getCall () const
| Return the call from the alert.
LINPHONECXX_PUBLIC time_t | getEndTime () const
| Return the end time of the alert.
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Dictionary > | getInformations () const
| Return more informations about the alerts.
LINPHONECXX_PUBLIC time_t | getStartTime () const
| Return the start time of the alert.
LINPHONECXX_PUBLIC bool | getState () const
| Return the state of the alert.
LINPHONECXX_PUBLIC Type | getType () const
| Return the type of the alert.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Alert > | clone () const
| Clone the given alert.
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.

## 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 class 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

  listener | the 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

  listener | the application listener

## ◆ typeToString()

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

Provide a string describing the alert type.

Parameters

  type | the Type

Returns
  a string

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

- alert.hh