core.h 183 KB
Newer Older
aymeric's avatar
aymeric committed
1 2
/*
linphone
3
Copyright (C) 2000 - 2010 Simon MORLAT (simon.morlat@linphone.org)
aymeric's avatar
aymeric committed
4 5 6 7 8 9 10 11 12 13 14 15 16

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 2
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, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
aymeric's avatar
aymeric committed
18 19 20 21 22 23 24
*/
#ifndef LINPHONECORE_H
#define LINPHONECORE_H

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

smorlat's avatar
smorlat committed
31
#define LINPHONE_IPADDR_SIZE 64
smorlat's avatar
smorlat committed
32
#define LINPHONE_HOSTNAME_SIZE 128
smorlat's avatar
smorlat committed
33

jehan's avatar
jehan committed
34
#ifndef LINPHONE_PUBLIC
Simon Morlat's avatar
Simon Morlat committed
35
#define LINPHONE_PUBLIC MS2_PUBLIC
Sylvain Berfini's avatar
Sylvain Berfini committed
36 37
#endif

38
#ifndef LINPHONE_DEPRECATED
Simon Morlat's avatar
Simon Morlat committed
39
#define LINPHONE_DEPRECATED MS2_DEPRECATED
40
#endif
jehan's avatar
jehan committed
41 42


aymeric's avatar
aymeric committed
43 44 45 46 47
#ifdef __cplusplus
extern "C" {
#endif

struct _LinphoneCore;
48
struct _LinphoneChatRoom;
49 50 51
struct _LinphoneAuthInfo;
struct _SipSetupContext;
struct _LinphoneInfoMessage;
52

jehan's avatar
jehan committed
53 54 55 56 57
/**
 * Linphone core main object created by function linphone_core_new() .
 * @ingroup initializing
 */
typedef struct _LinphoneCore LinphoneCore;
aymeric's avatar
aymeric committed
58

59

60 61 62 63 64 65 66 67 68 69 70
/**
 * Disable a sip transport
 * Use with #LCSipTransports
 * @ingroup initializing
 */
#define LC_SIP_TRANSPORT_DISABLED 0
/**
 * Randomly chose a sip port for this transport
 * Use with #LCSipTransports
 * @ingroup initializing
 */
Simon Morlat's avatar
Simon Morlat committed
71 72 73 74 75 76 77 78
#define LC_SIP_TRANSPORT_RANDOM (-1)

/**
 * Don't create any server socket for this transport, ie don't bind on any port.
 * Use with #LCSipTransports
 * @ingroup initializing
**/
#define LC_SIP_TRANSPORT_DONTBIND (-2)
79

jehan's avatar
jehan committed
80 81
/**
 * Linphone core SIP transport ports.
Simon Morlat's avatar
Simon Morlat committed
82
 * Special values LC_SIP_TRANSPORT_RANDOM, LC_SIP_TRANSPORT_RANDOM, #define LC_SIP_TRANSPORT_DONTBIND can be used.
jehan's avatar
jehan committed
83 84 85
 * Use with #linphone_core_set_sip_transports
 * @ingroup initializing
 */
jehan's avatar
jehan committed
86
typedef struct _LCSipTransports{
jehan's avatar
jehan committed
87
	/**
Simon Morlat's avatar
Simon Morlat committed
88 89
	 * SIP/UDP port.
	 **/
90
	int udp_port;
jehan's avatar
jehan committed
91
	/**
Simon Morlat's avatar
Simon Morlat committed
92
	 * SIP/TCP port
jehan's avatar
jehan committed
93
	 * */
94
	int tcp_port;
jehan's avatar
jehan committed
95
	/**
Simon Morlat's avatar
Simon Morlat committed
96
	 * SIP/DTLS port
jehan's avatar
jehan committed
97
	 * */
98
	int dtls_port;
jehan's avatar
jehan committed
99
	/**
Simon Morlat's avatar
Simon Morlat committed
100
	 * SIP/TLS port
jehan's avatar
jehan committed
101
	 * */
102
	int tls_port;
jehan's avatar
jehan committed
103 104
} LCSipTransports;

105

106 107
/**
 * Enum describing transport type for LinphoneAddress.
108
 * @ingroup linphone_address
109 110 111 112 113 114 115 116 117
**/
enum _LinphoneTransportType{
	LinphoneTransportUdp,
	LinphoneTransportTcp,
	LinphoneTransportTls,
	LinphoneTransportDtls
};
/*this enum MUST be kept in sync with the SalTransport from sal.h*/

118 119 120 121
/**
 * Typedef for transport type enum.
 * @ingroup linphone_address
**/
122 123
typedef enum _LinphoneTransportType LinphoneTransportType;

124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
/**
 * Enum describing the stream types.
 * @ingroup initializing
**/
enum _LinphoneStreamType {
	LinphoneStreamTypeAudio,
	LinphoneStreamTypeVideo,
	LinphoneStreamTypeText,
	LinphoneStreamTypeUnknown /* WARNING: Make sure this value remains the last one in the list */
};

/**
 * Enum describing the stream types.
 * @ingroup initializing
**/
typedef enum _LinphoneStreamType LinphoneStreamType;
140

141
/**
142
 * Function returning a human readable value for LinphoneStreamType.
143 144
 * @ingroup initializing
 **/
145

146
LINPHONE_PUBLIC const char *linphone_stream_type_to_string(const LinphoneStreamType);
147

148 149
typedef struct belle_sip_dict LinphoneDictionary;

150 151 152 153 154 155 156 157 158 159 160
/**
 * The LinphoneCall object represents a call issued or received by the LinphoneCore
 * @ingroup call_control
**/
struct _LinphoneCall;
/**
 * The LinphoneCall object represents a call issued or received by the LinphoneCore
 * @ingroup call_control
**/
typedef struct _LinphoneCall LinphoneCall;

161
/**
162 163 164
 * Enum describing various failure reasons or contextual information for some events.
 * @see linphone_call_get_reason()
 * @see linphone_proxy_config_get_error()
165
 * @see linphone_error_info_get_reason()
166 167 168 169 170
 * @ingroup misc
**/
enum _LinphoneReason{
	LinphoneReasonNone,
	LinphoneReasonNoResponse, /**<No response received from remote*/
171
	LinphoneReasonForbidden, /**<Authentication failed due to bad credentials or resource forbidden*/
172
	LinphoneReasonDeclined, /**<The call has been declined*/
173 174
	LinphoneReasonNotFound, /**<Destination of the call was not found.*/
	LinphoneReasonNotAnswered, /**<The call was not answered in time (request timeout)*/
175
	LinphoneReasonBusy, /**<Phone line was busy */
176
	LinphoneReasonUnsupportedContent, /**<Unsupported content */
jehan's avatar
jehan committed
177
	LinphoneReasonIOError, /**<Transport error: connection failures, disconnections etc...*/
jehan's avatar
jehan committed
178
	LinphoneReasonDoNotDisturb, /**<Do not disturb reason*/
179
	LinphoneReasonUnauthorized, /**<Operation is unauthorized because missing credential*/
180
	LinphoneReasonNotAcceptable, /**<Operation is rejected due to incompatible or unsupported media parameters*/
181 182
	LinphoneReasonNoMatch, /**<Operation could not be executed by server or remote client because it didn't have any context for it*/
	LinphoneReasonMovedPermanently, /**<Resource moved permanently*/
183
	LinphoneReasonGone, /**<Resource no longer exists*/
184 185 186 187
	LinphoneReasonTemporarilyUnavailable, /**<Temporarily unavailable*/
	LinphoneReasonAddressIncomplete, /**<Address incomplete*/
	LinphoneReasonNotImplemented, /**<Not implemented*/
	LinphoneReasonBadGateway, /**<Bad gateway*/
188 189
	LinphoneReasonServerTimeout, /**<Server timeout*/
	LinphoneReasonUnknown /**Unknown reason*/
190 191
};

192 193
#define LinphoneReasonBadCredentials LinphoneReasonForbidden

194 195 196
/*for compatibility*/
#define LinphoneReasonMedia LinphoneReasonUnsupportedContent

197 198 199 200 201 202 203 204 205 206
/**
 * Enum describing failure reasons.
 * @ingroup misc
**/
typedef enum _LinphoneReason LinphoneReason;

/**
 * Converts a LinphoneReason enum to a string.
 * @ingroup misc
**/
207
LINPHONE_PUBLIC const char *linphone_reason_to_string(LinphoneReason err);
208

209 210 211 212 213 214 215 216
/**
 * Object representing full details about a signaling error or status.
 * All LinphoneErrorInfo object returned by the liblinphone API are readonly and transcients. For safety they must be used immediately
 * after obtaining them. Any other function call to the liblinphone may change their content or invalidate the pointer.
 * @ingroup misc
**/
typedef struct _LinphoneErrorInfo LinphoneErrorInfo;

217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
/**
 * Enum describing the authentication methods
 * @ingroup network_parameters
**/
enum _LinphoneAuthMethod {
	LinphoneAuthHttpDigest, /* Digest authentication requested */
	LinphoneAuthTls, /* Client certificate requested */
};

/**
 * Typedef for authentication methods enum.
 * @ingroup network_parameters
**/
typedef enum _LinphoneAuthMethod LinphoneAuthMethod;

232 233 234 235
LINPHONE_PUBLIC LinphoneReason linphone_error_info_get_reason(const LinphoneErrorInfo *ei);
LINPHONE_PUBLIC const char *linphone_error_info_get_phrase(const LinphoneErrorInfo *ei);
LINPHONE_PUBLIC const char *linphone_error_info_get_details(const LinphoneErrorInfo *ei);
LINPHONE_PUBLIC int linphone_error_info_get_protocol_code(const LinphoneErrorInfo *ei);
236 237

/* linphone dictionary */
238
LINPHONE_PUBLIC	LinphoneDictionary* linphone_dictionary_new(void);
Ghislain MARY's avatar
Ghislain MARY committed
239 240 241
LINPHONE_PUBLIC LinphoneDictionary * linphone_dictionary_clone(const LinphoneDictionary* src);
LINPHONE_PUBLIC LinphoneDictionary * linphone_dictionary_ref(LinphoneDictionary* obj);
LINPHONE_PUBLIC void linphone_dictionary_unref(LinphoneDictionary* obj);
242 243 244 245 246 247 248 249
LINPHONE_PUBLIC void linphone_dictionary_set_int(LinphoneDictionary* obj, const char* key, int value);
LINPHONE_PUBLIC int linphone_dictionary_get_int(LinphoneDictionary* obj, const char* key, int default_value);
LINPHONE_PUBLIC void linphone_dictionary_set_string(LinphoneDictionary* obj, const char* key, const char*value);
LINPHONE_PUBLIC const char* linphone_dictionary_get_string(LinphoneDictionary* obj, const char* key, const char* default_value);
LINPHONE_PUBLIC void linphone_dictionary_set_int64(LinphoneDictionary* obj, const char* key, int64_t value);
LINPHONE_PUBLIC int64_t linphone_dictionary_get_int64(LinphoneDictionary* obj, const char* key, int64_t default_value);
LINPHONE_PUBLIC int linphone_dictionary_remove(LinphoneDictionary* obj, const char* key);
LINPHONE_PUBLIC void linphone_dictionary_clear(LinphoneDictionary* obj);
250
LINPHONE_PUBLIC int linphone_dictionary_haskey(const LinphoneDictionary* obj, const char* key);
251 252 253 254 255 256
LINPHONE_PUBLIC void linphone_dictionary_foreach( const LinphoneDictionary* obj, void (*apply_func)(const char*key, void* value, void* userdata), void* userdata);
/**
 * Converts a config section into a dictionary.
 * @return a #LinphoneDictionary with all the keys from a section, or NULL if the section doesn't exist
 * @ingroup misc
 */
Ghislain MARY's avatar
Ghislain MARY committed
257
LINPHONE_PUBLIC LinphoneDictionary* lp_config_section_to_dict( const LpConfig* lpconfig, const char* section );
258 259 260 261 262 263

/**
 * Loads a dictionary into a section of the lpconfig. If the section doesn't exist it is created.
 * Overwrites existing keys, creates non-existing keys.
 * @ingroup misc
 */
Ghislain MARY's avatar
Ghislain MARY committed
264
LINPHONE_PUBLIC void lp_config_load_dict_to_section( LpConfig* lpconfig, const char* section, const LinphoneDictionary* dict);
265 266


267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
/**
 * @addtogroup media_parameters
 * @{
**/

/**
 * Object representing an RTP payload type.
 */
typedef PayloadType LinphonePayloadType;

/**
 * Get the type of payload.
 * @param[in] pt LinphonePayloadType object
 * @return The type of payload.
 */
LINPHONE_PUBLIC int linphone_payload_type_get_type(const LinphonePayloadType *pt);

/**
 * Get the normal bitrate in bits/s.
 * @param[in] pt LinphonePayloadType object
 * @return The normal bitrate in bits/s.
 */
LINPHONE_PUBLIC int linphone_payload_type_get_normal_bitrate(const LinphonePayloadType *pt);

/**
 * Get the mime type.
 * @param[in] pt LinphonePayloadType object
 * @return The mime type.
 */
296
LINPHONE_PUBLIC const char * linphone_payload_type_get_mime_type(const LinphonePayloadType *pt);
297 298 299 300 301 302 303 304

/**
 * Get the number of channels.
 * @param[in] pt LinphonePayloadType object
 * @return The number of channels.
 */
LINPHONE_PUBLIC int linphone_payload_type_get_channels(const LinphonePayloadType *pt);

305

306 307 308 309 310 311 312 313 314 315 316 317 318 319
/**
 * Enum describing RTP AVPF activation modes.
**/
enum _LinphoneAVPFMode{
	LinphoneAVPFDefault=-1, /**<Use default value defined at upper level*/
	LinphoneAVPFDisabled, /**<AVPF is disabled*/
	LinphoneAVPFEnabled /**<AVPF is enabled */
};

/**
 * Enum describing RTP AVPF activation modes.
**/
typedef enum _LinphoneAVPFMode  LinphoneAVPFMode;

320 321 322 323 324 325
/**
 * Enum describing type of media encryption types.
**/
enum _LinphoneMediaEncryption {
	LinphoneMediaEncryptionNone, /**< No media encryption is used */
	LinphoneMediaEncryptionSRTP, /**< Use SRTP media encryption */
johan's avatar
johan committed
326 327
	LinphoneMediaEncryptionZRTP, /**< Use ZRTP media encryption */
	LinphoneMediaEncryptionDTLS /**< Use DTLS media encryption */
328 329 330 331 332 333 334 335 336 337 338 339
};

/**
 * Enum describing type of media encryption types.
**/
typedef enum _LinphoneMediaEncryption LinphoneMediaEncryption;

/**
 * Convert enum member to string.
**/
LINPHONE_PUBLIC const char *linphone_media_encryption_to_string(LinphoneMediaEncryption menc);

340 341 342 343
/**
 * @}
**/

344

Simon Morlat's avatar
Simon Morlat committed
345 346 347
/*
 * Note for developers: this enum must be kept synchronized with the SalPrivacy enum declared in sal.h
 */
Simon Morlat's avatar
Simon Morlat committed
348
/**
jehan's avatar
jehan committed
349
 * @ingroup call_control
jehan's avatar
jehan committed
350
 * Defines privacy policy to apply as described by rfc3323
Simon Morlat's avatar
Simon Morlat committed
351
**/
jehan's avatar
jehan committed
352 353
typedef enum _LinphonePrivacy {
	/**
Simon Morlat's avatar
Simon Morlat committed
354
	 * Privacy services must not perform any privacy function
jehan's avatar
jehan committed
355
	 */
Simon Morlat's avatar
Simon Morlat committed
356
	LinphonePrivacyNone=0x0,
jehan's avatar
jehan committed
357
	/**
jehan's avatar
jehan committed
358
	 * Request that privacy services provide a user-level privacy
Simon Morlat's avatar
Simon Morlat committed
359 360
	 * function.
	 * With this mode, "from" header is hidden, usually replaced by  From: "Anonymous" <sip:anonymous@anonymous.invalid>
jehan's avatar
jehan committed
361
	 */
jehan's avatar
jehan committed
362
	LinphonePrivacyUser=0x1,
jehan's avatar
jehan committed
363
	/**
jehan's avatar
jehan committed
364
	 * Request that privacy services modify headers that cannot
Simon Morlat's avatar
Simon Morlat committed
365
	 * be set arbitrarily by the user (Contact/Via).
jehan's avatar
jehan committed
366
	 */
jehan's avatar
jehan committed
367
	LinphonePrivacyHeader=0x2,
Simon Morlat's avatar
Simon Morlat committed
368
	/**
jehan's avatar
jehan committed
369
	 *  Request that privacy services provide privacy for session
Simon Morlat's avatar
Simon Morlat committed
370 371
	 * media
	 */
jehan's avatar
jehan committed
372 373 374 375
	LinphonePrivacySession=0x4,
	/**
	 * rfc3325
	 * The presence of this privacy type in
Simon Morlat's avatar
Simon Morlat committed
376 377 378 379 380
	 * a Privacy header field indicates that the user would like the Network
	 * Asserted Identity to be kept private with respect to SIP entities
	 * outside the Trust Domain with which the user authenticated.  Note
	 * that a user requesting multiple types of privacy MUST include all of
	 * the requested privacy types in its Privacy header field value
jehan's avatar
jehan committed
381 382 383 384 385
	 *
	 */
	LinphonePrivacyId=0x8,
	/**
	 * Privacy service must perform the specified services or
Simon Morlat's avatar
Simon Morlat committed
386
	 * fail the request
jehan's avatar
jehan committed
387 388
	 *
	 **/
Simon Morlat's avatar
Simon Morlat committed
389
	LinphonePrivacyCritical=0x10,
Guillaume BIENKOWSKI's avatar
Guillaume BIENKOWSKI committed
390

Simon Morlat's avatar
Simon Morlat committed
391
	/**
Simon Morlat's avatar
Simon Morlat committed
392
	 * Special keyword to use privacy as defined either globally or by proxy using linphone_proxy_config_set_privacy()
Simon Morlat's avatar
Simon Morlat committed
393 394
	 */
	LinphonePrivacyDefault=0x8000,
jehan's avatar
jehan committed
395
} LinphonePrivacy;
jehan's avatar
jehan committed
396 397 398 399 400
/*
 * a mask  of #LinphonePrivacy values
 * */
typedef unsigned int LinphonePrivacyMask;

Simon Morlat's avatar
Simon Morlat committed
401 402

LINPHONE_PUBLIC const char* linphone_privacy_to_string(LinphonePrivacy privacy);
Ghislain MARY's avatar
Ghislain MARY committed
403 404


405
#include "linphone/address.h"
406
#include "linphone/buffer.h"
Ghislain MARY's avatar
Ghislain MARY committed
407 408
#include "linphone/call_log.h"
#include "linphone/call_params.h"
409 410 411
#include "linphone/content.h"
#include "linphone/event.h"
#include "linphone/linphonefriend.h"
412
#include "linphone/nat_policy.h"
413
#include "linphone/xmlrpc.h"
414
#include "linphone/conference.h"
Ghislain MARY's avatar
Ghislain MARY committed
415 416 417 418 419 420 421 422 423 424

/**
 * Create a #LinphoneAddress object by parsing the user supplied address, given as a string.
 * @param[in] lc #LinphoneCore object
 * @param[in] address String containing the user supplied address
 * @return The create #LinphoneAddress object
 * @ingroup linphone_address
 */
LINPHONE_PUBLIC LinphoneAddress * linphone_core_create_address(LinphoneCore *lc, const char *address);

Simon Morlat's avatar
Simon Morlat committed
425 426 427 428 429
/**
 * The LinphoneInfoMessage is an object representing an informational message sent or received by the core.
**/
typedef struct _LinphoneInfoMessage LinphoneInfoMessage;

430 431
LINPHONE_PUBLIC LinphoneInfoMessage *linphone_core_create_info_message(LinphoneCore*lc);
LINPHONE_PUBLIC int linphone_call_send_info_message(struct _LinphoneCall *call, const LinphoneInfoMessage *info);
Simon Morlat's avatar
Simon Morlat committed
432
LINPHONE_PUBLIC void linphone_info_message_add_header(LinphoneInfoMessage *im, const char *name, const char *value);
Simon Morlat's avatar
Simon Morlat committed
433
LINPHONE_PUBLIC const char *linphone_info_message_get_header(const LinphoneInfoMessage *im, const char *name);
Simon Morlat's avatar
Simon Morlat committed
434
LINPHONE_PUBLIC void linphone_info_message_set_content(LinphoneInfoMessage *im,  const LinphoneContent *content);
Simon Morlat's avatar
Simon Morlat committed
435
LINPHONE_PUBLIC const LinphoneContent * linphone_info_message_get_content(const LinphoneInfoMessage *im);
Simon Morlat's avatar
Simon Morlat committed
436
LINPHONE_PUBLIC void linphone_info_message_destroy(LinphoneInfoMessage *im);
437
LINPHONE_PUBLIC LinphoneInfoMessage *linphone_info_message_copy(const LinphoneInfoMessage *orig);
Simon Morlat's avatar
Simon Morlat committed
438

Simon Morlat's avatar
Simon Morlat committed
439 440


441 442
/**
 * Structure describing policy regarding video streams establishments.
Simon Morlat's avatar
Simon Morlat committed
443
 * @ingroup media_parameters
444 445
**/
struct _LinphoneVideoPolicy{
Guillaume BIENKOWSKI's avatar
Guillaume BIENKOWSKI committed
446
	bool_t automatically_initiate; /**<Whether video shall be automatically proposed for outgoing calls.*/
447 448 449 450
	bool_t automatically_accept; /**<Whether video shall be automatically accepted for incoming calls*/
	bool_t unused[2];
};

Simon Morlat's avatar
Simon Morlat committed
451 452 453 454
/**
 * Structure describing policy regarding video streams establishments.
 * @ingroup media_parameters
**/
455 456
typedef struct _LinphoneVideoPolicy LinphoneVideoPolicy;

457

Yann Diorcet's avatar
Yann Diorcet committed
458 459


Simon Morlat's avatar
Simon Morlat committed
460 461 462 463 464
/**
 * @addtogroup call_misc
 * @{
**/

465 466 467
#define LINPHONE_CALL_STATS_AUDIO ((int)LinphoneStreamTypeAudio)
#define LINPHONE_CALL_STATS_VIDEO ((int)LinphoneStreamTypeVideo)
#define LINPHONE_CALL_STATS_TEXT  ((int)LinphoneStreamTypeText)
Yann Diorcet's avatar
Yann Diorcet committed
468

469 470 471 472 473
/**
 * Enum describing ICE states.
 * @ingroup initializing
**/
enum _LinphoneIceState{
Simon Morlat's avatar
Simon Morlat committed
474
	LinphoneIceStateNotActivated, /**< ICE has not been activated for this call or stream*/
Ghislain MARY's avatar
Ghislain MARY committed
475
	LinphoneIceStateFailed, /**< ICE processing has failed */
476 477 478 479 480 481 482 483 484 485 486 487
	LinphoneIceStateInProgress, /**< ICE process is in progress */
	LinphoneIceStateHostConnection, /**< ICE has established a direct connection to the remote host */
	LinphoneIceStateReflexiveConnection, /**< ICE has established a connection to the remote host through one or several NATs */
	LinphoneIceStateRelayConnection /**< ICE has established a connection through a relay */
};

/**
 * Enum describing Ice states.
 * @ingroup initializing
**/
typedef enum _LinphoneIceState LinphoneIceState;

488 489
LINPHONE_PUBLIC const char *linphone_ice_state_to_string(LinphoneIceState state);

Yann Diorcet's avatar
Yann Diorcet committed
490 491 492 493 494 495 496 497 498 499 500 501
/**
 * Enum describing uPnP states.
 * @ingroup initializing
**/
enum _LinphoneUpnpState{
	LinphoneUpnpStateIdle, /**< uPnP is not activate */
	LinphoneUpnpStatePending, /**< uPnP process is in progress */
	LinphoneUpnpStateAdding,   /**< Internal use: Only used by port binding */
	LinphoneUpnpStateRemoving, /**< Internal use: Only used by port binding */
	LinphoneUpnpStateNotAvailable,  /**< uPnP is not available */
	LinphoneUpnpStateOk, /**< uPnP is enabled */
	LinphoneUpnpStateKo, /**< uPnP processing has failed */
Yann Diorcet's avatar
Yann Diorcet committed
502
	LinphoneUpnpStateBlacklisted, /**< IGD router is blacklisted */
Yann Diorcet's avatar
Yann Diorcet committed
503 504 505 506 507 508 509 510
};

/**
 * Enum describing uPnP states.
 * @ingroup initializing
**/
typedef enum _LinphoneUpnpState LinphoneUpnpState;

511

512 513 514 515
/**
 * Enum describing Ip family.
 * @ingroup initializing
**/
Erwan Croze's avatar
Erwan Croze committed
516 517 518 519
enum _LinphoneAddressFamily {
	LinphoneAddressFamilyInet, /* IpV4 */
	LinphoneAddressFamilyInet6, /* IpV6 */
	LinphoneAddressFamilyUnspec, /* Unknown */
520 521 522 523 524 525
};

/**
 * Enum describing Ip family.
 * @ingroup initializing
**/
Erwan Croze's avatar
Erwan Croze committed
526
typedef enum _LinphoneAddressFamily LinphoneAddressFamily;
527

Simon Morlat's avatar
Simon Morlat committed
528 529 530
/**
 * @}
**/
Yann Diorcet's avatar
Yann Diorcet committed
531

532 533
#include "linphone/call_stats.h"

Sylvain Berfini's avatar
Sylvain Berfini committed
534 535
LINPHONE_PUBLIC const LinphoneCallStats *linphone_call_get_audio_stats(LinphoneCall *call);
LINPHONE_PUBLIC const LinphoneCallStats *linphone_call_get_video_stats(LinphoneCall *call);
536
LINPHONE_PUBLIC const LinphoneCallStats *linphone_call_get_text_stats(LinphoneCall *call);
Yann Diorcet's avatar
Yann Diorcet committed
537

538
/** Callback prototype */
539
typedef void (*LinphoneCallCbFunc)(LinphoneCall *call,void * user_data);
540

541 542 543 544 545 546 547 548 549 550 551 552 553 554
/**
 * Player interface.
 * @ingroup call_control
**/
typedef struct _LinphonePlayer LinphonePlayer;

/**
 * Callback for notifying end of play (file).
 * @param obj the LinphonePlayer
 * @param user_data the user_data provided when calling linphone_player_open().
 * @ingroup call_control
**/
typedef void (*LinphonePlayerEofCallback)(struct _LinphonePlayer *obj, void *user_data);

555 556 557 558 559 560 561 562 563
LINPHONE_PUBLIC int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data);
LINPHONE_PUBLIC int linphone_player_start(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_pause(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_seek(LinphonePlayer *obj, int time_ms);
LINPHONE_PUBLIC MSPlayerState linphone_player_get_state(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_get_duration(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_get_current_position(LinphonePlayer *obj);
LINPHONE_PUBLIC void linphone_player_close(LinphonePlayer *obj);
LINPHONE_PUBLIC void linphone_player_destroy(LinphonePlayer *obj);
564

565
/**
566
 * Create an independent media file player.
567
 * This player support WAVE and MATROSKA formats.
568
 * @param lc A LinphoneCore object
569 570
 * @param snd_card Playback sound card. If NULL, the sound card set in LinphoneCore will be used
 * @param video_out Video display. If NULL, the video display set in LinphoneCore will be used
571
 * @param window_id Id of the drawing window. Depend of video out
572 573
 * @return A pointer on the new instance. NULL if faild.
 */
Ghislain MARY's avatar
Ghislain MARY committed
574
LINPHONE_PUBLIC LinphonePlayer *linphone_core_create_local_player(LinphoneCore *lc, MSSndCard *snd_card, const char *video_out, void *window_id);
575

576
/**
577
 * Check whether Matroksa format is supported by the player
578 579
 * @return TRUE if it is supported
 */
580
LINPHONE_PUBLIC bool_t linphone_local_player_matroska_supported(void);
581

Simon Morlat's avatar
Simon Morlat committed
582 583 584 585 586
/**
 * LinphoneCallState enum represents the different state a call can reach into.
 * The application is notified of state changes through the LinphoneCoreVTable::call_state_changed callback.
 * @ingroup call_control
**/
587
typedef enum _LinphoneCallState{
Simon Morlat's avatar
Simon Morlat committed
588
	LinphoneCallIdle,					/**<Initial call state */
589 590 591 592 593 594 595 596 597 598 599 600 601 602
	LinphoneCallIncomingReceived, /**<This is a new incoming call */
	LinphoneCallOutgoingInit, /**<An outgoing call is started */
	LinphoneCallOutgoingProgress, /**<An outgoing call is in progress */
	LinphoneCallOutgoingRinging, /**<An outgoing call is ringing at remote end */
	LinphoneCallOutgoingEarlyMedia, /**<An outgoing call is proposed early media */
	LinphoneCallConnected, /**<Connected, the call is answered */
	LinphoneCallStreamsRunning, /**<The media streams are established and running*/
	LinphoneCallPausing, /**<The call is pausing at the initiative of local end */
	LinphoneCallPaused, /**< The call is paused, remote end has accepted the pause */
	LinphoneCallResuming, /**<The call is being resumed by local end*/
	LinphoneCallRefered, /**<The call is being transfered to another party, resulting in a new outgoing call to follow immediately*/
	LinphoneCallError, /**<The call encountered an error*/
	LinphoneCallEnd, /**<The call ended normally*/
	LinphoneCallPausedByRemote, /**<The call is paused by remote end*/
Simon Morlat's avatar
Simon Morlat committed
603
	LinphoneCallUpdatedByRemote, /**<The call's parameters change is requested by remote end, used for example when video is added by remote */
604
	LinphoneCallIncomingEarlyMedia, /**<We are proposing early media to an incoming call */
605
	LinphoneCallUpdating, /**<A call update has been initiated by us */
606 607 608
	LinphoneCallReleased, /**< The call object is no more retained by the core */
	LinphoneCallEarlyUpdatedByRemote, /*<The call is updated by remote while not yet answered (early dialog SIP UPDATE received).*/
	LinphoneCallEarlyUpdating /*<We are updating the call while not yet answered (early dialog SIP UPDATE sent)*/
609 610
} LinphoneCallState;

611
LINPHONE_PUBLIC	const char *linphone_call_state_to_string(LinphoneCallState cs);
612

613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
/**
 * Acquire a reference to the call.
 * An application that wishes to retain a pointer to call object
 * must use this function to unsure the pointer remains
 * valid. Once the application no more needs this pointer,
 * it must call linphone_call_unref().
 * @param[in] call The call.
 * @return The same call.
 * @ingroup call_control
**/
LINPHONE_PUBLIC LinphoneCall *linphone_call_ref(LinphoneCall *call);

/**
 * Release reference to the call.
 * @param[in] call The call.
 * @ingroup call_control
**/
LINPHONE_PUBLIC void linphone_call_unref(LinphoneCall *call);

/**
 * Retrieve the user pointer associated with the call.
 * @param[in] call The call.
 * @return The user pointer associated with the call.
 * @ingroup call_control
**/
LINPHONE_PUBLIC void *linphone_call_get_user_data(const LinphoneCall *call);

/**
 * Assign a user pointer to the call.
Ghislain MARY's avatar
Ghislain MARY committed
642
 * @param[in] call The call.
643 644 645 646 647
 * @param[in] ud The user pointer to associate with the call.
 * @ingroup call_control
**/
LINPHONE_PUBLIC void linphone_call_set_user_data(LinphoneCall *call, void *ud);

648 649 650 651 652 653
/**
 * Get the core that has created the specified call.
 * @param[in] call LinphoneCall object
 * @return The LinphoneCore object that has created the specified call.
 * @ingroup call_control
 */
654
LINPHONE_PUBLIC LinphoneCore *linphone_call_get_core(const LinphoneCall *call);
655

656
LINPHONE_PUBLIC	LinphoneCallState linphone_call_get_state(const LinphoneCall *call);
Ghislain MARY's avatar
Ghislain MARY committed
657
LINPHONE_PUBLIC bool_t linphone_call_asked_to_autoanswer(LinphoneCall *call);
658 659 660 661 662 663 664

/**
 * Get the remote address of the current call.
 * @param[in] lc LinphoneCore object.
 * @return The remote address of the current call or NULL if there is no current call.
 * @ingroup call_control
 */
Simon Morlat's avatar
Simon Morlat committed
665
LINPHONE_PUBLIC	const LinphoneAddress * linphone_core_get_current_call_remote_address(LinphoneCore *lc);
666

Sylvain Berfini's avatar
Sylvain Berfini committed
667 668
LINPHONE_PUBLIC	const LinphoneAddress * linphone_call_get_remote_address(const LinphoneCall *call);
LINPHONE_PUBLIC	char *linphone_call_get_remote_address_as_string(const LinphoneCall *call);
jehan's avatar
jehan committed
669
LINPHONE_PUBLIC	const LinphoneAddress * linphone_call_get_diversion_address(const LinphoneCall *call);
Sylvain Berfini's avatar
Sylvain Berfini committed
670
LINPHONE_PUBLIC	LinphoneCallDir linphone_call_get_dir(const LinphoneCall *call);
671
LINPHONE_PUBLIC	LinphoneCallLog *linphone_call_get_call_log(const LinphoneCall *call);
672 673 674 675
LINPHONE_PUBLIC const char *linphone_call_get_refer_to(const LinphoneCall *call);
LINPHONE_PUBLIC bool_t linphone_call_has_transfer_pending(const LinphoneCall *call);
LINPHONE_PUBLIC LinphoneCall *linphone_call_get_transferer_call(const LinphoneCall *call);
LINPHONE_PUBLIC LinphoneCall *linphone_call_get_transfer_target_call(const LinphoneCall *call);
676
LINPHONE_PUBLIC	LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call);
Sylvain Berfini's avatar
Sylvain Berfini committed
677
LINPHONE_PUBLIC	int linphone_call_get_duration(const LinphoneCall *call);
678
LINPHONE_PUBLIC	const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call);
679
LINPHONE_PUBLIC	const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call);
Ghislain MARY's avatar
Ghislain MARY committed
680 681
LINPHONE_PUBLIC void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled);
LINPHONE_PUBLIC bool_t linphone_call_camera_enabled(const LinphoneCall *lc);
682
LINPHONE_PUBLIC int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file);
683
LINPHONE_PUBLIC int linphone_call_take_preview_snapshot(LinphoneCall *call, const char *file);
684
LINPHONE_PUBLIC	LinphoneReason linphone_call_get_reason(const LinphoneCall *call);
685
LINPHONE_PUBLIC const LinphoneErrorInfo *linphone_call_get_error_info(const LinphoneCall *call);
686
LINPHONE_PUBLIC	const char *linphone_call_get_remote_user_agent(LinphoneCall *call);
Sylvain Berfini's avatar
Sylvain Berfini committed
687
LINPHONE_PUBLIC	const char *linphone_call_get_remote_contact(LinphoneCall *call);
688 689 690

