mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix(linphone): add some fixes for Windows + add a export symbol for internal classes
This commit is contained in:
parent
3cf801a632
commit
ec23c3bdc8
15 changed files with 94 additions and 30 deletions
|
|
@ -122,9 +122,9 @@ LINPHONE_PUBLIC void linphone_core_stop_dtmf_stream(LinphoneCore* lc);
|
|||
|
||||
typedef bool_t (*LinphoneCoreIterateHook)(void *data);
|
||||
|
||||
void linphone_core_add_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook hook, void *hook_data);
|
||||
LINPHONE_PUBLIC void linphone_core_add_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook hook, void *hook_data);
|
||||
|
||||
void linphone_core_remove_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook hook, void *hook_data);
|
||||
LINPHONE_PUBLIC void linphone_core_remove_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook hook, void *hook_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
#define LINPHONE_PUBLIC
|
||||
#else
|
||||
#ifdef LINPHONE_EXPORTS
|
||||
#define LINPHONE_PUBLIC __declspec(dllexport)
|
||||
#define LINPHONE_PUBLIC __declspec(dllexport)
|
||||
#else
|
||||
#define LINPHONE_PUBLIC __declspec(dllimport)
|
||||
#define LINPHONE_PUBLIC __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
|
|||
search/magic-search.h
|
||||
search/search-result.h
|
||||
utils/background-task.h
|
||||
utils/general-internal.h
|
||||
utils/payload-type-handler.h
|
||||
variant/variant.h
|
||||
xml/conference-info.h
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ extern "C" {
|
|||
const char* sal_transport_to_string(SalTransport transport);
|
||||
SalTransport sal_transport_parse(const char*);
|
||||
/* Address manipulation API*/
|
||||
SalAddress * sal_address_new(const char *uri);
|
||||
LINPHONE_PUBLIC SalAddress * sal_address_new(const char *uri);
|
||||
SalAddress * sal_address_clone(const SalAddress *addr);
|
||||
SalAddress * sal_address_ref(SalAddress *addr);
|
||||
void sal_address_unref(SalAddress *addr);
|
||||
LINPHONE_PUBLIC void sal_address_unref(SalAddress *addr);
|
||||
const char *sal_address_get_scheme(const SalAddress *addr);
|
||||
const char *sal_address_get_display_name(const SalAddress* addr);
|
||||
const char *sal_address_get_display_name_unquoted(const SalAddress *addr);
|
||||
|
|
@ -119,7 +119,7 @@ void sal_address_clean(SalAddress *addr);
|
|||
char *sal_address_as_string(const SalAddress *u);
|
||||
char *sal_address_as_string_uri_only(const SalAddress *u);
|
||||
void sal_address_destroy(SalAddress *u);
|
||||
void sal_address_set_param(SalAddress *u,const char* name,const char* value);
|
||||
LINPHONE_PUBLIC void sal_address_set_param(SalAddress *u,const char* name,const char* value);
|
||||
void sal_address_set_transport(SalAddress* addr,SalTransport transport);
|
||||
void sal_address_set_transport_name(SalAddress* addr,const char* transport);
|
||||
void sal_address_set_method_param(SalAddress *addr, const char *method);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
class Participant;
|
||||
class ParticipantDevice;
|
||||
|
||||
class LocalConferenceEventHandlerPrivate : public ObjectPrivate {
|
||||
class LINPHONE_INTERNAL_PUBLIC LocalConferenceEventHandlerPrivate : public ObjectPrivate {
|
||||
public:
|
||||
void notifyFullState (const std::string ¬ify, const std::shared_ptr<ParticipantDevice> &device);
|
||||
void notifyAllExcept (const std::string ¬ify, const std::shared_ptr<Participant> &exceptParticipant);
|
||||
|
|
|
|||
|
|
@ -111,10 +111,4 @@ bool Participant::isAdmin () const {
|
|||
return d->isAdmin;
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
||||
ostream & operator<< (ostream &strm, const shared_ptr<Participant> &participant) {
|
||||
return strm << "'" << participant->getAddress().asString() << "'";
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
#include <list>
|
||||
|
||||
#include "address/identity-address.h"
|
||||
#include "object/object.h"
|
||||
#include "conference/params/call-session-params.h"
|
||||
#include "object/object.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ class ClientGroupChatRoom;
|
|||
class ParticipantPrivate;
|
||||
|
||||
class Participant : public Object {
|
||||
// TODO: Remove... It's ugly.
|
||||
friend class Call;
|
||||
friend class CallPrivate;
|
||||
friend class ClientGroupChatRoom;
|
||||
|
|
@ -67,7 +68,10 @@ private:
|
|||
L_DISABLE_COPY(Participant);
|
||||
};
|
||||
|
||||
std::ostream & operator<< (std::ostream &strm, const std::shared_ptr<Participant> &participant);
|
||||
inline std::ostream &operator<< (std::ostream &os, const Participant &participant) {
|
||||
return os << participant.getAddress().asString();
|
||||
return os;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Header::Header (const string &name, const string &value) : ClonableObject(*new H
|
|||
setValue(value);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
string parsedValue = value.substr(0, posParam);
|
||||
string params = value.substr(posParam + 1);
|
||||
string token;
|
||||
|
|
@ -167,7 +167,7 @@ string Header::asString () const {
|
|||
stringstream asString;
|
||||
if (!getName().empty()) {
|
||||
asString << getName() << ":";
|
||||
}
|
||||
}
|
||||
asString << getValue();
|
||||
for (const auto ¶m : getParameters()) {
|
||||
asString << param.asString();
|
||||
|
|
@ -175,9 +175,9 @@ string Header::asString () const {
|
|||
return asString.str();
|
||||
}
|
||||
|
||||
ostream &operator<<(ostream& stream, const Header& header) {
|
||||
stream << header.asString();
|
||||
return stream;
|
||||
ostream &operator<< (ostream &os, const Header& header) {
|
||||
os << header.asString();
|
||||
return os;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@ public:
|
|||
const HeaderParam &getParameter (const std::string ¶mName) const;
|
||||
|
||||
std::string asString () const;
|
||||
friend std::ostream &operator<<(std::ostream&, const Header&);
|
||||
|
||||
LINPHONE_PUBLIC friend std::ostream &operator<< (std::ostream &os, const Header &header);
|
||||
|
||||
protected:
|
||||
explicit Header (HeaderPrivate &p);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#define _L_ABSTRACT_DB_H_
|
||||
|
||||
#include "object/object.h"
|
||||
#include "utils/general-internal.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
|
|
@ -28,7 +29,7 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
class AbstractDbPrivate;
|
||||
|
||||
class AbstractDb : public Object {
|
||||
class LINPHONE_INTERNAL_PUBLIC AbstractDb : public Object {
|
||||
public:
|
||||
enum Backend {
|
||||
Mysql,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class MainDbKey;
|
|||
class MainDbPrivate;
|
||||
class ParticipantDevice;
|
||||
|
||||
class MainDb : public AbstractDb, public CoreAccessor {
|
||||
class LINPHONE_INTERNAL_PUBLIC MainDb : public AbstractDb, public CoreAccessor {
|
||||
template<typename Function>
|
||||
friend class DbTransaction;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,13 @@
|
|||
#include "linphone/utils/general.h"
|
||||
|
||||
#include "object-head-p.h"
|
||||
#include "utils/general-internal.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class BaseObjectPrivate {
|
||||
class LINPHONE_INTERNAL_PUBLIC BaseObjectPrivate {
|
||||
L_OBJECT_PRIVATE;
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,14 @@
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
class ObjectPrivate : public BaseObjectPrivate {
|
||||
#ifdef _WIN32
|
||||
// TODO: Avoid this error.
|
||||
// Disable C4251 triggered by std::recursive_mutex.
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4251)
|
||||
#endif // ifdef _WIN32
|
||||
|
||||
class LINPHONE_INTERNAL_PUBLIC ObjectPrivate : public BaseObjectPrivate {
|
||||
protected:
|
||||
inline const Object::Lock &getLock () const {
|
||||
return lock;
|
||||
|
|
@ -39,6 +46,10 @@ private:
|
|||
L_DECLARE_PUBLIC(Object);
|
||||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif // ifdef _WIN32
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _L_OBJECT_P_H_
|
||||
|
|
|
|||
|
|
@ -973,7 +973,7 @@ LINPHONE_PUBLIC void sal_set_dns_user_hosts_file(Sal *sal, const char *hosts_fil
|
|||
sal->setDnsUserHostsFile(hosts_file);
|
||||
}
|
||||
|
||||
void *sal_get_stack_impl(Sal *sal) {
|
||||
LINPHONE_PUBLIC void *sal_get_stack_impl(Sal *sal) {
|
||||
return sal->getStackImpl();
|
||||
}
|
||||
|
||||
|
|
@ -1020,11 +1020,11 @@ LINPHONE_PUBLIC belle_sip_resolver_context_t *sal_resolve_a(Sal *sal, const char
|
|||
return sal->resolveA(name, port, family, cb, data);
|
||||
}
|
||||
|
||||
Sal *sal_op_get_sal(SalOp *op) {
|
||||
LINPHONE_PUBLIC Sal *sal_op_get_sal(SalOp *op) {
|
||||
return op->getSal();
|
||||
}
|
||||
|
||||
SalOp *sal_create_refer_op(Sal *sal) {
|
||||
LINPHONE_PUBLIC SalOp *sal_create_refer_op(Sal *sal) {
|
||||
return new SalReferOp(sal);
|
||||
}
|
||||
|
||||
|
|
|
|||
51
src/utils/general-internal.h
Normal file
51
src/utils/general-internal.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* general-internal.h
|
||||
* Copyright (C) 2010-2018 Belledonne Communications SARL
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _L_GENERAL_INTERNAL_H_
|
||||
#define _L_GENERAL_INTERNAL_H_
|
||||
|
||||
#include "linphone/utils/general.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Export.
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#ifndef LINPHONE_INTERNAL_PUBLIC
|
||||
#if defined(_MSC_VER)
|
||||
#ifdef LINPHONE_STATIC
|
||||
#define LINPHONE_INTERNAL_PUBLIC
|
||||
#else
|
||||
#ifdef LINPHONE_EXPORTS
|
||||
#define LINPHONE_INTERNAL_PUBLIC __declspec(dllexport)
|
||||
#else
|
||||
#define LINPHONE_INTERNAL_PUBLIC __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define LINPHONE_INTERNAL_PUBLIC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
||||
#endif // ifndef _L_GENERAL_INTERNAL_H_
|
||||
Loading…
Add table
Reference in a new issue