/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of Liblinphone.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#ifndef LINPHONECORE_H
#define LINPHONECORE_H
#include "ortp/ortp.h"
#include "ortp/payloadtype.h"
#include "mediastreamer2/mscommon.h"
#include "mediastreamer2/msvideo.h"
#include "mediastreamer2/mediastream.h"
#include "mediastreamer2/bitratecontrol.h"
#include "linphone/defs.h"
#include "linphone/types.h"
#include "linphone/callbacks.h"
#include "linphone/sipsetup.h"
#include "linphone/account_creator.h"
#include "linphone/account_creator_service.h"
#include "linphone/buffer.h"
#include "linphone/call.h"
#include "linphone/call_log.h"
#include "linphone/call_params.h"
#include "linphone/call_stats.h"
#include "linphone/chat.h"
#include "linphone/conference.h"
#include "linphone/dictionary.h"
#include "linphone/error_info.h"
#include "linphone/event.h"
#include "linphone/factory.h"
#include "linphone/friend.h"
#include "linphone/friendlist.h"
#include "linphone/im_encryption_engine.h"
#include "linphone/im_notif_policy.h"
#include "linphone/info_message.h"
#include "linphone/logging.h"
#include "linphone/lpconfig.h"
#include "linphone/misc.h"
#include "linphone/nat_policy.h"
#include "linphone/payload_type.h"
#include "linphone/player.h"
#include "linphone/presence.h"
#include "linphone/proxy_config.h"
#include "linphone/ringtoneplayer.h"
#include "linphone/vcard.h"
#include "linphone/video_definition.h"
#include "linphone/xmlrpc.h"
#include "linphone/headers.h"
// For migration purpose.
#include "linphone/api/c-api.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Safely down-cast a belle_sip_object_t into #LinphoneCore
* @ingroup initializing
*/
#define LINPHONE_CORE(object) BELLE_SIP_CAST(object, LinphoneCore)
/**
* Create a #LinphoneAddress object by parsing the user supplied address, given as a string.
* @param core #LinphoneCore object @maybenil
* @param address String containing the user supplied address @maybenil
* @return The create #LinphoneAddress object @maybenil
* @ingroup linphone_address
*/
LINPHONE_PUBLIC LinphoneAddress * linphone_core_create_address(LinphoneCore *core, const char *address);
/**
* @addtogroup misc
* @{
*/
/**
* Create an independent media file player.
* This player support WAVE and MATROSKA formats.
* @param core A #LinphoneCore object @notnil
* @param sound_card_name Playback sound card. If NULL, the ringer sound card set in #LinphoneCore will be used @maybenil
* @param video_display_name Video display. If NULL, the video display set in #LinphoneCore will be used @maybenil
* @param window_id Id of the drawing window. Depend of video out @maybenil
* @return A pointer on the new instance. NULL if failed. @maybenil
*/
LINPHONE_PUBLIC LinphonePlayer *linphone_core_create_local_player(LinphoneCore *core, const char *sound_card_name, const char *video_display_name, void *window_id);
/**
* Creates an empty info message.
* @param core the #LinphoneCore @maybenil
* @return a new LinphoneInfoMessage. @notnil
*
* The info message can later be filled with information using linphone_info_message_add_header() or linphone_info_message_set_content(),
* and finally sent with linphone_core_send_info_message().
**/
LINPHONE_PUBLIC LinphoneInfoMessage *linphone_core_create_info_message(LinphoneCore *core);
/**
* Create a #LinphoneMagicSearch object.
* @param core #LinphoneCore object @notnil
* @return The created #LinphoneMagicSearch object @notnil
*/
LINPHONE_PUBLIC LinphoneMagicSearch *linphone_core_create_magic_search(LinphoneCore *core);
/**
* Checks if a new version of the application is available.
* @param core #LinphoneCore object @notnil
* @param current_version The current version of the application @notnil
*/
LINPHONE_PUBLIC void linphone_core_check_for_update(LinphoneCore *core, const char *current_version);
/**
* Return the global unread chat message count.
* @param core #LinphoneCore object. @notnil
* @return The global unread chat message count.
*/
LINPHONE_PUBLIC int linphone_core_get_unread_chat_message_count (const LinphoneCore *core);
/**
* Return the unread chat message count for a given local address.
* @param core #LinphoneCore object. @notnil
* @param address #LinphoneAddress object. @notnil
* @return The unread chat message count.
*/
LINPHONE_PUBLIC int linphone_core_get_unread_chat_message_count_from_local (
const LinphoneCore *core,
const LinphoneAddress *address
);
/**
* Return the unread chat message count for all active local address. (Primary contact + proxy configs.)
* @param core #LinphoneCore object. @notnil
* @return The unread chat message count.
*/
LINPHONE_PUBLIC int linphone_core_get_unread_chat_message_count_from_active_locals (const LinphoneCore *core);
/**
* @}
*/
/**
* Get the remote address of the current call.
* @param core #LinphoneCore object. @notnil
* @return The remote address of the current call or NULL if there is no current call. @maybenil
* @ingroup call_control
*/
LINPHONE_PUBLIC const LinphoneAddress * linphone_core_get_current_call_remote_address(LinphoneCore *core);
/**
* @addtogroup initializing
* @{
**/
/**
* Callback prototype
*/
typedef void (*LinphoneCoreCbFunc)(LinphoneCore *core,void * user_data);
/**
* This structure holds all callbacks that the application should implement.
* None is mandatory.
* @donotwrap
**/
typedef struct _LinphoneCoreVTable{
LinphoneCoreGlobalStateChangedCb global_state_changed; /**data field of the bctbx_list_t points a PayloadType
* structure holding the codec information.
* It is possible to make copy of the list with bctbx_list_copy() in order to modify it
* (such as the order of codecs).
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_core_get_audio_payload_types() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t *linphone_core_get_audio_codecs(const LinphoneCore *core);
/**
* Sets the list of audio codecs.
* @param core The #LinphoneCore object
* @param codecs The new list of codecs. The list is taken by the #LinphoneCore,
* thus the application should not free it. \bctbx_list{OrtpPayloadType}
* @return 0
* @deprecated 31/03/2017 Use linphone_core_set_audio_payload_types() instead.
* @ingroup media_parameters
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_audio_codecs(LinphoneCore *core, bctbx_list_t *codecs);
/**
* Returns the list of available video codecs.
* @param core The #LinphoneCore object
* @return A list of #OrtpPayloadType. \bctbx_list{OrtpPayloadType}
*
* This list is unmodifiable. The ->data field of the bctbx_list_t points a PayloadType
* structure holding the codec information.
* It is possible to make copy of the list with bctbx_list_copy() in order to modify it
* (such as the order of codecs).
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_core_get_video_payload_types() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t *linphone_core_get_video_codecs(const LinphoneCore *core);
/**
* Sets the list of video codecs.
* @param core The #LinphoneCore object
* @param codecs The new list of codecs. The list is taken by the #LinphoneCore,
* thus the application should not free it. \bctbx_list{OrtpPayloadType}
* @return 0
* @deprecated 31/03/2017 Use linphone_core_set_video_payload_types() instead.
* @ingroup media_parameters
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_video_codecs(LinphoneCore *core, bctbx_list_t *codecs);
/**
* Returns the list of available text codecs.
* @param core The #LinphoneCore object
* @return A list of OrtpPayloadType. \bctbx_list{OrtpPayloadType}
*
* This list is unmodifiable. The ->data field of the bctbx_list_t points a PayloadType
* structure holding the codec information.
* It is possible to make copy of the list with bctbx_list_copy() in order to modify it
* (such as the order of codecs).
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_core_get_text_payload_types() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t *linphone_core_get_text_codecs(const LinphoneCore *core);
/**
* Sets the list of text codecs.
* @param core The #LinphoneCore object
* @param codecs The new list of codecs. The list is taken by the #LinphoneCore,
* thus the application should not free it. \bctbx_list{LinphonePayloadType}
* @return 0
* @deprecated 31/03/2017 Use linphone_core_set_text_payload_types() instead.
* @ingroup media_parameters
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_text_codecs(LinphoneCore *core, bctbx_list_t *codecs);
/**
* Enable RFC3389 generic comfort noise algorithm (CN payload type).
* It is disabled by default, because this algorithm is only relevant for legacy codecs (PCMU, PCMA, G722).
* @param core #LinphoneCore object
* @param enabled TRUE if enabled, FALSE otherwise.
* @deprecated 20/12/2016 Use linphone_core_enable_generic_comfort_noise() instead
* @donotwrap
*/
#define linphone_core_enable_generic_confort_noise(lc, enabled) linphone_core_enable_generic_comfort_noise(lc, enabled)
/**
* Returns enablement of RFC3389 generic comfort noise algorithm.
* @param core #LinphoneCore object
* @return TRUE or FALSE.
* @deprecated 20/12/2016 Use linphone_core_generic_comfort_noise_enabled() instead
* @donotwrap
*/
#define linphone_core_generic_confort_noise_enabled(lc) linphone_core_generic_comfort_noise_enabled(lc)
/**
* Tells whether the specified payload type is enabled.
* @param core #LinphoneCore object.
* @param pt The payload type to check.
* @return TRUE if the payload type is enabled, FALSE if disabled.
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_payload_type_enabled() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_payload_type_enabled(const LinphoneCore *core, const OrtpPayloadType *pt);
/**
* Tells whether the specified payload type represents a variable bitrate codec.
* @param core #LinphoneCore object.
* @param pt The payload type to check.
* @return TRUE if the payload type represents a VBR codec, FALSE if disabled.
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_payload_type_is_vbr() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_payload_type_is_vbr(const LinphoneCore *core, const OrtpPayloadType *pt);
/**
* Set an explicit bitrate (IP bitrate, not codec bitrate) for a given codec, in kbit/s.
* @param core the #LinphoneCore object
* @param pt the payload type to modify.
* @param bitrate the IP bitrate in kbit/s.
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_payload_type_set_normal_bitrate() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_payload_type_bitrate(LinphoneCore *core, OrtpPayloadType *pt, int bitrate);
/**
* Get the bitrate explicitely set with linphone_core_set_payload_type_bitrate().
* @param core the #LinphoneCore object
* @param pt the payload type to modify.
* @return bitrate the IP bitrate in kbit/s, or -1 if an error occured.
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_payload_type_get_bitrate().
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_payload_type_bitrate(LinphoneCore *core, const OrtpPayloadType *pt);
/**
* Enable or disable the use of the specified payload type.
* @param core #LinphoneCore object.
* @param pt The payload type to enable or disable. It can be retrieved using #linphone_core_find_payload_type()
* @param enable TRUE to enable the payload type, FALSE to disable it.
* @return 0 if successful, any other value otherwise.
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_payload_type_enable().
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_enable_payload_type(LinphoneCore *core, OrtpPayloadType *pt, bool_t enable);
/**
* Wildcard value used by #linphone_core_find_payload_type() to ignore rate in search algorithm
* @ingroup media_parameters
*/
#define LINPHONE_FIND_PAYLOAD_IGNORE_RATE -1
/**
* Wildcard value used by #linphone_core_find_payload_type() to ignore channel in search algorithm
* @ingroup media_parameters
*/
#define LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS -1
/**
* Get payload type from mime type and clock rate.
* @ingroup media_parameters
* This function searches in audio and video codecs for the given payload type name and clockrate.
* @param core #LinphoneCore object
* @param type payload mime type (I.E SPEEX, PCMU, VP8)
* @param rate can be #LINPHONE_FIND_PAYLOAD_IGNORE_RATE
* @param channels number of channels, can be #LINPHONE_FIND_PAYLOAD_IGNORE_CHANNELS
* @return Returns NULL if not found.
* @deprecated 31/03/2017 Use linphone_core_get_payload_type() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED OrtpPayloadType *linphone_core_find_payload_type(LinphoneCore* core, const char* type, int rate, int channels);
/**
* Returns the payload type number assigned for this codec.
* @ingroup media_parameters
* @deprecated 13/02/2017 Use linphone_payload_type_get_number() instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_payload_type_number(LinphoneCore *core, const OrtpPayloadType *pt);
/**
* Force a number for a payload type. The #LinphoneCore does payload type number assignment automatically. THis function is to be used mainly for tests, in order
* to override the automatic assignment mechanism.
* @ingroup media_parameters
* @deprecated 13/02/2017 Use linphone_payload_type_set_number() instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_payload_type_number(LinphoneCore *core, OrtpPayloadType *pt, int number);
/**
* Get a description of the encoder used to supply a payload type.
* @param core The core.
* @param pt The payload type.
* @return The description of the encoder. Can be NULL if the format is not supported by Mediastreamer2.
* @deprecated 31/03/2017 Use linphone_payload_type_get_encoder_description() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_payload_type_description(LinphoneCore *core, const OrtpPayloadType *pt);
/**
* Return TRUE if codec can be used with bandwidth, FALSE else
* @ingroup media_parameters
* @deprecated 31/03/2017 Use linphone_payload_type_is_usable() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_check_payload_type_usability(LinphoneCore *core, const OrtpPayloadType *pt);
/**
* @return the default proxy configuration, that is the one used to determine the current identity.
* @deprecated 29/07/2015 Use linphone_core_get_default_proxy_config() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_default_proxy(LinphoneCore *core, LinphoneProxyConfig **config);
/**
* Create an authentication information with default values from Linphone core.
* @param core #LinphoneCore object
* @param username String containing the username part of the authentication credentials
* @param userid String containing the username to use to calculate the authentication digest (optional)
* @param passwd String containing the password of the authentication credentials (optional, either passwd or ha1 must be set)
* @param ha1 String containing a ha1 hash of the password (optional, either passwd or ha1 must be set)
* @param realm String used to discriminate different SIP authentication domains (optional)
* @param domain String containing the SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
* @return #LinphoneAuthInfo with default values set
* @ingroup authentication
* @deprecated 13/02/2019 use linphone_factory_create_auth_info() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneAuthInfo * linphone_core_create_auth_info(LinphoneCore *core, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain);
/**
* Sets the UDP port to be used by SIP.
* @param core #LinphoneCore object
* @param port The UDP port to be used by SIP
* @ingroup network_parameters
* @deprecated 20/12/2016 use linphone_core_set_sip_transports() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_sip_port(LinphoneCore *core, int port);
/**
* Gets the UDP port used by SIP.
* @param core #LinphoneCore object
* @return The UDP port used by SIP
* @ingroup network_parameters
* @deprecated 20/12/2016 use linphone_core_get_sip_transports() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_sip_port(LinphoneCore *core);
/**
* Sets the ports to be used for each of transport (UDP or TCP)
* A zero value port for a given transport means the transport
* is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be choosen randomly by the system.
* @param core #LinphoneCore object
* @param transports A #LinphoneSipTransports structure giving the ports to use
* @return 0
* @ingroup network_parameters
* @deprecated 18/04/2017 Use linphone_core_set_transports instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_set_sip_transports(LinphoneCore *core, const LinphoneSipTransports *transports);
/**
* Retrieves the port configuration used for each transport (udp, tcp, tls).
* A zero value port for a given transport means the transport
* is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be chosen randomly by the system.
* @param core #LinphoneCore object
* @param[out] transports A #LinphoneSipTransports structure that will receive the configured ports
* @return 0
* @ingroup network_parameters
* @deprecated 18/04/2017
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneStatus linphone_core_get_sip_transports(LinphoneCore *core, LinphoneSipTransports *transports);
/**
* Retrieves the real port number assigned for each sip transport (udp, tcp, tls).
* A zero value means that the transport is not activated.
* If LC_SIP_TRANSPORT_RANDOM was passed to linphone_core_set_sip_transports(), the random port choosed by the system is returned.
* @param core #LinphoneCore object
* @param[out] tr A #LinphoneSipTransports structure that will receive the ports being used
* @ingroup network_parameters
* @deprecated 18/04/2017 Use linphone_core_get_transports_used instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_get_sip_transports_used(LinphoneCore *core, LinphoneSipTransports *tr);
/**
* Give access to the UDP sip socket. Can be useful to configure this socket as persistent I.E kCFStreamNetworkServiceType set to kCFStreamNetworkServiceTypeVoIP)
* @param core #LinphoneCore
* @return socket file descriptor
* @deprecated 11/05/2018
* @donotwrap
*/
LINPHONE_DEPRECATED ortp_socket_t linphone_core_get_sip_socket(LinphoneCore *core);
/**
* Set the policy to use to pass through firewalls.
* @param core #LinphoneCore object.
* @param pol The #LinphoneFirewallPolicy to use.
* @ingroup network_parameters
* @deprecated 30/03/2016 Use linphone_core_set_nat_policy() instead.
* @donotwrap
*/
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_set_firewall_policy(LinphoneCore *core, LinphoneFirewallPolicy pol);
/**
* Get the policy that is used to pass through firewalls.
* @param core #LinphoneCore object.
* @return The #LinphoneFirewallPolicy that is being used.
* @ingroup network_parameters
* @deprecated 27/03/2016 Use linphone_core_get_nat_policy() instead
* @donotwrap
*/
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *core);
/**
* Gets the list of the available sound devices.
* @param core #LinphoneCore object
* @return An unmodifiable array of strings contanining the names of the available sound devices that is NULL terminated
* @ingroup media_parameters
* @donotwrap
* @deprecated 12/10/2017 use linphone_core_get_sound_devices_list instead
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char** linphone_core_get_sound_devices(LinphoneCore *core);
/**
* Use this function when you want to set the default sound devices
* @deprecated 08/07/2020
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_default_sound_devices(LinphoneCore *core);
/**
* Tells whether a specified sound device can capture sound.
* @param core #LinphoneCore object @notnil
* @param device the device name as returned by linphone_core_get_sound_devices() @notnil
* @return A boolean value telling whether the specified sound device can capture sound
* @deprecated 08/07/2020 use #LinphoneAudioDevice API instead()
* @ingroup media_parameters
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_sound_device_can_capture(LinphoneCore *core, const char *device);
/**
* Tells whether a specified sound device can play sound.
* @param core #LinphoneCore object @notnil
* @param device the device name as returned by linphone_core_get_sound_devices() @notnil
* @return A boolean value telling whether the specified sound device can play sound
* @deprecated 08/07/2020 use #LinphoneAudioDevice API instead()
* @ingroup media_parameters
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_sound_device_can_playback(LinphoneCore *core, const char *device);
/**
* Get ring sound level in 0-100 scale.
* @ingroup media_parameters
* @deprecated 20/12/2016
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_ring_level(LinphoneCore *core);
/**
* Get playback sound level in 0-100 scale.
* @ingroup media_parameters
* @deprecated 20/12/2016
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_play_level(LinphoneCore *core);
/**
* Get sound capture level in 0-100 scale.
* @ingroup media_parameters
* @deprecated 20/12/2016
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_rec_level(LinphoneCore *core);
/**
* Get sound media level in 0-100 scale.
* @ingroup media_parameters
* @deprecated 20/12/2018
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED int linphone_core_get_media_level(LinphoneCore *core);
/**
* Set sound ring level in 0-100 scale.
* @ingroup media_parameters
* @deprecated 20/12/2016
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_ring_level(LinphoneCore *core, int level);
/**
* Set sound playback level in 0-100 scale.
* @deprecated 20/12/2016
* @ingroup media_parameters
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_play_level(LinphoneCore *core, int level);
/**
* Set sound capture level in 0-100 scale.
* @deprecated 20/12/2016
* @ingroup media_parameters
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_rec_level(LinphoneCore *core, int level);
/**
* Set sound media level in 0-100 scale.
* @deprecated 12/12/2018
* @ingroup media_parameters
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_media_level(LinphoneCore *core, int level);
LINPHONE_DEPRECATED char linphone_core_get_sound_source(LinphoneCore *core);
LINPHONE_DEPRECATED void linphone_core_set_sound_source(LinphoneCore *core, char source);
/**
* @deprecated 09/10/2013 Use #linphone_core_enable_mic() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_mute_mic(LinphoneCore *core, bool_t muted);
/**
* Get mic state.
* @deprecated 05/06/2014 Use #linphone_core_mic_enabled() instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_is_mic_muted(LinphoneCore *core);
/**
* Get the list of call logs (past calls) that matches the given #LinphoneAddress.
* At the contrary of linphone_core_get_call_logs, it is your responsibility to unref the logs and free this list once you are done using it.
* @param core #LinphoneCore object @notnil
* @param address #LinphoneAddress object @notnil
* @return A list of #LinphoneCallLog. \bctbx_list{LinphoneCallLog} @tobefreed @maybenil
* @deprecated 29/10/2018 Use #linphone_core_get_call_history_2() instead.
* @ingroup call_logs
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bctbx_list_t * linphone_core_get_call_history_for_address(LinphoneCore *core, const LinphoneAddress *address);
/**
* Enables video globally.
*
* This function does not have any effect during calls. It just indicates #LinphoneCore to
* initiate future calls with video or not. The two boolean parameters indicate in which
* direction video is enabled. Setting both to false disables video entirely.
*
* @param core The #LinphoneCore object
* @param vcap_enabled indicates whether video capture is enabled
* @param display_enabled indicates whether video display should be shown
* @ingroup media_parameters
* @deprecated 09/10/2013 Use #linphone_core_enable_video_capture() and #linphone_core_enable_video_display() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_enable_video(LinphoneCore *core, bool_t vcap_enabled, bool_t display_enabled);
/**
* Sets the default policy for video.
* This policy defines whether:
* - video shall be initiated by default for outgoing calls
* - video shall be accepter by default for incoming calls
*
* @param core #LinphoneCore object
* @param policy The video policy to use
* @ingroup media_parameters
* @deprecated 19/04/2017 Use linphone_video_activation_policy_set_automatically_accept instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_video_policy(LinphoneCore *core, const LinphoneVideoPolicy *policy);
/**
* Get the default policy for video.
* See linphone_core_set_video_policy() for more details.
* @param core #LinphoneCore object
* @return The video policy being used
* @ingroup media_parameters
* @deprecated 19/04/2017 Use linphone_video_activation_policy_get_automatically_accept instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const LinphoneVideoPolicy *linphone_core_get_video_policy(const LinphoneCore *core);
/**
* @brief Returns the zero terminated table of supported video resolutions.
* @ingroup media_parameters
* @deprecated 28/03/2017 Use #linphone_factory_get_supported_video_definitions() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const MSVideoSizeDef *linphone_core_get_supported_video_sizes(LinphoneCore *core);
/**
* @brief Sets the preferred video size.
*
* This applies only to the stream that is captured and sent to the remote party,
* since we accept all standard video size on the receive path.
* @ingroup media_parameters
* @deprecated 28/03/2017 Use linphone_core_set_preferred_video_definition() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_preferred_video_size(LinphoneCore *core, MSVideoSize vsize);
/**
* @brief Sets the video size for the captured (preview) video.
*
* This method is for advanced usage where a video capture must be set independently of the size of the stream actually sent through the call.
* This allows for example to have the preview window with HD resolution even if due to bandwidth constraint the sent video size is small.
* Using this feature increases the CPU consumption, since a rescaling will be done internally.
* @ingroup media_parameters
* @param core the linphone core
* @param vsize the video resolution choosed for capuring and previewing. It can be (0,0) to not request any specific preview size and let the core optimize the processing.
* @deprecated 28/03/2017 Use #linphone_core_set_preview_video_definition() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_preview_video_size(LinphoneCore *core, MSVideoSize vsize);
/**
* Sets the preview video size by its name. See linphone_core_set_preview_video_size() for more information about this feature.
*
* Video resolution names are: qcif, svga, cif, vga, 4cif, svga ...
* @ingroup media_parameters
* @deprecated 28/03/2017 Use linphone_factory_create_video_definition_from_name() and linphone_core_set_preview_video_definition() instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_preview_video_size_by_name(LinphoneCore *core, const char *name);
/**
* @brief Returns video size for the captured video if it was previously set by #linphone_core_set_preview_video_size(), otherwise returns a 0,0 size.
* @see #linphone_core_set_preview_video_size()
* @ingroup media_parameters
* @param core the core
* @return a #MSVideoSize
* @deprecated 28/03/2017 Use #linphone_core_get_preview_video_definition() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED MSVideoSize linphone_core_get_preview_video_size(const LinphoneCore *core);
/**
* @brief Returns the effective video size for the captured video as provided by the camera.
*
* When preview is disabled or not yet started, this function returns a zeroed video size.
* @see #linphone_core_set_preview_video_size()
* @ingroup media_parameters
* @param core the core
* @return a #MSVideoSize
* @deprecated 28/03/2017 Use #linphone_core_get_current_preview_video_definition() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED MSVideoSize linphone_core_get_current_preview_video_size(const LinphoneCore *core);
/**
* @brief Returns the current preferred video size for sending.
* @ingroup media_parameters
* @deprecated 28/03/2017 Use linphone_core_get_preferred_video_definition() instead.
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED MSVideoSize linphone_core_get_preferred_video_size(const LinphoneCore *core);
/**
* Get the name of the current preferred video size for sending.
* @param core #LinphoneCore object.
* @return A string containing the name of the current preferred video size (to be freed with ms_free()).
* @deprecated 28/03/2017 Use linphone_core_get_preferred_video_defintion() and linphone_video_definition_get_name() instead
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED char * linphone_core_get_preferred_video_size_name(const LinphoneCore *core);
/**
* Sets the preferred video size by its name.
*
* This is identical to linphone_core_set_preferred_video_size() except
* that it takes the name of the video resolution as input.
* Video resolution names are: qcif, svga, cif, vga, 4cif, svga ...
* @ingroup media_parameters
* @deprecated 28/03/2017 Use linphone_core_set_preferred_video_definition_by_name() instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_preferred_video_size_by_name(LinphoneCore *core, const char *name);
/**
* Gets the list of the available video capture devices.
* @param core #LinphoneCore object
* @return An unmodifiable array of strings contanining the names of the available video capture devices that is NULL terminated
* @ingroup media_parameters
* @deprecated 12/10/2017 use linphone_core_get_video_devices_list instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char** linphone_core_get_video_devices(const LinphoneCore *core);
/**
* Create a LpConfig object from a user config file.
* @param core #LinphoneCore object
* @param filename The filename of the config file to read to fill the instantiated LpConfig
* @ingroup misc
* @deprecated 12/01/2017 Use linphone_core_create_config() instead.
* @donotwrap
*/
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneConfig * linphone_core_create_lp_config(LinphoneCore *core, const char *filename);
/**
* Destroys a #LinphoneCore
* @param core #LinphoneCore object
* @ingroup initializing
* @deprecated 12/01/2017 Use linphone_core_unref() instead.
* @donotwrap
**/
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_destroy(LinphoneCore *core);
/**
* Get a pointer to the sqlite db holding zrtp/lime cache.
* @param core #LinphoneCore object. @notnil
* @return An sqlite3 pointer cast to a void one or NULL if cache is not available(not enabled at compile or access failed) @maybenil
* @ingroup initializing
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void* linphone_core_get_zrtp_cache_db(LinphoneCore *core);
/**
* Returns a null terminated table of strings containing the file format extension supported for call recording.
* @param core the core
* @return the supported formats, typically 'wav' and 'mkv'
* @ingroup media_parameters
* @deprecated 12/10/2017 use linphone_core_get_supported_file_formats_list instead
* @donotwrap
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char ** linphone_core_get_supported_file_formats(LinphoneCore *core);
/**
* Get the linphone specs value telling what functionalities the linphone client supports.
* @param core #LinphoneCore object @notnil
* @return The linphone specs telling what functionalities the linphone client supports @maybenil
* @ingroup initializing
* @deprecated 07/02/2019 Use linphone_core_get_linphone_specs_list instead.
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_linphone_specs (const LinphoneCore *core);
/**
* Set the linphone specs value telling what functionalities the linphone client supports.
* @param core #LinphoneCore object @notnil
* @param specs The linphone specs to set @maybenil
* @ingroup initializing
* @deprecated 07/02/2019 Use linphone_core_set_linphone_specs_list or linphone_core_add_linphone_spec instead.
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_linphone_specs (LinphoneCore *core, const char *specs);
/**
* Set the chat database path.
* @param core the linphone core
* @param path the database path
* @deprecated 10/01/2018: Use only for migration purposes
* @donotwrap
*/
LINPHONE_DEPRECATED LINPHONE_PUBLIC void linphone_core_set_chat_database_path(LinphoneCore *core, const char *path);
/**
* Get path to the database file used for storing chat messages.
* @param core the linphone core
* @return file path or NULL if not exist
* @deprecated 10/01/2018
* @donotwrap
**/
LINPHONE_DEPRECATED LINPHONE_PUBLIC const char *linphone_core_get_chat_database_path(const LinphoneCore *core);
/**
* Create a client-side group chat room. When calling this function the chat room is only created
* at the client-side and is empty. You need to call linphone_chat_room_add_participants() to
* create at the server side and add participants to it.
* Also, the created chat room will not be a one-to-one chat room even if linphone_chat_room_add_participants() is called with only one participant.
*
* @param core A #LinphoneCore object @notnil
* @param subject The subject of the group chat room @notnil
* @param fallback Boolean value telling whether we should plan on being able to fallback to a basic chat room if the client-side group chat room creation fails
* @return The newly created client-side group chat room. @maybenil
* @deprecated 02/07/2020, use linphone_core_create_chat_room_6() instead
* @ingroup chatroom
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom * linphone_core_create_client_group_chat_room(LinphoneCore *core, const char *subject, bool_t fallback);
/**
* Create a client-side group chat room. When calling this function the chat room is only created
* at the client-side and is empty. You need to call linphone_chat_room_add_participants() to
* create at the server side and add participants to it.
* Also, the created chat room will not be a one-to-one chat room even if linphone_chat_room_add_participants() is called with only one participant.
*
* @param core A #LinphoneCore object @notnil
* @param subject The subject of the group chat room @notnil
* @param fallback Boolean value telling whether we should plan on being able to fallback to a basic chat room if the client-side group chat room creation fails
* @param encrypted Boolean value telling whether we should apply encryption or not on chat messages sent and received on this room.
* @return The newly created client-side group chat room. @maybenil
* @deprecated 02/07/2020, use linphone_core_create_chat_room_6() instead
* @ingroup chatroom
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_create_client_group_chat_room_2(LinphoneCore *core, const char *subject, bool_t fallback, bool_t encrypted);
/**
* Create a chat room.
*
* @param core A #LinphoneCore object @notnil
* @param params The chat room creation parameters #LinphoneChatRoomParams @notnil
* @param localAddr #LinphoneAddress representing the local proxy configuration to use for the chat room creation @notnil
* @param subject The subject of the group chat room @notnil
* @param participants The initial list of participants of the chat room \bctbx_list{LinphoneAddress} @notnil
* @return The newly created chat room. @maybenil
* @deprecated 02/07/2020, use linphone_core_create_chat_room_6() instead
* @ingroup chatroom
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_create_chat_room(LinphoneCore *core, const LinphoneChatRoomParams *params, const LinphoneAddress *localAddr, const char *subject, const bctbx_list_t *participants);
/**
* Create a chat room.
*
* @param core A #LinphoneCore object @notnil
* @param params The chat room creation parameters #LinphoneChatRoomParams @notnil
* @param participants The initial list of participants of the chat room. \bctbx_list{LinphoneAddress} @notnil
* @return The newly created chat room. @maybenil
* @deprecated 02/07/2020, use linphone_core_create_chat_room_6() instead
* @ingroup chatroom
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_create_chat_room_2(LinphoneCore *core, const LinphoneChatRoomParams *params, const char *subject, const bctbx_list_t *participants);
/**
*
* @param core A #LinphoneCore object @notnil
* @param subject The subject of the group chat room @notnil
* @param participants The initial list of participants of the chat room. \bctbx_list{LinphoneAddress} @notnil
* @return The newly created chat room. @maybenil
* @deprecated 02/07/2020, use linphone_core_create_chat_room_6() instead
* @ingroup chatroom
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_create_chat_room_3(LinphoneCore *core, const char *subject, const bctbx_list_t *participants);
/**
*
* @param core A #LinphoneCore object @notnil
* @param params The chat room creation parameters #LinphoneChatRoomParams @notnil
* @param localAddr #LinphoneAddress representing the local proxy configuration to use for the chat room creation @notnil
* @param participant #LinphoneAddress representing the initial participant to add to the chat room @notnil
* @return The newly created chat room. @maybenil
* @deprecated 02/07/2020, use linphone_core_create_chat_room_6() instead
* @ingroup chatroom
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_create_chat_room_4(LinphoneCore *core, const LinphoneChatRoomParams *params, const LinphoneAddress *localAddr, const LinphoneAddress *participant);
/**
*
* @param core A #LinphoneCore object @notnil
* @param participant #LinphoneAddress representing the initial participant to add to the chat room @notnil
* @return The newly created chat room. @maybenil
* @deprecated 02/07/2020, use linphone_core_create_chat_room_6() instead
* @ingroup chatroom
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_create_chat_room_5(LinphoneCore *core, const LinphoneAddress *participant);
/**
* Get a chat room whose peer is the supplied address. If it does not exist yet, it will be created as a basic chat room.
* No reference is transfered to the application. The #LinphoneCore keeps a reference on the chat room.
* @warning This method is prone to errors, use linphone_core_search_chat_room() instead
* @param core the linphone core @notnil
* @param addr a linphone address. @notnil
* @return #LinphoneChatRoom where messaging can take place. @maybenil
* @deprecated 02/07/2020, use linphone_core_search_chat_room() instead
* @ingroup chatroom
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_get_chat_room(LinphoneCore *core, const LinphoneAddress *addr);
/**
* Get a chat room. If it does not exist yet, it will be created as a basic chat room.
* No reference is transfered to the application. The #LinphoneCore keeps a reference on the chat room.
* @warning This method is prone to errors, use linphone_core_search_chat_room() instead
* @param core the linphone core @notnil
* @param peer_addr a linphone address. @notnil
* @param local_addr a linphone address. @notnil
* @return #LinphoneChatRoom where messaging can take place. @maybenil
* @deprecated 02/07/2020, use linphone_core_search_chat_room() instead
* @ingroup chatroom
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_get_chat_room_2(
LinphoneCore *core,
const LinphoneAddress *peer_addr,
const LinphoneAddress *local_addr
);
/**
* Get a chat room for messaging from a sip uri like sip:joe@sip.linphone.org. If it does not exist yet, it will be created as a basic chat room.
* No reference is transfered to the application. The #LinphoneCore keeps a reference on the chat room.
* @warning This method is prone to errors, use linphone_core_search_chat_room() instead
* @param core A #LinphoneCore object @notnil
* @param to The destination address for messages. @notnil
* @return #LinphoneChatRoom where messaging can take place. @maybenil
* @deprecated 02/07/2020, use linphone_core_search_chat_room() instead
* @ingroup chatroom
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_get_chat_room_from_uri(LinphoneCore *core, const char *to);
/**
* Find a chat room.
* No reference is transfered to the application. The #LinphoneCore keeps a reference on the chat room.
* @param core the linphone core @notnil
* @param peer_addr a linphone address. @notnil
* @param local_addr a linphone address. @notnil
* @return #LinphoneChatRoom where messaging can take place. @maybenil
* @deprecated 02/07/2020, use linphone_core_search_chat_room() instead
* @ingroup chatroom
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_find_chat_room (
const LinphoneCore *core,
const LinphoneAddress *peer_addr,
const LinphoneAddress *local_addr
);
/**
* Find a one to one chat room.
* No reference is transfered to the application. The #LinphoneCore keeps a reference on the chat room.
* @param core the linphone core @notnil
* @param local_addr a linphone address. @notnil
* @param participant_addr a linphone address. @notnil
* @return #LinphoneChatRoom where messaging can take place. @maybenil
* @deprecated 12/12/2018, use linphone_core_find_one_to_one_chat_room_2 instead
* @ingroup chatroom
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_find_one_to_one_chat_room (
const LinphoneCore *core,
const LinphoneAddress *local_addr,
const LinphoneAddress *participant_addr
);
/**
* Find a one to one chat room.
* No reference is transfered to the application. The #LinphoneCore keeps a reference on the chat room.
* @param core the linphone core @notnil
* @param local_addr a linphone address. @notnil
* @param participant_addr a linphone address. @notnil
* @param encrypted whether to look for an encrypted chat room or not
* @return #LinphoneChatRoom where messaging can take place. @maybenil
* @deprecated 02/07/2020, use linphone_core_search_chat_room() instead
* @ingroup chatroom
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneChatRoom *linphone_core_find_one_to_one_chat_room_2 (
const LinphoneCore *core,
const LinphoneAddress *local_addr,
const LinphoneAddress *participant_addr,
bool_t encrypted
);
/**
* @deprecated 03/02/2017 Use linphone_core_interpret_url() instead
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_interpret_friend_uri(LinphoneCore *core, const char *uri, char **result);
/**
* Add a friend to the current buddy list.
* A SIP SUBSCRIBE message is sent if subscription has been enabled by linphone_friend_enable_subscribes().
* @param core #LinphoneCore object
* @param fr #LinphoneFriend to add
* @deprecated 03/02/2017 use linphone_friend_list_add_friend() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_add_friend(LinphoneCore *core, LinphoneFriend *fr);
/**
* Removes a friend from the buddy list
* @param core #LinphoneCore object
* @param fr #LinphoneFriend to remove
* @deprecated 03/02/2017 use linphone_friend_list_remove_friend() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_remove_friend(LinphoneCore *core, LinphoneFriend *fr);
/**
* Set my presence status
* @param core #LinphoneCore object
* @param minutes_away how long in away
* @param alternative_contact sip uri used to redirect call in state #LinphoneStatusMoved
* @param os #LinphoneOnlineStatus
* @deprecated 03/02/2017 Use linphone_core_set_presence_model() instead
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_set_presence_info(LinphoneCore *core,int minutes_away,const char *alternative_contact,LinphoneOnlineStatus os);
/**
* Get Buddy list of #LinphoneFriend
* @param core #LinphoneCore object
* @return A list of #LinphoneFriend. \bctbx_list{LinphoneFriend}
* @deprecated 03/02/2017 use linphone_core_get_friends_lists() or linphone_friend_list_get_friends() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED const bctbx_list_t * linphone_core_get_friend_list(const LinphoneCore *core);
/**
* Search a #LinphoneFriend by its address.
* @param core #LinphoneCore object.
* @param addr The address to use to search the friend.
* @return The #LinphoneFriend object corresponding to the given address.
* @deprecated 03/02/2017 use linphone_core_find_friend() instead.
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneFriend *linphone_core_get_friend_by_address(const LinphoneCore *core, const char *addr);
/**
* Get my presence status
* @param core #LinphoneCore object
* @return #LinphoneOnlineStatus
* @deprecated 03/02/2017 Use linphone_core_get_presence_model() instead
* @donotwrap
*/
LINPHONE_PUBLIC LINPHONE_DEPRECATED LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *core);
#ifdef __cplusplus
}
#endif
#endif