]> sjero.net Git - linphone/blobdiff - coreapi/linphonecore.h
Remove useless arguement in linphone_core_upnp_available
[linphone] / coreapi / linphonecore.h
index 241813790b7bbdb12475018f8aab5e0015f1770e..67d4fb255bf02f3c9d102cc252b264992268b64d 100644 (file)
@@ -71,7 +71,6 @@ typedef struct _LCSipTransports{
        int tls_port;
 } LCSipTransports;
 
-typedef struct _LCSipTransports LCSipTransports;
 
 /**
  * Object that represents a SIP address.
@@ -344,14 +343,16 @@ struct _LinphoneCallStats {
        LinphoneUpnpState       upnp_state; /**< State of uPnP processing. */
        float download_bandwidth; /**<Download bandwidth measurement of received stream, expressed in kbit/s, including IP/UDP/RTP headers*/
        float upload_bandwidth; /**<Download bandwidth measurement of sent stream, expressed in kbit/s, including IP/UDP/RTP headers*/
+       float local_late_rate; /**<percentage of packet received too late over last second*/
+       float local_loss_rate; /**<percentage of lost packet over last second*/
 };
 
 /**
  * @}
 **/
 
-const LinphoneCallStats *linphone_call_get_audio_stats(const LinphoneCall *call);
-const LinphoneCallStats *linphone_call_get_video_stats(const LinphoneCall *call);
+const LinphoneCallStats *linphone_call_get_audio_stats(LinphoneCall *call);
+const LinphoneCallStats *linphone_call_get_video_stats(LinphoneCall *call);
 
 
 /** Callback prototype */
@@ -873,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);
@@ -883,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);
@@ -1155,10 +1199,9 @@ const char * linphone_core_get_stun_server(const LinphoneCore *lc);
  * @ingroup network_parameters
  * Return the availability of uPnP.
  *
- * @param lc #LinphoneCore
  * @return true if uPnP is available otherwise return false. 
  */
-bool_t linphone_core_upnp_available(const LinphoneCore *lc);
+bool_t linphone_core_upnp_available();
 
 /**
  * @ingroup network_parameters