chenqiyang
2021-08-16 d98a16782ce455ebf4624c6d29e4311598b7eead
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
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
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
/*
 * 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/>.
 */
 
#ifndef LINPHONE_FACTORY_H
#define LINPHONE_FACTORY_H
 
#include "linphone/types.h"
#include "logging.h"
 
#ifdef __cplusplus
extern "C" {
#endif
 
/**
 * @addtogroup initializing
 * @{
 */
 
/**
 * Create the #LinphoneFactory if that has not been done and return
 * a pointer on it.
 * @return A pointer on the #LinphoneFactory
 */
LINPHONE_PUBLIC LinphoneFactory *linphone_factory_get(void);
 
/**
 * Clean the factory. This function is generally useless as the factory is unique per process, however
 * calling this function at the end avoid getting reports from belle-sip leak detector about memory leaked in linphone_factory_get().
 */
LINPHONE_PUBLIC void linphone_factory_clean(void);
 
/**
 * Instanciate a #LinphoneCore object.
 *
 * The #LinphoneCore object is the primary handle for doing all phone actions.
 * It should be unique within your application.
 * @param factory The #LinphoneFactory singleton.
 * @param cbs a #LinphoneCoreCbs object holding your application callbacks. A reference
 * will be taken on it until the destruciton of the core or the unregistration
 * with linphone_core_remove_cbs().
 * @param 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.
 * @param 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.
 * @see linphone_core_new_with_config
 * @deprecated 2018-01-10: Use linphone_factory_create_core_3() instead
 */
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_core(
    const LinphoneFactory *factory,
    LinphoneCoreCbs *cbs,
    const char *config_path,
    const char *factory_config_path
);
 
/**
 * Instanciate a #LinphoneCore object.
 *
 * The #LinphoneCore object is the primary handle for doing all phone actions.
 * It should be unique within your application.
 * @param factory The #LinphoneFactory singleton.
 * @param cbs a #LinphoneCoreCbs object holding your application callbacks. A reference
 * will be taken on it until the destruciton of the core or the unregistration
 * with linphone_core_remove_cbs().
 * @param 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.
 * @param 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.
 * @param user_data an application pointer associated with the returned core.
 * @param system_context a pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass NULL on other platforms.
 * @see linphone_core_new_with_config
 * @deprecated 2018-01-10: Use linphone_factory_create_core_3() instead
 */
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_core_2 (
    const LinphoneFactory *factory,
    LinphoneCoreCbs *cbs,
    const char *config_path,
    const char *factory_config_path,
    void *user_data,
    void *system_context
);
 
/**
 * Instantiate a #LinphoneCore object.
 *
 * The #LinphoneCore object is the primary handle for doing all phone actions. It should be unique within your
 * application.
 * The #LinphoneCore object is not started automatically, you need to call linphone_core_start() to that effect.
 * The returned #LinphoneCore will be in #LinphoneGlobalState Ready.
 * Core ressources can be released using linphone_core_stop() which is strongly encouraged on garbage collected languages.
 * @param[in] factory The #LinphoneFactory singleton.
 * @param[in] 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, 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.
 * @param[in] factory_config_path A path to a read-only config file that can be used to store hard-coded preferences
 * such as proxy settings or internal preferences. The settings in this factory file always override the ones in the
 * normal config file. It is optional, use NULL if unneeded.
 * @param[in] system_context A pointer to a system object required by the core to operate. Currently it is required to
 * pass an android Context on android, pass NULL on other platforms.
 * @see linphone_core_new_with_config_3
 */
LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_core_3 (
    const LinphoneFactory *factory,
    const char *config_path,
    const char *factory_config_path,
    void *system_context
);
 
/**
 * Instantiate a shared #LinphoneCore object.
 *
 * The shared #LinphoneCore allow you to create several #LinphoneCore with the same config.
 * Two #LinphoneCore can't run at the same time.
 *
 * A shared #LinphoneCore can be a "Main Core" or an "Executor Core".
 * A "Main Core" automatically stops a running "Executor Core" when calling linphone_core_start()
 * An "Executor Core" can't start unless no other #LinphoneCore is started. It can be stopped by a "Main Core" and
 * switch to #LinphoneGlobalState Off at any time.
 *
 * Shared Executor Core are used in iOS UNNotificationServiceExtension to receive new messages from push notifications.
 * When the application is in background, its Shared Main Core is stopped.
 *
 * The #LinphoneCore object is not started automatically, you need to call linphone_core_start() to that effect.
 * The returned #LinphoneCore will be in #LinphoneGlobalState Ready.
 * Core ressources can be released using linphone_core_stop() which is strongly encouraged on garbage collected languages.
 * @param[in] factory The #LinphoneFactory singleton.
 * @param[in] config_filename The name of the config file. If it does not exists it will be created.
 * Its path is computed using the app_group_id. The config file is used to
 * store all settings, 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.
 * @param[in] factory_config_path A path to a read-only config file that can be used to store hard-coded preferences
 * such as proxy settings or internal preferences. The settings in this factory file always override the ones in the
 * normal config file. It is optional, use NULL if unneeded.
 * @param[in] system_context A pointer to a system object required by the core to operate. Currently it is required to
 * pass an android Context on android, pass NULL on other platforms.
 * @param[in] app_group_id Name of iOS App Group that lead to the file system that is shared between an app and its app extensions.
 * @param[in] main_core Indicate if we want to create a "Main Core" or an "Executor Core".
 * @see linphone_factory_create_shared_core_with_config
 */
LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_shared_core (
    const LinphoneFactory *factory,
    const char *config_filename,
    const char *factory_config_path,
    void *system_context,
    const char *app_group_id,
    bool_t main_core
);
 
/**
 * Instantiates a #LinphoneCore object with a given LpConfig.
 *
 * @param factory The #LinphoneFactory singleton.
 * The #LinphoneCore object is the primary handle for doing all phone actions.
 * It should be unique within your application.
 * @param cbs a #LinphoneCoreCbs object holding your application callbacks. A reference
 * will be taken on it until the destruciton of the core or the unregistration
 * with linphone_core_remove_cbs().
 * @param config a pointer to an LpConfig object holding the configuration of the #LinphoneCore to be instantiated.
 * @see linphone_core_new
 * @deprecated 2018-01-10: Use linphone_factory_create_core_with_config_3() instead
 */
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_core_with_config (
    const LinphoneFactory *factory,
    LinphoneCoreCbs *cbs,
    LinphoneConfig *config
);
 
/**
 * Instantiates a #LinphoneCore object with a given LpConfig.
 *
 * @param factory The #LinphoneFactory singleton.
 * The #LinphoneCore object is the primary handle for doing all phone actions.
 * It should be unique within your application.
 * @param cbs a #LinphoneCoreCbs object holding your application callbacks. A reference
 * will be taken on it until the destruciton of the core or the unregistration
 * with linphone_core_remove_cbs().
 * @param config a pointer to an LpConfig object holding the configuration of the #LinphoneCore to be instantiated.
 * @param user_data an application pointer associated with the returned core.
 * @param system_context a pointer to a system object required by the core to operate. Currently it is required to pass an android Context on android, pass NULL on other platforms.
 * @see linphone_core_new
 * @deprecated 2018-01-10: Use linphone_factory_create_core_with_config_3() instead
 */
LINPHONE_DEPRECATED LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_core_with_config_2 (
    const LinphoneFactory *factory,
    LinphoneCoreCbs *cbs,
    LinphoneConfig *config,
    void *user_data,
    void *system_context
);
 
/**
 * Instantiate a #LinphoneCore object with a given LinphoneConfig.
 *
 * The #LinphoneCore object is the primary handle for doing all phone actions. It should be unique within your
 * application.
 * The #LinphoneCore object is not started automatically, you need to call linphone_core_start() to that effect.
 * The returned #LinphoneCore will be in #LinphoneGlobalState Ready.
 * Core ressources can be released using linphone_core_stop() which is strongly encouraged on garbage collected languages.
 * @param[in] factory The #LinphoneFactory singleton.
 * @param[in] config A #LinphoneConfig object holding the configuration for the #LinphoneCore to be instantiated.
 * @param[in] system_context A pointer to a system object required by the core to operate. Currently it is required to
 * pass an android Context on android, pass NULL on other platforms.
 * @see linphone_factory_create_core_3
 */
LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_core_with_config_3 (
    const LinphoneFactory *factory,
    LinphoneConfig *config,
    void *system_context
);
 
/**
 * Instantiate a shared #LinphoneCore object.
 *
 * The shared #LinphoneCore allow you to create several #LinphoneCore with the same config.
 * Two #LinphoneCore can't run at the same time.
 *
 * A shared #LinphoneCore can be a "Main Core" or an "Executor Core".
 * A "Main Core" automatically stops a running "Executor Core" when calling linphone_core_start()
 * An "Executor Core" can't start unless no other #LinphoneCore is started. It can be stopped by a "Main Core" and
 * switch to #LinphoneGlobalState Off at any time.
 *
 * Shared Executor Core are used in iOS UNNotificationServiceExtension to receive new messages from push notifications.
 * When the application is in background, its Shared Main Core is stopped.
 *
 * The #LinphoneCore object is not started automatically, you need to call linphone_core_start() to that effect.
 * The returned #LinphoneCore will be in #LinphoneGlobalState Ready.
 * Core ressources can be released using linphone_core_stop() which is strongly encouraged on garbage collected languages.
 * @param[in] factory The #LinphoneFactory singleton.
 * @param[in] config A #LinphoneConfig object holding the configuration for the #LinphoneCore to be instantiated.
 * @param[in] system_context A pointer to a system object required by the core to operate. Currently it is required to
 * pass an android Context on android, pass NULL on other platforms.
 * @param[in] app_group_id Name of iOS App Group that lead to the file system that is shared between an app and its app extensions.
 * @param[in] main_core Indicate if we want to create a "Main Core" or an "Executor Core".
 * @see linphone_factory_create_shared_core
 */
LINPHONE_PUBLIC LinphoneCore *linphone_factory_create_shared_core_with_config (
    const LinphoneFactory *factory,
    LinphoneConfig *config,
    void *system_context,
    const char *app_group_id,
    bool_t main_core
);
 
/**
 * Instanciate a #LinphoneCoreCbs object.
 * @return a new #LinphoneCoreCbs.
 */
LINPHONE_PUBLIC LinphoneCoreCbs *linphone_factory_create_core_cbs(const LinphoneFactory *factory);
 
/**
 * Parse a string holding a SIP URI and create the according #LinphoneAddress object.
 * @param factory The #LinphoneFactory singleton.
 * @param addr A string holding the SIP URI to parse.
 * @return A new #LinphoneAddress.
 */
LINPHONE_PUBLIC LinphoneAddress *linphone_factory_create_address(const LinphoneFactory *factory, const char *addr);
 
/**
 * Create a #LinphoneParticipantDeviceIdentity object.
 * @param factory The #LinphoneFactory singleton.
 * @param address #LinphoneAddress object.
 * @param name the name given to the device.
 * @return A new #LinphoneParticipantDeviceIdentity.
 */
LINPHONE_PUBLIC LinphoneParticipantDeviceIdentity *linphone_factory_create_participant_device_identity(
    const LinphoneFactory *factory,
    const LinphoneAddress *address,
    const char *name
);
 
/**
 * Creates a #LinphoneAuthInfo object.
 * The object can be created empty, that is with all arguments set to NULL.
 * Username, userid, password, realm and domain can be set later using specific methods.
 * At the end, username and passwd (or ha1) are required.
 * @param factory The #LinphoneFactory singleton.
 * @param username The username that needs to be authenticated
 * @param userid The userid used for authenticating (use NULL if you don't know what it is)
 * @param passwd The password in clear text
 * @param ha1 The ha1-encrypted password if password is not given in clear text.
 * @param realm The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
 * @param domain The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
 * @return A #LinphoneAuthInfo object. linphone_auth_info_destroy() must be used to destroy it when no longer needed. The #LinphoneCore makes a copy of #LinphoneAuthInfo
 * passed through linphone_core_add_auth_info().
 */
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_factory_create_auth_info(const LinphoneFactory *factory, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain);
 
/**
 * Creates a #LinphoneAuthInfo object.
 * The object can be created empty, that is with all arguments set to NULL.
 * Username, userid, password, realm and domain can be set later using specific methods.
 * At the end, username and passwd (or ha1) are required.
 * @param factory The #LinphoneFactory singleton.
 * @param username The username that needs to be authenticated
 * @param userid The userid used for authenticating (use NULL if you don't know what it is)
 * @param passwd The password in clear text
 * @param ha1 The ha1-encrypted password if password is not given in clear text.
 * @param realm The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
 * @param domain The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
 * @param algorithm The algorithm for encrypting password.
 * @return A #LinphoneAuthInfo object. linphone_auth_info_destroy() must be used to destroy it when no longer needed. The #LinphoneCore makes a copy of #LinphoneAuthInfo
 * passed through linphone_core_add_auth_info().
 */
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_factory_create_auth_info_2(const LinphoneFactory *factory, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain, const char *algorithm);
 
/**
 * Create a #LinphoneCallCbs object that holds callbacks for events happening on a call.
 * @param[in] factory #LinphoneFactory singletion object
 * @return A new #LinphoneCallCbs object
 */
LINPHONE_PUBLIC LinphoneCallCbs * linphone_factory_create_call_cbs(const LinphoneFactory *factory);
 
/**
 * Create a LinphoneChatRoomCbs object that holds callbacks for events happening on a chat room.
 * @param[in] factory LinphoneFactory singletion object
 * @return A new LinphoneChatRoomCbs object
 */
LINPHONE_PUBLIC LinphoneChatRoomCbs * linphone_factory_create_chat_room_cbs(const LinphoneFactory *factory);
 
/**
 * Create a LinphoneChatMessageCbs object that holds callbacks for events happening on a chat message.
 * @param[in] factory LinphoneFactory singletion object
 * @return A new LinphoneChatMessageCbs object
 */
LINPHONE_PUBLIC LinphoneChatMessageCbs * linphone_factory_create_chat_message_cbs(const LinphoneFactory *factory);
 
/**
 * Create an empty #LinphoneVcard.
 * @return a new #LinphoneVcard.
 * @ingroup initializing
 */
LINPHONE_PUBLIC LinphoneVcard *linphone_factory_create_vcard(LinphoneFactory *factory);
 
/**
 * Create a #LinphoneVideoDefinition from a given width and height
 * @param[in] factory #LinphoneFactory singleton object
 * @param[in] width The width of the created video definition
 * @param[in] height The height of the created video definition
 * @return A new #LinphoneVideoDefinition object
 */
LINPHONE_PUBLIC LinphoneVideoDefinition * linphone_factory_create_video_definition(const LinphoneFactory *factory, unsigned int width, unsigned int height);
 
/**
 * Create a #LinphoneVideoDefinition from a given standard definition name
 * @param[in] factory #LinphoneFactory singleton object
 * @param[in] name The standard definition name of the video definition to create
 * @return A new #LinphoneVideoDefinition object
 */
LINPHONE_PUBLIC LinphoneVideoDefinition * linphone_factory_create_video_definition_from_name(const LinphoneFactory *factory, const char *name);
 
/**
 * Get the list of standard video definitions supported by Linphone.
 * @param[in] factory #LinphoneFactory singleton object
 * @return \bctbx_list{LinphoneVideoDefinition}
 */
LINPHONE_PUBLIC const bctbx_list_t * linphone_factory_get_supported_video_definitions(const LinphoneFactory *factory);
 
/**
 * Get the top directory where the resources are located.
 * @param[in] factory #LinphoneFactory object
 * @return The path to the top directory where the resources are located
 */
LINPHONE_PUBLIC const char * linphone_factory_get_top_resources_dir(const LinphoneFactory *factory);
 
/**
 * Set the top directory where the resources are located.
 * If you only define this top directory, the other resources directory will automatically be derived form this one.
 * @param[in] factory #LinphoneFactory object
 * @param[in] path The path to the top directory where the resources are located
 */
LINPHONE_PUBLIC void linphone_factory_set_top_resources_dir(LinphoneFactory *factory, const char *path);
 
/**
 * Get the directory where the data resources are located.
 * @param[in] factory #LinphoneFactory object
 * @return The path to the directory where the data resources are located
 */
LINPHONE_PUBLIC const char * linphone_factory_get_data_resources_dir(LinphoneFactory *factory);
 
/**
 * Set the directory where the data resources are located.
 * @param[in] factory #LinphoneFactory object
 * @param[in] path The path where the data resources are located
 */
LINPHONE_PUBLIC void linphone_factory_set_data_resources_dir(LinphoneFactory *factory, const char *path);
 
/**
 * Get the directory where the sound resources are located.
 * @param[in] factory #LinphoneFactory object
 * @return The path to the directory where the sound resources are located
 */
LINPHONE_PUBLIC const char * linphone_factory_get_sound_resources_dir(LinphoneFactory *factory);
 
/**
 * Set the directory where the sound resources are located.
 * @param[in] factory #LinphoneFactory object
 * @param[in] path The path where the sound resources are located
 */
LINPHONE_PUBLIC void linphone_factory_set_sound_resources_dir(LinphoneFactory *factory, const char *path);
 
/**
 * Get the directory where the ring resources are located.
 * @param[in] factory #LinphoneFactory object
 * @return The path to the directory where the ring resources are located
 */
LINPHONE_PUBLIC const char * linphone_factory_get_ring_resources_dir(LinphoneFactory *factory);
 
/**
 * Set the directory where the ring resources are located.
 * @param[in] factory #LinphoneFactory object
 * @param[in] path The path where the ring resources are located
 */
LINPHONE_PUBLIC void linphone_factory_set_ring_resources_dir(LinphoneFactory *factory, const char *path);
 
/**
 * Get the directory where the image resources are located.
 * @param[in] factory #LinphoneFactory object
 * @return The path to the directory where the image resources are located
 */
LINPHONE_PUBLIC const char * linphone_factory_get_image_resources_dir(LinphoneFactory *factory);
 
/**
 * Set the directory where the image resources are located.
 * @param[in] factory #LinphoneFactory object
 * @param[in] path The path where the image resources are located
 */
LINPHONE_PUBLIC void linphone_factory_set_image_resources_dir(LinphoneFactory *factory, const char *path);
 
/**
 * Get the directory where the mediastreamer2 plugins are located.
 * @param[in] factory #LinphoneFactory object
 * @return The path to the directory where the mediastreamer2 plugins are located, or NULL if it has not been set
 */
LINPHONE_PUBLIC const char * linphone_factory_get_msplugins_dir(LinphoneFactory *factory);
 
/**
 * Set the directory where the mediastreamer2 plugins are located.
 * @param[in] factory #LinphoneFactory object
 * @param[in] path The path to the directory where the mediastreamer2 plugins are located
 */
LINPHONE_PUBLIC void linphone_factory_set_msplugins_dir(LinphoneFactory *factory, const char *path);
 
/**
 * Creates an object LinphoneErrorInfo.
 * @param[in] factory #LinphoneFactory object
 * @return  #LinphoneErrorInfo object.
 */
LINPHONE_PUBLIC  LinphoneErrorInfo *linphone_factory_create_error_info(LinphoneFactory *factory);
 
/**
 * Creates an object LinphoneRange.
 * @param[in] factory #LinphoneFactory object
 * @return  #LinphoneRange object.
 */
LINPHONE_PUBLIC LinphoneRange *linphone_factory_create_range(LinphoneFactory *factory);
 
/**
 * Creates an object LinphoneTransports.
 * @param[in] factory #LinphoneFactory object
 * @return  #LinphoneTransports object.
 */
LINPHONE_PUBLIC LinphoneTransports *linphone_factory_create_transports(LinphoneFactory *factory);
 
/**
 * Creates an object LinphoneVideoActivationPolicy.
 * @param[in] factory #LinphoneFactory object
 * @return  #LinphoneVideoActivationPolicy object.
 */
LINPHONE_PUBLIC LinphoneVideoActivationPolicy *linphone_factory_create_video_activation_policy(LinphoneFactory *factory);
 
/**
 * Returns a bctbx_list_t of all DialPlans
 * @param[in] factory the #LinphoneFactory object
 * @return \bctbx_list{LinphoneDialPlan} a list of DialPlan
 */
LINPHONE_PUBLIC const bctbx_list_t * linphone_factory_get_dial_plans(const LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneContent
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneContent
 */
LINPHONE_PUBLIC LinphoneContent *linphone_factory_create_content(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneBuffer
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneBuffer
 */
LINPHONE_PUBLIC LinphoneBuffer *linphone_factory_create_buffer(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneBuffer
 * @param[in] factory the #LinphoneFactory
 * @param[in] data the data to set in the buffer
 * @param[in] size the size of the data
 * @return a #LinphoneBuffer
 */
LINPHONE_PUBLIC LinphoneBuffer *linphone_factory_create_buffer_from_data(LinphoneFactory *factory, const uint8_t *data, size_t size);
 
/**
 * Creates an object #LinphoneBuffer
 * @param[in] factory the #LinphoneFactory
 * @param[in] data the data to set in the buffer
 * @return a #LinphoneBuffer
 */
LINPHONE_PUBLIC LinphoneBuffer *linphone_factory_create_buffer_from_string(LinphoneFactory *factory, const char *data);
 
/**
 * Creates an object #LinphoneConfig
 * @param[in] factory the #LinphoneFactory
 * @param[in] path the path of the config
 * @return a #LinphoneConfig
 */
LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config(LinphoneFactory *factory, const char *path);
 
/**
 * Creates an object #LinphoneConfig
 * @param[in] factory the #LinphoneFactory
 * @param[in] path the path of the config
 * @param[in] path the path of the factory
 * @return a #LinphoneConfig
 */
LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config_with_factory(LinphoneFactory *factory, const char *path, const char *factory_path);
 
/**
 * Creates an object #LinphoneConfig
 * @param[in] factory the #LinphoneFactory
 * @param[in] data the config data
 * @return a #LinphoneConfig
 */
LINPHONE_PUBLIC LinphoneConfig *linphone_factory_create_config_from_string(LinphoneFactory *factory, const char *data);
 
/**
 * Gets the user data in the #LinphoneFactory object
 * @param[in] factory the #LinphoneFactory
 * @return the user data
*/
LINPHONE_PUBLIC void *linphone_factory_get_user_data(const LinphoneFactory *factory);
 
/**
 * Sets the user data in the #LinphoneFactory object
 * @param[in] factory the #LinphoneFactory object
 * @param[in] data the user data
*/
LINPHONE_PUBLIC void linphone_factory_set_user_data(LinphoneFactory *factory, void *data);
 
/**
 * Sets the log collection path
 * @param[in] factory the #LinphoneFactory
 * @param[in] path the path of the logs
 */
LINPHONE_PUBLIC void linphone_factory_set_log_collection_path(LinphoneFactory *factory, const char *path);
 
/**
 * Enables or disables log collection
 * @param[in] factory the #LinphoneFactory
 * @param[in] state the policy for log collection
 */
LINPHONE_PUBLIC void linphone_factory_enable_log_collection(LinphoneFactory *factory, LinphoneLogCollectionState state);
 
/**
 * Creates an object #LinphoneTunnelConfig
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneTunnelConfig
 */
LINPHONE_PUBLIC LinphoneTunnelConfig *linphone_factory_create_tunnel_config(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneLoggingServiceCbs
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneLoggingServiceCbs
 */
LINPHONE_PUBLIC LinphoneLoggingServiceCbs *linphone_factory_create_logging_service_cbs(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphonePlayerCbs
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphonePlayerCbs
 */
LINPHONE_PUBLIC LinphonePlayerCbs *linphone_factory_create_player_cbs(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneEventCbs
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneEventCbs
 */
LINPHONE_PUBLIC LinphoneEventCbs *linphone_factory_create_event_cbs(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneFriendListCbs
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneFriendListCbs
 */
LINPHONE_PUBLIC LinphoneFriendListCbs *linphone_factory_create_friend_list_cbs(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneAccountCreatorCbs
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneAccountCreatorCbs
 */
LINPHONE_PUBLIC LinphoneAccountCreatorCbs *linphone_factory_create_account_creator_cbs(LinphoneFactory *factory);
 
/**
 * Creates an object #LinphoneXmlRpcRequestCbs
 * @param[in] factory the #LinphoneFactory
 * @return a #LinphoneXmlRpcRequestCbs
 */
LINPHONE_PUBLIC LinphoneXmlRpcRequestCbs *linphone_factory_create_xml_rpc_request_cbs(LinphoneFactory *factory);
 
/**
 * Indicates if the given LinphoneChatRoomBackend is available
 * @param[in] factory the #LinphoneFactory
 * @param[in] chatroom_backend the #LinphoneChatRoomBackend
 * @return TRUE if the chatroom backend is available, FALSE otherwise
 */
LINPHONE_PUBLIC bool_t linphone_factory_is_chatroom_backend_available(LinphoneFactory *factory, LinphoneChatRoomBackend chatroom_backend);
 
/**
 * Indicates if the storage in database is available
 * @param[in] factory the #LinphoneFactory
 * @return TRUE if the database storage is available, FALSE otherwise
 */
LINPHONE_PUBLIC bool_t linphone_factory_is_database_storage_available(LinphoneFactory *factory);
 
/**
 * Indicates if IMDN are available
 * @param[in] factory the #LinphoneFactory
 * @return TRUE if IDMN are available
 */
LINPHONE_PUBLIC bool_t linphone_factory_is_imdn_available(LinphoneFactory *factory);
 
/**
 * Get the config path
 * @param[in] factory the #LinphoneFactory
 * @param[in] context used to compute path. can be NULL. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
 * @return The config path
 * @ingroup misc
**/
LINPHONE_PUBLIC const char *linphone_factory_get_config_dir(LinphoneFactory *factory, void *context);
 
/**
 * Get the data path
 * @param[in] factory the #LinphoneFactory
 * @param[in] context used to compute path. can be NULL. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
 * @return The data path
 * @ingroup misc
**/
LINPHONE_PUBLIC const char *linphone_factory_get_data_dir(LinphoneFactory *factory, void *context);
 
/**
 * Get the download path
 * @param[in] factory the #LinphoneFactory
 * @param[in] context used to compute path. can be NULL. JavaPlatformHelper on Android and char *appGroupId on iOS with shared core.
 * @return The download path
 * @ingroup misc
**/
LINPHONE_PUBLIC const char *linphone_factory_get_download_dir(LinphoneFactory *factory, void *context);
 
/**
 * @}
 */
 
#ifdef __cplusplus
}
#endif
 
 
#endif // LINPHONE_FACTORY_H