Commit fc9dc609 authored by François Grisez's avatar François Grisez
Browse files

Add a method to LinphoneCallLog to check whether a call was a call to a conference server

parent 454e9834
......@@ -248,6 +248,10 @@ bool_t linphone_call_log_video_enabled(LinphoneCallLog *cl) {
return cl->video_enabled;
}
bool_t linphone_call_log_was_conference(LinphoneCallLog *cl) {
return cl->was_conference;
}
/*******************************************************************************
* Reference and user data handling functions *
......
......@@ -179,6 +179,13 @@ LINPHONE_PUBLIC bool_t linphone_call_log_video_enabled(LinphoneCallLog *cl);
**/
LINPHONE_PUBLIC char * linphone_call_log_to_str(LinphoneCallLog *cl);
/**
* Tells whether that call was a call to a conference server
* @param[in] cl #LinphoneCallLog object
* @return TRUE if the call was a call to a conference server
*/
LINPHONE_PUBLIC bool_t linphone_call_log_was_conference(LinphoneCallLog *cl);
/*******************************************************************************
* Reference and user data handling functions *
......
......@@ -611,8 +611,10 @@ int RemoteConference::addParticipant(LinphoneCall *call) {
m_localParticipantStream = m_focusCall->audiostream;
m_pendingCalls = ms_list_append(m_pendingCalls, linphone_call_ref(call));
m_state = ConnectingToFocus;
linphone_address_unref(addr);
call->conf_ref = (LinphoneConference *)this;
LinphoneCallLog *callLog = linphone_call_get_call_log(m_focusCall);
callLog->was_conference = TRUE;
linphone_address_unref(addr);
linphone_call_params_unref(params);
return 0;
} else return -1;
......
......@@ -2790,6 +2790,10 @@ extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getCallDuration(JNIEn
return (jint)((LinphoneCallLog*)ptr)->duration;
}
extern "C" jboolean Java_org_linphone_core_LinphoneCallLogImpl_wasConference(JNIEnv *env, jobject thiz, jlong ptr) {
return linphone_call_log_was_conference((LinphoneCallLog *)ptr);
}
/* CallStats */
extern "C" jint Java_org_linphone_core_LinphoneCallStatsImpl_getMediaType(JNIEnv *env, jobject thiz, jlong stats_ptr) {
return (jint)((LinphoneCallStats *)stats_ptr)->type;
......
......@@ -194,6 +194,7 @@ struct _LinphoneCallLog{
char* call_id; /**unique id of a call*/
struct _LinphoneQualityReporting reporting;
bool_t video_enabled;
bool_t was_conference; /**<That call was a call with a conference server */
unsigned int storage_id;
};
......
......@@ -121,4 +121,9 @@ public interface LinphoneCallLog {
* @return the SIP call-id.
*/
public String getCallId();
/**
* Tells whether the call was a call to a conference server
* @return true if the call was a call to a conference server
*/
public boolean wasConference();
}
......@@ -31,6 +31,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
private native int getCallDuration(long nativePtr);
private native String getCallId(long nativePtr);
private native long getTimestamp(long nativePtr);
private native boolean wasConference(long nativePtr);
LinphoneCallLogImpl(long aNativePtr) {
nativePtr = aNativePtr;
......@@ -69,4 +70,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
public long getTimestamp() {
return getTimestamp(nativePtr) * 1000; // Need milliseconds, not seconds
}
public boolean wasConference() {
return wasConference(nativePtr);
}
}
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