]> sjero.net Git - linphone/commitdiff
Conferencing JNI + Android support.
authorGuillaume Beraudo <guillaume.beraudo@linphone.org>
Wed, 14 Sep 2011 08:27:11 +0000 (10:27 +0200)
committerGuillaume Beraudo <guillaume.beraudo@linphone.org>
Wed, 14 Sep 2011 08:27:11 +0000 (10:27 +0200)
Conflicts:

coreapi/conference.c
coreapi/linphonecore.h

build/android/Android.mk
coreapi/conference.c
coreapi/linphonecore.h
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCall.java
java/common/org/linphone/core/LinphoneCore.java
mediastreamer2

index 1c7a611bfe306b954f4a2bf5515135476f04c65b..3946dca89f3f8a96fe35b140badeb7bdcd2ef4ac 100755 (executable)
@@ -47,6 +47,7 @@ LOCAL_SRC_FILES := \
        offeranswer.c \
        callbacks.c \
        linphonecall.c \
+       conference.c \
        ec-calibrator.c
 
 ifndef MY_LOG_DOMAIN
index c1058233b9a1b5c691a0bf7bf552b8ba30496ff4..695fc61216b06fa6ace9af25e53d6ad76797b5ec 100644 (file)
@@ -157,3 +157,6 @@ int linphone_core_enter_conference(LinphoneCore *lc){
        return 0;
 }
 
+int linphone_core_add_all_to_conference(LinphoneCore *lc) {return 0;}
+int linphone_core_terminate_conference(LinphoneCore *lc) {return 0;}
+int linphone_core_get_conference_size(LinphoneCore *lc) {return 0;}
index dbf698fade5eb9a76826590d75fb69d683de5d1a..0cd5a232cc125ebe165525918c1f7bd8e6f3ab97 100644 (file)
@@ -1025,11 +1025,14 @@ const char* linphone_call_get_authentication_token(LinphoneCall *call);
 bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call);
 
 int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
+int linphone_core_add_all_to_conference(LinphoneCore *lc);
 int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);
 bool_t linphone_core_is_in_conference(const LinphoneCore *lc);
 int linphone_core_enter_conference(LinphoneCore *lc);
 int linphone_core_leave_conference(LinphoneCore *lc);
 
+int linphone_core_terminate_conference(LinphoneCore *lc);
+int linphone_core_get_conference_size(LinphoneCore *lc);
 
 #ifdef __cplusplus
 }