/**
 * Get the mesured playback volume level.
691
 *
692 693 694
 * @param call The call.
 * @return float Volume level in percentage.
 */
695
LINPHONE_PUBLIC	float linphone_call_get_play_volume(LinphoneCall *call);
696 697 698

/**
 * Get the mesured record volume level
699
 *
700 701 702
 * @param call The call.
 * @return float Volume level in percentage.
 */
703
LINPHONE_PUBLIC	float linphone_call_get_record_volume(LinphoneCall *call);
704

705
/**
706 707
 * Create a new chat room for messaging from a call if not already existing, else return existing one.
 * No reference is given to the caller: the chat room will be deleted when the call is ended.
708 709 710 711 712 713
 * @param call #LinphoneCall object
 * @return #LinphoneChatRoom where messaging can take place.
 */
LINPHONE_PUBLIC	struct _LinphoneChatRoom * linphone_call_get_chat_room(LinphoneCall *call);


714

715
/**
716
 * Get speaker volume gain.
717 718
 * If the sound backend supports it, the returned gain is equal to the gain set
 * with the system mixer.
719
 *
720
 * @param call The call.
721
 * @return Percenatge of the max supported volume gain. Valid values are in [ 0.0 : 1.0 ].
722 723
 * In case of failure, a negative value is returned
 */
