core.h 283 KB
Newer Older
aymeric's avatar
aymeric committed
1
/*
Simon Morlat's avatar
Simon Morlat committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 * 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 <http://www.gnu.org/licenses/>.
 */
19

aymeric's avatar
aymeric committed
20 21 22 23 24 25
#ifndef LINPHONECORE_H
#define LINPHONECORE_H

#include "ortp/ortp.h"
#include "ortp/payloadtype.h"
#include "mediastreamer2/mscommon.h"
smorlat's avatar
smorlat committed
26
#include "mediastreamer2/msvideo.h"
Sylvain Berfini's avatar
Sylvain Berfini committed
27
#include "mediastreamer2/mediastream.h"
28
#include "mediastreamer2/bitratecontrol.h"
Ghislain MARY's avatar
Ghislain MARY committed
29

30 31
#include "linphone/defs.h"
#include "linphone/types.h"
32
#include "linphone/callbacks.h"
33
#include "linphone/sipsetup.h"
34 35

#include "linphone/account_creator.h"
36
#include "linphone/account_creator_service.h"
rosset claire's avatar
rosset claire committed
37

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
#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"
Erwan Croze's avatar
Erwan Croze committed
54
#include "linphone/logging.h"
55
#include "linphone/lpconfig.h"
56 57 58 59 60 61 62 63
#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"
64
#include "linphone/video_definition.h"
65
#include "linphone/xmlrpc.h"
66
#include "linphone/headers.h"
67

68 69
// For migration purpose.
#include "linphone/api/c-api.h"
jehan's avatar
jehan committed
70

aymeric's avatar
aymeric committed
71 72 73 74
#ifdef __cplusplus
extern "C" {
#endif

75
/**
76
 * Safely down-cast a belle_sip_object_t into #LinphoneCore
77 78 79
 * @ingroup initializing
 */
#define LINPHONE_CORE(object) BELLE_SIP_CAST(object, LinphoneCore)
80

81

jehan's avatar
jehan committed
82
/**
83
 * Create a #LinphoneAddress object by parsing the user supplied address, given as a string.
84 85 86
 * @param core #LinphoneCore object @maybenil
 * @param address String containing the user supplied address @maybenil
 * @return The create #LinphoneAddress object @maybenil
87
 * @ingroup linphone_address
88
 */
89
LINPHONE_PUBLIC LinphoneAddress * linphone_core_create_address(LinphoneCore *core, const char *address);
90 91


92
/**
93 94
 * @addtogroup misc
 * @{
Simon Morlat's avatar
Simon Morlat committed
95
 */
96 97 98 99

/**
 * Create an independent media file player.
 * This player support WAVE and MATROSKA formats.
100 101 102 103 104
 * @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
105
 */
106
LINPHONE_PUBLIC LinphonePlayer *linphone_core_create_local_player(LinphoneCore *core, const char *sound_card_name, const char *video_display_name, void *window_id);
107

108 109
/**
 * Creates an empty info message.
110 111
 * @param core the #LinphoneCore @maybenil
 * @return a new LinphoneInfoMessage. @notnil
112 113 114 115
 *
 * 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().
**/
116
LINPHONE_PUBLIC LinphoneInfoMessage *linphone_core_create_info_message(LinphoneCore *core);
117

118 119
/**
 * Create a #LinphoneMagicSearch object.
120 121
 * @param core #LinphoneCore object @notnil
 * @return The created #LinphoneMagicSearch object @notnil
122
 */
123
LINPHONE_PUBLIC LinphoneMagicSearch *linphone_core_create_magic_search(LinphoneCore *core);
124

Ghislain MARY's avatar
Ghislain MARY committed
125 126
/**
 * Checks if a new version of the application is available.
127 128
 * @param core #LinphoneCore object @notnil
 * @param current_version The current version of the application @notnil
Ghislain MARY's avatar
Ghislain MARY committed
129
 */
130
LINPHONE_PUBLIC void linphone_core_check_for_update(LinphoneCore *core, const char *current_version);
Ghislain MARY's avatar
Ghislain MARY committed
131

132 133
/**
 * Return the global unread chat message count.
134
 * @param core #LinphoneCore object. @notnil
135 136
 * @return The global unread chat message count.
 */
137
LINPHONE_PUBLIC int linphone_core_get_unread_chat_message_count (const LinphoneCore *core);
138 139 140

/**
 * Return the unread chat message count for a given local address.
141 142
 * @param core #LinphoneCore object. @notnil
 * @param address #LinphoneAddress object. @notnil
143 144 145
 * @return The unread chat message count.
 */
LINPHONE_PUBLIC int linphone_core_get_unread_chat_message_count_from_local (
146
	const LinphoneCore *core,
147 148 149 150 151
	const LinphoneAddress *address
);

/**
 * Return the unread chat message count for all active local address. (Primary contact + proxy configs.)
152
 * @param core #LinphoneCore object. @notnil
153 154
 * @return The unread chat message count.
 */
155
LINPHONE_PUBLIC int linphone_core_get_unread_chat_message_count_from_active_locals (const LinphoneCore *core);
156

Ghislain MARY's avatar
Ghislain MARY committed
157 158 159
/**
 * @}
 */
Simon Morlat's avatar
Simon Morlat committed
160

161 162
/**
 * Get the remote address of the current call.
163 164
 * @param core #LinphoneCore object. @notnil
 * @return The remote address of the current call or NULL if there is no current call. @maybenil
165 166
 * @ingroup call_control
 */
167
LINPHONE_PUBLIC const LinphoneAddress * linphone_core_get_current_call_remote_address(LinphoneCore *core);
168

169

Simon Morlat's avatar
Simon Morlat committed
170 171 172 173 174
/**
 * @addtogroup initializing
 * @{
**/

175 176
/**
 * Callback prototype
177
 */
178
typedef void (*LinphoneCoreCbFunc)(LinphoneCore *core,void * user_data);
179

smorlat's avatar
smorlat committed
180 181
/**
 * This structure holds all callbacks that the application should implement.
182
 * None is mandatory.
183
 * @donotwrap
smorlat's avatar
smorlat committed
184
**/
Simon Morlat's avatar
Simon Morlat committed
185
typedef struct _LinphoneCoreVTable{
186 187 188
	LinphoneCoreGlobalStateChangedCb global_state_changed; /**<Notifies global state changes*/
	LinphoneCoreRegistrationStateChangedCb registration_state_changed;/**<Notifies registration state changes*/
	LinphoneCoreCallStateChangedCb call_state_changed;/**<Notifies call state changes*/
189
	LinphoneCoreNotifyPresenceReceivedCb notify_presence_received; /**< Notify received presence events*/
190
	LinphoneCoreNotifyPresenceReceivedForUriOrTelCb notify_presence_received_for_uri_or_tel; /**< Notify received presence events*/
191
	LinphoneCoreNewSubscriptionRequestedCb new_subscription_requested; /**< Notify about pending presence subscription request */
192
	LINPHONE_DEPRECATED LinphoneCoreAuthInfoRequestedCb auth_info_requested; /** @brief Ask the application some authentication information.
193
	                                                                             @deprecated 21/09/2016 Use authentication_requested instead. */
194
	LinphoneCoreAuthenticationRequestedCb authentication_requested; /**< Ask the application some authentication information */
195
	LinphoneCoreCallLogUpdatedCb call_log_updated; /**< Notifies that call log list has been updated */
DanmeiChen's avatar
DanmeiChen committed
196
	LinphoneCoreCallIdUpdatedCb call_id_updated;/**< Notifies that callid of a call has been updated */
197
	LinphoneCoreMessageReceivedCb message_received; /**< a message is received, can be text or external body*/
198
	LinphoneCoreCbsMessageReceivedUnableDecryptCb message_received_unable_decrypt; /**< an encrypted message is received but we can't decrypt it*/
199
	LinphoneCoreIsComposingReceivedCb is_composing_received; /**< An is-composing notification has been received */
200 201 202 203 204 205 206 207
	LinphoneCoreDtmfReceivedCb dtmf_received; /**< A dtmf has been received received */
	LinphoneCoreReferReceivedCb refer_received; /**< An out of call refer was received */
	LinphoneCoreCallEncryptionChangedCb call_encryption_changed; /**<Notifies on change in the encryption of call streams */
	LinphoneCoreTransferStateChangedCb transfer_state_changed; /**<Notifies when a transfer is in progress */
	LinphoneCoreBuddyInfoUpdatedCb buddy_info_updated; /**< a LinphoneFriend's BuddyInfo has changed*/
	LinphoneCoreCallStatsUpdatedCb call_stats_updated; /**<Notifies on refreshing of call's statistics. */
	LinphoneCoreInfoReceivedCb info_received; /**<Notifies an incoming informational message received.*/
	LinphoneCoreSubscriptionStateChangedCb subscription_state_changed; /**<Notifies subscription state change */
208
	LinphoneCoreNotifyReceivedCb notify_received; /**< Notifies a an event notification, see linphone_core_subscribe() */
209
	LinphoneCoreSubscribeReceivedCb subscribe_received; /**< Notifies a subscribe has been received, see linphone_core_subscribe() */
210
	LinphoneCorePublishStateChangedCb publish_state_changed;/**Notifies publish state change (only from #LinphoneEvent api)*/
211
	LinphoneCoreConfiguringStatusCb configuring_status; /** Notifies configuring status changes */
212
	LINPHONE_DEPRECATED LinphoneCoreTextMessageReceivedCb text_received; /**< @brief A text message has been received.
213
	                                                                          @deprecated 19/11/2015 Use #message_received instead.*/
214
	LINPHONE_DEPRECATED LinphoneCoreFileTransferRecvCb file_transfer_recv; /**< @brief Callback to store file received attached to a #LinphoneChatMessage.
215
	                                                                            @deprecated 19/11/2015 */
216
	LINPHONE_DEPRECATED LinphoneCoreFileTransferSendCb file_transfer_send; /**< @brief Callback to collect file chunk to be sent for a #LinphoneChatMessage.
217
	                                                                            @deprecated 19/11/2015 */
218
	LINPHONE_DEPRECATED LinphoneCoreFileTransferProgressIndicationCb file_transfer_progress_indication; /**< @brief Callback to indicate file transfer progress.
219
	                                                                                                         @deprecated 19/11/2015 */
220 221 222
	LinphoneCoreNetworkReachableCb network_reachable; /**< Callback to report IP network status (I.E up/down )*/
	LinphoneCoreLogCollectionUploadStateChangedCb log_collection_upload_state_changed; /**< Callback to upload collected logs */
	LinphoneCoreLogCollectionUploadProgressIndicationCb log_collection_upload_progress_indication; /**< Callback to indicate log collection upload progress */
223 224
	LinphoneCoreFriendListCreatedCb friend_list_created;
	LinphoneCoreFriendListRemovedCb friend_list_removed;
225
	LinphoneCoreCbsCallCreatedCb call_created;
Ghislain MARY's avatar
Ghislain MARY committed
226
	LinphoneCoreCbsVersionUpdateCheckResultReceivedCb version_update_check_result_received;
Andrea Gianarda's avatar
Andrea Gianarda committed
227
	LinphoneCoreCbsConferenceStateChangedCb conference_state_changed;
228
	LinphoneCoreCbsChatRoomStateChangedCb chat_room_state_changed;
229
	LinphoneCoreCbsQrcodeFoundCb qrcode_found;
230 231 232
	LinphoneCoreCbsEcCalibrationResultCb ec_calibration_result;
	LinphoneCoreCbsEcCalibrationAudioInitCb ec_calibration_audio_init;
	LinphoneCoreCbsEcCalibrationAudioUninitCb ec_calibration_audio_uninit;
233 234
	LinphoneCoreCbsMessageReceivedCb message_sent;
	LinphoneCoreCbsChatRoomReadCb chat_room_read;
235
	LinphoneCoreCbsChatRoomSubjectChangedCb chat_room_subject_changed;
DanmeiChen's avatar
DanmeiChen committed
236
	LinphoneCoreCbsChatRoomEphemeralMessageDeleteCb chat_room_ephemeral_message_deleted;
237 238
	LinphoneCoreCbsFirstCallStartedCb first_call_started;
	LinphoneCoreCbsLastCallEndedCb last_call_ended;
239 240
	LinphoneCoreCbsAudioDeviceChangedCb audio_device_changed;
	LinphoneCoreCbsAudioDevicesListUpdatedCb audio_devices_list_updated;
241
	LinphoneCoreCbsImeeUserRegistrationCb imee_user_registration;
242
	LinphoneCoreCbsChatRoomExhumedCb chat_room_exhumed;
Simon Morlat's avatar
Simon Morlat committed
243
	void *user_data; /**<User data associated with the above callbacks */
aymeric's avatar
aymeric committed
244 245
} LinphoneCoreVTable;

246
/**
247 248 249
 * @brief Instantiate a vtable with all arguments set to NULL.
 * @return newly allocated vtable.
 * @donotwrap
250
 */
251
LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_v_table_new(void);
252

253
/**
254 255 256 257
 * @brief Sets a user data pointer in the vtable.
 * @param table the vtable.
 * @param data the user data to attach.
 * @donotwrap
258 259 260 261
 */
LINPHONE_PUBLIC void linphone_core_v_table_set_user_data(LinphoneCoreVTable *table, void *data);

/**
262 263 264 265
 * @brief Gets a user data pointer in the vtable.
 * @param table the vtable.
 * @return the data attached to the vtable.
 * @donotwrap
266
 */
267
LINPHONE_PUBLIC void* linphone_core_v_table_get_user_data(const LinphoneCoreVTable *table);
268 269 270 271

/**
 * 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.
272
 * @param core the linphonecore
273
 * @return the vtable that called the last callback
274
 * @donotwrap
275
 */
276
LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_get_current_vtable(LinphoneCore *core);
277

278
/**
279 280 281
 * @brief Destroy a vtable.
 * @param table to be destroyed.
 * @donotwrap
282
 */
283
LINPHONE_PUBLIC void linphone_core_v_table_destroy(LinphoneCoreVTable* table);
284

285 286
/**
 * Increment the reference counter.
287 288
 * @param cbs the #LinphoneCoreCbs object @notnil
 * @return the same #LinphoneCoreCbs object @notnil
289 290 291 292 293
 */
LINPHONE_PUBLIC LinphoneCoreCbs *linphone_core_cbs_ref(LinphoneCoreCbs *cbs);

/**
 * Decrement the reference counter.
294
 * @param cbs the #LinphoneCoreCbs object @notnil
295 296 297 298 299
 */
LINPHONE_PUBLIC void linphone_core_cbs_unref(LinphoneCoreCbs *cbs);

/**
 * Set private data to be get from each callbacks.
300
 * @param cbs the #LinphoneCoreCbs object @notnil
301
 * @param user_data the user data pointer. @maybenil
302 303 304 305 306
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_user_data(LinphoneCoreCbs *cbs, void *user_data);

/**
 * Get the user pointer.
307
 * @param cbs the #LinphoneCoreCbs object @notnil
308
 * @return the user data pointer. @maybenil
309
 */
Ghislain MARY's avatar
Ghislain MARY committed
310
LINPHONE_PUBLIC void *linphone_core_cbs_get_user_data(const LinphoneCoreCbs *cbs);
311 312 313 314

/**
 * Gets the current #LinphoneCoreCbs.
 * This is meant only to be called from a callback to be able to get the user_data associated with the #LinphoneCoreCbs that is calling the callback.
315 316
 * @param core the #LinphoneCore @notnil
 * @return the #LinphoneCoreCbs that has called the last callback @maybenil
317
 */
318
LINPHONE_PUBLIC LinphoneCoreCbs *linphone_core_get_current_callbacks(const LinphoneCore *core);
319

320 321
/**
 * Set the #LinphoneCoreGlobalStateChangedCb callback.
322
 * @param cbs A #LinphoneCoreCbs. @notnil
323
 * @param cb The callback.
324
 */
325
LINPHONE_PUBLIC void linphone_core_cbs_set_global_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsGlobalStateChangedCb cb);
326

327 328
/**
 * Get the # callback.
329
 * @param cbs A #LinphoneCoreCbs. @notnil
330 331 332 333
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsGlobalStateChangedCb linphone_core_cbs_get_global_state_changed(LinphoneCoreCbs *cbs);

334 335
/**
 * Set the #LinphoneCoreCbsRegistrationStateChangedCb callback.
336
 * @param cbs A #LinphoneCoreCbs. @notnil
337
 * @param cb The callback.
338 339 340
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_registration_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsRegistrationStateChangedCb cb);

341 342
/**
 * Get the #LinphoneCoreCbsRegistrationStateChangedCb callback.
343
 * @param cbs A #LinphoneCoreCbs. @notnil
344 345 346 347
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsRegistrationStateChangedCb linphone_core_cbs_get_registration_state_changed(LinphoneCoreCbs *cbs);

348 349
/**
 * Set the #LinphoneCoreCbsCallStateChangedCb callback.
350
 * @param cbs A #LinphoneCoreCbs. @notnil
351
 * @param cb The callback.
352 353 354
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_call_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsCallStateChangedCb cb);

355 356
/**
 * Get the #LinphoneCoreCbsCallStateChangedCb callback.
357
 * @param cbs A #LinphoneCoreCbs. @notnil
358 359 360 361
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsCallStateChangedCb linphone_core_cbs_get_call_state_changed(LinphoneCoreCbs *cbs);

362 363
/**
 * Set the #LinphoneCoreCbsNotifyPresenceReceivedCb callback.
364
 * @param cbs A #LinphoneCoreCbs. @notnil
365
 * @param cb The callback.
366 367 368
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_notify_presence_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsNotifyPresenceReceivedCb cb);

369 370
/**
 * Get the #LinphoneCoreCbsNotifyPresenceReceivedCb callback.
371
 * @param cbs A #LinphoneCoreCbs. @notnil
372 373 374 375
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsNotifyPresenceReceivedCb linphone_core_cbs_get_notify_presence_received(LinphoneCoreCbs *cbs);

376 377
/**
 * Set the #LinphoneCoreCbsNotifyPresenceReceivedForUriOrTelCb callback.
378
 * @param cbs A #LinphoneCoreCbs. @notnil
379
 * @param cb The callback.
380 381 382
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_notify_presence_received_for_uri_or_tel(LinphoneCoreCbs *cbs, LinphoneCoreCbsNotifyPresenceReceivedForUriOrTelCb cb);

383 384
/**
 * Get the #LinphoneCoreCbsNotifyPresenceReceivedForUriOrTelCb callback.
385
 * @param cbs A #LinphoneCoreCbs. @notnil
386 387 388 389
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsNotifyPresenceReceivedForUriOrTelCb linphone_core_cbs_get_notify_presence_received_for_uri_or_tel(LinphoneCoreCbs *cbs);

390 391
/**
 * Set the #LinphoneCoreCbsNewSubscriptionRequestedCb callback.
392
 * @param cbs A #LinphoneCoreCbs. @notnil
393
 * @param cb The callback.
394 395 396
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_new_subscription_requested(LinphoneCoreCbs *cbs, LinphoneCoreCbsNewSubscriptionRequestedCb cb);

397 398
/**
 * Get the #LinphoneCoreCbsNewSubscriptionRequestedCb callback.
399
 * @param cbs A #LinphoneCoreCbs. @notnil
400 401 402 403
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsNewSubscriptionRequestedCb linphone_core_cbs_get_new_subscription_requested(LinphoneCoreCbs *cbs);

404 405
/**
 * Set the #LinphoneCoreCbsAuthenticationRequestedCb callback.'
406
 * @param cbs A #LinphoneCoreCbs. @notnil
407
 * @param cb The callback.
408 409 410
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_authentication_requested(LinphoneCoreCbs *cbs, LinphoneCoreCbsAuthenticationRequestedCb cb);

411 412
/**
 * Get the #LinphoneCoreCbsAuthenticationRequestedCb callback.
413
 * @param cbs A #LinphoneCoreCbs. @notnil
414 415 416 417
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsAuthenticationRequestedCb linphone_core_cbs_get_authentication_requested(LinphoneCoreCbs *cbs);

418 419
/**
 * Set the #LinphoneCoreCbsCallLogUpdatedCb callback.
420
 * @param cbs A #LinphoneCoreCbs. @notnil
421
 * @param cb The callback.
422 423 424
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_call_log_updated(LinphoneCoreCbs *cbs, LinphoneCoreCbsCallLogUpdatedCb cb);

425 426
/**
 * Get the #LinphoneCoreCbsCallLogUpdatedCb callback.
427
 * @param cbs A #LinphoneCoreCbs. @notnil
428 429 430 431
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsCallLogUpdatedCb linphone_core_cbs_get_call_log_updated(LinphoneCoreCbs *cbs);

DanmeiChen's avatar
DanmeiChen committed
432 433 434 435 436 437 438 439 440 441 442 443 444 445
/**
 * Set the #LinphoneCoreCbsCallIdUpdatedCb callback.
 * @param cbs A #LinphoneCoreCbs. @notnil
 * @param cb The callback.
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_call_id_updated(LinphoneCoreCbs *cbs, LinphoneCoreCbsCallIdUpdatedCb cb);

/**
 * Get the #LinphoneCoreCbsCallIdUpdatedCb callback.
 * @param cbs A #LinphoneCoreCbs. @notnil
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsCallIdUpdatedCb linphone_core_cbs_get_call_id_updated(LinphoneCoreCbs *cbs);

446 447
/**
 * Set the #LinphoneCoreCbsMessageReceivedCb callback.
448
 * @param cbs A #LinphoneCoreCbs. @notnil
449
 * @param cb The callback.
450 451 452
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_message_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsMessageReceivedCb cb);

453 454
/**
 * Get the #LinphoneCoreCbsMessageReceivedCb callback.
455
 * @param cbs A #LinphoneCoreCbs. @notnil
456 457 458 459
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsMessageReceivedCb linphone_core_cbs_get_message_received(LinphoneCoreCbs *cbs);

460 461
/**
 * Set the #LinphoneCoreCbsMessageSentCb callback.
462
 * @param cbs A #LinphoneCoreCbs. @notnil
463
 * @param cb The callback.
464 465 466 467 468
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_message_sent(LinphoneCoreCbs *cbs, LinphoneCoreCbsMessageSentCb cb);

/**
 * Get the #LinphoneCoreCbsMessageSentCb callback.
469
 * @param cbs A #LinphoneCoreCbs. @notnil
470 471 472 473 474 475
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsMessageSentCb linphone_core_cbs_get_message_sent(LinphoneCoreCbs *cbs);

/**
 * Set the #LinphoneCoreCbsChatRoomReadCb callback.
476
 * @param cbs A #LinphoneCoreCbs. @notnil
477
 * @param cb The callback.
478 479 480 481 482
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_chat_room_read(LinphoneCoreCbs *cbs, LinphoneCoreCbsChatRoomReadCb cb);

/**
 * Get the #LinphoneCoreCbsChatRoomReadCb callback.
483
 * @param cbs A #LinphoneCoreCbs. @notnil
484 485 486 487
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsChatRoomReadCb linphone_core_cbs_get_chat_room_read(LinphoneCoreCbs *cbs);

488 489
/**
 * Set the #LinphoneCoreCbsMessageReceivedUnableDecryptCb callback.
490
 * @param cbs A #LinphoneCoreCbs. @notnil
491
 * @param cb The callback.
492 493 494 495 496
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_message_received_unable_decrypt(LinphoneCoreCbs *cbs, LinphoneCoreCbsMessageReceivedUnableDecryptCb cb);

/**
 * Get the #LinphoneCoreCbsMessageReceivedUnableDecryptCb callback.
497
 * @param cbs A #LinphoneCoreCbs. @notnil
498 499 500 501
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsMessageReceivedUnableDecryptCb linphone_core_cbs_get_message_received_unable_decrypt(LinphoneCoreCbs *cbs);

502 503
/**
 * Set the #LinphoneCoreCbsIsComposingReceivedCb callback.
504
 * @param cbs A #LinphoneCoreCbs. @notnil
505
 * @param cb The callback.
506 507 508
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_is_composing_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsIsComposingReceivedCb cb);

509 510
/**
 * Get the #LinphoneCoreCbsIsComposingReceivedCb callback.
511
 * @param cbs A #LinphoneCoreCbs. @notnil
512 513 514 515
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsIsComposingReceivedCb linphone_core_cbs_get_is_composing_received(LinphoneCoreCbs *cbs);

516 517
/**
 * Set the #LinphoneCoreCbsDtmfReceivedCb callback.
518
 * @param cbs A #LinphoneCoreCbs. @notnil
519
 * @param cb The callback.
520 521 522
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_dtmf_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsDtmfReceivedCb cb);

523 524
/**
 * Get the #LinphoneCoreCbsDtmfReceivedCb callback.
525
 * @param cbs A #LinphoneCoreCbs. @notnil
526 527 528 529
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsDtmfReceivedCb linphone_core_cbs_get_dtmf_received(LinphoneCoreCbs *cbs);

530 531
/**
 * Set the #LinphoneCoreCbsReferReceivedCb callback.
532
 * @param cbs A #LinphoneCoreCbs. @notnil
533
 * @param cb The callback.
534 535 536
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_refer_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsReferReceivedCb cb);

537 538
/**
 * Get the #LinphoneCoreCbsReferReceivedCb callback.
539
 * @param cbs A #LinphoneCoreCbs. @notnil
540 541 542 543
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsReferReceivedCb linphone_core_cbs_get_refer_received(LinphoneCoreCbs *cbs);

544 545
/**
 * Set the #LinphoneCoreCbsCallEncryptionChangedCb callback.
546
 * @param cbs A #LinphoneCoreCbs. @notnil
547
 * @param cb The callback.
548 549 550
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_call_encryption_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsCallEncryptionChangedCb cb);

551 552
/**
 * Get the #LinphoneCoreCbsCallEncryptionChangedCb callback.
553
 * @param cbs A #LinphoneCoreCbs. @notnil
554 555 556 557
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsCallEncryptionChangedCb linphone_core_cbs_get_call_encryption_changed(LinphoneCoreCbs *cbs);

558 559
/**
 * Set the #LinphoneCoreCbsTransferStateChangedCb callback.
560
 * @param cbs A #LinphoneCoreCbs. @notnil
561
 * @param cb The callback.
562 563 564
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_transfer_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsTransferStateChangedCb cb);

565 566
/**
 * Get the #LinphoneCoreCbsTransferStateChangedCb callback.
567
 * @param cbs A #LinphoneCoreCbs. @notnil
568 569 570 571
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsTransferStateChangedCb linphone_core_cbs_get_transfer_state_changed(LinphoneCoreCbs *cbs);

572 573
/**
 * Set the #LinphoneCoreCbsBuddyInfoUpdatedCb callback.
574
 * @param cbs A #LinphoneCoreCbs. @notnil
575
 * @param cb The callback.
576 577 578
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_buddy_info_updated(LinphoneCoreCbs *cbs, LinphoneCoreCbsBuddyInfoUpdatedCb cb);

579 580
/**
 * Get the #LinphoneCoreCbsBuddyInfoUpdatedCb callback.
581
 * @param cbs A #LinphoneCoreCbs. @notnil
582 583 584 585
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsBuddyInfoUpdatedCb linphone_core_cbs_get_buddy_info_updated(LinphoneCoreCbs *cbs);

586 587
/**
 * Set the #LinphoneCoreCbsCallStatsUpdatedCb callback.
588
 * @param cbs A #LinphoneCoreCbs. @notnil
589
 * @param cb The callback.
590 591 592
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_call_stats_updated(LinphoneCoreCbs *cbs, LinphoneCoreCbsCallStatsUpdatedCb cb);

593 594
/**
 * Get the #LinphoneCoreCbsCallStatsUpdatedCb callback.
595
 * @param cbs A #LinphoneCoreCbs. @notnil
596 597 598 599
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsCallStatsUpdatedCb linphone_core_cbs_get_call_stats_updated(LinphoneCoreCbs *cbs);

600 601
/**
 * Set the #LinphoneCoreCbsInfoReceivedCb callback.
602
 * @param cbs A #LinphoneCoreCbs. @notnil
603
 * @param cb The callback.
604 605 606
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_info_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsInfoReceivedCb cb);

607 608
/**
 * Get the #LinphoneCoreCbsInfoReceivedCb callback.
609
 * @param cbs A #LinphoneCoreCbs. @notnil
610 611 612 613
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsInfoReceivedCb linphone_core_cbs_get_info_received(LinphoneCoreCbs *cbs);

614 615
/**
 * Set the #LinphoneCoreCbsSubscriptionStateChangedCb callback.
616
 * @param cbs A #LinphoneCoreCbs. @notnil
617
 * @param cb The callback.
618 619 620
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_subscription_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsSubscriptionStateChangedCb cb);

621 622
/**
 * Get the #LinphoneCoreCbsSubscriptionStateChangedCb callback.
623
 * @param cbs A #LinphoneCoreCbs. @notnil
624 625 626 627
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsSubscriptionStateChangedCb linphone_core_cbs_get_subscription_state_changed(LinphoneCoreCbs *cbs);

628 629
/**
 * Set the #LinphoneCoreCbsNotifyReceivedCb callback.
630
 * @param cbs A #LinphoneCoreCbs. @notnil
631
 * @param cb The callback.
632 633 634
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_notify_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsNotifyReceivedCb cb);

635 636
/**
 * Get the #LinphoneCoreCbsNotifyReceivedCb callback.
637
 * @param cbs A #LinphoneCoreCbs. @notnil
638 639 640 641
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsNotifyReceivedCb linphone_core_cbs_get_notify_received(LinphoneCoreCbs *cbs);

642 643
/**
 * Set the #LinphoneCoreCbsSubscribeReceivedCb callback.
644
 * @param cbs A #LinphoneCoreCbs. @notnil
645
 * @param cb The callback.
646 647 648 649 650
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_subscribe_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsSubscribeReceivedCb cb);

/**
 * Get the #LinphoneCoreCbsSubscribeReceivedCb callback.
651
 * @param cbs A #LinphoneCoreCbs. @notnil
652 653 654 655
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsSubscribeReceivedCb linphone_core_cbs_get_subscribe_received(LinphoneCoreCbs *cbs);

656 657
/**
 * Set the #LinphoneCoreCbsPublishStateChangedCb callback.
658
 * @param cbs A #LinphoneCoreCbs. @notnil
659
 * @param cb The callback.
660 661 662
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_publish_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsPublishStateChangedCb cb);

663 664
/**
 * Get the #LinphoneCoreCbsPublishStateChangedCb callback.
665
 * @param cbs A #LinphoneCoreCbs. @notnil
666 667 668 669
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsPublishStateChangedCb linphone_core_cbs_get_publish_state_changed(LinphoneCoreCbs *cbs);

670 671
/**
 * Set the #LinphoneCoreCbsConfiguringStatusCb callback.
672
 * @param cbs A #LinphoneCoreCbs. @notnil
673
 * @param cb The callback.
674 675 676
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_configuring_status(LinphoneCoreCbs *cbs, LinphoneCoreCbsConfiguringStatusCb cb);

677 678
/**
 * Get the #LinphoneCoreCbsConfiguringStatusCb callback.
679
 * @param cbs A #LinphoneCoreCbs. @notnil
680 681 682 683
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsConfiguringStatusCb linphone_core_cbs_get_configuring_status(LinphoneCoreCbs *cbs);

684 685
/**
 * Set the #LinphoneCoreCbsNetworkReachableCb callback.
686
 * @param cbs A #LinphoneCoreCbs. @notnil
687
 * @param cb The callback.
688 689 690
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_network_reachable(LinphoneCoreCbs *cbs, LinphoneCoreCbsNetworkReachableCb cb);

691 692
/**
 * Get the #LinphoneCoreCbsNetworkReachableCb callback.
693
 * @param cbs A #LinphoneCoreCbs. @notnil
694 695
 * @return The callback.
 */
Sylvain Berfini's avatar
Sylvain Berfini committed
696
LINPHONE_PUBLIC LinphoneCoreCbsNetworkReachableCb linphone_core_cbs_get_network_reachable(LinphoneCoreCbs *cbs);
697

698 699
/**
 * Set the #LinphoneCoreCbsLogCollectionUploadStateChangedCb callback.
700
 * @param cbs A #LinphoneCoreCbs. @notnil
701
 * @param cb The callback.
702 703 704
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_log_collection_upload_state_changed(LinphoneCoreCbs *cbs, LinphoneCoreCbsLogCollectionUploadStateChangedCb cb);

705 706
/**
 * Get the #LinphoneCoreCbsLogCollectionUploadStateChangedCb callback.
707
 * @param cbs A #LinphoneCoreCbs. @notnil
708 709 710 711
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsLogCollectionUploadStateChangedCb linphone_core_cbs_get_log_collection_upload_state_changed(LinphoneCoreCbs *cbs);

712 713
/**
 * Set the #LinphoneCoreCbsLogCollectionUploadProgressIndicationCb callback.
714
 * @param cbs A #LinphoneCoreCbs. @notnil
715
 * @param cb The callback.
716 717 718
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_log_collection_upload_progress_indication(LinphoneCoreCbs *cbs, LinphoneCoreCbsLogCollectionUploadProgressIndicationCb cb);

719 720
/**
 * Get the #LinphoneCoreCbsLogCollectionUploadProgressIndicationCb callback.
721
 * @param cbs A #LinphoneCoreCbs. @notnil
722 723 724 725
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsLogCollectionUploadProgressIndicationCb linphone_core_cbs_get_log_collection_upload_progress_indication(LinphoneCoreCbs *cbs);

726 727
/**
 * Set the #LinphoneCoreCbsFriendListCreatedCb callback.
728
 * @param cbs A #LinphoneCoreCbs. @notnil
729
 * @param cb The callback.
730 731 732
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_friend_list_created(LinphoneCoreCbs *cbs, LinphoneCoreCbsFriendListCreatedCb cb);

733 734
/**
 * Get the #LinphoneCoreCbsFriendListCreatedCb callback.
735
 * @param cbs A #LinphoneCoreCbs. @notnil
736 737 738 739
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsFriendListCreatedCb linphone_core_cbs_get_friend_list_created(LinphoneCoreCbs *cbs);

740 741
/**
 * Set the #LinphoneCoreCbsFriendListRemovedCb callback.
742
 * @param cbs A #LinphoneCoreCbs. @notnil
743
 * @param cb The callback.
744 745 746
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_friend_list_removed(LinphoneCoreCbs *cbs, LinphoneCoreCbsFriendListRemovedCb cb);

747 748
/**
 * Get the #LinphoneCoreCbsFriendListRemovedCb callback.
749
 * @param cbs A #LinphoneCoreCbs. @notnil
750 751 752 753
 * @return The callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsFriendListRemovedCb linphone_core_cbs_get_friend_list_removed(LinphoneCoreCbs *cbs);

754 755
/**
 * Set the call created callback.
756
 * @param cbs #LinphoneCallCbs object. @notnil
757
 * @param cb The call created callback to be used.
758 759 760 761 762
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_call_created(LinphoneCoreCbs *cbs, LinphoneCoreCbsCallCreatedCb cb);

/**
 * Get the call created callback.
763
 * @param cbs #LinphoneCoreCbs object. @notnil
764 765 766 767
 * @return The current call created callback.
 */
