]> sjero.net Git - linphone/commitdiff
Add getRemoteUserAgent() to the JNI.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Tue, 4 Dec 2012 13:04:10 +0000 (14:04 +0100)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Tue, 4 Dec 2012 13:04:33 +0000 (14:04 +0100)
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCall.java
java/impl/org/linphone/core/LinphoneCallImpl.java

index 1f924497bccfb5170d76e27755e61b9704754495..12b1a22fe2d6c8467788ef8b4b56c5c9652bcb48 100644 (file)
@@ -1488,6 +1488,12 @@ extern "C" jlong Java_org_linphone_core_LinphoneCallImpl_getRemoteAddress(       JNIEn
        return (jlong)linphone_call_get_remote_address((LinphoneCall*)ptr);
 }
 
+extern "C" jstring Java_org_linphone_core_LinphoneCallImpl_get_remoteUserAgent(JNIEnv *env, jobject thiz, jlong ptr) {
+       LinphoneCall *call = (LinphoneCall *)ptr;
+       jstring jvalue = env->NewStringUTF(linphone_call_get_remote_user_agent(call));
+       return jvalue;
+}
+
 extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getState(      JNIEnv*  env
                                                                                                                                                ,jobject  thiz
                                                                                                                                                ,jlong ptr) {
index 35e173d5a802d1a454b827780f3aca081285e475..7c02334e9f236390c9c740ef0f1b7f2b52ad63e5 100644 (file)
@@ -268,6 +268,11 @@ public interface LinphoneCall {
        boolean isInConference();
        
        float getPlayVolume();
+
+       /**
+        * Obtain the remote user agent string. 
+        */
+       String getRemoteUserAgent();
        
        /**
         * Take a photo of currently received video and write it into a jpeg file.
index 7e39cebc76663575642ae2de252421ffbf350b40..6a91438acf4ea8aaf80f3a4849fabae80bc8126d 100644 (file)
@@ -174,6 +174,11 @@ class LinphoneCallImpl implements LinphoneCall {
        public float getPlayVolume() {
                return getPlayVolume(nativePtr);
        }
+
+       private native String getRemoteUserAgent(long nativePtr);
+       public String getRemoteUserAgent() {
+               return getRemoteUserAgent(nativePtr);
+       }
        
        private native void takeSnapshot(long nativePtr, String path);
        public void takeSnapshot(String path) {