Skip to content
Snippets Groups Projects
Commit fc91a465 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

Use new API in SipService

Still some issues about static/virtual declarations of methods for
Callback and ConfigurationCallback generated files.
parent 9c450ae8
No related branches found
No related tags found
No related merge requests found
Showing
with 239 additions and 305 deletions
......@@ -2,30 +2,19 @@
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="PACK_TEST_CODE" value="true" />
<option name="UPDATE_PROPERTY_FILES" value="true" />
</configuration>
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="SFLPhone" scope="PROVIDED" />
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../libs/robotium-solo-5.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="libs" level="project" />
<orderEntry type="module" module-name="sflphone-android" />
</component>
</module>
revision.txt
builddate.txt
builder.txt
env.txt
2014-08-07
tmatth@bodega
719259d
......@@ -32,32 +32,32 @@
#include "sflphone.h"
class CallManagerCallback {
class Callback {
public:
virtual ~CallManagerCallback() {}
static void callOnStateChange(const std::string& call_id, const std::string& state){}
static void callOnTransferFail(void){}
static void callOnTransferSuccess(void){}
static void callOnRecordPlaybackStopped(const std::string& path){}
static void callOnVoiceMailNotify(const std::string& call_id, int nd_msg){}
static void callOnIncomingMessage(const std::string& id, const std::string& from, const std::string& msg){}
static void callOnIncomingCall(const std::string& account_id, const std::string& call_id, const std::string& from){}
static void callOnRecordPlaybackFilepath(const std::string& id, const std::string& filename){}
static void callOnConferenceCreated(const std::string& conf_id){}
static void callOnConferenceChanged(const std::string& conf_id, const std::string& state){}
static void callOnUpdatePlaybackScale(const std::string& filepath, int position, int scale){}
static void callOnConferenceRemove(const std::string& conf_id){}
static void callOnNewCall(const std::string& account_id, const std::string& call_id, const std::string& to){}
static void callOnSipCallStateChange(const std::string& call_id, const std::string& state, int code){}
static void callOnRecordStateChange(const std::string& call_id, int state){}
static void callOnSecureSdesOn(const std::string& call_id){}
static void callOnSecureSdesOff(const std::string& call_id){}
static void callOnSecureZrtpOn(const std::string& call_id, const std::string& cipher){}
static void callOnSecureZrtpOff(const std::string& call_id){}
static void callOnShowSas(const std::string& call_id, const std::string& sas, int verified){}
static void callOnZrtpNotSuppOther(const std::string& call_id){}
static void callOnZrtpNegotiationFail(const std::string& call_id, const std::string& reason, const std::string& severity){}
static void callOnRtcpReceiveReport(const std::string& call_id, const std::map<std::string, int>& stats){}
virtual ~Callback() {}
virtual void callOnStateChange(const std::string& call_id, const std::string& state){}
virtual void callOnTransferFail(void){}
virtual void callOnTransferSuccess(void){}
virtual void callOnRecordPlaybackStopped(const std::string& path){}
virtual void callOnVoiceMailNotify(const std::string& call_id, int nd_msg){}
virtual void callOnIncomingMessage(const std::string& id, const std::string& from, const std::string& msg){}
virtual void callOnIncomingCall(const std::string& account_id, const std::string& call_id, const std::string& from){}
virtual void callOnRecordPlaybackFilepath(const std::string& id, const std::string& filename){}
virtual void callOnConferenceCreated(const std::string& conf_id){}
virtual void callOnConferenceChanged(const std::string& conf_id, const std::string& state){}
virtual void callOnUpdatePlaybackScale(const std::string& filepath, int position, int scale){}
virtual void callOnConferenceRemove(const std::string& conf_id){}
virtual void callOnNewCall(const std::string& account_id, const std::string& call_id, const std::string& to){}
virtual void callOnSipCallStateChange(const std::string& call_id, const std::string& state, int code){}
virtual void callOnRecordStateChange(const std::string& call_id, int state){}
virtual void callOnSecureSdesOn(const std::string& call_id){}
virtual void callOnSecureSdesOff(const std::string& call_id){}
virtual void callOnSecureZrtpOn(const std::string& call_id, const std::string& cipher){}
virtual void callOnSecureZrtpOff(const std::string& call_id){}
virtual void callOnShowSas(const std::string& call_id, const std::string& sas, int verified){}
virtual void callOnZrtpNotSuppOther(const std::string& call_id){}
virtual void callOnZrtpNegotiationFail(const std::string& call_id, const std::string& reason, const std::string& severity){}
virtual void callOnRtcpReceiveReport(const std::string& call_id, const std::map<std::string, int>& stats){}
};
......@@ -107,30 +107,30 @@ void sflph_call_request_go_clear(const std::string& call_id);
void sflph_call_accept_enrollment(const std::string& call_id, bool accepted);
void sflph_call_send_text_message(const std::string& call_id, const std::string& message);
class CallManagerCallback {
class Callback {
public:
virtual ~CallManagerCallback();
static void callOnStateChange(const std::string& call_id, const std::string& state);
static void callOnTransferFail(void);
static void callOnTransferSuccess(void);
static void callOnRecordPlaybackStopped(const std::string& path);
static void callOnVoiceMailNotify(const std::string& call_id, int nd_msg);
static void callOnIncomingMessage(const std::string& id, const std::string& from, const std::string& msg);
static void callOnIncomingCall(const std::string& account_id, const std::string& call_id, const std::string& from);
static void callOnRecordPlaybackFilepath(const std::string& id, const std::string& filename);
static void callOnConferenceCreated(const std::string& conf_id);
static void callOnConferenceChanged(const std::string& conf_id, const std::string& state);
static void callOnUpdatePlaybackScale(const std::string& filepath, int position, int scale);
static void callOnConferenceRemove(const std::string& conf_id);
static void callOnNewCall(const std::string& account_id, const std::string& call_id, const std::string& to);
static void callOnSipCallStateChange(const std::string& call_id, const std::string& state, int code);
static void callOnRecordStateChange(const std::string& call_id, int state);
static void callOnSecureSdesOn(const std::string& call_id);
static void callOnSecureSdesOff(const std::string& call_id);
static void callOnSecureZrtpOn(const std::string& call_id, const std::string& cipher);
static void callOnSecureZrtpOff(const std::string& call_id);
static void callOnShowSas(const std::string& call_id, const std::string& sas, int verified);
static void callOnZrtpNotSuppOther(const std::string& call_id);
static void callOnZrtpNegotiationFail(const std::string& call_id, const std::string& reason, const std::string& severity);
static void callOnRtcpReceiveReport(const std::string& call_id, const std::map<std::string, int>& stats);
virtual ~Callback();
virtual void callOnStateChange(const std::string& call_id, const std::string& state);
virtual void callOnTransferFail(void);
virtual void callOnTransferSuccess(void);
virtual void callOnRecordPlaybackStopped(const std::string& path);
virtual void callOnVoiceMailNotify(const std::string& call_id, int nd_msg);
virtual void callOnIncomingMessage(const std::string& id, const std::string& from, const std::string& msg);
virtual void callOnIncomingCall(const std::string& account_id, const std::string& call_id, const std::string& from);
virtual void callOnRecordPlaybackFilepath(const std::string& id, const std::string& filename);
virtual void callOnConferenceCreated(const std::string& conf_id);
virtual void callOnConferenceChanged(const std::string& conf_id, const std::string& state);
virtual void callOnUpdatePlaybackScale(const std::string& filepath, int position, int scale);
virtual void callOnConferenceRemove(const std::string& conf_id);
virtual void callOnNewCall(const std::string& account_id, const std::string& call_id, const std::string& to);
virtual void callOnSipCallStateChange(const std::string& call_id, const std::string& state, int code);
virtual void callOnRecordStateChange(const std::string& call_id, int state);
virtual void callOnSecureSdesOn(const std::string& call_id);
virtual void callOnSecureSdesOff(const std::string& call_id);
virtual void callOnSecureZrtpOn(const std::string& call_id, const std::string& cipher);
virtual void callOnSecureZrtpOff(const std::string& call_id);
virtual void callOnShowSas(const std::string& call_id, const std::string& sas, int verified);
virtual void callOnZrtpNotSuppOther(const std::string& call_id);
virtual void callOnZrtpNegotiationFail(const std::string& call_id, const std::string& reason, const std::string& severity);
virtual void callOnRtcpReceiveReport(const std::string& call_id, const std::map<std::string, int>& stats);
};
......@@ -33,14 +33,14 @@
class ConfigurationCallback {
public:
virtual ~ConfigurationCallback(){}
static void configOnVolumeChange(const std::string& device, int value){}
static void configOnAccountsChange(void){}
static void configOnHistoryChange(void){}
static void configOnStunStatusFail(const std::string& account_id){}
static void configOnRegistrationStateChange(const std::string& account_id, int state){}
static void configOnSipRegistrationStateChange(const std::string& account_id, const std::string& state, int code){}
static void configOnError(int alert){}
virtual void configOnVolumeChange(const std::string& device, int value){}
virtual void configOnAccountsChange(void){}
virtual void configOnHistoryChange(void){}
virtual void configOnStunStatusFail(const std::string& account_id){}
virtual void configOnRegistrationStateChange(const std::string& account_id, int state){}
virtual void configOnSipRegistrationStateChange(const std::string& account_id, const std::string& state, int code){}
virtual void configOnError(int alert){}
virtual std::vector<int32_t> configGetHardwareAudioFormat(void){}
};
%}
......@@ -117,13 +117,13 @@ bool sflph_config_check_hostname_certificate(const std::string& host, const std:
class ConfigurationCallback {
public:
virtual ~ConfigurationCallback();
static void configOnVolumeChange(const std::string& device, int value);
static void configOnAccountsChange(void);
static void configOnHistoryChange(void);
static void configOnStunStatusFail(const std::string& account_id);
static void configOnRegistrationStateChange(const std::string& account_id, int state);
static void configOnSipRegistrationStateChange(const std::string& account_id, const std::string& state, int code);
static void configOnError(int alert);
void configOnVolumeChange(const std::string& device, int value);
void configOnAccountsChange(void);
void configOnHistoryChange(void);
void configOnStunStatusFail(const std::string& account_id);
void configOnRegistrationStateChange(const std::string& account_id, int state);
void configOnSipRegistrationStateChange(const std::string& account_id, const std::string& state, int code);
void configOnError(int alert);
std::vector<int32_t> configGetHardwareAudioFormat(void);
};
......@@ -87,33 +87,33 @@ namespace std {
/* some functions that need to be declared in *_wrap.cpp
* that are not declared elsewhere in the c++ code
*/
void init(ConfigurationCallback* conf_cb, CallManagerCallback* call_cb) {
void init(ConfigurationCallback* conf_cb, Callback* call_cb) {
// Call event handlers
sflph_call_ev_handlers callEvHandlers = {
CallManagerCallback::callOnStateChange,
CallManagerCallback::callOnTransferFail,
CallManagerCallback::callOnTransferSuccess,
CallManagerCallback::callOnRecordPlaybackStopped,
CallManagerCallback::callOnVoiceMailNotify,
CallManagerCallback::callOnIncomingMessage,
CallManagerCallback::callOnIncomingCall,
CallManagerCallback::callOnRecordPlaybackFilepath,
CallManagerCallback::callOnConferenceCreated,
CallManagerCallback::callOnConferenceChanged,
CallManagerCallback::callOnUpdatePlaybackScale,
CallManagerCallback::callOnConferenceRemove,
CallManagerCallback::callOnNewCall,
CallManagerCallback::callOnSipCallStateChange,
CallManagerCallback::callOnRecordStateChange,
CallManagerCallback::callOnSecureSdesOn,
CallManagerCallback::callOnSecureSdesOff,
CallManagerCallback::callOnSecureZrtpOn,
CallManagerCallback::callOnSecureZrtpOff,
CallManagerCallback::callOnShowSas,
CallManagerCallback::callOnZrtpNotSuppOther,
CallManagerCallback::callOnZrtpNegotiationFail,
CallManagerCallback::callOnRtcpReceiveReport,
Callback::callOnStateChange,
Callback::callOnTransferFail,
Callback::callOnTransferSuccess,
Callback::callOnRecordPlaybackStopped,
Callback::callOnVoiceMailNotify,
Callback::callOnIncomingMessage,
Callback::callOnIncomingCall,
Callback::callOnRecordPlaybackFilepath,
Callback::callOnConferenceCreated,
Callback::callOnConferenceChanged,
Callback::callOnUpdatePlaybackScale,
Callback::callOnConferenceRemove,
Callback::callOnNewCall,
Callback::callOnSipCallStateChange,
Callback::callOnRecordStateChange,
Callback::callOnSecureSdesOn,
Callback::callOnSecureSdesOff,
Callback::callOnSecureZrtpOn,
Callback::callOnSecureZrtpOff,
Callback::callOnShowSas,
Callback::callOnZrtpNotSuppOther,
Callback::callOnZrtpNegotiationFail,
Callback::callOnRtcpReceiveReport,
};
// Configuration event handlers
......@@ -125,19 +125,14 @@ void init(ConfigurationCallback* conf_cb, CallManagerCallback* call_cb) {
ConfigurationCallback::configOnRegistrationStateChange,
ConfigurationCallback::configOnSipRegistrationStateChange,
ConfigurationCallback::configOnError,
ConfigurationCallback::configGetHardwareAudioFormat,
};
// All event handlers
sflph_ev_handlers evHandlers;
memset(std::addressof(evHandlers), 0, sizeof(evHandlers));
sflph_ev_handlers evHandlers = {};
evHandlers.call_ev_handlers = callEvHandlers;
evHandlers.config_ev_handlers = configEvHandlers;
sflph_init(&evHandlers, 0);
}
%}
......
......@@ -30,8 +30,9 @@
/* %nodefaultctor ManagerImpl;
%nodefaultdtor ManagerImpl; */
%header %{
#include "sflphone.h"
%}
/**
* Initializes libsflphone.
*
......@@ -50,7 +51,3 @@ void sflph_fini(void);
* Poll for SIP/IAX events
*/
void sflph_poll_events(void);
%}
......@@ -11,7 +11,7 @@
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="libs" level="project" />
</component>
......
......@@ -110,7 +110,7 @@ public class SecureSipCall extends SipCall {
}
};
public void sasConfirmedByZrtpLayer(boolean verified) {
public void sasConfirmedByZrtpLayer(int verified) {
// Not used
}
......
......@@ -3,13 +3,11 @@ package org.sflphone.service;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import org.sflphone.account.AccountDetailSrtp;
import org.sflphone.client.CallActivity;
import org.sflphone.model.*;
import org.sflphone.utils.SwigNativeConverter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
public class CallManagerCallBack extends Callback {
......@@ -39,7 +37,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_call_state_changed(String callID, String newState) {
public void callOnStateChange(String callID, String newState) {
Log.d(TAG, "on_call_state_changed : (" + callID + ", " + newState + ")");
Conference toUpdate = mService.findConference(callID);
......@@ -79,7 +77,7 @@ public class CallManagerCallBack extends Callback {
} else if (newState.equals("FAILURE")) {
toUpdate.setCallState(callID, SipCall.state.CALL_STATE_FAILURE);
mService.getConferences().remove(toUpdate.getId());
mService.getCallManagerJNI().hangUp(callID);
SFLPhoneservice.sflph_call_hang_up(callID);
} else if (newState.equals("HOLD")) {
toUpdate.setCallState(callID, SipCall.state.CALL_STATE_HOLD);
} else if (newState.equals("UNHOLD")) {
......@@ -91,12 +89,12 @@ public class CallManagerCallBack extends Callback {
@Override
public void on_incoming_call(String accountID, String callID, String from) {
public void callOnIncomingCall(String accountID, String callID, String from) {
Log.d(TAG, "on_incoming_call(" + accountID + ", " + callID + ", " + from + ")");
try {
StringMap details = mService.getConfigurationManagerJNI().getAccountDetails(accountID);
VectMap credentials = mService.getConfigurationManagerJNI().getCredentials(accountID);
StringMap details = SFLPhoneservice.sflph_config_get_account_details(accountID);
VectMap credentials = SFLPhoneservice.sflph_config_get_credentials(accountID);
Account acc = new Account(accountID, SwigNativeConverter.convertAccountToNative(details), SwigNativeConverter.convertCredentialsToNative(credentials));
Bundle args = new Bundle();
......@@ -137,26 +135,20 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_transfer_state_changed(String result) {
Log.w(TAG, "TRANSFER STATE CHANGED:" + result);
}
@Override
public void on_conference_created(final String confID) {
public void callOnConferenceCreated(final String confID) {
Log.w(TAG, "CONFERENCE CREATED:" + confID);
Intent intent = new Intent(CONF_CREATED);
Conference created = new Conference(confID);
StringVect all_participants = mService.getCallManagerJNI().getParticipantList(confID);
StringVect all_participants = SFLPhoneservice.sflph_call_get_participant_list(confID);
Log.w(TAG, "all_participants:" + all_participants.size());
for (int i = 0; i < all_participants.size(); ++i) {
if (mService.getConferences().get(all_participants.get(i)) != null) {
created.addParticipant(mService.getConferences().get(all_participants.get(i)).getCallById(all_participants.get(i)));
mService.getConferences().remove(all_participants.get(i));
} else {
Iterator<Map.Entry<String, Conference>> it = mService.getConferences().entrySet().iterator();
while (it.hasNext()) {
Conference tmp = it.next().getValue();
for (Map.Entry<String, Conference> stringConferenceEntry : mService.getConferences().entrySet()) {
Conference tmp = stringConferenceEntry.getValue();
for (SipCall c : tmp.getParticipants()) {
if (c.getCallId().contentEquals(all_participants.get(i))) {
created.addParticipant(c);
......@@ -173,7 +165,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_incoming_message(String ID, String from, String msg) {
public void callOnIncomingMessage(String ID, String from, String msg) {
Log.w(TAG, "on_incoming_message:" + msg);
Intent intent = new Intent(INCOMING_TEXT);
intent.putExtra("CallID", ID);
......@@ -184,9 +176,8 @@ public class CallManagerCallBack extends Callback {
mService.getConferences().get(ID).addSipMessage(new SipMessage(true, msg));
intent.putExtra("conference", mService.getConferences().get(ID));
} else {
Iterator<Map.Entry<String, Conference>> it = mService.getConferences().entrySet().iterator();
while (it.hasNext()) {
Conference tmp = it.next().getValue();
for (Map.Entry<String, Conference> stringConferenceEntry : mService.getConferences().entrySet()) {
Conference tmp = stringConferenceEntry.getValue();
for (SipCall c : tmp.getParticipants()) {
if (c.getCallId().contentEquals(ID)) {
mService.getConferences().get(tmp.getId()).addSipMessage(new SipMessage(true, msg));
......@@ -200,7 +191,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_conference_removed(String confID) {
public void callOnConferenceRemove(String confID) {
Log.i(TAG, "on_conference_removed:");
Intent intent = new Intent(CONF_REMOVED);
intent.putExtra("confID", confID);
......@@ -216,7 +207,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_conference_state_changed(String confID, String state) {
public void callOnConferenceChanged(String confID, String state) {
Log.i(TAG, "on_conference_state_changed:");
Intent intent = new Intent(CONF_CHANGED);
intent.putExtra("confID", confID);
......@@ -229,13 +220,13 @@ public class CallManagerCallBack extends Callback {
Conference toModify = mService.getConferences().get(confID);
toModify.setCallState(confID, state);
ArrayList<String> newParticipants = SwigNativeConverter.convertSwigToNative(mService.getCallManagerJNI().getParticipantList(intent.getStringExtra("confID")));
ArrayList<String> newParticipants = SwigNativeConverter.convertSwigToNative(SFLPhoneservice.sflph_call_get_participant_list(intent.getStringExtra("confID")));
if (toModify.getParticipants().size() < newParticipants.size()) {
// We need to add the new participant to the conf
for (int i = 0; i < newParticipants.size(); ++i) {
if (toModify.getCallById(newParticipants.get(i)) == null) {
mService.addCallToConference(toModify.getId(), newParticipants.get(i));
for (String newParticipant : newParticipants) {
if (toModify.getCallById(newParticipant) == null) {
mService.addCallToConference(toModify.getId(), newParticipant);
}
}
} else if (toModify.getParticipants().size() > newParticipants.size()) {
......@@ -252,15 +243,15 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_record_playback_filepath(String id, String filename) {
Intent intent = new Intent(RECORD_STATE_CHANGED);
public void callOnRecordPlaybackFilepath(String id, String filename) {
Intent intent = new Intent();
intent.putExtra("callID", id);
intent.putExtra("file", filename);
mService.sendBroadcast(intent);
}
@Override
public void on_secure_sdes_on(String callID) {
public void callOnSecureSdesOn(String callID) {
Log.i(TAG, "on_secure_sdes_on");
SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
call.setInitialized();
......@@ -268,7 +259,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_secure_sdes_off(String callID) {
public void callOnSecureSdesOff(String callID) {
Log.i(TAG, "on_secure_sdes_off");
SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
call.setInitialized();
......@@ -276,7 +267,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_secure_zrtp_on(String callID, String cipher) {
public void callOnSecureZrtpOn(String callID, String cipher) {
Log.i(TAG, "on_secure_zrtp_on");
Intent intent = new Intent(ZRTP_ON);
SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
......@@ -288,7 +279,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_secure_zrtp_off(String callID) {
public void callOnSecureZrtpOff(String callID) {
Log.i(TAG, "on_secure_zrtp_off");
Intent intent = new Intent(ZRTP_OFF);
intent.putExtra("callID", callID);
......@@ -304,7 +295,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_show_sas(String callID, String sas, boolean verified) {
public void callOnShowSas(String callID, String sas, int verified) {
Log.i(TAG, "on_show_sas:" + sas);
Intent intent = new Intent(DISPLAY_SAS);
SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
......@@ -319,7 +310,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_zrtp_not_supported(String callID) {
public void callOnZrtpNotSuppOther(String callID) {
Log.i(TAG, "on_zrtp_not_supported");
Intent intent = new Intent(ZRTP_NOT_SUPPORTED);
SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
......@@ -331,7 +322,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_zrtp_negociation_failed(String callID, String reason, String severity) {
public void callOnZrtpNegotiationFail(String callID, String reason, String severity) {
Log.i(TAG, "on_zrtp_negociation_failed");
Intent intent = new Intent(ZRTP_NEGOTIATION_FAILED);
SecureSipCall call = (SecureSipCall) mService.getCallById(callID);
......@@ -343,7 +334,7 @@ public class CallManagerCallBack extends Callback {
}
@Override
public void on_rtcp_report_received(String callID, IntegerMap stats) {
public void callOnRtcpReceiveReport(String callID, IntegerMap stats) {
Log.i(TAG, "on_rtcp_report_received");
Intent intent = new Intent(RTCP_REPORT_RECEIVED);
mService.sendBroadcast(intent);
......
......@@ -23,10 +23,12 @@
package org.sflphone.service;
import android.content.Intent;
import android.util.Log;
public class ConfigurationManagerCallback extends ConfigurationCallback {
private SipService mService;
private static final String TAG = "ConfigurationManagerCallback";
static public final String ACCOUNTS_CHANGED = "accounts-changed";
static public final String ACCOUNT_STATE_CHANGED = "account-state-changed";
......@@ -36,12 +38,24 @@ public class ConfigurationManagerCallback extends ConfigurationCallback {
}
@Override
public void on_accounts_changed() {
sendAccountsChangedMessage();
public void configOnVolumeChange(String device, int value) {
super.configOnVolumeChange(device, value);
}
@Override
public void on_account_state_changed(String accoundID, int state) {
public void configOnAccountsChange() {
super.configOnAccountsChange();
Intent intent = new Intent(ACCOUNTS_CHANGED);
mService.sendBroadcast(intent);
}
@Override
public void configOnStunStatusFail(String account_id) {
Log.d(TAG, "configOnStunStatusFail : (" + account_id);
}
@Override
public void configOnRegistrationStateChange(String accoundID, int state) {
String strState = "";
switch (state){
case 0:
......@@ -77,15 +91,20 @@ public class ConfigurationManagerCallback extends ConfigurationCallback {
}
sendAccountsStateChangedMessage(accoundID, strState, 0);
sendAccountStateChangedMessage(accoundID, strState, 0);
}
@Override
public void configOnSipRegistrationStateChange(String account_id, String state, int code) {
Log.d(TAG, "configOnSipRegistrationStateChange : (" + account_id);
}
@Override
public void on_account_state_changed_with_code(String accoundID, String state, int code) {
// sendAccountsStateChangedMessage(accoundID, state, code);
public void configOnError(int alert) {
Log.d(TAG, "configOnError : (" + alert);
}
private void sendAccountsStateChangedMessage(String accoundID, String state, int code) {
private void sendAccountStateChangedMessage(String accoundID, String state, int code) {
Intent intent = new Intent(ACCOUNT_STATE_CHANGED);
intent.putExtra("Account", accoundID);
intent.putExtra("state", state);
......@@ -93,12 +112,7 @@ public class ConfigurationManagerCallback extends ConfigurationCallback {
mService.sendBroadcast(intent);
}
private void sendAccountsChangedMessage() {
Intent intent = new Intent(ACCOUNTS_CHANGED);
mService.sendBroadcast(intent);
}
public IntVect get_hardware_audio_format(){
public IntVect configGetHardwareAudioFormat(){
IntVect result = new IntVect();
OpenSlParams audioParams = OpenSlParams.createInstance(mService);
......
......@@ -27,7 +27,6 @@ interface ISipService {
void setAudioPlugin(in String callID);
String getCurrentAudioOutputPlugin();
List getAudioCodecList(in String accountID);
String getCurrentAudioCodecName(in String callID);
void setActiveCodecList(in List codecs, in String accountID);
Map getRingtoneList();
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment