]> sjero.net Git - linphone/blobdiff - coreapi/linphonecore.h
Update ms2
[linphone] / coreapi / linphonecore.h
index 37001d367a4663dd5ce8c5369aa6da8f41a91a44..5ae73cc4dd91bb48676affa7a65d06151992d48e 100644 (file)
@@ -874,6 +874,35 @@ typedef void * (*LinphoneWaitingCallback)(struct _LinphoneCore *lc, void *contex
 
 /* THE main API */
 
+/**
+ * Define a log handler.
+ *
+ * @ingroup misc
+ *
+ * @param logfunc The function pointer of the log handler.
+ */
+void linphone_core_set_log_handler(OrtpLogFunc logfunc);
+/**
+ * Define a log file.
+ *
+ * @ingroup misc
+ *
+ * If the file pointer passed as an argument is NULL, stdout is used instead.
+ *
+ * @param file A pointer to the FILE structure of the file to write to.
+ */
+void linphone_core_set_log_file(FILE *file);
+/**
+ * Define the log level.
+ *
+ * @ingroup misc
+ *
+ * The loglevel parameter is a bitmask parameter. Therefore to enable only warning and error
+ * messages, use ORTP_WARNING | ORTP_ERROR. To disable logs, simply set loglevel to 0.
+ *
+ * @param loglevel A bitmask of the log levels to set.
+ */
+void linphone_core_set_log_level(OrtpLogLevel loglevel);
 void linphone_core_enable_logs(FILE *file);
 void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc);
 void linphone_core_disable_logs(void);
@@ -884,6 +913,20 @@ const char *linphone_core_get_user_agent_version(void);
 LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
                                                const char *config_path, const char *factory_config, void* userdata);
 
+/**
+ * Instantiates a LinphoneCore object with a given LpConfig.
+ * @ingroup initializing
+ *
+ * The LinphoneCore object is the primary handle for doing all phone actions.
+ * It should be unique within your application.
+ * @param vtable a LinphoneCoreVTable structure holding your application callbacks
+ * @param config a pointer to an LpConfig object holding the configuration of the LinphoneCore to be instantiated.
+ * @param userdata an opaque user pointer that can be retrieved at any time (for example in
+ *        callbacks) using linphone_core_get_user_data().
+ * @see linphone_core_new
+**/
+LinphoneCore *linphone_core_new_with_config(const LinphoneCoreVTable *vtable, struct _LpConfig *config, void *userdata);
+
 /* function to be periodically called in a main loop */
 /* For ICE to work properly it should be called every 20ms */
 void linphone_core_iterate(LinphoneCore *lc);