Commit 00d1d983 authored by Ronan's avatar Ronan

fix(cpim): export symbols on Windows

parent 8c97e0c5
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
// ============================================================================= // =============================================================================
#define MAKE_CORE_HEADER(CLASS_PREFIX, NAME) \ #define MAKE_CORE_HEADER(CLASS_PREFIX, NAME) \
class CLASS_PREFIX ## Header : public CoreHeader { \ class LINPHONE_PUBLIC CLASS_PREFIX ## Header : public CoreHeader { \
public: \ public: \
CLASS_PREFIX ## Header() = default; \ CLASS_PREFIX ## Header() = default; \
inline std::string getName() const override { \ inline std::string getName() const override { \
...@@ -43,7 +43,7 @@ namespace LinphonePrivate { ...@@ -43,7 +43,7 @@ namespace LinphonePrivate {
// Generic core header. // Generic core header.
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
class CoreHeader : public Header { class LINPHONE_PUBLIC CoreHeader : public Header {
friend class HeaderNode; friend class HeaderNode;
public: public:
...@@ -79,7 +79,7 @@ namespace LinphonePrivate { ...@@ -79,7 +79,7 @@ namespace LinphonePrivate {
class SubjectHeaderPrivate; class SubjectHeaderPrivate;
class SubjectHeader : public CoreHeader { class LINPHONE_PUBLIC SubjectHeader : public CoreHeader {
friend class HeaderNode; friend class HeaderNode;
public: public:
......
...@@ -31,7 +31,7 @@ namespace LinphonePrivate { ...@@ -31,7 +31,7 @@ namespace LinphonePrivate {
class GenericHeaderPrivate; class GenericHeaderPrivate;
class HeaderNode; class HeaderNode;
class GenericHeader : public Header { class LINPHONE_PUBLIC GenericHeader : public Header {
friend class HeaderNode; friend class HeaderNode;
public: public:
......
...@@ -29,7 +29,7 @@ namespace LinphonePrivate { ...@@ -29,7 +29,7 @@ namespace LinphonePrivate {
namespace Cpim { namespace Cpim {
class HeaderPrivate; class HeaderPrivate;
class Header : public Object { class LINPHONE_PUBLIC Header : public Object {
public: public:
virtual ~Header () = default; virtual ~Header () = default;
......
...@@ -28,7 +28,7 @@ namespace LinphonePrivate { ...@@ -28,7 +28,7 @@ namespace LinphonePrivate {
namespace Cpim { namespace Cpim {
class MessagePrivate; class MessagePrivate;
class Message : public Object { class LINPHONE_PUBLIC Message : public Object {
public: public:
Message (); Message ();
......
...@@ -37,7 +37,7 @@ namespace LinphonePrivate { ...@@ -37,7 +37,7 @@ namespace LinphonePrivate {
L_DECLARE_PUBLIC(Object); L_DECLARE_PUBLIC(Object);
}; };
class Object { class LINPHONE_PUBLIC Object {
public: public:
virtual ~Object () { virtual ~Object () {
delete mPrivate; delete mPrivate;
......
...@@ -21,6 +21,24 @@ ...@@ -21,6 +21,24 @@
#ifndef _GENERAL_H_ #ifndef _GENERAL_H_
#define _GENERAL_H_ #define _GENERAL_H_
#ifndef LINPHONE_PUBLIC
#if defined(_MSC_VER)
#ifdef LINPHONE_STATIC
#define LINPHONE_PUBLIC
#else
#ifdef LINPHONE_EXPORTS
#define LINPHONE_PUBLIC __declspec(dllexport)
#else
#define LINPHONE_PUBLIC __declspec(dllimport)
#endif
#endif
#else
#define LINPHONE_PUBLIC
#endif
#endif
// -----------------------------------------------------------------------------
#define L_DECLARE_PRIVATE(CLASS) \ #define L_DECLARE_PRIVATE(CLASS) \
inline CLASS ## Private * getPrivate() { \ inline CLASS ## Private * getPrivate() { \
return reinterpret_cast<CLASS ## Private *>(mPrivate); \ return reinterpret_cast<CLASS ## Private *>(mPrivate); \
......
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