LINPHONE_PUBLIC LinphoneCoreCbsCallCreatedCb linphone_core_cbs_get_call_created(LinphoneCoreCbs *cbs);

Ghislain MARY's avatar
Ghislain MARY committed
768 769
/**
 * Set the version update check result callback.
770
 * @param cbs #LinphoneCoreCbs object @notnil
771
 * @param cb The callback to use
Ghislain MARY's avatar
Ghislain MARY committed
772 773 774 775 776
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_version_update_check_result_received(LinphoneCoreCbs *cbs, LinphoneCoreCbsVersionUpdateCheckResultReceivedCb cb);

/**
 * Get the version update check result callback.
777
 * @param cbs #LinphoneCoreCbs object @notnil
Ghislain MARY's avatar
Ghislain MARY committed
778 779 780 781
 * @return The current callback
 */
LINPHONE_PUBLIC LinphoneCoreCbsVersionUpdateCheckResultReceivedCb linphone_core_cbs_get_version_update_check_result_received(LinphoneCoreCbs *cbs);

Andrea Gianarda's avatar
Andrea Gianarda committed
782 783 784 785 786 787 788 789 790 791 792 793 794 795
/**
 * Get the conference state changed callback.
 * @param[in] cbs #LinphoneCoreCbs object
 * @return The current callback
 */
