Commit d4f46e89 authored by jehan's avatar jehan

add enablePubish java binding

parent e559cf6d
...@@ -153,6 +153,7 @@ public class TutorialBuddyStatus implements LinphoneCoreListener { ...@@ -153,6 +153,7 @@ public class TutorialBuddyStatus implements LinphoneCoreListener {
// create proxy config // create proxy config
LinphoneProxyConfig proxyCfg = lcFactory.createProxyConfig(mySipAddress, domain, null, true); LinphoneProxyConfig proxyCfg = lcFactory.createProxyConfig(mySipAddress, domain, null, true);
proxyCfg.enablePublish(true);
lc.addProxyConfig(proxyCfg); // add it to linphone lc.addProxyConfig(proxyCfg); // add it to linphone
lc.setDefaultProxyConfig(proxyCfg); lc.setDefaultProxyConfig(proxyCfg);
while (!proxyCfg.isRegistered()) { while (!proxyCfg.isRegistered()) {
......
...@@ -303,6 +303,13 @@ void linphone_proxy_config_enable_register(LinphoneProxyConfig *obj, bool_t val) ...@@ -303,6 +303,13 @@ void linphone_proxy_config_enable_register(LinphoneProxyConfig *obj, bool_t val)
#define linphone_proxy_config_enableregister linphone_proxy_config_enable_register #define linphone_proxy_config_enableregister linphone_proxy_config_enable_register
void linphone_proxy_config_edit(LinphoneProxyConfig *obj); void linphone_proxy_config_edit(LinphoneProxyConfig *obj);
int linphone_proxy_config_done(LinphoneProxyConfig *obj); int linphone_proxy_config_done(LinphoneProxyConfig *obj);
/**
* Indicates either or not, PUBLISH must be issued for this #LinphoneProxyConfig .
* <br> In case this #LinphoneProxyConfig has been added to #LinphoneCore, follows the linphone_proxy_config_edit() rule.
* @param obj object pointer
* @param val if true, publish will be engaged
*
*/
void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val); void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val);
void linphone_proxy_config_set_dial_escape_plus(LinphoneProxyConfig *cfg, bool_t val); void linphone_proxy_config_set_dial_escape_plus(LinphoneProxyConfig *cfg, bool_t val);
void linphone_proxy_config_set_dial_prefix(LinphoneProxyConfig *cfg, const char *prefix); void linphone_proxy_config_set_dial_prefix(LinphoneProxyConfig *cfg, const char *prefix);
......
...@@ -714,7 +714,15 @@ extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setDialPrefix(JNI ...@@ -714,7 +714,15 @@ extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setDialPrefix(JNI
linphone_proxy_config_set_dial_prefix((LinphoneProxyConfig*)proxyCfg,prefix); linphone_proxy_config_set_dial_prefix((LinphoneProxyConfig*)proxyCfg,prefix);
env->ReleaseStringUTFChars(jprefix, prefix); env->ReleaseStringUTFChars(jprefix, prefix);
} }
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_enablePublish(JNIEnv* env
,jobject thiz
,jlong proxyCfg
,jboolean val) {
linphone_proxy_config_enable_publish((LinphoneProxyConfig*)proxyCfg,val);
}
extern "C" jboolean Java_org_linphone_core_LinphoneProxyConfigImpl_publishEnabled(JNIEnv* env,jobject thiz,jlong proxyCfg) {
return linphone_proxy_config_publish_enabled((LinphoneProxyConfig*)proxyCfg);
}
//Auth Info //Auth Info
......
...@@ -215,7 +215,6 @@ void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int val){ ...@@ -215,7 +215,6 @@ void linphone_proxy_config_expires(LinphoneProxyConfig *obj, int val){
void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val){ void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val){
obj->publish=val; obj->publish=val;
} }
/** /**
* Starts editing a proxy configuration. * Starts editing a proxy configuration.
* *
......
...@@ -112,5 +112,18 @@ public interface LinphoneProxyConfig { ...@@ -112,5 +112,18 @@ public interface LinphoneProxyConfig {
* @return the route set for this proxy configuration. * @return the route set for this proxy configuration.
*/ */
public String getRoute(); public String getRoute();
/**
* Indicates either or not, PUBLISH must be issued for this #LinphoneProxyConfig .
* <br> In case this #LinphoneProxyConfig has been added to #LinphoneCore, follows the linphone_proxy_config_edit() rule.
* @param obj object pointer
* @param val if true, publish will be engaged
*
*/
public void enablePublish(boolean enable);
/**
* returns publish state for this proxy config (see {@link #enablePublish(boolean)} )
*/
public boolean publishEnabled();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment