Commit baa4eebb authored by Ghislain MARY's avatar Ghislain MARY

Use correct naming convention in sal API.

parent 9a4cdb30
......@@ -281,7 +281,7 @@ TunnelManager::~TunnelManager(){
mTunnelClient->stop();
delete mTunnelClient;
}
mCore->sal->set_tunnel(NULL);
mCore->sal->setTunnel(NULL);
linphone_core_remove_listener(mCore, mVTable);
linphone_core_v_table_destroy(mVTable);
}
......
......@@ -472,10 +472,10 @@ void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info)
lc->auth_info=bctbx_list_append(lc->auth_info,linphone_auth_info_clone(info));
/* retry pending authentication operations */
for(l=elem=lc->sal->get_pending_auths();elem!=NULL;elem=elem->next){
for(l=elem=lc->sal->getPendingAuths();elem!=NULL;elem=elem->next){
LinphonePrivate::SalOp *op= static_cast<LinphonePrivate::SalOp*>(elem->data);
LinphoneAuthInfo *ai;
const SalAuthInfo *req_sai=op->get_auth_requested();
const SalAuthInfo *req_sai=op->getAuthRequested();
ai=(LinphoneAuthInfo*)_linphone_core_find_auth_info(lc,req_sai->realm,req_sai->username,req_sai->domain, FALSE);
if (ai){
SalAuthInfo sai;
......@@ -495,7 +495,7 @@ void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info)
}
/*proxy case*/
for (proxy=(bctbx_list_t*)linphone_core_get_proxy_config_list(lc);proxy!=NULL;proxy=proxy->next) {
if (proxy->data == op->get_user_pointer()) {
if (proxy->data == op->getUserPointer()) {
linphone_proxy_config_set_state((LinphoneProxyConfig*)(proxy->data),LinphoneRegistrationProgress,"Authentication...");
break;
}
......
This diff is collapsed.
......@@ -573,7 +573,7 @@ static char* generate_url_from_server_address_and_uid(const char *server_url) {
char *result = NULL;
if (server_url) {
char *uuid = reinterpret_cast<char *>(ms_malloc(64));
if (LinphonePrivate::Sal::generate_uuid(uuid, 64) == 0) {
if (LinphonePrivate::Sal::generateUuid(uuid, 64) == 0) {
char *url = reinterpret_cast<char *>(ms_malloc(300));
snprintf(url, 300, "%s/linphone-%s.vcf", server_url, uuid);
ms_debug("Generated url is %s", url);
......
......@@ -127,10 +127,10 @@ int linphone_core_message_received(LinphoneCore *lc, LinphonePrivate::SalOp *op,
const char *peerAddress;
const char *localAddress;
if (linphone_core_conference_server_enabled(lc)) {
localAddress = peerAddress = op->get_to();
localAddress = peerAddress = op->getTo();
} else {
peerAddress = op->get_from();
localAddress = op->get_to();
peerAddress = op->getFrom();
localAddress = op->getTo();
}
shared_ptr<LinphonePrivate::AbstractChatRoom> chatRoom = L_GET_CPP_PTR_FROM_C_OBJECT(lc)->findChatRoom(
......
......@@ -207,9 +207,9 @@ void linphone_error_info_from_sal_op(LinphoneErrorInfo *ei, const LinphonePrivat
}else{
const SalErrorInfo *sei;
linphone_error_info_reset(ei);
sei = op->get_error_info();
sei = op->getErrorInfo();
linphone_error_info_from_sal(ei, sei);
sei = op->get_reason_error_info();
sei = op->getReasonErrorInfo();
linphone_error_info_from_sal_reason_ei(ei, sei);
}
}
......
......@@ -119,7 +119,7 @@ void linphone_event_cbs_set_notify_response(LinphoneEventCbs *cbs, LinphoneEvent
static void linphone_event_release(LinphoneEvent *lev){
if (lev->op) {
/*this will stop the refresher*/
lev->op->stop_refreshing();
lev->op->stopRefreshing();
}
linphone_event_unref(lev);
}
......@@ -133,7 +133,7 @@ static LinphoneEvent * linphone_event_new_base(LinphoneCore *lc, LinphoneSubscri
lev->name=ms_strdup(name);
if (strcmp(lev->name, "conference") == 0)
lev->internal = TRUE;
lev->op->set_user_pointer(lev);
lev->op->setUserPointer(lev);
return lev;
}
......@@ -221,7 +221,7 @@ LinphoneReason linphone_event_get_reason(const LinphoneEvent *lev){
LinphoneEvent *linphone_core_create_subscribe(LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires){
LinphoneEvent *lev=linphone_event_new(lc, LinphoneSubscriptionOutgoing, event, expires);
linphone_configure_op(lc,lev->op,resource,NULL,TRUE);
lev->op->set_manual_refresher_mode(!lp_config_get_int(lc->config,"sip","refresh_generic_subscribe",1));
lev->op->setManualRefresherMode(!lp_config_get_int(lc->config,"sip","refresh_generic_subscribe",1));
return lev;
}
......@@ -229,7 +229,7 @@ LinphoneEvent *linphone_core_create_notify(LinphoneCore *lc, const LinphoneAddre
LinphoneEvent *lev=linphone_event_new(lc, LinphoneSubscriptionIncoming, event, -1);
linphone_configure_op(lc,lev->op,resource,NULL,TRUE);
lev->subscription_state = LinphoneSubscriptionIncomingReceived;
lev->op->set_event(event);
lev->op->setEvent(event);
lev->is_out_of_dialog_op = TRUE;
return lev;
}
......@@ -265,10 +265,10 @@ LinphoneStatus linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneC
}
if (lev->send_custom_headers){
lev->op->set_sent_custom_header(lev->send_custom_headers);
lev->op->setSentCustomHeaders(lev->send_custom_headers);
sal_custom_header_free(lev->send_custom_headers);
lev->send_custom_headers=NULL;
}else lev->op->set_sent_custom_header(NULL);
}else lev->op->setSentCustomHeaders(NULL);
body_handler = sal_body_handler_from_content(body);
auto subscribeOp = dynamic_cast<SalSubscribeOp *>(lev->op);
......@@ -347,7 +347,7 @@ static LinphoneEvent *_linphone_core_create_publish(LinphoneCore *core, Linphone
lev = linphone_event_new_with_op(lc, new SalPublishOp(lc->sal), LinphoneSubscriptionInvalidDir, event);
lev->expires = expires;
linphone_configure_op_with_proxy(lc,lev->op,resource,NULL, !!lp_config_get_int(lc->config,"sip","publish_msg_with_contact",0),cfg);
lev->op->set_manual_refresher_mode(!lp_config_get_int(lc->config,"sip","refresh_generic_publish",1));
lev->op->setManualRefresherMode(!lp_config_get_int(lc->config,"sip","refresh_generic_publish",1));
return lev;
}
LinphoneEvent *linphone_core_create_publish(LinphoneCore *lc, const LinphoneAddress *resource, const char *event, int expires){
......@@ -374,10 +374,10 @@ static int _linphone_event_send_publish(LinphoneEvent *lev, const LinphoneConten
return -1;
}
if (lev->send_custom_headers){
lev->op->set_sent_custom_header(lev->send_custom_headers);
lev->op->setSentCustomHeaders(lev->send_custom_headers);
sal_custom_header_free(lev->send_custom_headers);
lev->send_custom_headers=NULL;
}else lev->op->set_sent_custom_header(NULL);
}else lev->op->setSentCustomHeaders(NULL);
body_handler = sal_body_handler_from_content(body);
auto publishOp = dynamic_cast<SalPublishOp *>(lev->op);
err=publishOp->publish(NULL,NULL,lev->name,lev->expires,body_handler);
......@@ -413,7 +413,7 @@ LinphoneStatus linphone_event_refresh_publish(LinphoneEvent *lev) {
return lev->op->refresh();
}
void linphone_event_pause_publish(LinphoneEvent *lev) {
if (lev->op) lev->op->stop_refreshing();
if (lev->op) lev->op->stopRefreshing();
}
void linphone_event_unpublish(LinphoneEvent *lev) {
lev->terminating = TRUE; /* needed to get clear event*/
......@@ -435,7 +435,7 @@ void linphone_event_add_custom_header(LinphoneEvent *ev, const char *name, const
}
const char* linphone_event_get_custom_header(LinphoneEvent* ev, const char* name){
const SalCustomHeader *ch=ev->op->get_recv_custom_header();
const SalCustomHeader *ch=ev->op->getRecvCustomHeaders();
return sal_custom_header_find(ch,name);
}
......@@ -453,7 +453,7 @@ void linphone_event_terminate(LinphoneEvent *lev){
lev->terminating=TRUE;
if (lev->dir==LinphoneSubscriptionIncoming){
auto op = dynamic_cast<SalSubscribeOp *>(lev->op);
op->close_notify();
op->closeNotify();
}else if (lev->dir==LinphoneSubscriptionOutgoing){
auto op = dynamic_cast<SalSubscribeOp *>(lev->op);
op->unsubscribe();
......@@ -511,7 +511,7 @@ const char *linphone_event_get_name(const LinphoneEvent *lev){
static const LinphoneAddress *_linphone_event_cache_to (const LinphoneEvent *lev) {
if (lev->to_address)
linphone_address_unref(lev->to_address);
char *buf = sal_address_as_string(lev->op->get_to_address());
char *buf = sal_address_as_string(lev->op->getToAddress());
((LinphoneEvent *)lev)->to_address = linphone_address_new(buf);
ms_free(buf);
return lev->to_address;
......@@ -520,7 +520,7 @@ static const LinphoneAddress *_linphone_event_cache_to (const LinphoneEvent *lev
static const LinphoneAddress *_linphone_event_cache_from (const LinphoneEvent *lev) {
if (lev->from_address)
linphone_address_unref(lev->from_address);
char *buf = sal_address_as_string(lev->op->get_from_address());
char *buf = sal_address_as_string(lev->op->getFromAddress());
((LinphoneEvent *)lev)->from_address = linphone_address_new(buf);
ms_free(buf);
return lev->from_address;
......@@ -529,7 +529,7 @@ static const LinphoneAddress *_linphone_event_cache_from (const LinphoneEvent *l
static const LinphoneAddress *_linphone_event_cache_remote_contact (const LinphoneEvent *lev) {
if (lev->remote_contact_address)
linphone_address_unref(lev->remote_contact_address);
char *buf = sal_address_as_string(lev->op->get_remote_contact_address());
char *buf = sal_address_as_string(lev->op->getRemoteContactAddress());
((LinphoneEvent *)lev)->remote_contact_address = linphone_address_new(buf);
ms_free(buf);
return lev->remote_contact_address;
......
......@@ -478,7 +478,7 @@ void linphone_friend_notify(LinphoneFriend *lf, LinphonePresenceModel *presence)
}
for(elem=lf->insubs; elem!=NULL; elem=bctbx_list_next(elem)){
auto op = reinterpret_cast<SalPresenceOp *>(bctbx_list_get_data(elem));
op->notify_presence((SalPresenceModel *)presence);
op->notifyPresence((SalPresenceModel *)presence);
}
}
......@@ -531,7 +531,7 @@ void linphone_friend_invalidate_subscription(LinphoneFriend *lf){
}
static void close_presence_notification(SalPresenceOp *op) {
op->notify_presence_close();
op->notifyPresenceClose();
}
static void release_sal_op(SalOp *op) {
......@@ -773,7 +773,7 @@ void linphone_friend_update_subscribes(LinphoneFriend *fr, bool_t only_when_regi
linphone_friend_unsubscribe(fr);
}else if (!can_subscribe && fr->outsub){
fr->subscribe_active=FALSE;
fr->outsub->stop_refreshing();
fr->outsub->stopRefreshing();
}
}
......
......@@ -834,7 +834,7 @@ LinphoneFriend * linphone_friend_list_find_friend_by_out_subscribe (
const bctbx_list_t *elem;
for (elem = list->friends; elem != NULL; elem = bctbx_list_next(elem)) {
LinphoneFriend *lf = (LinphoneFriend *)bctbx_list_get_data(elem);
if (lf->outsub && ((lf->outsub == op) || lf->outsub->is_forked_of(op))) return lf;
if (lf->outsub && ((lf->outsub == op) || lf->outsub->isForkedOf(op))) return lf;
}
return NULL;
}
......
This diff is collapsed.
......@@ -476,7 +476,7 @@ const char * linphone_core_get_echo_canceller_filter_name(const LinphoneCore *lc
* task_fun must return BELLE_SIP_STOP when job is finished.
**/
void linphone_core_queue_task(LinphoneCore *lc, belle_sip_source_func_t task_fun, void *data, const char *task_description){
belle_sip_source_t *s=lc->sal->create_timer(task_fun,data, 20, task_description);
belle_sip_source_t *s=lc->sal->createTimer(task_fun,data, 20, task_description);
belle_sip_object_unref(s);
}
......
......@@ -1563,7 +1563,7 @@ void linphone_subscription_new(LinphoneCore *lc, SalSubscribeOp *op, const char
linphone_friend_add_incoming_subscription(lf, op);
lf->inc_subscribe_pending=TRUE;
if (lp_config_get_int(lc->config,"sip","notify_pending_state",0)) {
op->notify_pending_state();
op->notifyPendingState();
}
op->accept();
} else {
......@@ -1936,7 +1936,7 @@ void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeStatus ss, Sa
if (linphone_core_get_default_friend_list(lc) != NULL)
lf=linphone_core_find_friend_by_out_subscribe(lc, op);
if (lf==NULL && lp_config_get_int(lc->config,"sip","allow_out_of_subscribe_presence",0)){
char *buf = sal_address_as_string_uri_only(op->get_from_address());
char *buf = sal_address_as_string_uri_only(op->getFromAddress());
LinphoneAddress *addr = linphone_address_new(buf);
lf = linphone_core_find_friend(lc, addr);
ms_free(buf);
......@@ -2000,7 +2000,7 @@ void linphone_subscription_closed(LinphoneCore *lc, SalOp *op){
linphone_friend_remove_incoming_subscription(lf, op);
}else{
/*case of an op that we already released because the friend was destroyed*/
ms_message("Receiving unsuscribe for unknown in-subscribtion from %s", op->get_from());
ms_message("Receiving unsuscribe for unknown in-subscribtion from %s", op->getFrom());
}
}
......
......@@ -436,7 +436,7 @@ void linphone_proxy_config_enable_publish(LinphoneProxyConfig *cfg, bool_t val){
}
void linphone_proxy_config_pause_register(LinphoneProxyConfig *cfg){
if (cfg->op) cfg->op->stop_refreshing();
if (cfg->op) cfg->op->stopRefreshing();
}
void linphone_proxy_config_edit(LinphoneProxyConfig *cfg){
......@@ -457,7 +457,7 @@ void linphone_proxy_config_apply(LinphoneProxyConfig *cfg,LinphoneCore *lc){
void linphone_proxy_config_stop_refreshing(LinphoneProxyConfig * cfg){
LinphoneAddress *contact_addr = NULL;
const SalAddress *sal_addr = cfg->op && cfg->state == LinphoneRegistrationOk ? cfg->op->get_contact_address() : NULL;
const SalAddress *sal_addr = cfg->op && cfg->state == LinphoneRegistrationOk ? cfg->op->getContactAddress() : NULL;
if (sal_addr) {
char *buf = sal_address_as_string(sal_addr);
contact_addr = buf ? linphone_address_new(buf) : NULL;
......@@ -538,10 +538,10 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
guess_contact_for_register(cfg);
if (cfg->contact_address)
cfg->op->set_contact_address(L_GET_PRIVATE_FROM_C_OBJECT(cfg->contact_address)->getInternalAddress());
cfg->op->set_user_pointer(cfg);
cfg->op->setContactAddress(L_GET_PRIVATE_FROM_C_OBJECT(cfg->contact_address)->getInternalAddress());
cfg->op->setUserPointer(cfg);
if (cfg->op->register_(
if (cfg->op->sendRegister(
proxy_string,
cfg->reg_identity,
cfg->expires,
......@@ -568,7 +568,7 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
void linphone_proxy_config_refresh_register(LinphoneProxyConfig *cfg){
if (cfg->reg_sendregister && cfg->op && cfg->state!=LinphoneRegistrationProgress){
if (cfg->op->register_refresh(cfg->expires) == 0) {
if (cfg->op->refreshRegister(cfg->expires) == 0) {
linphone_proxy_config_set_state(cfg,LinphoneRegistrationProgress, "Refresh registration");
}
}
......@@ -850,7 +850,7 @@ LinphoneStatus linphone_proxy_config_done(LinphoneProxyConfig *cfg)
if (res == LinphoneProxyConfigAddressDifferent) {
_linphone_proxy_config_unregister(cfg);
}
cfg->op->set_user_pointer(NULL); /*we don't want to receive status for this un register*/
cfg->op->setUserPointer(NULL); /*we don't want to receive status for this un register*/
cfg->op->unref(); /*but we keep refresher to handle authentication if needed*/
cfg->op=NULL;
}
......@@ -1045,7 +1045,7 @@ struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig
const char *linphone_proxy_config_get_custom_header(LinphoneProxyConfig *cfg, const char *header_name){
const SalCustomHeader *ch;
if (!cfg->op) return NULL;
ch = cfg->op->get_recv_custom_header();
ch = cfg->op->getRecvCustomHeaders();
return sal_custom_header_find(ch, header_name);
}
......@@ -1416,7 +1416,7 @@ const LinphoneErrorInfo *linphone_proxy_config_get_error_info(const LinphoneProx
}
const LinphoneAddress* linphone_proxy_config_get_service_route(const LinphoneProxyConfig* cfg) {
return cfg->op?(const LinphoneAddress*) cfg->op->get_service_route():NULL;
return cfg->op?(const LinphoneAddress*) cfg->op->getServiceRoute():NULL;
}
const char* linphone_proxy_config_get_transport(const LinphoneProxyConfig *cfg) {
const char* addr=NULL;
......@@ -1496,7 +1496,7 @@ const LinphoneAddress *linphone_proxy_config_get_contact (const LinphoneProxyCon
// Warning : Do not remove, the op can change its contact_address
if (!cfg->op)
return NULL;
const SalAddress *salAddr = cfg->op->get_contact_address();
const SalAddress *salAddr = cfg->op->getContactAddress();
if (!salAddr)
return NULL;
if (cfg->contact_address)
......
......@@ -380,7 +380,7 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
sal_address_has_uri_param(salAddress, "maddr") ||
linphone_address_get_port(request_uri) != 0) {
ms_message("Publishing report with custom route %s", collector_uri);
lev->op->set_route(collector_uri);
lev->op->setRoute(collector_uri);
}
if (linphone_event_send_publish(lev, content) != 0){
......@@ -424,7 +424,7 @@ static const SalStreamDescription * get_media_stream_for_desc(const SalMediaDesc
static void update_ip(LinphoneCall * call, int stats_type) {
SalStreamType sal_stream_type = stats_type == LINPHONE_CALL_STATS_AUDIO ? SalAudio : stats_type == LINPHONE_CALL_STATS_VIDEO ? SalVideo : SalText;
const SalStreamDescription * local_desc = get_media_stream_for_desc(_linphone_call_get_local_desc(call), sal_stream_type);
const SalStreamDescription * remote_desc = get_media_stream_for_desc(L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp()->get_remote_media_description(), sal_stream_type);
const SalStreamDescription * remote_desc = get_media_stream_for_desc(L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp()->getRemoteMediaDescription(), sal_stream_type);
LinphoneCallLog *log = L_GET_CPP_PTR_FROM_C_OBJECT(call)->getLog();
if (local_desc != NULL) {
......@@ -444,7 +444,7 @@ static void update_ip(LinphoneCall * call, int stats_type) {
if (strlen(remote_desc->rtp_addr) > 0) {
STR_REASSIGN(log->reporting.reports[stats_type]->info.remote_addr.ip, ms_strdup(remote_desc->rtp_addr));
} else {
STR_REASSIGN(log->reporting.reports[stats_type]->info.remote_addr.ip, ms_strdup(L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp()->get_remote_media_description()->addr));
STR_REASSIGN(log->reporting.reports[stats_type]->info.remote_addr.ip, ms_strdup(L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp()->getRemoteMediaDescription()->addr));
}
}
}
......@@ -511,7 +511,7 @@ void linphone_reporting_update_media_info(LinphoneCall * call, int stats_type) {
if (!media_report_enabled(call, stats_type) || !L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp())
return;
dialog_id = L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp()->get_dialog_id();
dialog_id = L_GET_PRIVATE_FROM_C_OBJECT(call)->getOp()->getDialogId();
STR_REASSIGN(report->info.call_id, ms_strdup(log->call_id));
......
......@@ -367,7 +367,7 @@ bool_t linphone_vcard_generate_unique_id(LinphoneVcard *vCard) {
if (linphone_vcard_get_uid(vCard)) {
return FALSE;
}
if (LinphonePrivate::Sal::generate_uuid(uuid, sizeof(uuid)) == 0) {
if (LinphonePrivate::Sal::generateUuid(uuid, sizeof(uuid)) == 0) {
char vcard_uuid[sizeof(uuid)+4];
snprintf(vcard_uuid, sizeof(vcard_uuid), "urn:%s", uuid);
linphone_vcard_set_uid(vCard, vcard_uuid);
......
......@@ -207,7 +207,7 @@ LinphoneCallState linphone_call_get_state (const LinphoneCall *call) {
bool_t linphone_call_asked_to_autoanswer (LinphoneCall *call) {
//return TRUE if the unique(for the moment) incoming call asked to be autoanswered
if (call)
return linphone_call_get_op(call)->autoanswer_asked();
return linphone_call_get_op(call)->autoAnswerAsked();
return FALSE;
}
......@@ -575,8 +575,8 @@ void linphone_call_ogl_render (const LinphoneCall *call) {
LinphoneStatus linphone_call_send_info_message (LinphoneCall *call, const LinphoneInfoMessage *info) {
SalBodyHandler *body_handler = sal_body_handler_from_content(linphone_info_message_get_content(info));
linphone_call_get_op(call)->set_sent_custom_header(linphone_info_message_get_headers(info));
return linphone_call_get_op(call)->send_info(nullptr, nullptr, body_handler);
linphone_call_get_op(call)->setSentCustomHeaders(linphone_info_message_get_headers(info));
return linphone_call_get_op(call)->sendInfo(nullptr, nullptr, body_handler);
}
LinphoneCallStats *linphone_call_get_stats (LinphoneCall *call, LinphoneStreamType type) {
......
......@@ -680,11 +680,11 @@ void ChatMessagePrivate::send () {
core->getCCore(), op, peer, getSalCustomHeaders(),
!!lp_config_get_int(core->getCCore()->config, "sip", "chat_msg_with_contact", 0)
);
op->set_user_pointer(q); /* If out of call, directly store msg */
op->setUserPointer(q); /* If out of call, directly store msg */
linphone_address_unref(peer);
}
op->set_from(q->getFromAddress().asString().c_str());
op->set_to(q->getToAddress().asString().c_str());
op->setFrom(q->getFromAddress().asString().c_str());
op->setTo(q->getToAddress().asString().c_str());
// ---------------------------------------
// Start of message modification
......@@ -721,7 +721,7 @@ void ChatMessagePrivate::send () {
EncryptionChatMessageModifier ecmm;
ChatMessageModifier::Result result = ecmm.encode(q->getSharedFromThis(), errorCode);
if (result == ChatMessageModifier::Result::Error) {
sal_error_info_set((SalErrorInfo *)op->get_error_info(), SalReasonNotAcceptable, "SIP", errorCode, "Unable to encrypt IM", nullptr);
sal_error_info_set((SalErrorInfo *)op->getErrorInfo(), SalReasonNotAcceptable, "SIP", errorCode, "Unable to encrypt IM", nullptr);
setState(ChatMessage::State::NotDelivered);
return;
} else if (result == ChatMessageModifier::Result::Suspended) {
......@@ -783,7 +783,7 @@ void ChatMessagePrivate::send () {
currentSendStep = ChatMessagePrivate::Step::None;
if (imdnId.empty())
setImdnMessageId(op->get_call_id()); /* must be known at that time */
setImdnMessageId(op->getCallId()); /* must be known at that time */
if (lcall && linphone_call_get_op(lcall) == op) {
/* In this case, chat delivery status is not notified, so unrefing chat message right now */
......@@ -890,7 +890,7 @@ ChatMessage::~ChatMessage () {
}
if (d->salOp) {
d->salOp->set_user_pointer(nullptr);
d->salOp->setUserPointer(nullptr);
d->salOp->unref();
}
if (d->salCustomHeaders)
......
......@@ -235,7 +235,7 @@ LinphoneReason ChatRoomPrivate::onSipMessageReceived (SalOp *op, const SalMessag
LinphoneCore *cCore = core->getCCore();
msg = createChatMessage(
IdentityAddress(op->get_from()) == q->getLocalAddress()
IdentityAddress(op->getFrom()) == q->getLocalAddress()
? ChatMessage::Direction::Outgoing
: ChatMessage::Direction::Incoming
);
......@@ -252,9 +252,9 @@ LinphoneReason ChatRoomPrivate::onSipMessageReceived (SalOp *op, const SalMessag
msg->setInternalContent(content);
msg->getPrivate()->setTime(message->time);
msg->getPrivate()->setImdnMessageId(op->get_call_id());
msg->getPrivate()->setImdnMessageId(op->getCallId());
const SalCustomHeader *ch = op->get_recv_custom_header();
const SalCustomHeader *ch = op->getRecvCustomHeaders();
if (ch)
msg->getPrivate()->setSalCustomHeaders(sal_custom_header_clone(ch));
......
......@@ -110,13 +110,13 @@ void ClientGroupChatRoomPrivate::confirmJoining (SalCallOp *op) {
auto focus = qConference->getPrivate()->focus;
bool previousSession = (focus->getPrivate()->getSession() != nullptr);
auto session = focus->getPrivate()->createSession(*q, nullptr, false, this);
session->configure(LinphoneCallIncoming, nullptr, op, Address(op->get_from()), Address(op->get_to()));
session->configure(LinphoneCallIncoming, nullptr, op, Address(op->getFrom()), Address(op->getTo()));
session->startIncomingNotification(false);
if (!previousSession) {
setState(ClientGroupChatRoom::State::CreationPending);
// Handle participants addition
list<IdentityAddress> identAddresses = ClientGroupChatRoom::parseResourceLists(op->get_remote_body());
list<IdentityAddress> identAddresses = ClientGroupChatRoom::parseResourceLists(op->getRemoteBody());
for (const auto &addr : identAddresses) {
auto participant = q->findParticipant(addr);
if (!participant) {
......@@ -351,7 +351,7 @@ void ClientGroupChatRoom::addParticipant (const IdentityAddress &addr, const Cal
linphone_address_unref(lAddr);
Address referToAddr = addr;
referToAddr.setParam("text");
referOp->send_refer(referToAddr.getPrivate()->getInternalAddress());
referOp->sendRefer(referToAddr.getPrivate()->getInternalAddress());
referOp->unref();
}
}
......@@ -402,7 +402,7 @@ void ClientGroupChatRoom::removeParticipant (const shared_ptr<Participant> &part
Address referToAddr = participant->getAddress();
referToAddr.setParam("text");
referToAddr.setUriParam("method", "BYE");
referOp->send_refer(referToAddr.getPrivate()->getInternalAddress());
referOp->sendRefer(referToAddr.getPrivate()->getInternalAddress());
referOp->unref();
}
......@@ -444,7 +444,7 @@ void ClientGroupChatRoom::setParticipantAdminStatus (const shared_ptr<Participan
Address referToAddr = participant->getAddress();
referToAddr.setParam("text");
referToAddr.setParam("admin", Utils::toString(isAdmin));
referOp->send_refer(referToAddr.getPrivate()->getInternalAddress());
referOp->sendRefer(referToAddr.getPrivate()->getInternalAddress());
referOp->unref();
}
......
......@@ -139,8 +139,8 @@ void ServerGroupChatRoomPrivate::onCallSessionSetReleased (const shared_ptr<Call
// =============================================================================
ServerGroupChatRoom::ServerGroupChatRoom (const shared_ptr<Core> &core, SalCallOp *op)
: ChatRoom(*new ServerGroupChatRoomPrivate, core, ChatRoomId(IdentityAddress(op->get_to()), IdentityAddress(op->get_to()))),
LocalConference(core, IdentityAddress(op->get_to()), nullptr) {
: ChatRoom(*new ServerGroupChatRoomPrivate, core, ChatRoomId(IdentityAddress(op->getTo()), IdentityAddress(op->getTo()))),
LocalConference(core, IdentityAddress(op->getTo()), nullptr) {
L_D();
d->chatRoomListener = d;
}
......
......@@ -235,7 +235,7 @@ void Imdn::startTimer () {
unsigned int duration = 500;
if (!timer)
timer = chatRoom->getCore()->getCCore()->sal->create_timer(timerExpired, this, duration, "imdn timeout");
timer = chatRoom->getCore()->getCCore()->sal->createTimer(timerExpired, this, duration, "imdn timeout");
else
belle_sip_source_set_timeout(timer, duration);
bgTask.start(chatRoom->getCore(), 1);
......@@ -245,7 +245,7 @@ void Imdn::stopTimer () {
if (timer) {
auto core = chatRoom->getCore()->getCCore();
if (core && core->sal)
core->sal->cancel_timer(timer);
core->sal->cancelTimer(timer);
belle_sip_object_unref(timer);
timer = nullptr;
}
......
......@@ -85,7 +85,7 @@ void IsComposing::parse (const Address &remoteAddr, const string &text) {
void IsComposing::startIdleTimer () {
unsigned int duration = getIdleTimerDuration();
if (!idleTimer) {
idleTimer = core->sal->create_timer(idleTimerExpired, this,
idleTimer = core->sal->createTimer(idleTimerExpired, this,
duration * 1000, "composing idle timeout");
} else {
belle_sip_source_set_timeout(idleTimer, duration * 1000);
......@@ -95,7 +95,7 @@ void IsComposing::startIdleTimer () {
void IsComposing::startRefreshTimer () {
unsigned int duration = getRefreshTimerDuration();
if (!refreshTimer) {
refreshTimer = core->sal->create_timer(refreshTimerExpired, this,
refreshTimer = core->sal->createTimer(refreshTimerExpired, this,
duration * 1000, "composing refresh timeout");
} else {
belle_sip_source_set_timeout(refreshTimer, duration * 1000);
......@@ -113,7 +113,7 @@ void IsComposing::stopTimers () {
void IsComposing::stopIdleTimer () {
if (idleTimer) {
if (core && core->sal)
core->sal->cancel_timer(idleTimer);
core->sal->cancelTimer(idleTimer);
belle_sip_object_unref(idleTimer);
idleTimer = nullptr;
}
......@@ -122,7 +122,7 @@ void IsComposing::stopIdleTimer () {
void IsComposing::stopRefreshTimer () {
if (refreshTimer) {
if (core && core->sal)
core->sal->cancel_timer(refreshTimer);
core->sal->cancelTimer(refreshTimer);
belle_sip_object_unref(refreshTimer);
refreshTimer = nullptr;
}
......@@ -176,7 +176,7 @@ void IsComposing::startRemoteRefreshTimer (const string &uri, unsigned long long
auto it = remoteRefreshTimers.find(uri);
if (it == remoteRefreshTimers.end()) {
IsRemoteComposingData *data = new IsRemoteComposingData(this, uri);
belle_sip_source_t *timer = core->sal->create_timer(remoteRefreshTimerExpired, data,
belle_sip_source_t *timer = core->sal->createTimer(remoteRefreshTimerExpired, data,
duration * 1000, "composing remote refresh timeout");
pair<string, belle_sip_source_t *> p(uri, timer);
remoteRefreshTimers.insert(p);
......@@ -192,7 +192,7 @@ void IsComposing::stopAllRemoteRefreshTimers () {
unordered_map<string, belle_sip_source_t *>::iterator IsComposing::stopRemoteRefreshTimer (const unordered_map<string, belle_sip_source_t *>::const_iterator it) {
belle_sip_source_t *timer = it->second;
if (core && core->sal) {
core->sal->cancel_timer(timer);
core->sal->cancelTimer(timer);
delete reinterpret_cast<IsRemoteComposingData *>(belle_sip_source_get_user_data(timer));
}
belle_sip_object_unref(timer);
......
......@@ -208,7 +208,7 @@ void RemoteConferenceEventHandlerPrivate::subscribe () {
}
lev = linphone_event_ref(linphone_core_create_subscribe(conf->getCore()->getCCore(), lAddr, "conference", 600));
lev->op->set_from(chatRoomId.getLocalAddress().asString().c_str());
lev->op->setFrom(chatRoomId.getLocalAddress().asString().c_str());
const string &lastNotifyStr = Utils::toString(lastNotify);
linphone_event_add_custom_header(lev, "Last-Notify-Version", lastNotifyStr.c_str());
linphone_address_unref(lAddr);
......
This diff is collapsed.
This diff is collapsed.
......@@ -59,16 +59,16 @@ bool CorePrivate::canWeAddCall () const {
bool CorePrivate::inviteReplacesABrokenCall (SalCallOp *op) {
CallSession *replacedSession = nullptr;
SalCallOp *replacedOp = op->get_replaces();
SalCallOp *replacedOp = op->getReplaces();
if (replacedOp)
replacedSession = reinterpret_cast<CallSession *>(replacedOp->get_user_pointer());
replacedSession = reinterpret_cast<CallSession *>(replacedOp->getUserPointer());
for (const auto &call : calls) {
shared_ptr<CallSession> session = call->getPrivate()->getActiveSession();
if (session
&& ((session->getPrivate()->isBroken() && op->compare_op(session->getPrivate()->getOp()))
&& ((session->getPrivate()->isBroken() && op->compareOp(session->getPrivate()->getOp()))
|| ((replacedSession == session.get())
&& (strcmp(op->get_from(), replacedOp->get_from()) == 0)
&& (strcmp(op->get_to(), replacedOp->get_to()) == 0)))
&& (strcmp(op->getFrom(), replacedOp->getFrom()) == 0)
&& (strcmp(op->getTo(), replacedOp->getTo()) == 0)))
) {
session->getPrivate()->replaceOp(op);
return true;
......
......@@ -81,7 +81,7 @@ void IceAgent::deleteSession () {
}
void IceAgent::gatheringFinished () {
const SalMediaDescription *rmd = mediaSession.getPrivate()->getOp()->get_remote_media_description();
const SalMediaDescription *rmd = mediaSession.getPrivate()->getOp()->getRemoteMediaDescription();
if (rmd)
clearUnusedIceCandidates(mediaSession.getPrivate()->getLocalDesc(), rmd);
if (!iceSession)
......@@ -134,7 +134,7 @@ bool IceAgent::prepare (const SalMediaDescription *localDesc, bool incomingOffer
SalMediaDescription *remoteDesc = nullptr;
bool hasVideo = false;
if (incomingOffer) {
remoteDesc = mediaSession.getPrivate()->getOp()->get_remote_media_description();
remoteDesc = mediaSession.getPrivate()->getOp()->getRemoteMediaDescription();
hasVideo = linphone_core_video_enabled(mediaSession.getCore()->getCCore()) &&
linphone_core_media_description_contains_video_stream(remoteDesc);
} else
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -24,49 +24,49 @@
LINPHONE_BEGIN_NAMESPACE
class SalEventOp: public SalOp {
class SalEventOp : public SalOp {
public:
SalEventOp(Sal *sal): SalOp(sal) {}
SalEventOp (Sal *sal) : SalOp(sal) {}
};
class SalSubscribeOp: public SalEventOp {
public:
SalSubscribeOp(Sal *sal): SalEventOp(sal) {}
SalSubscribeOp (Sal *sal): SalEventOp(sal) {}
int subscribe(const char *from, const char *to, const char *eventname, int expires, const SalBodyHandler *body_handler);
int unsubscribe() {return SalOp::unsubscribe();}
int accept();
int decline(SalReason reason);
int notify_pending_state();
int notify(const SalBodyHandler *body_handler);
int close_notify();
int subscribe (const char *from, const char *to, const char *eventName, int expires, const SalBodyHandler *bodyHandler);
int unsubscribe () { return SalOp::unsubscribe(); }
int accept ();
int decline (SalReason reason);
int notifyPendingState ();
int notify (const SalBodyHandler *bodyHandler);
int closeNotify ();
private:
virtual void fill_cbs() override;
void handle_notify(belle_sip_request_t *req, const char *