724
LINPHONE_PUBLIC float linphone_call_get_speaker_volume_gain(const LinphoneCall *call);
725 726

/**
727
 * Set speaker volume gain.
728
 * If the sound backend supports it, the new gain will synchronized with the system mixer.
729
 *
730
 * @param call The call.
731
 * @param volume Percentage of the max supported gain. Valid values are in [ 0.0 : 1.0 ].
732
 */
733
LINPHONE_PUBLIC void linphone_call_set_speaker_volume_gain(LinphoneCall *call, float volume);
734 735

/**
736
 * Get microphone volume gain.
737 738
 * If the sound backend supports it, the returned gain is equal to the gain set
 * with the system mixer.
739
 *
740
 * @param call The call.
741
 * @return double Percenatge of the max supported volume gain. Valid values are in [ 0.0 : 1.0 ].
742 743
 * In case of failure, a negative value is returned
 */
744
LINPHONE_PUBLIC float linphone_call_get_microphone_volume_gain(const LinphoneCall *call);
745 746

/**
747
 * Set microphone volume gain.
748
 * If the sound backend supports it, the new gain will synchronized with the system mixer.
749
 *
750
 * @param call The call.
751
 * @param volume Percentage of the max supported gain. Valid values are in [ 0.0 : 1.0 ].
752
 */
