]> sjero.net Git - linphone/commitdiff
JNI for setting file to play while on hold.
authorGuillaume Beraudo <guillaume.beraudo@belledonne-communications.com>
Thu, 1 Dec 2011 07:34:21 +0000 (08:34 +0100)
committerGuillaume Beraudo <guillaume.beraudo@belledonne-communications.com>
Thu, 1 Dec 2011 07:36:03 +0000 (08:36 +0100)
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCore.java

index f36b0db483309f77607d8b12015c21760905c1a5..4552a0523ad5447c2787556d67036706d2286fcc 100644 (file)
@@ -732,6 +732,14 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isVideoEnabled(JNIEn
                                                                                                                                                        ,jlong lc) {
        return linphone_core_video_enabled((LinphoneCore*)lc);
 }
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPlayFile(JNIEnv*  env
+                                                                                                                                                       ,jobject  thiz
+                                                                                                                                                       ,jlong lc
+                                                                                                                                                       ,jstring jpath) {
+       const char* path = jpath?env->GetStringUTFChars(jpath, NULL):NULL;
+       linphone_core_set_play_file((LinphoneCore*)lc,path);
+       if (path) env->ReleaseStringUTFChars(jpath, path);
+}
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setRing(JNIEnv*  env
                                                                                                                                                        ,jobject  thiz
                                                                                                                                                        ,jlong lc
index e3f06ab554f39dc6abfe8d6ea5f1ebfdd9c27a2c..b3c25b4b72c241cb2428c02a46921581a0b26b9d 100644 (file)
@@ -699,8 +699,13 @@ public interface LinphoneCore {
         */
        void setMediaEncryptionMandatory(boolean yesno);
        /**
-        * @return if media encryption is required for ougtoing calls
+        * @return if media encryption is required for outgoing calls
         */
        boolean isMediaEncryptionMandatory();
+
+       /**
+        * @param path path to music file played to remote side when on hold.
+        */
+       void setPlayFile(String path);
        
 }