Skip to content
Snippets Groups Projects
Commit 75540ff6 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

android: bump to last daemon API

Issue: #79814
Change-Id: Ie1ba9208e5eaa69387fcda818384d5878f36b6d1
parent 9f4d86d7
No related branches found
No related tags found
No related merge requests found
...@@ -118,19 +118,20 @@ public class SipCall implements Parcelable { ...@@ -118,19 +118,20 @@ public class SipCall implements Parcelable {
public interface direction { public interface direction {
public static final int CALL_TYPE_INCOMING = 1; int CALL_TYPE_INCOMING = 1;
public static final int CALL_TYPE_OUTGOING = 2; int CALL_TYPE_OUTGOING = 2;
} }
public interface state { public interface state {
public static final int CALL_STATE_NONE = 0; int CALL_STATE_NONE = 0;
public static final int CALL_STATE_RINGING = 2; int CALL_STATE_CONNECTING = 1;
public static final int CALL_STATE_CURRENT = 3; int CALL_STATE_RINGING = 2;
public static final int CALL_STATE_HUNGUP = 4; int CALL_STATE_CURRENT = 3;
public static final int CALL_STATE_BUSY = 5; int CALL_STATE_HUNGUP = 4;
public static final int CALL_STATE_FAILURE = 6; int CALL_STATE_BUSY = 5;
public static final int CALL_STATE_HOLD = 7; int CALL_STATE_FAILURE = 6;
public static final int CALL_STATE_UNHOLD = 8; int CALL_STATE_HOLD = 7;
int CALL_STATE_UNHOLD = 8;
} }
@Override @Override
......
...@@ -175,8 +175,13 @@ public class CallManagerCallBack extends Callback { ...@@ -175,8 +175,13 @@ public class CallManagerCallBack extends Callback {
} }
@Override @Override
public void incomingMessage(String ID, String from, String msg) { public void incomingMessage(String ID, String from, StringMap messages) {
Log.w(TAG, "on_incoming_message:" + msg); Log.w(TAG, "on_incoming_message:" + messages);
String msg = messages.get("text/plain");
if (msg == null)
return;
Intent intent = new Intent(INCOMING_TEXT); Intent intent = new Intent(INCOMING_TEXT);
intent.putExtra("CallID", ID); intent.putExtra("CallID", ID);
intent.putExtra("From", from); intent.putExtra("From", from);
......
...@@ -58,6 +58,8 @@ interface ISipService { ...@@ -58,6 +58,8 @@ interface ISipService {
/* IM */ /* IM */
void sendTextMessage(in String callID, in SipMessage message); void sendTextMessage(in String callID, in SipMessage message);
void sendAccountTextMessage(in String accountid, in String to, in String msg);
void transfer(in String callID, in String to); void transfer(in String callID, in String to);
void attendedTransfer(in String transferID, in String targetID); void attendedTransfer(in String transferID, in String targetID);
......
...@@ -930,7 +930,9 @@ public class SipService extends Service { ...@@ -930,7 +930,9 @@ public class SipService extends Service {
@Override @Override
protected void doRun() throws SameThreadException, RemoteException { protected void doRun() throws SameThreadException, RemoteException {
Log.i(TAG, "SipService.sendTextMessage() thread running..."); Log.i(TAG, "SipService.sendTextMessage() thread running...");
Ringservice.sendTextMessage(callID, message.comment); StringMap messages = new StringMap();
messages.set("text/plain", message.comment);
Ringservice.sendTextMessage(callID, messages, "", false);
if (getConferences().get(callID) != null) if (getConferences().get(callID) != null)
getConferences().get(callID).addSipMessage(message); getConferences().get(callID).addSipMessage(message);
} }
...@@ -938,6 +940,17 @@ public class SipService extends Service { ...@@ -938,6 +940,17 @@ public class SipService extends Service {
} }
@Override
public void sendAccountTextMessage(final String accountid, final String to, final String msg) {
getExecutor().execute(new SipRunnable() {
@Override
protected void doRun() throws SameThreadException, RemoteException {
Log.i(TAG, "SipService.sendAccountTextMessage() thread running... " + accountid + " " + to + " " + msg);
Ringservice.sendAccountTextMessage(accountid, to, msg);
}
});
}
@Override @Override
public List<Codec> getAudioCodecList(final String accountID) throws RemoteException { public List<Codec> getAudioCodecList(final String accountID) throws RemoteException {
return getExecutor().executeAndReturn(new SipRunnableWithReturn<ArrayList<Codec>>() { return getExecutor().executeAndReturn(new SipRunnableWithReturn<ArrayList<Codec>>() {
...@@ -1064,7 +1077,7 @@ public class SipService extends Service { ...@@ -1064,7 +1077,7 @@ public class SipService extends Service {
@Override @Override
protected Map<String, String> doRun() throws SameThreadException { protected Map<String, String> doRun() throws SameThreadException {
Log.i(TAG, "SipService.validateCertificatePath() thread running..."); Log.i(TAG, "SipService.validateCertificatePath() thread running...");
return Ringservice.validateCertificatePath(accountID, certificatePath, privateKeyPath, "").toNative(); return Ringservice.validateCertificatePath(accountID, certificatePath, privateKeyPath, "", "").toNative();
} }
}); });
} }
......
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
virtual void transferSucceeded(void){} virtual void transferSucceeded(void){}
virtual void recordPlaybackStopped(const std::string& path){} virtual void recordPlaybackStopped(const std::string& path){}
virtual void voiceMailNotify(const std::string& call_id, int nd_msg){} virtual void voiceMailNotify(const std::string& call_id, int nd_msg){}
virtual void incomingMessage(const std::string& id, const std::string& from, const std::string& msg){} virtual void incomingMessage(const std::string& id, const std::string& from, const std::map<std::string, std::string>& messages){}
virtual void incomingCall(const std::string& account_id, const std::string& call_id, const std::string& from){} virtual void incomingCall(const std::string& account_id, const std::string& call_id, const std::string& from){}
virtual void recordPlaybackFilepath(const std::string& id, const std::string& filename){} virtual void recordPlaybackFilepath(const std::string& id, const std::string& filename){}
virtual void conferenceCreated(const std::string& conf_id){} virtual void conferenceCreated(const std::string& conf_id){}
...@@ -129,8 +129,7 @@ void requestGoClear(const std::string& callID); ...@@ -129,8 +129,7 @@ void requestGoClear(const std::string& callID);
void acceptEnrollment(const std::string& callID, bool accepted); void acceptEnrollment(const std::string& callID, bool accepted);
/* Instant messaging */ /* Instant messaging */
void sendTextMessage(const std::string& callID, const std::string& message); void sendTextMessage(const std::string& callID, const std::map<std::string, std::string>& messages, const std::string& from, const bool& isMixed);
void sendTextMessage(const std::string& callID, const std::string& message, const std::string& from);
} }
...@@ -142,7 +141,7 @@ public: ...@@ -142,7 +141,7 @@ public:
virtual void transferSucceeded(void){} virtual void transferSucceeded(void){}
virtual void recordPlaybackStopped(const std::string& path){} virtual void recordPlaybackStopped(const std::string& path){}
virtual void voiceMailNotify(const std::string& call_id, int nd_msg){} virtual void voiceMailNotify(const std::string& call_id, int nd_msg){}
virtual void incomingMessage(const std::string& id, const std::string& from, const std::string& msg){} virtual void incomingMessage(const std::string& id, const std::string& from, const std::map<std::string, std::string>& messages){}
virtual void incomingCall(const std::string& account_id, const std::string& call_id, const std::string& from){} virtual void incomingCall(const std::string& account_id, const std::string& call_id, const std::string& from){}
virtual void recordPlaybackFilepath(const std::string& id, const std::string& filename){} virtual void recordPlaybackFilepath(const std::string& id, const std::string& filename){}
virtual void conferenceCreated(const std::string& conf_id){} virtual void conferenceCreated(const std::string& conf_id){}
......
...@@ -144,12 +144,13 @@ double getVolume(const std::string& device); ...@@ -144,12 +144,13 @@ double getVolume(const std::string& device);
std::map<std::string, std::string> validateCertificatePath(const std::string& accountId, std::map<std::string, std::string> validateCertificatePath(const std::string& accountId,
const std::string& certificate, const std::string& certificate,
const std::string& privateKey, const std::string& privateKey,
const std::string& privateKeyPassword,
const std::string& caList); const std::string& caList);
std::map<std::string, std::string> validateCertificate(const std::string& accountId, const std::string& certificate); std::map<std::string, std::string> validateCertificate(const std::string& accountId, const std::string& certificate);
std::map<std::string, std::string> getCertificateDetails(const std::string& certificate); std::map<std::string, std::string> getCertificateDetails(const std::string& certificate);
std::map<std::string, std::string> getCertificateDetailsPath(const std::string& certificate); std::map<std::string, std::string> getCertificateDetailsPath(const std::string& certificate, const std::string& privateKey, const std::string& privateKeyPass);
std::vector<std::string> getPinnedCertificates(); std::vector<std::string> getPinnedCertificates();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment