Commit 044ad7be authored by Ghislain MARY's avatar Ghislain MARY

Use bool type instead of bool_t where possible.

parent 1b6c7c62
......@@ -241,7 +241,7 @@ void FileTransferChatMessageModifier::processResponseFromPostFile (const belle_h
string first_part_header;
belle_sip_body_handler_t *first_part_bh;
bool_t is_file_encryption_enabled = FALSE;
bool is_file_encryption_enabled = false;
LinphoneImEncryptionEngine *imee = linphone_core_get_im_encryption_engine(message->getCore()->getCCore());
if (imee && message->getChatRoom()) {
LinphoneImEncryptionEngineCbs *imee_cbs = linphone_im_encryption_engine_get_callbacks(imee);
......
......@@ -2865,7 +2865,7 @@ void MediaSessionPrivate::startTextStream () {
configureRtpSessionForRtcpFb(tstream);
configureRtpSessionForRtcpXr(SalText);
rtp_session_enable_rtcp_mux(textStream->ms.sessions.rtp_session, tstream->rtcp_mux);
bool_t isMulticast = ms_is_multicast(rtpAddr);
bool isMulticast = ms_is_multicast(rtpAddr);
if (isMulticast)
rtp_session_set_multicast_ttl(textStream->ms.sessions.rtp_session, tstream->ttl);
text_stream_start(textStream, textProfile, rtpAddr, tstream->rtp_port, rtcpAddr,
......
......@@ -546,7 +546,7 @@ void IceAgent::createIceCheckListsAndParseIceAttributes (const SalMediaDescripti
);
}
if (!iceRestarted) {
bool_t losingPairsAdded = false;
bool losingPairsAdded = false;
for (int j = 0; j < SAL_MEDIA_DESCRIPTION_MAX_ICE_REMOTE_CANDIDATES; j++) {
const SalIceRemoteCandidate *remoteCandidate = &stream->ice_remote_candidates[j];
const char *addr = nullptr;
......
......@@ -93,7 +93,7 @@ int SalCallOp::setLocalBody(const Content &&body) {
return 0;
}
belle_sip_header_allow_t *SalCallOp::createAllow(bool_t enable_update) {
belle_sip_header_allow_t *SalCallOp::createAllow(bool enable_update) {
belle_sip_header_allow_t* header_allow;
char allow [256];
snprintf(allow,sizeof(allow),"INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO%s",(enable_update?", UPDATE":""));
......@@ -370,7 +370,7 @@ void SalCallOp::handleBodyFromResponse(belle_sip_response_t* response) {
}
}
void SalCallOp::setError(belle_sip_response_t* response, bool_t fatal){
void SalCallOp::setError(belle_sip_response_t* response, bool fatal){
setErrorInfoFromResponse(response);
if (fatal) mState = State::Terminating;
mRoot->mCallbacks.call_failure(this);
......@@ -538,7 +538,7 @@ void SalCallOp::processTransactionTerminatedCb(void *user_ctx, const belle_sip_t
belle_sip_request_t* req;
belle_sip_response_t* resp;
int code = 0;
bool_t release_call=FALSE;
bool release_call = false;
if (client_transaction) {
req=belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(client_transaction));
......@@ -554,13 +554,13 @@ void SalCallOp::processTransactionTerminatedCb(void *user_ctx, const belle_sip_t
&& (!resp || (belle_sip_response_get_status_code(resp) != 401
&& belle_sip_response_get_status_code(resp) != 407))
&& op->mDialog==NULL) {
release_call=TRUE;
release_call=true;
}else if (op->mState == State::Early && code < 200){
/*call terminated early*/
sal_error_info_set(&op->mErrorInfo, SalReasonIOError, "SIP", 503, "I/O error", NULL);
op->mState = State::Terminating;
op->mRoot->mCallbacks.call_failure(op);
release_call=TRUE;
release_call=true;
}
if (server_transaction){
if (op->mPendingServerTransaction==server_transaction){
......@@ -665,7 +665,7 @@ void SalCallOp::unsupportedMethod(belle_sip_server_transaction_t* server_transac
belle_sip_server_transaction_send_response(server_transaction,resp);
}
bool_t SalCallOp::isAPendingIncomingInviteTransaction(belle_sip_transaction_t *tr){
bool SalCallOp::isAPendingIncomingInviteTransaction(belle_sip_transaction_t *tr){
return BELLE_SIP_OBJECT_IS_INSTANCE_OF(tr, belle_sip_ist_t) && belle_sip_transaction_state_is_transient(
belle_sip_transaction_get_state(tr));
}
......@@ -679,8 +679,8 @@ void SalCallOp::processRequestEventCb(void *op_base, const belle_sip_request_eve
belle_sip_response_t* resp;
belle_sip_header_t* call_info;
const char *method=belle_sip_request_get_method(req);
bool_t is_update=FALSE;
bool_t drop_op = FALSE;
bool is_update = false;
bool drop_op = false;
if (strcmp("ACK",method)!=0){ /*ACK doesn't create a server transaction*/
server_transaction = belle_sip_provider_create_server_transaction(op->mRoot->mProvider,belle_sip_request_event_get_request(event));
......@@ -728,7 +728,7 @@ void SalCallOp::processRequestEventCb(void *op_base, const belle_sip_request_eve
sal_error_info_set(&op->mErrorInfo, reason, "SIP", 0, NULL, NULL);
op->mRoot->mCallbacks.call_rejected(op);
/*the INVITE was declined by process_sdp_for_invite(). As we are not inside an established dialog, we can drop the op immediately*/
drop_op = TRUE;
drop_op = true;
}
break;
}BCTBX_NO_BREAK; /* else same behavior as for EARLY state, thus NO BREAK*/
......@@ -931,16 +931,15 @@ int SalCallOp::call(const char *from, const char *to, const char *subject) {
return sendRequest(invite);
}
int SalCallOp::notifyRinging(bool_t early_media){
int SalCallOp::notifyRinging(bool early_media){
int status_code =early_media?183:180;
belle_sip_request_t* req=belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(mPendingServerTransaction));
belle_sip_response_t* ringing_response = createResponseFromRequest(req,status_code);
belle_sip_header_t *require;
const char *tags=NULL;
if (early_media){
handleOfferAnswerResponse(ringing_response);
}
if (early_media)
handleOfferAnswerResponse(ringing_response);
require=belle_sip_message_get_header((belle_sip_message_t*)req,"Require");
if (require) tags=belle_sip_header_get_unparsed_value(require);
/* if client requires 100rel, then add necessary stuff*/
......@@ -1085,7 +1084,7 @@ int SalCallOp::declineWithErrorInfo(const SalErrorInfo *info, const SalAddress *
return 0;
}
int SalCallOp::update(const char *subject, bool_t no_user_consent) {
int SalCallOp::update(const char *subject, bool no_user_consent) {
belle_sip_request_t *update;
belle_sip_dialog_state_t state;
......@@ -1538,7 +1537,7 @@ int SalCallOp::sendMessage (const Content &content) {
return sendRequest(req);
}
bool_t SalCallOp::compareOp(const SalCallOp *op2) const {
bool SalCallOp::compareOp(const SalCallOp *op2) const {
return (strcmp(mCallId, op2->mCallId) == 0);
}
......
......@@ -40,11 +40,11 @@ public:
SalMediaDescription *getFinalMediaDescription ();
int call (const char *from, const char *to, const char *subject);
int notifyRinging (bool_t earlyMedia);
int notifyRinging (bool earlyMedia);
int accept ();
int decline (SalReason reason, const char *redirection = nullptr);
int declineWithErrorInfo (const SalErrorInfo *info, const SalAddress *redirectionAddr = nullptr);
int update (const char *subject, bool_t noUserConsent);
int update (const char *subject, bool noUserConsent);
int cancelInvite (const SalErrorInfo *info = nullptr);
int refer (const char *referTo);
int referWithReplaces (SalCallOp *otherCallOp);
......@@ -52,12 +52,12 @@ public:
SalCallOp *getReplaces () const;
int sendDtmf (char dtmf);
int terminate (const SalErrorInfo *info = nullptr);
bool_t autoAnswerAsked () const { return mAutoAnswerAsked; }
bool autoAnswerAsked () const { return mAutoAnswerAsked; }
void sendVfuRequest ();
int isOfferer () const { return mSdpOffering; }
int notifyReferState (SalCallOp *newCallOp);
bool_t compareOp (const SalCallOp *otherCallOp) const;
bool_t dialogRequestPending () const { return (belle_sip_dialog_request_pending(mDialog) != 0); }
bool compareOp (const SalCallOp *otherCallOp) const;
bool dialogRequestPending () const { return (belle_sip_dialog_request_pending(mDialog) != 0); }
const char *getLocalTag () { return belle_sip_dialog_get_local_tag(mDialog); }
const char *getRemoteTag () { return belle_sip_dialog_get_remote_tag(mDialog); }
void setReplaces (const char *callId, const char *fromTag, const char *toTag);
......@@ -71,7 +71,7 @@ private:
virtual void fillCallbacks () override;
void setReleased ();
void setError (belle_sip_response_t *response, bool_t fatal);
void setError (belle_sip_response_t *response, bool fatal);
void callTerminated (belle_sip_server_transaction_t *serverTransaction, int statusCode, belle_sip_request_t *cancelRequest);
void resetDescriptions ();
......@@ -92,11 +92,11 @@ private:
static void setAddrTo0000 (char value[], size_t sz);
static int isMediaDescriptionAcceptable (SalMediaDescription *md);
static bool_t isAPendingIncomingInviteTransaction (belle_sip_transaction_t *tr);
static bool isAPendingIncomingInviteTransaction (belle_sip_transaction_t *tr);
static void setCallAsReleased (SalCallOp *op);
static void unsupportedMethod (belle_sip_server_transaction_t *serverTransaction, belle_sip_request_t *request);
static belle_sip_header_reason_t *makeReasonHeader (const SalErrorInfo *info);
static belle_sip_header_allow_t *createAllow (bool_t enableUpdate);
static belle_sip_header_allow_t *createAllow (bool enableUpdate);
static std::vector<char> marshalMediaDescription (belle_sdp_session_description_t *sessionDesc, belle_sip_error_code &error);
// belle_sip_message handlers
......
......@@ -278,7 +278,7 @@ void SalOp::release() {
unref();
}
int SalOp::sendRequestWithContact(belle_sip_request_t* request, bool_t add_contact) {
int SalOp::sendRequestWithContact(belle_sip_request_t* request, bool add_contact) {
belle_sip_client_transaction_t* client_transaction;
belle_sip_provider_t* prov=mRoot->mProvider;
belle_sip_uri_t* outbound_proxy=NULL;
......@@ -369,7 +369,7 @@ int SalOp::sendRequestWithContact(belle_sip_request_t* request, bool_t add_conta
}
int SalOp::sendRequest(belle_sip_request_t* request) {
bool_t need_contact=FALSE;
bool need_contact=FALSE;
if (request==NULL) {
return -1; /*sanity check*/
}
......@@ -383,7 +383,7 @@ int SalOp::sendRequest(belle_sip_request_t* request) {
||strcmp(belle_sip_request_get_method(request),"SUBSCRIBE")==0
||strcmp(belle_sip_request_get_method(request),"OPTIONS")==0
||strcmp(belle_sip_request_get_method(request),"REFER")==0) /* Despite contact seems not mandatory, call flow example show a Contact in REFER requests*/
need_contact=TRUE;
need_contact=true;
return sendRequestWithContact(request,need_contact);
}
......@@ -438,7 +438,7 @@ int SalOp::processRedirect(){
void SalOp::processAuthentication() {
belle_sip_request_t* initial_request=belle_sip_transaction_get_request((belle_sip_transaction_t*)mPendingAuthTransaction);
belle_sip_request_t* new_request;
bool_t is_within_dialog=FALSE;
bool is_within_dialog=false;
belle_sip_list_t* auth_list=NULL;
belle_sip_auth_event_t* auth_event;
belle_sip_response_t *response=belle_sip_transaction_get_response((belle_sip_transaction_t*)mPendingAuthTransaction);
......@@ -454,7 +454,7 @@ void SalOp::processAuthentication() {
new_request = belle_sip_dialog_create_request_from(mDialog,initial_request);
if (!new_request)
new_request = belle_sip_dialog_create_queued_request_from(mDialog,initial_request);
is_within_dialog=TRUE;
is_within_dialog=true;
} else {
new_request=initial_request;
belle_sip_message_remove_header(BELLE_SIP_MESSAGE(new_request),BELLE_SIP_AUTHORIZATION);
......@@ -466,11 +466,10 @@ void SalOp::processAuthentication() {
}
if (belle_sip_provider_add_authorization(mRoot->mProvider,new_request,response,from_uri,&auth_list,mRealm)) {
if (is_within_dialog) {
sendRequest(new_request);
} else {
resendRequest(new_request);
}
if (is_within_dialog)
sendRequest(new_request);
else
resendRequest(new_request);
mRoot->removePendingAuth(this);
}else {
belle_sip_header_from_t *from=belle_sip_message_get_header_by_type(response,belle_sip_header_from_t);
......@@ -540,11 +539,10 @@ int SalOp::getAddressFamily() const {
}
}
bool_t SalOp::isIdle() const {
if (mDialog){
bool SalOp::isIdle() const {
if (mDialog)
return !belle_sip_dialog_request_pending(mDialog);
}
return TRUE;
return true;
}
void SalOp::setEntityTag(const char* entity_tag) {
......@@ -945,7 +943,7 @@ const char *SalOp::toString(const Type type) {
}
}
bool_t SalOp::isSecure() const {
bool SalOp::isSecure() const {
const SalAddress* from = getFromAddress();
const SalAddress* to = getToAddress();
return from && to && strcasecmp("sips",sal_address_get_scheme(from))==0 && strcasecmp("sips",sal_address_get_scheme(to))==0;
......@@ -1013,7 +1011,7 @@ void SalOp::processIncomingMessage(const belle_sip_request_event_t *event) {
belle_sip_header_cseq_t* cseq = belle_sip_message_get_header_by_type(req,belle_sip_header_cseq_t);
belle_sip_header_date_t *date=belle_sip_message_get_header_by_type(req,belle_sip_header_date_t);
char* from;
bool_t external_body=FALSE;
bool external_body = false;
from_header=belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_from_t);
content_type=belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_content_type_t);
......@@ -1067,7 +1065,7 @@ void SalOp::processIncomingMessage(const belle_sip_request_event_t *event) {
}
}
bool_t SalOp::isExternalBody(belle_sip_header_content_type_t* content_type) {
bool SalOp::isExternalBody(belle_sip_header_content_type_t* content_type) {
return strcmp("message",belle_sip_header_content_type_get_type(content_type))==0
&& strcmp("external-body",belle_sip_header_content_type_get_subtype(content_type))==0;
}
......
......@@ -71,7 +71,7 @@ public:
void setServiceRoute (const SalAddress *value);
const SalAddress *getServiceRoute () const { return mServiceRoute; }
void setManualRefresherMode (bool_t value) { mManualRefresher = value; }
void setManualRefresherMode (bool value) { mManualRefresher = value; }
void setEntityTag (const char *value);
const char *getEntityTag() const { return mEntityTag; }
......@@ -85,8 +85,8 @@ public:
void setSentCustomHeaders (SalCustomHeader *ch);
void enableCnxIpTo0000IfSendOnly (bool_t value) { mCnxIpTo0000IfSendOnlyEnabled = value; }
bool_t cnxIpTo0000IfSendOnlyEnabled () const { return mCnxIpTo0000IfSendOnlyEnabled; }
void enableCnxIpTo0000IfSendOnly (bool value) { mCnxIpTo0000IfSendOnlyEnabled = value; }
bool cnxIpTo0000IfSendOnlyEnabled () const { return mCnxIpTo0000IfSendOnlyEnabled; }
const char *getProxy () const { return mRoute; }
const char *getNetworkOrigin () const { return mOrigin; }
......@@ -108,10 +108,10 @@ public:
const SalErrorInfo *getErrorInfo () const { return &mErrorInfo; }
const SalErrorInfo *getReasonErrorInfo () const { return &mReasonErrorInfo; }
bool_t isForkedOf (const SalOp *op) const {
bool isForkedOf (const SalOp *op) const {
return mCallId && op->mCallId && strcmp(mCallId, op->mCallId) == 0;
}
bool_t isIdle () const;
bool isIdle () const;
void stopRefreshing () {
if (mRefresher)
......@@ -166,7 +166,7 @@ protected:
belle_sip_request_t *buildRequest (const char *method);
int sendRequest (belle_sip_request_t *request);
int sendRequestWithContact (belle_sip_request_t *request, bool_t addContact);
int sendRequestWithContact (belle_sip_request_t *request, bool addContact);
int sendRequestWithExpires (belle_sip_request_t *request, int expires);
void resendRequest (belle_sip_request_t *request);
int sendRequestAndCreateRefresher (belle_sip_request_t *request, int expires, belle_sip_refresher_listener_t listener);
......@@ -196,7 +196,7 @@ protected:
void assignRecvHeaders (belle_sip_message_t *message);
bool_t isSecure () const;
bool isSecure () const;
void addHeaders (belle_sip_header_t *h, belle_sip_message_t *message);
void addCustomHeaders (belle_sip_message_t *message);
int unsubscribe ();
......@@ -205,7 +205,7 @@ protected:
int replyMessage (SalReason reason);
void addMessageAccept (belle_sip_message_t *message);
static bool_t isExternalBody (belle_sip_header_content_type_t* contentType);
static bool isExternalBody (belle_sip_header_content_type_t* contentType);
static void assignAddress (SalAddress **address, const char *value);
static void assignString (char **str, const char *arg);
......@@ -258,14 +258,14 @@ protected:
belle_sip_header_event_t *mEvent = nullptr; // Used by SalOpSubscribe kinds
SalOpSDPHandling mSdpHandling = SalOpSDPNormal;
int mAuthRequests = 0; // number of auth requested for this op
bool_t mCnxIpTo0000IfSendOnlyEnabled = FALSE;
bool_t mAutoAnswerAsked = FALSE;
bool_t mSdpOffering = FALSE;
bool_t mCallReleased = FALSE;
bool_t mManualRefresher = FALSE;
bool_t mHasAuthPending = FALSE;
bool_t mSupportsSessionTimers = FALSE;
bool_t mOpReleased = FALSE;
bool mCnxIpTo0000IfSendOnlyEnabled = false;
bool mAutoAnswerAsked = false;
bool mSdpOffering = false;
bool mCallReleased = false;
bool mManualRefresher = false;
bool mHasAuthPending = false;
bool mSupportsSessionTimers = false;
bool mOpReleased = false;
friend class Sal;
};
......
......@@ -469,7 +469,7 @@ void Sal::setTlsProperties(){
}
}
int Sal::addListenPort(SalAddress* addr, bool_t is_tunneled) {
int Sal::addListenPort(SalAddress* addr, bool is_tunneled) {
int result;
belle_sip_listening_point_t* lp;
if (is_tunneled){
......@@ -505,7 +505,7 @@ int Sal::addListenPort(SalAddress* addr, bool_t is_tunneled) {
return result;
}
int Sal::setListenPort(const char *addr, int port, SalTransport tr, bool_t is_tunneled) {
int Sal::setListenPort(const char *addr, int port, SalTransport tr, bool is_tunneled) {
SalAddress* sal_addr = sal_address_new(NULL);
int result;
sal_address_set_domain(sal_addr,addr);
......@@ -655,19 +655,18 @@ int Sal::setTunnel(void *tunnelclient) {
#endif
}
bool_t Sal::isContentTypeSupported(const char *content_type) const {
bool Sal::isContentTypeSupported(const char *content_type) const {
bctbx_list_t *item;
for (item = mSupportedContentTypes; item != NULL; item = bctbx_list_next(item)) {
const char *item_content_type = (const char *)bctbx_list_get_data(item);
if (strcmp(item_content_type, content_type) == 0) return TRUE;
if (strcmp(item_content_type, content_type) == 0) return true;
}
return FALSE;
return false;
}
void Sal::addContentTypeSupport(const char *content_type) {
if ((content_type != NULL) && (isContentTypeSupported(content_type) == FALSE)) {
if (content_type && !isContentTypeSupported(content_type))
mSupportedContentTypes = bctbx_list_append(mSupportedContentTypes, ms_strdup(content_type));
}
}
void Sal::removeContentTypeSupport(const char *content_type) {
......@@ -678,7 +677,7 @@ void Sal::removeContentTypeSupport(const char *content_type) {
}
}
void Sal::useRport(bool_t use_rports) {
void Sal::useRport(bool use_rports) {
belle_sip_provider_enable_rport(mProvider,use_rports);
ms_message("Sal use rport [%s]", use_rports ? "enabled" : "disabled");
}
......@@ -713,12 +712,12 @@ void Sal::setRootCaData(const char* data) {
setTlsProperties();
}
void Sal::verifyServerCertificates(bool_t verify) {
void Sal::verifyServerCertificates(bool verify) {
mTlsVerify=verify;
setTlsProperties();
}
void Sal::verifyServerCn(bool_t verify) {
void Sal::verifyServerCn(bool verify) {
mTlsVerifyCn = verify;
setTlsProperties();
}
......@@ -746,21 +745,21 @@ int Sal::createUuid(char *uuid, size_t len) {
}
int Sal::generateUuid(char *uuid, size_t len) {
sal_uuid_t uuid_struct;
SalUuid uuid_struct;
int i;
int written;
if (len==0) return -1;
/*create an UUID as described in RFC4122, 4.4 */
belle_sip_random_bytes((unsigned char*)&uuid_struct, sizeof(sal_uuid_t));
uuid_struct.clock_seq_hi_and_reserved&=(unsigned char)~(1<<6);
uuid_struct.clock_seq_hi_and_reserved|=(unsigned char)1<<7;
uuid_struct.time_hi_and_version&=(unsigned char)~(0xf<<12);
uuid_struct.time_hi_and_version|=(unsigned char)4<<12;
written=snprintf(uuid,len,"%8.8x-%4.4x-%4.4x-%2.2x%2.2x-", uuid_struct.time_low, uuid_struct.time_mid,
uuid_struct.time_hi_and_version, uuid_struct.clock_seq_hi_and_reserved,
uuid_struct.clock_seq_low);
belle_sip_random_bytes((unsigned char*)&uuid_struct, sizeof(SalUuid));
uuid_struct.clockSeqHiAndReserved&=(unsigned char)~(1<<6);
uuid_struct.clockSeqHiAndReserved|=(unsigned char)1<<7;
uuid_struct.timeHiAndVersion&=(unsigned char)~(0xf<<12);
uuid_struct.timeHiAndVersion|=(unsigned char)4<<12;
written=snprintf(uuid,len,"%8.8x-%4.4x-%4.4x-%2.2x%2.2x-", uuid_struct.timeLow, uuid_struct.timeMid,
uuid_struct.timeHiAndVersion, uuid_struct.clockSeqHiAndReserved,
uuid_struct.clockSeqLow);
if ((written < 0) || ((size_t)written > (len +13))) {
ms_error("sal_create_uuid(): buffer is too short !");
return -1;
......@@ -792,7 +791,7 @@ void Sal::setDefaultSdpHandling(SalOpSDPHandling sdp_handling_method) {
mDefaultSdpHandling = sdp_handling_method;
}
void Sal::enableNatHelper(bool_t enable) {
void Sal::enableNatHelper(bool enable) {
mNatHelperEnabled=enable;
belle_sip_provider_enable_nat_helper(mProvider,enable);
ms_message("Sal nat helper [%s]",enable?"enabled":"disabled");
......@@ -967,8 +966,8 @@ void sal_set_recv_error(Sal *sal,int value) {
sal->setRecvError(value);
}
int sal_enable_pending_trans_checking(Sal *sal, bool_t value) {
return sal->enablePendingTransactionChecking(value);
void sal_enable_pending_trans_checking(Sal *sal, bool value) {
sal->enablePendingTransactionChecking(value);
}
void sal_enable_unconditional_answer(Sal *sal,int value) {
......@@ -999,7 +998,7 @@ void sal_set_transport_timeout(Sal* sal,int timeout) {
sal->setTransportTimeout(timeout);
}
void sal_enable_test_features(Sal*ctx, bool_t enabled) {
void sal_enable_test_features(Sal*ctx, bool enabled) {
ctx->enableTestFeatures(enabled);
}
......@@ -1011,7 +1010,7 @@ const SalErrorInfo *sal_op_get_error_info(const SalOp *op) {
return op->getErrorInfo();
}
bool_t sal_call_dialog_request_pending(const SalOp *op) {
bool sal_call_dialog_request_pending(const SalOp *op) {
auto callOp = dynamic_cast<const SalCallOp *>(op);
return callOp->dialogRequestPending();
}
......
......@@ -34,7 +34,7 @@ class SalSubscribeOp;
class SalPresenceOp;
class SalReferOp;
class Sal{
class Sal {
public:
using OnCallReceivedCb = void (*) (SalCallOp *op);
using OnCallRingingCb = void (*) (SalOp *op);
......@@ -145,10 +145,10 @@ public:
const char *getUserAgent() const;
void appendStackStringToUserAgent ();
bool_t isContentEncodingAvailable (const char *contentEncoding) {
return (bool_t)belle_sip_stack_content_encoding_available(mStack, contentEncoding);
bool isContentEncodingAvailable (const char *contentEncoding) {
return belle_sip_stack_content_encoding_available(mStack, contentEncoding);
}
bool_t isContentTypeSupported (const char *contentType) const;
bool isContentTypeSupported (const char *contentType) const;
void addContentTypeSupport (const char *contentType);
void removeContentTypeSupport (const char *contentType);
......@@ -158,25 +158,25 @@ public:
int createUuid (char *uuid, size_t len);
static int generateUuid (char *uuid, size_t len);
void enableNatHelper (bool_t enable);
bool_t natHelperEnabled () const { return mNatHelperEnabled; }
void enableNatHelper (bool value);
bool natHelperEnabled () const { return mNatHelperEnabled; }
bool_t pendingTransactionCheckingEnabled () const { return mPendingTransactionChecking; }
int enablePendingTransactionChecking (bool_t value) { mPendingTransactionChecking = value; return 0; }
bool pendingTransactionCheckingEnabled () const { return mPendingTransactionChecking; }
void enablePendingTransactionChecking (bool value) { mPendingTransactionChecking = value; }
void setRefresherRetryAfter (int value) { mRefresherRetryAfter = value; }
int getRefresherRetryAfter () const { return mRefresherRetryAfter; }
void enableSipUpdateMethod (bool_t value) { mEnableSipUpdate = value; }
void enableSipUpdateMethod (bool value) { mEnableSipUpdate = value; }
void useSessionTimers (int expires) { mSessionExpires = expires; }
void useDates (bool_t value) { mUseDates = value; }
void useOneMatchingCodecPolicy (bool_t value) { mOneMatchingCodec = value; }
void useRport (bool_t value);
void enableAutoContacts (bool_t value) { mAutoContacts = value; }
void enableTestFeatures (bool_t value) { mEnableTestFeatures = value; }
void useNoInitialRoute (bool_t value) { mNoInitialRoute = value; }
void useDates (bool value) { mUseDates = value; }
void useOneMatchingCodecPolicy (bool value) { mOneMatchingCodec = value; }
void useRport (bool value);
void enableAutoContacts (bool value) { mAutoContacts = value; }
void enableTestFeatures (bool value) { mEnableTestFeatures = value; }
void useNoInitialRoute (bool value) { mNoInitialRoute = value; }
void enableUnconditionalAnswer (int value) { belle_sip_provider_enable_unconditional_answer(mProvider, value); }
void enableReconnectToPrimaryAsap (bool_t value) { belle_sip_stack_enable_reconnect_to_primary_asap(mStack, value); }
void enableReconnectToPrimaryAsap (bool value) { belle_sip_stack_enable_reconnect_to_primary_asap(mStack, value); }
bctbx_list_t *getPendingAuths () const { return bctbx_list_copy(mPendingAuths); }
......@@ -186,7 +186,7 @@ public:
// ---------------------------------------------------------------------------
// Network parameters
// ---------------------------------------------------------------------------
int setListenPort (const char *addr, int port, SalTransport tr, bool_t isTunneled);
int setListenPort (const char *addr, int port, SalTransport tr, bool isTunneled);
int getListeningPort (SalTransport tr);
int isTransportAvailable (SalTransport t);
......@@ -197,7 +197,7 @@ public:
void setKeepAlivePeriod (unsigned int value);
unsigned int getKeepAlivePeriod () const { return mKeepAlive; }
void useTcpTlsKeepAlive (bool_t value) { mUseTcpTlsKeepAlive = value; }
void useTcpTlsKeepAlive (bool value) { mUseTcpTlsKeepAlive = value; }
void setDscp (int dscp) { belle_sip_stack_set_default_dscp(mStack, dscp); }
......@@ -223,8 +223,8 @@ public:
void setRootCaData (const char *data);
const char *getRootCa () const { return mRootCa; }
void verifyServerCertificates (bool_t value);
void verifyServerCn (bool_t value);
void verifyServerCertificates (bool value);
void verifyServerCn (bool value);
// ---------------------------------------------------------------------------
......@@ -235,11 +235,11 @@ public:
void setDnsServers (const bctbx_list_t *servers);
void enableDnsSearch (bool_t value) { belle_sip_stack_enable_dns_search(mStack, (unsigned char)value); }
bool_t dnsSearchEnabled () const { return (bool_t)belle_sip_stack_dns_search_enabled(mStack); }
void enableDnsSearch (bool value) { belle_sip_stack_enable_dns_search(mStack, (unsigned char)value); }
bool dnsSearchEnabled () const { return belle_sip_stack_dns_search_enabled(mStack); }
void enableDnsSrv (bool_t value) { belle_sip_stack_enable_dns_srv(mStack, (unsigned char)value); }
bool_t dnsSrvEnabled () const { return (bool_t)belle_sip_stack_dns_srv_enabled(mStack); }
void enableDnsSrv (bool value) { belle_sip_stack_enable_dns_srv(mStack, (unsigned char)value); }
bool dnsSrvEnabled () const { return belle_sip_stack_dns_srv_enabled(mStack); }
void setDnsUserHostsFile (const char *value) { belle_sip_stack_set_dns_user_hosts_file(mStack, value); }
const char *getDnsUserHostsFile () const { return belle_sip_stack_get_dns_user_hosts_file(mStack); }
......@@ -260,17 +260,17 @@ public:
private:
struct sal_uuid_t {
unsigned int time_low;
unsigned short time_mid;
unsigned short time_hi_and_version;
unsigned char clock_seq_hi_and_reserved;
unsigned char clock_seq_low;
struct SalUuid {
unsigned int timeLow;
unsigned short timeMid;
unsigned short timeHiAndVersion;
unsigned char clockSeqHiAndReserved;
unsigned char clockSeqLow;
unsigned char node[6];
};
void setTlsProperties ();
int addListenPort (SalAddress *addr, bool_t isTunneled);
int addListenPort (SalAddress *addr, bool isTunneled);
void makeSupportedHeader ();
void addPendingAuth (SalOp *op);
void removePendingAuth (SalOp *op);
......@@ -307,18 +307,18 @@ private:
int mRefresherRetryAfter = 60000; // Retry after value for refresher
MSList *mSupportedTags = nullptr; // List of char *
belle_sip_header_t *mSupported = nullptr;
bool_t mOneMatchingCodec = FALSE;
bool_t mUseTcpTlsKeepAlive = FALSE;
bool_t mNatHelperEnabled = FALSE;
bool_t mTlsVerify = TRUE;
bool_t mTlsVerifyCn = TRUE;
bool_t mUseDates = FALSE;
bool_t mAutoContacts = TRUE;
bool_t mEnableTestFeatures = FALSE;
bool_t mNoInitialRoute = FALSE;
bool_t mEnableSipUpdate = TRUE; // true by default
bool mOneMatchingCodec = false;
bool mUseTcpTlsKeepAlive = false;
bool mNatHelperEnabled = false;
bool mTlsVerify = true;
bool mTlsVerifyCn = true;
bool mUseDates = false;
bool mAutoContacts = true;
bool mEnableTestFeatures = false;
bool mNoInitialRoute = false;
bool mEnableSipUpdate = true;
SalOpSDPHandling mDefaultSdpHandling = SalOpSDPNormal;
bool_t mPendingTransactionChecking = TRUE; // For testing purposes
bool mPendingTransactionChecking = true; // For testing purposes
void *mSslConfig = nullptr;
bctbx_list_t *mSupportedContentTypes = nullptr; // List of char *
char *mLinphoneSpecs = nullptr;
......
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