753
LINPHONE_PUBLIC void linphone_call_set_microphone_volume_gain(LinphoneCall *call, float volume);
754

755 756 757 758 759
LINPHONE_PUBLIC	float linphone_call_get_current_quality(LinphoneCall *call);
LINPHONE_PUBLIC	float linphone_call_get_average_quality(LinphoneCall *call);
LINPHONE_PUBLIC	const char* linphone_call_get_authentication_token(LinphoneCall *call);
LINPHONE_PUBLIC	bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call);
LINPHONE_PUBLIC	void linphone_call_set_authentication_token_verified(LinphoneCall *call, bool_t verified);
760
LINPHONE_PUBLIC void linphone_call_send_vfu_request(LinphoneCall *call);
761 762 763 764
/** @deprecated Use linphone_call_get_user_data() instead. */
#define linphone_call_get_user_pointer(call) linphone_call_get_user_data(call)
/** @deprecated Use linphone_call_set_user_data() instead. */
#define linphone_call_set_user_pointer(call, ud) linphone_call_set_user_data(call, ud)
765
LINPHONE_PUBLIC	void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, LinphoneCallCbFunc cb, void* user_data);
766 767
LINPHONE_PUBLIC LinphoneCallState linphone_call_get_transfer_state(LinphoneCall *call);
LINPHONE_PUBLIC void linphone_call_zoom_video(LinphoneCall* call, float zoom_factor, float* cx, float* cy);
768 769
LINPHONE_PUBLIC	void linphone_call_start_recording(LinphoneCall *call);
LINPHONE_PUBLIC	void linphone_call_stop_recording(LinphoneCall *call);
770
LINPHONE_PUBLIC LinphonePlayer * linphone_call_get_player(LinphoneCall *call);
Simon Morlat's avatar
Simon Morlat committed
771
LINPHONE_PUBLIC bool_t linphone_call_media_in_progress(LinphoneCall *call);
772 773 774 775 776 777
/**
 * Send the specified dtmf.
 *
 * The dtmf is automatically played to the user.
 * @param call The LinphoneCall object
 * @param dtmf The dtmf name specified as a char, such as '0', '#' etc...
778
 * @return 0 if successful, -1 on error.
779
 * @ingroup call_control
780
**/
Ghislain MARY's avatar
Ghislain MARY committed
781
LINPHONE_PUBLIC	int linphone_call_send_dtmf(LinphoneCall *call,char dtmf);
782 783 784 785 786 787 788 789

/**
 * Send a list of dtmf.
 *
 * The dtmfs are automatically sent to remote, separated by some needed customizable delay.
 * Sending is canceled if the call state changes to something not LinphoneCallStreamsRunning.
 * @param call The LinphoneCall object
 * @param dtmfs A dtmf sequence such as '123#123123'
790
 * @return -2 if there is already a DTMF sequence, -1 if call is not ready, 0 otherwise.
791
 * @ingroup call_control
792
**/
Erwan Croze's avatar
Erwan Croze committed
793
LINPHONE_PUBLIC	int linphone_call_send_dtmfs(LinphoneCall *call,const char *dtmfs);
794 795 796 797 798 799 800 801 802

/**
 * Stop current DTMF sequence sending.
 *
 * Please note that some DTMF could be already sent,
 * depending on when this function call is delayed from #linphone_call_send_dtmfs. This
 * function will be automatically called if call state change to anything but LinphoneCallStreamsRunning.
 *
 * @param call The LinphoneCall object
803
 * @ingroup call_control
804 805
**/
LINPHONE_PUBLIC	void linphone_call_cancel_dtmfs(LinphoneCall *call);
Sylvain Berfini's avatar
Sylvain Berfini committed
806

807 808 809 810
/**
 * Get the native window handle of the video window, casted as an unsigned long.
 * @ingroup media_parameters
**/
Ghislain MARY's avatar
Ghislain MARY committed
811
LINPHONE_PUBLIC void * linphone_call_get_native_video_window_id(const LinphoneCall *call);
812 813 814 815 816 817

