Liblinphone
5.3.0
|
Managing Alerts. More...
Typedefs | |
typedef void(* | LinphoneCoreCbsNewAlertTriggeredCb) (LinphoneCore *core, LinphoneAlert *alert) |
Callback for notifying about an alert (e.g on Qos) More... | |
typedef void(* | LinphoneAlertCbsTerminatedCb) (LinphoneAlert *alert) |
Callback to know if an alert stops. More... | |
typedef struct _LinphoneAlert | LinphoneAlert |
Object that represents an alert. More... | |
typedef struct _LinphoneAlertCbs | LinphoneAlertCbs |
Object that represents a callback attached to an alert. | |
typedef struct _LinphoneSignalInformation | LinphoneSignalInformation |
Object to get signal (wifi/4G etc...) informations. | |
typedef enum _LinphoneAlertTypes | LinphoneAlertType |
All kinds of alerts. | |
Managing Alerts.
typedef struct _LinphoneAlert LinphoneAlert |
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 LinphoneAlertType enum. An application is notified of new alerts through the LinphoneCoreCbs interface. Once raised, the application may use the LinphoneAlertCbs interface to get notified when the alert stops. For each kind of alert, a LinphoneDictionary is filled with relevant informations, returned by linphone_alert_get_informations(). The keys available are documented per-type in LinphoneAlertType enum.
typedef void(* LinphoneAlertCbsTerminatedCb) (LinphoneAlert *alert) |
Callback to know if an alert stops.
alert | the alert that stops |
typedef void(* LinphoneCoreCbsNewAlertTriggeredCb) (LinphoneCore *core, LinphoneAlert *alert) |
Callback for notifying about an alert (e.g on Qos)
core | LinphoneCore object |
alert | LinphoneAlert to notify |
enum _LinphoneAlertTypes |
All kinds of alerts.
Enumerator | |
---|---|
LinphoneAlertQoSCameraMisfunction | Camera is not working. No other information
|
LinphoneAlertQoSCameraLowFramerate | Camera is capturing low framerate. Information supplied : float framerate;
|
LinphoneAlertQoSVideoStalled | Video decoding has stopped for a given period (10 s by default). No other information.
|
LinphoneAlertQoSHighLossLateRate | A received media stream suffers from high loss or late rate. Information provided is:
|
LinphoneAlertQoSHighRemoteLossRate | A report of high loss rate is received from remote party. Information provided: loss-rate (float).
|
LinphoneAlertQoSBurstOccured | Packet Burst phenomenon.
|
LinphoneAlertQoSRetransmissionFailures | Loss rate is significant but retransmissions fail to arrive on time. Information provided: nack-performance (float) the fraction of lost packets recovered thanks to nack-triggered retransmissions.
|
LinphoneAlertQoSLowDownloadBandwidthEstimation | Low bandwidth detected. Information provided: bandwidth (float) in kbit/s.
|
LinphoneAlertQoSLowQualityReceivedVideo | Low quality (bitrate) video received. Information provided: bitrate (float) in kbit/s, width (integer), int height (integer).
|
LinphoneAlertQoSLowQualitySentVideo | Low quality video is being sent. Information provided: bitrate (float)in kbit/s, width (integer), height (integer).
|
LinphoneAlertQoSLowSignal | The operating system reports a low radio signal (wifi or mobile)
|
LinphoneAlertQoSLostSignal | The operating system reports a loss of radio signal (wifi or mobile). Information provided: rssi-value (float), signal-type (string) with values {"wifi", "mobile", "other"}.
|
void linphone_alert_add_callbacks | ( | LinphoneAlert * | alert, |
LinphoneAlertCbs * | cbs | ||
) |
Add a listener in order to be notified of LinphoneAlert events.
alert | The LinphoneAlert object to monitor. |
cbs | A LinphoneAlertCbs object holding the callbacks you need. |
LinphoneAlertCbsTerminatedCb linphone_alert_cbs_get_terminated | ( | LinphoneAlertCbs * | cbs | ) |
Get the callback for when the alert is terminated.
cbs | The LinphoneAlertCbs object. |
void* linphone_alert_cbs_get_user_data | ( | const LinphoneAlertCbs * | cbs | ) |
Retrieve the user pointer associated with the alert callbacks object.
cbs | The LinphoneAlertCbs object. |
LinphoneAlertCbs* linphone_alert_cbs_ref | ( | LinphoneAlertCbs * | cbs | ) |
Acquire a reference to the alert callbacks object.
cbs | The LinphoneAlertCbs object. |
void linphone_alert_cbs_set_terminated | ( | LinphoneAlertCbs * | cbs, |
LinphoneAlertCbsTerminatedCb | terminated | ||
) |
Assign a callback for when the alert is terminated.
cbs | The LinphoneAlertCbs object. |
on_terminated | The #LinphoneAlertCbsOnTerminatedCb callback to execute. |
void linphone_alert_cbs_set_user_data | ( | LinphoneAlertCbs * | cbs, |
void * | user_data | ||
) |
Assign a user pointer to the alert callbacks object.
cbs | The LinphoneAlertCbs object. |
user_data | The user pointer to associate with the alert callbacks object. |
void linphone_alert_cbs_unref | ( | LinphoneAlertCbs * | cbs | ) |
Release reference to the alert callbacks object.
cbs | The LinphoneAlertCbs object. |
LinphoneAlert* linphone_alert_clone | ( | const LinphoneAlert * | alert | ) |
Clone the given alert.
alert | The given alert. |
LinphoneCall* linphone_alert_get_call | ( | const LinphoneAlert * | alert | ) |
Return the call from the alert.
alert | The given alert. |
const bctbx_list_t* linphone_alert_get_callbacks_list | ( | const LinphoneAlert * | alert | ) |
Gets the list of listener in the alert.
alert | LinphoneAlert object. |
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.
alert | The LinphoneAlert object. |
time_t linphone_alert_get_end_time | ( | const LinphoneAlert * | alert | ) |
Return the end time of the alert.
alert | The given alert. |
const LinphoneDictionary* linphone_alert_get_informations | ( | const LinphoneAlert * | alert | ) |
Return more informations about the alerts.
alert | The given alert. |
time_t linphone_alert_get_start_time | ( | const LinphoneAlert * | alert | ) |
Return the start time of the alert.
alert | The given alert. |
bool_t linphone_alert_get_state | ( | const LinphoneAlert * | alert | ) |
Return the state of the alert.
alert | The given alert. |
LinphoneAlertType linphone_alert_get_type | ( | const LinphoneAlert * | alert | ) |
Return the type of the alert.
alert | The given alert. |
void linphone_alert_notify_on_terminated | ( | LinphoneAlert * | alert | ) |
Notify the alert if it is terminated.
alert | The given alert. |
LinphoneAlert* linphone_alert_ref | ( | LinphoneAlert * | alert | ) |
Take a reference on a LinphoneAlert.
alert | The LinphoneAlert object. |
void linphone_alert_remove_callbacks | ( | LinphoneAlert * | alert, |
LinphoneAlertCbs * | cbs | ||
) |
Removes a LinphoneAlertCbs object associated to the LinphoneAlert.
alert | LinphoneAlert object |
cbs | The LinphoneAlertCbs object to be removed from the LinphoneAlert. |
const char* linphone_alert_type_to_string | ( | LinphoneAlertType | type | ) |
void linphone_alert_unref | ( | LinphoneAlert * | alert | ) |
Release a LinphoneAlert.
alert | The LinphoneAlert object. |
bool_t linphone_core_alerts_enabled | ( | const LinphoneCore * | core | ) |
Returns whether alert reporting is enabled.
See LinphoneAlert for more details.
core | the LinphoneCore . |
LinphoneCoreCbsNewAlertTriggeredCb linphone_core_cbs_get_new_alert_triggered | ( | LinphoneCoreCbs * | cbs | ) |
Get the on alert callback.
cbs | LinphoneCoreCbs object. |
void linphone_core_cbs_set_new_alert_triggered | ( | LinphoneCoreCbs * | cbs, |
LinphoneCoreCbsNewAlertTriggeredCb | alert_cb | ||
) |
Set the on alert callback.
cbs | LinphoneCoreCbs object. |
alert_cb | The #LinphoneCoreCbsOnAlertCb callback to call. |
void linphone_core_enable_alerts | ( | LinphoneCore * | core, |
bool_t | enable | ||
) |
Enable alerts.
See LinphoneAlert for more details.
core | the LinphoneCore . |
enable | whether alert reporting is enabled or not. |