liblinphone
3.9.1
|
Data Structures | |
struct | _LCSipTransports |
struct | _LinphoneCoreVTable |
Macros | |
#define | LC_SIP_TRANSPORT_DISABLED 0 |
#define | LC_SIP_TRANSPORT_RANDOM -1 |
#define LC_SIP_TRANSPORT_DISABLED 0 |
Disable a sip transport Use with LCSipTransports
#define LC_SIP_TRANSPORT_RANDOM -1 |
Randomly chose a sip port for this transport Use with LCSipTransports
typedef struct _LinphoneCore LinphoneCore |
Linphone core main object created by function linphone_core_new() .
typedef struct _LCSipTransports LCSipTransports |
Linphone core SIP transport ports. Use with linphone_core_set_sip_transports
typedef enum _LinphoneStreamType LinphoneStreamType |
Enum describing the stream types.
typedef enum _LinphoneIceState LinphoneIceState |
Enum describing Ice states.
typedef enum _LinphoneUpnpState LinphoneUpnpState |
Enum describing uPnP states.
typedef enum _LinphoneGlobalState LinphoneGlobalState |
LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed
LinphoneCoreLogCollectionUploadState is used to notify if log collection upload have been succesfully delivered or not.
typedef void(* LinphoneCoreGlobalStateChangedCb) (LinphoneCore *lc, LinphoneGlobalState gstate, const char *message) |
Global state notification callback.
lc | |
gstate | the global state |
message | informational message. |
typedef void(* LinphoneCoreCallStateChangedCb) (LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message) |
Call state notification callback.
lc | the LinphoneCore |
call | the call object whose state is changed. |
cstate | the new state of the call |
message | a non NULL informational message about the state. |
typedef void(* LinphoneCoreCallEncryptionChangedCb) (LinphoneCore *lc, LinphoneCall *call, bool_t on, const char *authentication_token) |
Call encryption changed callback.
lc | the LinphoneCore |
call | the call on which encryption is changed. |
on | whether encryption is activated. |
authentication_token | an authentication_token, currently set for ZRTP kind of encryption only. |
typedef void(* LinphoneCoreRegistrationStateChangedCb) (LinphoneCore *lc, LinphoneProxyConfig *cfg, LinphoneRegistrationState cstate, const char *message) |
Registration state notification callback prototype
typedef void(* ShowInterfaceCb) (LinphoneCore *lc) |
Callback prototype
typedef void(* DisplayStatusCb) (LinphoneCore *lc, const char *message) |
Callback prototype
typedef void(* DisplayMessageCb) (LinphoneCore *lc, const char *message) |
Callback prototype
typedef void(* DisplayUrlCb) (LinphoneCore *lc, const char *message, const char *url) |
Callback prototype
typedef void(* LinphoneCoreCbFunc) (LinphoneCore *lc, void *user_data) |
Callback prototype
typedef void(* LinphoneCoreNotifyPresenceReceivedCb) (LinphoneCore *lc, LinphoneFriend *lf) |
Report status change for a friend previously added to LinphoneCore.
lc | LinphoneCore object . |
lf | Updated LinphoneFriend . |
typedef void(* LinphoneCoreNewSubscriptionRequestedCb) (LinphoneCore *lc, LinphoneFriend *lf, const char *url) |
Reports that a new subscription request has been received and wait for a decision. Status on this subscription request is notified by changing policy for this friend
lc | LinphoneCore object |
lf | LinphoneFriend corresponding to the subscriber |
url | of the subscriber Callback prototype |
typedef void(* LinphoneCoreAuthInfoRequestedCb) (LinphoneCore *lc, const char *realm, const char *username, const char *domain) |
Callback for requesting authentication information to application or user.
lc | the LinphoneCore |
realm | the realm (domain) on which authentication is required. |
username | the username that needs to be authenticated. Application shall reply to this callback using linphone_core_add_auth_info(). |
typedef void(* LinphoneCoreCallLogUpdatedCb) (LinphoneCore *lc, LinphoneCallLog *newcl) |
Callback to notify a new call-log entry has been added. This is done typically when a call terminates.
lc | the LinphoneCore |
newcl | the new call log entry added. |
typedef void(* LinphoneCoreTextMessageReceivedCb) (LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message) |
Callback prototype
lc | LinphoneCore object |
room | LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room. |
from | LinphoneAddress from |
message | incoming message |
typedef void(* LinphoneCoreMessageReceivedCb) (LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message) |
Chat message callback prototype
lc | LinphoneCore object |
room | LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room. |
LinphoneChatMessage | incoming message |
typedef void(* LinphoneCoreFileTransferRecvCb) (LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, const char *buff, size_t size) |
File transfer receive callback prototype. This function is called by the core upon an incoming File transfer is started. This function may be call several time for the same file in case of large file.
lc | LinphoneCore object |
message | LinphoneChatMessage message from which the body is received. |
content | LinphoneContent incoming content information |
buff | pointer to the received data |
size | number of bytes to be read from buff. 0 means end of file. |
typedef void(* LinphoneCoreFileTransferSendCb) (LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, char *buff, size_t *size) |
File transfer send callback prototype. This function is called by the core upon an outgoing File transfer is started. This function is called until size is set to 0.
a LinphoneContent with a size equal zero
lc | LinphoneCore object |
message | LinphoneChatMessage message from which the body is received. |
content | LinphoneContent outgoing content |
buff | pointer to the buffer where data chunk shall be written by the app |
size | as input value, it represents the number of bytes expected by the framework. As output value, it means the number of bytes wrote by the application in the buffer. 0 means end of file. |
typedef void(* LinphoneCoreFileTransferProgressIndicationCb) (LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent *content, size_t offset, size_t total) |
File transfer progress indication callback prototype.
lc | LinphoneCore object |
message | LinphoneChatMessage message from which the body is received. |
content | LinphoneContent incoming content information |
offset | The number of bytes sent/received since the beginning of the transfer. |
total | The total number of bytes to be sent/received. |
typedef void(* LinphoneCoreIsComposingReceivedCb) (LinphoneCore *lc, LinphoneChatRoom *room) |
Is composing notification callback prototype.
[in] | lc | LinphoneCore object |
[in] | room | LinphoneChatRoom involved in the conversation. |
typedef void(* LinphoneCoreDtmfReceivedCb) (LinphoneCore *lc, LinphoneCall *call, int dtmf) |
Callback for being notified of DTMFs received.
lc | the linphone core |
call | the call that received the dtmf |
dtmf | the ascii code of the dtmf |
typedef void(* LinphoneCoreReferReceivedCb) (LinphoneCore *lc, const char *refer_to) |
Callback prototype
typedef void(* LinphoneCoreBuddyInfoUpdatedCb) (LinphoneCore *lc, LinphoneFriend *lf) |
Callback prototype
typedef void(* LinphoneCoreTransferStateChangedCb) (LinphoneCore *lc, LinphoneCall *transfered, LinphoneCallState new_call_state) |
Callback for notifying progresses of transfers.
lc | the LinphoneCore |
transfered | the call that was transfered |
new_call_state | the state of the call to transfer target at the far end. |
typedef void(* LinphoneCoreCallStatsUpdatedCb) (LinphoneCore *lc, LinphoneCall *call, const LinphoneCallStats *stats) |
Callback for receiving quality statistics for calls.
lc | the LinphoneCore |
call | the call |
stats | the call statistics. |
typedef void(* LinphoneCoreInfoReceivedCb) (LinphoneCore *lc, LinphoneCall *call, const LinphoneInfoMessage *msg) |
Callback prototype for receiving info messages.
lc | the LinphoneCore |
call | the call whose info message belongs to. |
msg | the info message. |
typedef enum _LinphoneConfiguringState LinphoneConfiguringState |
LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed
typedef void(* LinphoneCoreConfiguringStatusCb) (LinphoneCore *lc, LinphoneConfiguringState status, const char *message) |
Callback prototype for configuring status changes notification
lc | the LinphoneCore |
message | informational message. |
typedef void(* LinphoneCoreNetworkReachableCb) (LinphoneCore *lc, bool_t reachable) |
Callback prototype for reporting network change either automatically detected or notified by linphone_core_set_network_reachable.
lc | the LinphoneCore |
reachable | true if network is reachable. |
typedef void(* LinphoneCoreLogCollectionUploadStateChangedCb) (LinphoneCore *lc, LinphoneCoreLogCollectionUploadState state, const char *info) |
Callback prototype for reporting log collection upload state change.
[in] | lc | LinphoneCore object |
[in] | state | The state of the log collection upload |
[in] | info | Additional information: error message in case of error state, URL of uploaded file in case of success. |
typedef void(* LinphoneCoreLogCollectionUploadProgressIndicationCb) (LinphoneCore *lc, size_t offset, size_t total) |
Callback prototype for reporting log collection upload progress indication.
[in] | lc | LinphoneCore object |
[in] | progress | Percentage of the file size of the log collection already uploaded. |
typedef struct _LinphoneCoreVTable LinphoneCoreVTable |
This structure holds all callbacks that the application should implement. None is mandatory.
enum _LinphoneStreamType |
Enum describing the stream types.
enum _LinphoneIceState |
Enum describing ICE states.
enum _LinphoneUpnpState |
Enum describing uPnP states.
enum _LinphoneGlobalState |
LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed
LinphoneCoreLogCollectionUploadState is used to notify if log collection upload have been succesfully delivered or not.
LinphoneGlobalState describes the global state of the LinphoneCore object. It is notified via the LinphoneCoreVTable::global_state_changed
void linphone_core_iterate | ( | LinphoneCore * | lc | ) |
Main loop function. It is crucial that your application call it periodically.
linphone_core_iterate() performs various backgrounds tasks:
void linphone_core_set_root_ca | ( | LinphoneCore * | lc, |
const char * | path | ||
) |
Sets the path to a file or folder containing trusted root CAs (PEM format)
path | |
lc | The LinphoneCore object |
const char* linphone_core_get_root_ca | ( | LinphoneCore * | lc | ) |
Gets the path to a file or folder containing the trusted root CAs (PEM format)
lc | The LinphoneCore object |
void linphone_core_verify_server_certificates | ( | LinphoneCore * | lc, |
bool_t | yesno | ||
) |
Specify whether the tls server certificate must be verified when connecting to a SIP/TLS server.
void linphone_core_verify_server_cn | ( | LinphoneCore * | lc, |
bool_t | yesno | ||
) |
Specify whether the tls server certificate common name must be verified when connecting to a SIP/TLS server.
void* linphone_core_get_user_data | ( | const LinphoneCore * | lc | ) |
Retrieves the user pointer that was given to linphone_core_new()
void linphone_core_set_user_data | ( | LinphoneCore * | lc, |
void * | userdata | ||
) |
Associate a user pointer to the linphone core.
void linphone_core_destroy | ( | LinphoneCore * | lc | ) |
Destroys a LinphoneCore
void linphone_core_set_chat_database_path | ( | LinphoneCore * | lc, |
const char * | path | ||
) |
Sets the database filename where chat messages will be stored. If the file does not exist, it will be created.
lc | the linphone core |
path | filesystem path |
void linphone_core_add_supported_tag | ( | LinphoneCore * | lc, |
const char * | tag | ||
) |
This function controls signaling features supported by the core. They are typically included in a SIP Supported header.
lc | the LinphoneCore |
tag | the feature tag name |
void linphone_core_remove_supported_tag | ( | LinphoneCore * | lc, |
const char * | tag | ||
) |
Remove a supported tag.
lc | the LinphoneCore |
tag | the tag to remove |
LinphoneCoreVTable* linphone_core_v_table_new | ( | ) |
Instantiate a vtable with all arguments set to NULL
void linphone_core_v_table_set_user_data | ( | LinphoneCoreVTable * | table, |
void * | data | ||
) |
Sets a user data pointer in the vtable.
table | the vtable |
data | the user data to attach |
void* linphone_core_v_table_get_user_data | ( | LinphoneCoreVTable * | table | ) |
Gets a user data pointer in the vtable.
table | the vtable |
LinphoneCoreVTable* linphone_core_get_current_vtable | ( | LinphoneCore * | lc | ) |
Gets the current VTable. This is meant only to be called from a callback to be able to get the user_data associated with the vtable that called the callback.
lc | the linphonecore |
void linphone_core_v_table_destroy | ( | LinphoneCoreVTable * | table | ) |
Destroy a vtable.
vtable | to be destroyed |
LinphoneCore* linphone_core_new | ( | const LinphoneCoreVTable * | vtable, |
const char * | config_path, | ||
const char * | factory_config, | ||
void * | userdata | ||
) |
Instanciates a LinphoneCore object.
The LinphoneCore object is the primary handle for doing all phone actions. It should be unique within your application.
vtable | a LinphoneCoreVTable structure holding your application callbacks |
config_path | a path to a config file. If it does not exists it will be created. The config file is used to store all settings, call logs, friends, proxies... so that all these settings become persistent over the life of the LinphoneCore object. It is allowed to set a NULL config file. In that case LinphoneCore will not store any settings. |
factory_config_path | a path to a read-only config file that can be used to to store hard-coded preference such as proxy settings or internal preferences. The settings in this factory file always override the one in the normal config file. It is OPTIONAL, use NULL if unneeded. |
userdata | an opaque user pointer that can be retrieved at any time (for example in callbacks) using linphone_core_get_user_data(). |
LinphoneCore* linphone_core_new_with_config | ( | const LinphoneCoreVTable * | vtable, |
LpConfig * | config, | ||
void * | userdata | ||
) |
Instantiates a LinphoneCore object with a given LpConfig.
The LinphoneCore object is the primary handle for doing all phone actions. It should be unique within your application.
vtable | a LinphoneCoreVTable structure holding your application callbacks |
config | a pointer to an LpConfig object holding the configuration of the LinphoneCore to be instantiated. |
userdata | an opaque user pointer that can be retrieved at any time (for example in callbacks) using linphone_core_get_user_data(). |
void linphone_core_add_listener | ( | LinphoneCore * | lc, |
LinphoneCoreVTable * | vtable | ||
) |
add a listener to be notified of linphone core events. Once events are received, registered vtable are invoked in order.
vtable | a LinphoneCoreVTable structure holding your application callbacks. Object is owned by linphone core until linphone_core_remove_listener. |
lc | object |
string | identifying the device, can be EMEI or UDID |
void linphone_core_remove_listener | ( | LinphoneCore * | lc, |
const LinphoneCoreVTable * | vtable | ||
) |
remove a listener registred by linphone_core_add_listener.
vtable | a LinphoneCoreVTable structure holding your application callbacks |
lc | object |
string | identifying the device, can be EMEI or UDID |
void linphone_core_set_call_logs_database_path | ( | LinphoneCore * | lc, |
const char * | path | ||
) |
Sets the database filename where call logs will be stored. If the file does not exist, it will be created.
lc | the linphone core |
path | filesystem path |
void linphone_core_migrate_logs_from_rc_to_db | ( | LinphoneCore * | lc | ) |
Migrates the call logs from the linphonerc to the database if not done yet
lc | the linphone core |
void linphone_core_set_zrtp_secrets_file | ( | LinphoneCore * | lc, |
const char * | file | ||
) |
Set the path to the file storing the zrtp secrets cache.
[in] | lc | LinphoneCore object |
[in] | file | The path to the file to use to store the zrtp secrets cache. |
const char* linphone_core_get_zrtp_secrets_file | ( | LinphoneCore * | lc | ) |
Get the path to the file storing the zrtp secrets cache.
[in] | lc | LinphoneCore object. |
void linphone_core_set_user_certificates_path | ( | LinphoneCore * | lc, |
const char * | path | ||
) |
Set the path to the directory storing the user's x509 certificates (used by dtls)
[in] | lc | LinphoneCore object |
[in] | path | The path to the directory to use to store the user's certificates. |
const char* linphone_core_get_user_certificates_path | ( | LinphoneCore * | lc | ) |
Get the path to the directory storing the user's certificates.
[in] | lc | LinphoneCore object. |
int linphone_core_get_max_calls | ( | LinphoneCore * | lc | ) |
Get the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
lc | core |
void linphone_core_set_max_calls | ( | LinphoneCore * | lc, |
int | max | ||
) |
Set the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
lc | core |
max | number of simultaneous calls |
bool_t linphone_core_media_encryption_supported | ( | const LinphoneCore * | lc, |
LinphoneMediaEncryption | menc | ||
) |
Check if a media encryption type is supported
lc | core |
menc | LinphoneMediaEncryption |
void linphone_core_set_provisioning_uri | ( | LinphoneCore * | lc, |
const char * | uri | ||
) |
Set URI where to download xml configuration file at startup. This can also be set from configuration file or factory config file, from [misc] section, item "config-uri". Calling this function does not load the configuration. It will write the value into configuration so that configuration from remote URI will take place at next LinphoneCore start.
lc | the linphone core |
uri | the http or https uri to use in order to download the configuration. |
const char* linphone_core_get_provisioning_uri | ( | const LinphoneCore * | lc | ) |
Get provisioning URI.
lc | the linphone core |
int linphone_core_migrate_to_multi_transport | ( | LinphoneCore * | lc | ) |
Migrate configuration so that all SIP transports are enabled. Versions of linphone < 3.7 did not support using multiple SIP transport simultaneously. This function helps application to migrate the configuration so that all transports are enabled. Existing proxy configuration are added a transport parameter so that they continue using the unique transport that was set previously. This function must be used just after creating the core, before any call to linphone_core_iterate()
lc | the linphone core |