LINPHONE_PUBLIC LinphoneCoreCbsConferenceStateChangedCb linphone_core_cbs_get_conference_state_changed (LinphoneCoreCbs *cbs);

/**
 * Set the conference state changed callback.
 * @param[in] cbs #LinphoneCoreCbs object
 * @param[in] cb The callback to use
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_conference_state_changed (LinphoneCoreCbs *cbs, LinphoneCoreCbsConferenceStateChangedCb cb);

796
/**
797
 * Get the chat room state changed callback.
798
 * @param cbs #LinphoneCoreCbs object @notnil
799 800
 * @return The current callback
 */
801
LINPHONE_PUBLIC LinphoneCoreCbsChatRoomStateChangedCb linphone_core_cbs_get_chat_room_state_changed (LinphoneCoreCbs *cbs);
802 803

/**
804
 * Set the chat room state changed callback.
805
 * @param cbs #LinphoneCoreCbs object @notnil
806
 * @param cb The callback to use
807
 */
808
LINPHONE_PUBLIC void linphone_core_cbs_set_chat_room_state_changed (LinphoneCoreCbs *cbs, LinphoneCoreCbsChatRoomStateChangedCb cb);
809

810 811
/**
 * Get the chat room subject changed callback.
812
 * @param cbs #LinphoneCoreCbs object @notnil
813 814 815 816 817 818
 * @return The current callback
 */
LINPHONE_PUBLIC LinphoneCoreCbsChatRoomSubjectChangedCb linphone_core_cbs_get_chat_room_subject_changed (LinphoneCoreCbs *cbs);

/**
 * Set the chat room subject changed callback.
819
 * @param cbs #LinphoneCoreCbs object @notnil
820
 * @param cb The callback to use
821 822 823
 */
LINPHONE_PUBLIC void linphone_core_cbs_set_chat_room_subject_changed (LinphoneCoreCbs *cbs, LinphoneCoreCbsChatRoomSubjectChangedCb cb);

DanmeiChen's avatar
DanmeiChen committed
824 825
/**
 * Get the chat room ephemeral message deleted callback.
826
 * @param cbs #LinphoneCoreCbs object @notnil
DanmeiChen's avatar
DanmeiChen committed
827 828 829 830 831 832
 * @return The current callback
 */
LINPHONE_PUBLIC LinphoneCoreCbsChatRoomEphemeralMessageDeleteCb linphone_core_cbs_get_chat_room_ephemeral_message_deleted (LinphoneCoreCbs *cbs);

/**
 * Set the chat room ephemeral message deleted callback.
833