Commit 3051c9bd authored by jehan's avatar jehan

add LinphoneReasonDoNotDisturb

parent 9702eeb2
...@@ -3357,6 +3357,9 @@ int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, LinphoneRe ...@@ -3357,6 +3357,9 @@ int linphone_core_decline_call(LinphoneCore *lc, LinphoneCall * call, LinphoneRe
case LinphoneReasonBusy: case LinphoneReasonBusy:
sal_reason=SalReasonBusy; sal_reason=SalReasonBusy;
break; break;
case LinphoneReasonDoNotDistrub:
sal_reason = SalReasonDoNotDisturb;
break;
default: default:
ms_error("linphone_core_decline_call(): unsupported reason %s",linphone_reason_to_string(reason)); ms_error("linphone_core_decline_call(): unsupported reason %s",linphone_reason_to_string(reason));
return -1; return -1;
...@@ -5782,6 +5785,8 @@ const char *linphone_reason_to_string(LinphoneReason err){ ...@@ -5782,6 +5785,8 @@ const char *linphone_reason_to_string(LinphoneReason err){
return "Incompatible media capabilities"; return "Incompatible media capabilities";
case LinphoneReasonIOError: case LinphoneReasonIOError:
return "IO error"; return "IO error";
case LinphoneReasonDoNotDistrub:
return "Do not distrub";
} }
return "unknown error"; return "unknown error";
} }
......
...@@ -133,7 +133,9 @@ enum _LinphoneReason{ ...@@ -133,7 +133,9 @@ enum _LinphoneReason{
LinphoneReasonNotAnswered, /**<The call was not answered in time*/ LinphoneReasonNotAnswered, /**<The call was not answered in time*/
LinphoneReasonBusy, /**<Phone line was busy */ LinphoneReasonBusy, /**<Phone line was busy */
LinphoneReasonMedia, /**<Incompatible media */ LinphoneReasonMedia, /**<Incompatible media */
LinphoneReasonIOError /**<Transport error: connection failures, disconnections etc...*/ LinphoneReasonIOError, /**<Transport error: connection failures, disconnections etc...*/
LinphoneReasonDoNotDistrub /*Do not disturb reason*/
}; };
/** /**
......
...@@ -1179,6 +1179,8 @@ SalReason linphone_reason_to_sal(LinphoneReason reason){ ...@@ -1179,6 +1179,8 @@ SalReason linphone_reason_to_sal(LinphoneReason reason){
return SalReasonMedia; return SalReasonMedia;
case LinphoneReasonIOError: case LinphoneReasonIOError:
return SalReasonServiceUnavailable; return SalReasonServiceUnavailable;
case LinphoneReasonDoNotDistrub:
return SalReasonDoNotDisturb;
} }
return SalReasonUnknown; return SalReasonUnknown;
} }
...@@ -1196,7 +1198,7 @@ LinphoneReason linphone_reason_from_sal(SalReason r){ ...@@ -1196,7 +1198,7 @@ LinphoneReason linphone_reason_from_sal(SalReason r){
ret=LinphoneReasonDeclined; ret=LinphoneReasonDeclined;
break; break;
case SalReasonDoNotDisturb: case SalReasonDoNotDisturb:
ret=LinphoneReasonDeclined; ret=LinphoneReasonDoNotDistrub;
break; break;
case SalReasonForbidden: case SalReasonForbidden:
ret=LinphoneReasonBadCredentials; ret=LinphoneReasonBadCredentials;
......
...@@ -32,7 +32,19 @@ public class Reason { ...@@ -32,7 +32,19 @@ public class Reason {
* Call not answered (in time). * Call not answered (in time).
*/ */
static public Reason Busy = new Reason(6,"Busy"); static public Reason Busy = new Reason(6,"Busy");
/**
* Incompatible media
* */
static public Reason Media = new Reason(7,"Media");
/**
* Transport error: connection failures, disconnections etc...
* */
static public Reason IOError = new Reason(8,"IOError");
/**
* Transport error: connection failures, disconnections etc...
* */
static public Reason DoNotDistrub = new Reason(9,"DoNotDistrub");
protected final int mValue; protected final int mValue;
private final String mStringValue; private final String mStringValue;
......
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