Commit b07b7845 authored by Guillaume Beraudo's avatar Guillaume Beraudo
Browse files

Conferencing JNI + Android support.

Conflicts:

	coreapi/conference.c
	coreapi/linphonecore.h
parent 0a9e2d37
......@@ -47,6 +47,7 @@ LOCAL_SRC_FILES := \
offeranswer.c \
callbacks.c \
linphonecall.c \
conference.c \
ec-calibrator.c
ifndef MY_LOG_DOMAIN
......
......@@ -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;}
......@@ -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
}
......
......@@ -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) {
......
......@@ -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();
}
......@@ -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();
}
mediastreamer2 @ 88baea60
Subproject commit 22816808514255867ae8fa5347b854f4570784f7
Subproject commit 88baea6036b1831228cc9deff92acb944e373ce0
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