Liblinphone 5.3.0
Typedefs | Enumerations | Functions
Alert

Managing Alerts. More...

Typedefs

typedef void(* LinphoneCoreCbsOnAlertCb) (LinphoneCore *core, LinphoneAlert *alert)
 Callback for notifying about an alert (e.g on Qos) More...
 
typedef void(* LinphoneAlertCbsOnTerminatedCb) (LinphoneAlert *alert)
 Callback to know if an alert stops. More...
 
typedef struct _LinphoneAlert LinphoneAlert
 Object that represents an alert.
 
typedef struct _LinphoneAlertCbs LinphoneAlertCbs
 Object that represents a callback attached to an alert.
 
typedef enum _LinphoneAlertTypes LinphoneAlertType
 All kinds of alerts.
 

Enumerations

enum  _LinphoneAlertTypes {
  LinphoneAlertQoSCameraMisfunction ,
  LinphoneAlertQoSCameraLowFramerate ,
  LinphoneAlertQoSVideoStalled ,
  LinphoneAlertQoSHighLossLateRate ,
  LinphoneAlertQoSHighRemoteLossRate ,
  LinphoneAlertQoSBurstOccured ,
  LinphoneAlertQoSRetransmissionFailures ,
  LinphoneAlertQoSLowDownloadBandwidthEstimation ,
  LinphoneAlertQoSLowQualityReceivedVideo ,
  LinphoneAlertQoSLowQualitySentVideo ,
  LinphoneAlertQoSLowSignal ,
  LinphoneAlertQoSLostSignal
}
 All kinds of alerts. More...
 

Functions

void linphone_core_cbs_set_on_alert (LinphoneCoreCbs *cbs, LinphoneCoreCbsOnAlertCb alert_cb)
 Set the on alert callback. More...
 
LinphoneCoreCbsOnAlertCb linphone_core_cbs_get_on_alert (LinphoneCoreCbs *cbs)
 Get the on alert callback. More...
 
void linphone_core_enable_alerts (LinphoneCore *core, bool_t enable)
 
bool_t linphone_core_alerts_enabled (const LinphoneCore *core)
 
LinphoneAlertCbslinphone_alert_cbs_ref (LinphoneAlertCbs *cbs)
 Acquire a reference to the alert callbacks object. More...
 
void linphone_alert_cbs_unref (LinphoneAlertCbs *cbs)
 Release reference to the alert callbacks object. More...
 
void * linphone_alert_cbs_get_user_data (const LinphoneAlertCbs *cbs)
 Retrieve the user pointer associated with the alert callbacks object. More...
 
void linphone_alert_cbs_set_user_data (LinphoneAlertCbs *cbs, void *user_data)
 Assign a user pointer to the alert callbacks object. More...
 
void linphone_alert_cbs_set_on_terminated (LinphoneAlertCbs *cbs, LinphoneAlertCbsOnTerminatedCb on_terminated)
 Assign a callback for when the alert is terminated. More...
 
LinphoneAlertCbsOnTerminatedCb linphone_alert_cbs_get_on_terminated (LinphoneAlertCbs *cbs)
 Get the callback for when the alert is terminated. More...
 
LinphoneAlertlinphone_alert_clone (const LinphoneAlert *alert)
 Clone the given alert. More...
 
LinphoneAlertlinphone_alert_ref (LinphoneAlert *alert)
 Take a reference on a LinphoneAlert. More...
 
void linphone_alert_unref (LinphoneAlert *alert)
 Release a LinphoneAlert. More...
 
time_t linphone_alert_get_start_time (const LinphoneAlert *alert)
 Return the start time of the alert. More...
 
time_t linphone_alert_get_end_time (const LinphoneAlert *alert)
 Return the end time of the alert. More...
 
LinphoneAlertType linphone_alert_get_type (const LinphoneAlert *alert)
 Return the type of the alert. More...
 
const LinphoneDictionarylinphone_alert_get_informations (const LinphoneAlert *alert)
 Return more informations about the alerts. More...
 
LinphoneCalllinphone_alert_get_call (const LinphoneAlert *alert)
 Return the call from the alert. More...
 
bool_t linphone_alert_get_state (const LinphoneAlert *alert)
 Return the state of the alert. More...
 
void linphone_alert_add_callbacks (LinphoneAlert *alert, LinphoneAlertCbs *cbs)
 Add a listener in order to be notified of LinphoneAlert events. More...
 
LinphoneAlertCbslinphone_alert_get_current_callbacks (const LinphoneAlert *alert)
 Gets the current LinphoneAlertCbs. More...
 
const bctbx_list_t * linphone_alert_get_callbacks_list (const LinphoneAlert *alert)
 Gets the list of listener in the alert. More...
 
void linphone_alert_remove_callbacks (LinphoneAlert *alert, LinphoneAlertCbs *cbs)
 Removes a LinphoneAlertCbs object associated to the LinphoneAlert. More...
 
void linphone_alert_notify_on_terminated (LinphoneAlert *alert)
 Notify the alert if it is terminated. More...
 

Detailed Description

Managing Alerts.

Typedef Documentation

◆ LinphoneAlertCbsOnTerminatedCb

typedef void(* LinphoneAlertCbsOnTerminatedCb) (LinphoneAlert *alert)

Callback to know if an alert stops.

Parameters
alertthe alert that stops

◆ LinphoneCoreCbsOnAlertCb

typedef void(* LinphoneCoreCbsOnAlertCb) (LinphoneCore *core, LinphoneAlert *alert)

Callback for notifying about an alert (e.g on Qos)

Parameters
coreLinphoneCore object
alertLinphoneAlert to notify

Enumeration Type Documentation

◆ _LinphoneAlertTypes

All kinds of alerts.

Enumerator
LinphoneAlertQoSCameraMisfunction 

Camera is not working.

No other information

Note
Use the key "camera_misfunction_interval" in the section "alerts::camera" to set the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSCameraLowFramerate 

Camera is capturing low framerate.

Information supplied : float framerate;

Note
Use the key "low_framerate_interval" in the section "alerts::camera" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSVideoStalled 

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

No other information.

Note
Use the key "video_stalled_interval" in the section "alerts::camera" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSHighLossLateRate 

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

Information provided is:   - float loss_rate   - float late_rate   - string media_type {audio, video, text}

Note
Use the key "loss_rate_interval" in the section "alerts::network" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSHighRemoteLossRate 

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

Information provided: float loss_rate.

Note
Use the key "remote_loss_rate_interval" in the section "alerts::network" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSBurstOccured 

Packet Burst phenomenon.

Note
Use the key "burst_occured_interval" in the section "alerts::network" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSRetransmissionFailures 

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

Note
Use the key "nack_check_interval" in the section "alerts::network" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSLowDownloadBandwidthEstimation 

Low bandwidth detected.

Information provided: float bandwidth; in kbit/s.

Note
Use the key "download_bandwidth_interval" in the section "alerts::video" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSLowQualityReceivedVideo 

Low quality (bitrate) video received.

Information provided: float bitrate in kbit/s, int width, int height

Note
Use the key "low_quality_recieved_interval" in the section "alerts::video" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSLowQualitySentVideo 

Low quality video is being sent.

Information provided: float bitrate in kbit/s, int width, int height

Note
Use the key "quality_sent_interval" in the section "alerts::camera" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSLowSignal 

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

Note
Use the key "low_signal_interval" in the section "alerts::network" to set or get the interval at which the problem is checked in a LinphoneConfig.
LinphoneAlertQoSLostSignal 

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

Note
Use the key "lost_signal_interval" in the section "alerts::network" to set or get the interval at which the problem is checked in a LinphoneConfig.

Function Documentation

◆ linphone_alert_add_callbacks()

void linphone_alert_add_callbacks ( LinphoneAlert alert,
LinphoneAlertCbs cbs 
)

Add a listener in order to be notified of LinphoneAlert events.

Parameters
alertThe LinphoneAlert object to monitor.
cbsA LinphoneAlertCbs object holding the callbacks you need.

◆ linphone_alert_cbs_get_on_terminated()

LinphoneAlertCbsOnTerminatedCb linphone_alert_cbs_get_on_terminated ( LinphoneAlertCbs cbs)

Get the callback for when the alert is terminated.

Parameters
cbsThe LinphoneAlertCbs object.
Returns
The LinphoneAlertCbsOnTerminatedCb callback to execute.

◆ linphone_alert_cbs_get_user_data()

void * linphone_alert_cbs_get_user_data ( const LinphoneAlertCbs cbs)

Retrieve the user pointer associated with the alert callbacks object.

Parameters
cbsThe LinphoneAlertCbs object.
Returns
The user pointer associated with the alert callbacks object.

◆ linphone_alert_cbs_ref()

LinphoneAlertCbs * linphone_alert_cbs_ref ( LinphoneAlertCbs cbs)

Acquire a reference to the alert callbacks object.

Parameters
cbsThe LinphoneAlertCbs object.
Returns
The same alert callbacks object.

◆ linphone_alert_cbs_set_on_terminated()

void linphone_alert_cbs_set_on_terminated ( LinphoneAlertCbs cbs,
LinphoneAlertCbsOnTerminatedCb  on_terminated 
)

Assign a callback for when the alert is terminated.