index 7ce1959ffd915d1d9fc5c14585355181fab01153..d5bd4ef46cd77aa07d39db3bef291a74da50c493 100644 (file)
@@ -1198,6 +1198,11 @@ extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_enableVideo(JNIEnv
 extern "C" jboolean Java_org_linphone_core_LinphoneCallParamsImpl_getVideoEnabled(JNIEnv *env, jobject thiz, jlong lcp){
        return linphone_call_params_video_enabled((LinphoneCallParams*)lcp);
 }
+
+extern "C" jboolean Java_org_linphone_core_LinphoneCallParamsImpl_localConferenceMode(JNIEnv *env, jobject thiz, jlong lcp){
+       return linphone_call_params_local_conference_mode((LinphoneCallParams*)lcp);
+}
+
 extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_destroy(JNIEnv *env, jobject thiz, jlong lc){
        return linphone_call_params_destroy((LinphoneCallParams*)lc);
 }
@@ -1323,6 +1328,41 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_pauseAllCalls(JNIEnv *en
 extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_resumeCall(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
        return linphone_core_resume_call((LinphoneCore *) pCore, (LinphoneCall *) pCall);
 }
+extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isInConference(JNIEnv *env,jobject thiz,jlong pCore) {
+       return linphone_core_is_in_conference((LinphoneCore *) pCore);
+}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enterConference(JNIEnv *env,jobject thiz,jlong pCore) {
+       linphone_core_enter_conference((LinphoneCore *) pCore);
+}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_leaveConference(JNIEnv *env,jobject thiz,jlong pCore) {
+       linphone_core_leave_conference((LinphoneCore *) pCore);
+}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addAllToConference(JNIEnv *env,jobject thiz,jlong pCore) {
+       linphone_core_add_all_to_conference((LinphoneCore *) pCore);
+}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addToConference(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
+       linphone_core_add_to_conference((LinphoneCore *) pCore, (LinphoneCall *) pCall);
+}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeFromConference(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
+       linphone_core_remove_from_conference((LinphoneCore *) pCore, (LinphoneCall *) pCall);
+}
+
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateConference(JNIEnv *env,jobject thiz,jlong pCore) {
+       linphone_core_terminate_conference((LinphoneCore *) pCore);
+}
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getConferenceSize(JNIEnv *env,jobject thiz,jlong pCore) {
+       return linphone_core_get_conference_size((LinphoneCore *) pCore);
+}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateAllCalls(JNIEnv *env,jobject thiz,jlong pCore) {
+       linphone_core_terminate_all_calls((LinphoneCore *) pCore);
+}
+extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_getCall(JNIEnv *env,jobject thiz,jlong pCore,jint position) {
+       return (jlong)ms_list_nth_data(linphone_core_get_calls((LinphoneCore *) pCore),position);
+}
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getCallsNb(JNIEnv *env,jobject thiz,jlong pCore) {
+       return ms_list_size(linphone_core_get_calls((LinphoneCore *) pCore));
+}
+
 
 extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setZrtpSecretsCache(JNIEnv *env,jobject thiz,jlong pCore, jstring jFile) {
        if (jFile) {
index a6edf1b7eb24514752c2ab8ff9c55d076f33758f..5f8745979f53cd96c08020758b20833d6b20a838 100644 (file)
@@ -34,6 +34,14 @@ public interface LinphoneCall {
                @SuppressWarnings("unchecked")
                static private Vector values = new Vector();
                private final int mValue;
+               public final int value() {return mValue;}
+               public static final int ID_INCOMING_RECEIVED=1;
+               public static final int ID_OUTGOING_RINGING=4;
+               public static final int ID_STREAMS_RUNNING=7;
+               public static final int ID_PAUSED=9;
+               public static final int ID_CALL_END=13;
+               public static final int ID_PAUSED_BY_REMOTE=14;
+
                private final String mStringValue;
                /**
                 * Idle
@@ -42,7 +50,7 @@ public interface LinphoneCall {
                /**
                 * Incoming call received.
                 */
-               public final static State IncomingReceived = new State(1,"IncomingReceived");
+               public final static State IncomingReceived = new State(ID_INCOMING_RECEIVED,"IncomingReceived");
                /**
                 * Outgoing call initialiazed.
                 */
@@ -54,7 +62,7 @@ public interface LinphoneCall {
                /**
                 * Outgoing call ringing.
                 */
-               public final static State OutgoingRinging = new State(4,"OutgoingRinging");
+               public final static State OutgoingRinging = new State(ID_OUTGOING_RINGING,"OutgoingRinging");
                /**
                 * Outgoing call early media
                 */
@@ -66,7 +74,7 @@ public interface LinphoneCall {
                /**
                 * Streams running
                 */
-               public final static State StreamsRunning = new State(7,"StreamsRunning");
+               public final static State StreamsRunning = new State(ID_STREAMS_RUNNING,"StreamsRunning");
                /**
                 * Paussing
                 */
@@ -74,7 +82,7 @@ public interface LinphoneCall {
                /**
                 * Paused
                 */
-               public final static State Paused = new State(9,"Paused");
+               public final static State Paused = new State(ID_PAUSED,"Paused");
                /**
                 * Resuming
                 */
@@ -90,12 +98,12 @@ public interface LinphoneCall {
                /**
                 * Call end
                 */
-               public final static State CallEnd = new State(13,"CallEnd");
+               public final static State CallEnd = new State(ID_CALL_END,"CallEnd");
                
                /**
                 * Paused by remote
                 */
-               public final static State PausedByRemote = new State(14,"PausedByRemote");
+               public final static State PausedByRemote = new State(ID_PAUSED_BY_REMOTE,"PausedByRemote");
                
                /**
                 * The call's parameters are updated, used for example when video is asked by remote
@@ -219,4 +227,5 @@ public interface LinphoneCall {
        String getAuthenticationToken();
        boolean isAuthenticationTokenVerified();
        boolean areStreamsEncrypted();
+       boolean isInConference();
 }
index 457a7c34ac5c9793a484bf3930c4e96a39e5cf3b..9f4e3d5a743360964649be802be88cb20dc3bb11 100644 (file)
@@ -594,6 +594,20 @@ public interface LinphoneCore {
        boolean pauseAllCalls();
        
        void setZrtpSecretsCache(String file);
-       public void enableEchoLimiter(boolean val);
+       void enableEchoLimiter(boolean val);
 
+       boolean isInConference();
+       void enterConference();
+       void leaveConference();
+
+       void addToConference(LinphoneCall call);
+       void addAllToConference();
+       void removeFromConference(LinphoneCall call);
+
+       void terminateConference();
+       int getConferenceSize();
+       
+       void terminateAllCalls();
+       @SuppressWarnings("unchecked") List getCalls();
+       int getCallsNb();
 }
index 22816808514255867ae8fa5347b854f4570784f7..88baea6036b1831228cc9deff92acb944e373ce0 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 22816808514255867ae8fa5347b854f4570784f7
+Subproject commit 88baea6036b1831228cc9deff92acb944e373ce0