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
case LinphoneReasonBusy:
sal_reason=SalReasonBusy;
break;
case LinphoneReasonDoNotDistrub:
sal_reason = SalReasonDoNotDisturb;
break;
default:
ms_error("linphone_core_decline_call(): unsupported reason %s",linphone_reason_to_string(reason));
return -1;
......@@ -5782,6 +5785,8 @@ const char *linphone_reason_to_string(LinphoneReason err){
return "Incompatible media capabilities";
case LinphoneReasonIOError:
return "IO error";
case LinphoneReasonDoNotDistrub:
return "Do not distrub";
}
return "unknown error";
}
......
......@@ -133,7 +133,9 @@ enum _LinphoneReason{
LinphoneReasonNotAnswered, /**<The call was not answered in time*/
LinphoneReasonBusy, /**<Phone line was busy */
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){
return SalReasonMedia;
case LinphoneReasonIOError:
return SalReasonServiceUnavailable;
case LinphoneReasonDoNotDistrub:
return SalReasonDoNotDisturb;
}
return SalReasonUnknown;
}
......@@ -1196,7 +1198,7 @@ LinphoneReason linphone_reason_from_sal(SalReason r){
ret=LinphoneReasonDeclined;
break;
case SalReasonDoNotDisturb:
ret=LinphoneReasonDeclined;
ret=LinphoneReasonDoNotDistrub;
break;
case SalReasonForbidden:
ret=LinphoneReasonBadCredentials;
......
......@@ -32,6 +32,18 @@ public class Reason {
* Call not answered (in time).
*/
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;
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