Parameters
cbsThe LinphoneAlertCbs object.
on_terminatedThe LinphoneAlertCbsOnTerminatedCb callback to execute.

◆ linphone_alert_cbs_set_user_data()

void linphone_alert_cbs_set_user_data ( LinphoneAlertCbs cbs,
void *  user_data 
)

Assign a user pointer to the alert callbacks object.

Parameters
cbsThe LinphoneAlertCbs object.
user_dataThe user pointer to associate with the alert callbacks object.

◆ linphone_alert_cbs_unref()

void linphone_alert_cbs_unref ( LinphoneAlertCbs cbs)

Release reference to the alert callbacks object.

Parameters
cbsThe LinphoneAlertCbs object.

◆ linphone_alert_clone()

LinphoneAlert * linphone_alert_clone ( const LinphoneAlert alert)

Clone the given alert.

Parameters
alertThe given alert.
Returns
A new alert with exactly same informations that param.

◆ linphone_alert_get_call()

LinphoneCall * linphone_alert_get_call ( const LinphoneAlert alert)

Return the call from the alert.

Parameters
alertThe given alert.
Returns
A LinphoneCall from the alert.

◆ linphone_alert_get_callbacks_list()

const bctbx_list_t * linphone_alert_get_callbacks_list ( const LinphoneAlert alert)

Gets the list of listener in the alert.

Parameters
alertLinphoneAlert object.
Returns
The list of LinphoneAlertCbs.

◆ linphone_alert_get_current_callbacks()

LinphoneAlertCbs * linphone_alert_get_current_callbacks ( const LinphoneAlert alert)

Gets the current LinphoneAlertCbs.

This is meant only to be called from a callback to be able to get the user_data associated with the LinphoneAlertCbs that is calling the callback.

Parameters
alertThe LinphoneAlert object.
Returns
The LinphoneAlertCbs that has called the last callback.

◆ linphone_alert_get_end_time()

time_t linphone_alert_get_end_time ( const LinphoneAlert alert)

Return the end time of the alert.

Parameters
alertThe given alert.
Returns
the end time of the alert.

◆ linphone_alert_get_informations()

const LinphoneDictionary * linphone_alert_get_informations ( const LinphoneAlert alert)

Return more informations about the alerts.

Parameters
alertThe given alert.
Returns
A LinphoneDictionary containing informations about the current alert.

◆ linphone_alert_get_start_time()

time_t linphone_alert_get_start_time ( const LinphoneAlert alert)

Return the start time of the alert.

Parameters
alertThe given alert.
Returns
the start time of the alert.

◆ linphone_alert_get_state()

bool_t linphone_alert_get_state ( const LinphoneAlert alert)

Return the state of the alert.

Parameters
alertThe given alert.
Returns
true if and only if the alert is active.

◆ linphone_alert_get_type()

LinphoneAlertType linphone_alert_get_type ( const LinphoneAlert alert)

Return the type of the alert.

Parameters
alertThe given alert.
Returns
A LinphoneAlertType corresponding to the current alert.

◆ linphone_alert_notify_on_terminated()

void linphone_alert_notify_on_terminated ( LinphoneAlert alert)

Notify the alert if it is terminated.

Parameters
alertThe given alert.

◆ linphone_alert_ref()

LinphoneAlert * linphone_alert_ref ( LinphoneAlert alert)

Take a reference on a LinphoneAlert.

Parameters
alertThe LinphoneAlert object.
Returns
the same LinphoneAlert object.

◆ linphone_alert_remove_callbacks()

void linphone_alert_remove_callbacks ( LinphoneAlert alert,
LinphoneAlertCbs cbs 
)

Removes a LinphoneAlertCbs object associated to the LinphoneAlert.

Parameters
alertLinphoneAlert object
cbsThe LinphoneAlertCbs object to be removed from the LinphoneAlert.

◆ linphone_alert_unref()

void linphone_alert_unref ( LinphoneAlert alert)

Release a LinphoneAlert.

Parameters
alertThe LinphoneAlert object.

◆ linphone_core_cbs_get_on_alert()

LinphoneCoreCbsOnAlertCb linphone_core_cbs_get_on_alert ( LinphoneCoreCbs cbs)

Get the on alert callback.

Parameters
cbsLinphoneCoreCbs object.
Returns
The LinphoneCoreCbsOnAlertCb callback called.

◆ linphone_core_cbs_set_on_alert()

void linphone_core_cbs_set_on_alert ( LinphoneCoreCbs cbs,
LinphoneCoreCbsOnAlertCb  alert_cb 
)

Set the on alert callback.

Parameters
cbsLinphoneCoreCbs object.
alert_cbThe LinphoneCoreCbsOnAlertCb callback to call.