/**
 * Set the native video window id where the video is to be displayed.
 * For MacOS, Linux, Windows: if not set or 0 a window will be automatically created, unless the special id -1 is given.
 * @ingroup media_parameters
**/
Ghislain MARY's avatar
Ghislain MARY committed
818
LINPHONE_PUBLIC void linphone_call_set_native_video_window_id(LinphoneCall *call, void * id);
819

jehan's avatar
jehan committed
820 821
/**
 * Return TRUE if this call is currently part of a conference
822 823
 * @param call #LinphoneCall
 * @return TRUE if part of a conference.
jehan's avatar
jehan committed
824
 *
825
 * @deprecated Use linphone_call_get_conference() instead.
826
 * @ingroup call_control
jehan's avatar
jehan committed
827
 */
Ghislain MARY's avatar
Ghislain MARY committed
828
LINPHONE_PUBLIC	LINPHONE_DEPRECATED bool_t linphone_call_is_in_conference(const LinphoneCall *call);
829 830 831 832 833 834 835 836 837

/**
 * Return the associated conference object
 * @param call #LinphoneCall
 * @return A pointer on #LinphoneConference or NULL if the call is not part
 * of any conference.
 * @ingroup call_control
 */
LINPHONE_PUBLIC LinphoneConference *linphone_call_get_conference(const LinphoneCall *call);
jehan's avatar
jehan committed
838 839 840 841 842 843 844
/**
 * Enables or disable echo cancellation for this call
 * @param call
 * @param val
 *
 * @ingroup media_parameters
**/
845
LINPHONE_PUBLIC	void linphone_call_enable_echo_cancellation(LinphoneCall *call, bool_t val) ;
jehan's avatar
jehan committed
846 847 848 849 850
/**
 * Returns TRUE if echo cancellation is enabled.
 *
 * @ingroup media_parameters
**/
851
LINPHONE_PUBLIC	bool_t linphone_call_echo_cancellation_enabled(LinphoneCall *lc);
jehan's avatar
jehan committed
852 853 854 855 856 857 858
/**
 * Enables or disable echo limiter for this call
 * @param call
 * @param val
 *
 * @ingroup media_parameters
**/
859
LINPHONE_PUBLIC	void linphone_call_enable_echo_limiter(LinphoneCall *call, bool_t val);
jehan's avatar
jehan committed
860 861 862 863 864
/**
 * Returns TRUE if echo limiter is enabled.
 *
 * @ingroup media_parameters
**/
865
LINPHONE_PUBLIC	bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call);
Simon Morlat's avatar
Simon Morlat committed
866

867 868
/**
 * Enum describing type of audio route.
869
 * @ingroup call_control
870 871 872 873 874 875 876 877
**/
enum _LinphoneAudioRoute {
	LinphoneAudioRouteEarpiece = MSAudioRouteEarpiece,
	LinphoneAudioRouteSpeaker = MSAudioRouteSpeaker
};

/**
 * Enum describing type of audio route.
878
 * @ingroup call_control
879 880 881
**/
typedef enum _LinphoneAudioRoute LinphoneAudioRoute;

882 883 884 885
/**
 * Change the playback output device (currently only used for blackberry)
 * @param call
 * @param route the wanted audio route (earpiece, speaker, ...)
886
 *
887 888
 * @ingroup call_control
**/
889 890 891 892 893 894
LINPHONE_PUBLIC void linphone_call_set_audio_route(LinphoneCall *call, LinphoneAudioRoute route);

/**
 * Returns the number of stream for the given call.
 * Currently there is only two (Audio, Video), but later there will be more.
 * @param call
895
 *
896 897 898 899 900 901 902 903
 * @return 2
**/
LINPHONE_PUBLIC int linphone_call_get_stream_count(LinphoneCall *call);

/**
 * Returns the type of stream for the given stream index.
 * @param call
 * @param stream_index
904
 *
905
 * @return the type (MSAudio, MSVideo, MSText) of the stream of given index.
906 907 908 909 910 911 912
**/
LINPHONE_PUBLIC MSFormatType linphone_call_get_stream_type(LinphoneCall *call, int stream_index);

/**
 * Returns the meta rtp transport for the given stream index.
 * @param call
 * @param stream_index
913
 *
914 915 916 917 918 919 920 921
 * @return a pointer to the meta rtp transport if it exists, NULL otherwise
**/
LINPHONE_PUBLIC RtpTransport* linphone_call_get_meta_rtp_transport(LinphoneCall *call, int stream_index);

/**
 * Returns the meta rtcp transport for the given stream index.
 * @param call
 * @param stream_index
922
 *
923 924 925
 * @return a pointer to the meta rtcp transport if it exists, NULL otherwise
**/
LINPHONE_PUBLIC RtpTransport* linphone_call_get_meta_rtcp_transport(LinphoneCall *call, int stream_index);
926

Simon Morlat's avatar
Simon Morlat committed
927
/*keep this in sync with mediastreamer2/msvolume.h*/
Simon Morlat's avatar
Simon Morlat committed
928 929 930 931 932 933

/**
 * Lowest volume measurement that can be returned by linphone_call_get_play_volume() or linphone_call_get_record_volume(), corresponding to pure silence.
 * @ingroup call_misc
**/
#define LINPHONE_VOLUME_DB_LOWEST (-120)
Simon Morlat's avatar
Simon Morlat committed
934

smorlat's avatar
smorlat committed
935 936 937 938
/**
 * @addtogroup proxies
 * @{
**/
939

smorlat's avatar
smorlat committed
940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955
/**
 * The LinphoneProxyConfig object represents a proxy configuration to be used
 * by the LinphoneCore object.
 * Its fields must not be used directly in favour of the accessors methods.
 * Once created and filled properly the LinphoneProxyConfig can be given to
 * LinphoneCore with linphone_core_add_proxy_config().
 * This will automatically triggers the registration, if enabled.
 *
 * The proxy configuration are persistent to restarts because they are saved
 * in the configuration file. As a consequence, after linphone_core_new() there
 * might already be a list of configured proxy that can be examined with
 * linphone_core_get_proxy_config_list().
 *
 * The default proxy (see linphone_core_set_default_proxy() ) is the one of the list
 * that is used by default for calls.
**/
956
typedef struct _LinphoneProxyConfig LinphoneProxyConfig;
aymeric's avatar
aymeric committed
957

958 959 960 961
/**
 * LinphoneRegistrationState describes proxy registration states.
**/
typedef enum _LinphoneRegistrationState{
Simon Morlat's avatar
Simon Morlat committed
962 963 964 965 966
	LinphoneRegistrationNone, /**<Initial state for registrations */
	LinphoneRegistrationProgress, /**<Registration is in progress */
	LinphoneRegistrationOk,	/**< Registration is successful */
	LinphoneRegistrationCleared, /**< Unregistration succeeded */
	LinphoneRegistrationFailed	/**<Registration failed */