fix(core): many fixes for Windows => include iterator, cast bool_t/bool, symbol export...

This commit is contained in:
Ronan Abhamon 2018-05-17 11:31:34 +02:00
parent 3dede7ccda
commit 4d084078f4
9 changed files with 10 additions and 9 deletions

View file

@ -18,6 +18,7 @@
*/
#include <algorithm>
#include <iterator>
// TODO: Remove me later.
#include "linphone/chat.h"

View file

@ -78,7 +78,7 @@ bool_t linphone_magic_search_get_use_delimiter (LinphoneMagicSearch *magic_searc
}
void linphone_magic_search_set_use_delimiter (LinphoneMagicSearch *magic_search, bool_t enable) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setUseDelimiter(enable);
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setUseDelimiter(!!enable);
}
unsigned int linphone_magic_search_get_search_limit (const LinphoneMagicSearch *magic_search) {
@ -94,7 +94,7 @@ bool_t linphone_magic_search_get_limited_search (const LinphoneMagicSearch *magi
}
void linphone_magic_search_set_limited_search (LinphoneMagicSearch *magic_search, bool_t limited) {
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setLimitedSearch(limited);
L_GET_CPP_PTR_FROM_C_OBJECT(magic_search)->setLimitedSearch(!!limited);
}
void linphone_magic_search_reset_search_cache (LinphoneMagicSearch *magic_search) {

View file

@ -461,7 +461,7 @@ void CallPrivate::onStopRingingIfNeeded (const shared_ptr<CallSession> &session)
L_Q();
LinphoneCore *lc = q->getCore()->getCCore();
bool stopRinging = true;
bool ringDuringEarlyMedia = linphone_core_get_ring_during_incoming_early_media(lc);
bool ringDuringEarlyMedia = !!linphone_core_get_ring_during_incoming_early_media(lc);
for (const auto &call : q->getCore()->getCalls()) {
if ((call->getState() == CallSession::State::IncomingReceived)
|| (ringDuringEarlyMedia && call->getState() == CallSession::State::IncomingEarlyMedia)) {

View file

@ -34,7 +34,7 @@ class CallPrivate;
class CallSessionPrivate;
class MediaSessionPrivate;
class Call : public Object, public CoreAccessor {
class LINPHONE_PUBLIC Call : public Object, public CoreAccessor {
friend class CallSessionPrivate;
friend class ChatMessage;
friend class ChatMessagePrivate;

View file

@ -248,7 +248,7 @@ void FileTransferChatMessageModifier::processResponseFromPostFile (const belle_h
LinphoneImEncryptionEngineCbsIsEncryptionEnabledForFileTransferCb is_encryption_enabled_for_file_transfer_cb =
linphone_im_encryption_engine_cbs_get_is_encryption_enabled_for_file_transfer(imee_cbs);
if (is_encryption_enabled_for_file_transfer_cb) {
is_file_encryption_enabled = is_encryption_enabled_for_file_transfer_cb(imee, L_GET_C_BACK_PTR(message->getChatRoom()));
is_file_encryption_enabled = !!is_encryption_enabled_for_file_transfer_cb(imee, L_GET_C_BACK_PTR(message->getChatRoom()));
}
}

View file

@ -124,7 +124,7 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
device->setConferenceSubscribeEvent((subscriptionState == LinphoneSubscriptionIncomingReceived) ? lev : nullptr);
int notifyId = (notifyIdStr.empty() || device->getState() == ParticipantDevice::State::Joining) ? 0 : Utils::stoi(notifyIdStr);
string notifyBody = handler->getNotifyForId(notifyId, (chatRoom->getCapabilities() & AbstractChatRoom::Capabilities::OneToOne));
string notifyBody = handler->getNotifyForId(notifyId, !!(chatRoom->getCapabilities() & AbstractChatRoom::Capabilities::OneToOne));
if (notifyBody.empty())
continue;

View file

@ -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 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,

View file

@ -304,9 +304,8 @@ void Core::soundcardHintCheck () {
LinphoneConference *conf_ctx = getCCore()->conf_ctx;
if (conf_ctx && linphone_conference_get_size(conf_ctx) >= 1) return;
bool useFiles = L_GET_C_BACK_PTR(getSharedFromThis())->use_files;
if ((!d->hasCalls() || noNeedForSound)
&& (!useFiles && (!useRtpIo || (useRtpIo && useRtpIoEnableLocalOutput)))) {
&& (!L_GET_C_BACK_PTR(getSharedFromThis())->use_files && (!useRtpIo || (useRtpIo && useRtpIoEnableLocalOutput)))) {
lInfo() << "Notifying soundcard that we don't need it anymore for calls";
d->notifySoundcardUsage(false);
}

View file

@ -18,6 +18,7 @@
*/
#include <algorithm>
#include <iterator>
#include "address/identity-address.h"
#include "chat/chat-room/basic-chat-room.h"