Merge branch 'master' of git.linphone.org:linphone into dev_python

This commit is contained in:
Ghislain MARY 2014-07-17 13:47:26 +02:00
commit c9e0c91589
8 changed files with 97 additions and 47 deletions

View file

@ -184,6 +184,7 @@ bool_t linphone_address_weak_equal(const LinphoneAddress *a1, const LinphoneAddr
/**
* Destroys a LinphoneAddress object (actually calls linphone_address_unref()).
* @deprecated Use linphone_address_unref() instead
**/
void linphone_address_destroy(LinphoneAddress *u){
sal_address_unref(u);

View file

@ -53,7 +53,7 @@ typedef struct _LinphoneTunnelConfig LinphoneTunnelConfig;
/**
* Create a new tunnel configuration
*/
LINPHONE_PUBLIC LinphoneTunnelConfig *linphone_tunnel_config_new();
LINPHONE_PUBLIC LinphoneTunnelConfig *linphone_tunnel_config_new(void);
/**
* Set address of server.

View file

@ -1578,12 +1578,18 @@ static void video_stream_event_cb(void *user_pointer, const MSFilter *f, const u
LinphoneCall* call = (LinphoneCall*) user_pointer;
switch (event_id) {
case MS_VIDEO_DECODER_DECODING_ERRORS:
ms_warning("Case is MS_VIDEO_DECODER_DECODING_ERRORS");
ms_warning("MS_VIDEO_DECODER_DECODING_ERRORS");
if (call->videostream && (video_stream_is_decoding_error_to_be_reported(call->videostream, 5000) == TRUE)) {
video_stream_decoding_error_reported(call->videostream);
linphone_call_send_vfu_request(call);
}
break;
case MS_VIDEO_DECODER_RECOVERED_FROM_ERRORS:
ms_message("MS_VIDEO_DECODER_RECOVERED_FROM_ERRORS");
if (call->videostream) {
video_stream_decoding_error_recovered(call->videostream);
}
break;
case MS_VIDEO_DECODER_FIRST_IMAGE_DECODED:
ms_message("First video frame decoded successfully");
if (call->nextVideoFrameDecoded._func != NULL)

View file

@ -1729,6 +1729,15 @@ extern "C" jlong Java_org_linphone_core_LinphoneProxyConfigImpl_getErrorInfo(JNI
return (jlong)linphone_proxy_config_get_error_info((LinphoneProxyConfig *) ptr);
}
extern "C" jint Java_org_linphone_core_LinphoneProxyConfigImpl_getPublishExpires(JNIEnv* env,jobject thiz,jlong ptr) {
return (jint)linphone_proxy_config_get_publish_expires((LinphoneProxyConfig *) ptr);
}
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setPublishExpires(JNIEnv* env
,jobject thiz
,jlong ptr
,jint jval) {
linphone_proxy_config_set_publish_expires((LinphoneProxyConfig *) ptr, jval);
}
//Auth Info
extern "C" jlong Java_org_linphone_core_LinphoneAuthInfoImpl_newLinphoneAuthInfo(JNIEnv* env

View file

@ -18,19 +18,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.linphone.core;
/**
* 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.
* 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 {@link LinphoneCore#addProxyConfig(LinphoneProxyConfig)}. This will automatically triggers the registration, if enabled.
*<br>The proxy configuration are persistent to restarts because they are saved in the configuration file. As a consequence, after {@link LinphoneCoreFactory#createLinphoneCore(LinphoneCoreListener, String, String, Object)} there might already be a default proxy that can be examined with {@link LinphoneCore#getDefaultProxyConfig()} .
*
*/
public interface LinphoneProxyConfig {
public void setIsDeleted(boolean b);
public boolean getIsDeleted();
/**
*Starts editing a proxy configuration.
*Because proxy configuration must be consistent, applications MUST call {@link #edit()} before doing any attempts to modify proxy configuration (such as identity, proxy address and so on).
*Because proxy configuration must be consistent, applications MUST call {@link #edit()} before doing any attempts to modify proxy configuration (such as identity, proxy address and so on).
*Once the modifications are done, then the application must call {@link #done()} to commit the changes.
*/
public LinphoneProxyConfig edit();
@ -61,20 +61,20 @@ public interface LinphoneProxyConfig {
public void setProxy(String proxyUri) throws LinphoneCoreException;
/**
* get the proxy's SIP address.
*
*
*/
public String getProxy();
/**
* Enable register for this proxy config.
* Register message is issued after call to {@link #done()}
* @param value
*/
*/
public LinphoneProxyConfig enableRegister(boolean value);
/**
* @return true if registration to the proxy is enabled.
*/
public boolean registerEnabled();
/**
* normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222
* @param number
@ -86,32 +86,32 @@ public interface LinphoneProxyConfig {
* @param prefix
*/
public void setDialPrefix(String prefix);
/**
* Returns the automatically added international prefix to e164 phone numbers
*/
public String getDialPrefix();
/**
* * Sets whether liblinphone should replace "+" by "00" in dialed numbers (passed to
* {@link LinphoneCore#invite(String)}).
* @param value default value is false
*/
public void setDialEscapePlus(boolean value);
/**
* Whether liblinphone should replace "+" by "00" in dialed numbers (passed to
* {@link LinphoneCore#invite(String)}).
*/
public boolean getDialEscapePlus();
/**
* get domain host name or ip
* @return may be null
*/
public String getDomain();
/**
*
*
* @return a boolean indicating that the user is successfully registered on the proxy.
*/
public boolean isRegistered();
@ -122,7 +122,7 @@ public interface LinphoneProxyConfig {
*/
public void setRoute(String routeUri) throws LinphoneCoreException;
/**
*
*
* @return the route set for this proxy configuration.
*/
public String getRoute();
@ -138,95 +138,95 @@ public interface LinphoneProxyConfig {
* returns publish state for this proxy config (see {@link #enablePublish(boolean)} )
*/
public boolean publishEnabled();
LinphoneCore.RegistrationState getState();
/**
* Sets the registration expiration time.
* @param delay expiration time in seconds
*/
void setExpires(int delay);
/**
* Gets the registration expiration time.
* @return delay expiration time in seconds.
*/
int getExpires();
/**
* Set the privacy for all calls or chat sessions using the identity exposed by this LinphoneProxyConfig
* @param privacy_mask a or'd int of values defined in interface {@link org.linphone.core.Privacy}
*/
void setPrivacy(int privacy_mask);
/**
* Get the privacy mask requested for this proxy config.
* @return the privacy mask as defined in interface {@link org.linphone.core.Privacy}
*/
int getPrivacy();
/**
* Indicates whether AVPF/SAVPF must be used for calls using this proxy config.
* @param enable True to enable AVPF/SAVF, false to disable it.
*/
void enableAvpf(boolean enable);
/**
* Whether AVPF is used for calls through this proxy.
* @return
* @return
*/
boolean avpfEnabled();
/**
* Set the interval between regular RTCP reports when using AVPF/SAVPF.
* @param interval The interval in seconds (between 0 and 5 seconds).
*/
void setAvpfRRInterval(int interval);
/**
* Get the interval between regular RTCP reports when using AVPF/SAVPF.
* @return The interval in seconds.
*/
int getAvpfRRInterval();
/**
* Indicates whether quality reporting must be used for calls using this proxy config.
* @param enable True to enable quality reporting, false to disable it.
*/
void enableQualityReporting(boolean enable);
/**
* Whether quality reporting is used for calls through this proxy.
* @return
* @return
*/
boolean qualityReportingEnabled();
/**
* Set the interval between quality interval reports during a call when using quality reporting.
* @param interval The interval in seconds (should be greater than 120 seconds to avoid too much).
*/
void setQualityReportingInterval(int interval);
/**
* Get the interval between quality interval reports during a call when using quality reporting.
* @return The interval in seconds.
*/
int getQualityReportingInterval();
/**
* Set the collector SIP URI to collect reports when using quality reporting.
* @param collector The collector SIP URI which should be configured server side too.
*/
void setQualityReportingCollector(String collector);
/**
* Get the collector SIP URI collecting reports when using quality reporting.
* @return The SIP URI collector address.
*/
String getQualityReportingCollector();
/**
* Set optional contact parameters that will be added to the contact information sent in the registration.
* @param contact_params a string containing the additional parameters in text form, like "myparam=something;myparam2=something_else"
@ -235,13 +235,13 @@ public interface LinphoneProxyConfig {
* As an example, the contact address in the SIP register sent will look like <sip:joe@15.128.128.93:50421>;android-push-id=43143-DFE23F-2323-FA2232.
**/
public void setContactParameters(String contact_params);
/**
* Get the contact's parameters.
* @return
*/
public String getContactParameters();
/**
* Set optional contact parameters that will be added to the contact information sent in the registration, inside the URI.
* @param params a string containing the additional parameters in text form, like "myparam=something;myparam2=something_else"
@ -250,34 +250,44 @@ public interface LinphoneProxyConfig {
* As an example, the contact address in the SIP register sent will look like <sip:joe@15.128.128.93:50421;apple-push-id=43143-DFE23F-2323-FA2232>.
**/
public void setContactUriParameters(String params);
/**
* Get the contact's URI parameters.
* @return
*/
public String getContactUriParameters();
/**
* Return the international prefix for the given country
* @param country iso code
*/
public int lookupCCCFromIso(String iso);
/**
* Return the international prefix for the given country
* @param e164 phone number
*/
public int lookupCCCFromE164(String e164);
/**
* Return reason error code.
* @return reason code.
*/
public Reason getError();
/**
* Get full error information about last error occured on the proxy config.
* @return an ErrorInfo.
*/
public ErrorInfo getErrorInfo();
/**
* Set the publish expiration time in second.
* @param expires in second
*/
public void setPublishExpires(int expires);
/**
* @return the publish expiration time in second. Default value is the registration expiration value.
*/
public int getPublishExpires();
}

View file

@ -212,7 +212,7 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
}
public boolean publishEnabled() {
isValid();
return publishEnabled(nativePtr);
return publishEnabled(nativePtr);
}
@Override
public void setContactParameters(String params) {
@ -304,21 +304,21 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
public ErrorInfo getErrorInfo() {
return new ErrorInfoImpl(getErrorInfo(nativePtr));
}
private native void enableQualityReporting(long nativePtr, boolean enable);
@Override
public void enableQualityReporting(boolean enable) {
isValid();
enableQualityReporting(nativePtr, enable);
}
private native boolean qualityReportingEnabled(long nativePtr);
@Override
public boolean qualityReportingEnabled() {
isValid();
return avpfEnabled(nativePtr);
}
private native void setQualityReportingInterval(long nativePtr, int interval);
@Override
public void setQualityReportingInterval(int interval) {
@ -344,4 +344,17 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
isValid();
return getQualityReportingCollector(nativePtr);
}
private native void setPublishExpires(long nativePtr, int expires);
@Override
public void setPublishExpires(int expires) {
isValid();
setPublishExpires(nativePtr, expires);
}
private native int getPublishExpires(long nativePtr);
@Override
public int getPublishExpires() {
isValid();
return getPublishExpires(nativePtr);
}
}

@ -1 +1 @@
Subproject commit b40af312e90b6c91bbee360f430ed87fa26119e9
Subproject commit 003add3c50881ad8c16cdd38202376afea2f424a

View file

@ -166,6 +166,16 @@ void linphone_proxy_config_is_server_config_changed_test() {
linphone_proxy_config_destroy(proxy_config);
}
static void chat_root_test(void) {
LinphoneCoreVTable v_table;
LinphoneCore* lc;
memset (&v_table,0,sizeof(v_table));
lc = linphone_core_new(&v_table,NULL,NULL,NULL);
CU_ASSERT_PTR_NOT_NULL_FATAL(lc);
linphone_core_create_chat_room(lc,"sip:toto@titi.com");
linphone_core_destroy(lc);
}
test_t setup_tests[] = {
{ "Linphone Address", linphone_address_test },
{ "Linphone proxy config address equal (internal api)", linphone_proxy_config_address_equal_test},
@ -173,7 +183,8 @@ test_t setup_tests[] = {
{ "Linphone core init/uninit", core_init_test },
{ "Linphone random transport port",core_sip_transport_test},
{ "Linphone interpret url", linphone_interpret_url_test },
{ "LPConfig from buffer", linphone_lpconfig_from_buffer }
{ "LPConfig from buffer", linphone_lpconfig_from_buffer },
{ "Chat room", chat_root_test }
};
test_suite_t setup_test_suite = {