From 3d6aa3b50090c19b50ae488494f1459bade88da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Mon, 17 Sep 2012 20:01:03 +0200 Subject: Support for building swiften as a DLL Added missing SWIFTEN_API declarations. Changed test infrastructure to extend path before running tests. diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index b049f94..a5474bf 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -22,6 +22,7 @@ vars.Add(BoolVariable("assertions", "Compile with assertions", "yes")) vars.Add(BoolVariable("max_jobs", "Build with maximum number of parallel jobs", "no")) vars.Add(EnumVariable("target", "Choose a target platform for compilation", "native", ["native", "iphone-simulator", "iphone-device", "xcode"])) vars.Add(BoolVariable("swift_mobile", "Build mobile Swift", "no")) +vars.Add(BoolVariable("swiften_dll", "Build Swiften as dynamically linked library", "no")) if os.name != "nt" : vars.Add(BoolVariable("coverage", "Compile with coverage information", "no")) if os.name == "posix" : diff --git a/BuildTools/SCons/Tools/Test.py b/BuildTools/SCons/Tools/Test.py index 40eaeb1..c52f448 100644 --- a/BuildTools/SCons/Tools/Test.py +++ b/BuildTools/SCons/Tools/Test.py @@ -1,27 +1,39 @@ import SCons.Util, os def generate(env) : - def registerTest(env, target, type = "unit", is_checker = False) : - if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type : - cmd = target[0].abspath if SCons.Util.is_List(target) else target.abspath - params = "" + def registerTest(env, target, type = "unit", is_checker = False) : + if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type : + cmd = target[0].abspath if SCons.Util.is_List(target) else target.abspath + params = "" - # Special support for unittest checker - if is_checker and env.get("checker_report", False) : - params = " --xml > " + os.path.join(target[0].dir.path, "checker-report.xml") + # Special support for unittest checker + if is_checker and env.get("checker_report", False) : + params = " --xml > " + os.path.join(target[0].dir.path, "checker-report.xml") - ignore_prefix = "" - if env.get("TEST_IGNORE_RESULT", False) : - ignore_prefix = "-" - env.Command("**dummy**", target, - SCons.Action.Action(ignore_prefix + env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR")) + ignore_prefix = "" + if env.get("TEST_IGNORE_RESULT", False) : + ignore_prefix = "-" - def registerScriptTests(env, scripts, name, type) : - if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type : - pass + # Set environment variables for running the test + test_env = env.Clone() + for i in ["HOME", "USERPROFILE", "APPDATA"]: + if os.environ.get(i, "") : + test_env["ENV"][i] = os.environ[i] + if test_env["PLATFORM"] == "darwin" : + test_env["ENV"]["DYLD_FALLBACK_LIBRARY_PATH"] = ":".join(map(lambda x : str(x), test_env.get("LIBPATH", []))) + elif test_env["PLATFORM"] == "win32" : + test_env["ENV"]["PATH"] = ";".join(map(lambda x : str(x), test_env.get("LIBRUNPATH", []))) + ";" + test_env["ENV"]["PATH"] - env.AddMethod(registerTest, "Test") - env.AddMethod(registerScriptTests, "ScriptTests") + # Run the test + test_env.Command("**dummy**", target, + SCons.Action.Action(ignore_prefix + env.get("TEST_RUNNER", "") + cmd + " " + params, cmdstr = "$TESTCOMSTR")) + + def registerScriptTests(env, scripts, name, type) : + if env["TEST_TYPE"] == "all" or env["TEST_TYPE"] == type : + pass + + env.AddMethod(registerTest, "Test") + env.AddMethod(registerScriptTests, "ScriptTests") def exists(env) : - return True + return True diff --git a/QA/UnitTest/SConscript b/QA/UnitTest/SConscript index 694d9a8..11e6fbb 100644 --- a/QA/UnitTest/SConscript +++ b/QA/UnitTest/SConscript @@ -25,9 +25,5 @@ if env["TEST"] : myenv.Program("checker", lib) else : checker = myenv.Program("checker", env["UNITTEST_SOURCES"] + env["UNITTEST_OBJECTS"]) - for i in ["HOME", "USERPROFILE", "APPDATA"]: - if os.environ.get(i, "") : - myenv["ENV"][i] = os.environ[i] - if myenv["PLATFORM"] == "darwin" : - myenv["ENV"]["DYLD_FALLBACK_LIBRARY_PATH"] = ":".join(map(lambda x : str(x), myenv.get("LIBPATH", []))) myenv.Test(checker, is_checker = True) + diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 5ab9c9e..c940d49 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -1,4 +1,4 @@ -import os, shutil, datetime, re +import os, shutil, datetime, re, time import Version def generateDefaultTheme(dir) : @@ -170,11 +170,17 @@ myenv["SWIFT_VERSION_MAJOR"] = int(version_match.group(1)) if version_match else myenv["SWIFT_VERSION_MINOR"] = int(version_match.group(2)) if version_match else 0 if env["PLATFORM"] == "win32" : - res = myenv.RES("#/Swift/resources/Windows/Swift.rc") + res_env = myenv.Clone() + res_env.Append(CPPDEFINES = [ + ("SWIFT_COPYRIGHT_YEAR", "\"\\\"2010-%s\\\"\"" % str(time.localtime()[0])), + ("SWIFT_VERSION_MAJOR", "${SWIFT_VERSION_MAJOR}"), + ("SWIFT_VERSION_MINOR", "${SWIFT_VERSION_MINOR}"), + ]) + res = res_env.RES("#/Swift/resources/Windows/Swift.rc") # For some reason, SCons isn't picking up the dependency correctly # Adding it explicitly until i figure out why - myenv.Depends(res, "../Controllers/BuildVersion.h") - sources += [ + myenv.Depends(res, "../Controllers/BuildVersion.h") + sources += [ "WinUIHelpers.cpp", "CAPICertificateSelector.cpp", "WindowsNotifier.cpp", @@ -299,7 +305,7 @@ if env["PLATFORM"] == "win32" : "#/Swift/resources/images", ] if env["SWIFTEN_DLL"] : - commonResources[""] = commonResources.get("", []) + ["#/Swiften/Swiften.dll"] + commonResources[""] = commonResources.get("", []) + ["#/Swiften/${SWIFTEN_LIBRARY_FILE}"] qtimageformats = ["gif", "ico", "jpeg", "mng", "svg", "tiff"] qtlibs = ["QtCore4", "QtGui4", "QtNetwork4", "QtWebKit4", "QtXMLPatterns4", "phonon4"] myenv.WindowsBundle("Swift", diff --git a/Swift/resources/Windows/Swift.rc b/Swift/resources/Windows/Swift.rc index 99201e6..eb02bd1 100644 --- a/Swift/resources/Windows/Swift.rc +++ b/Swift/resources/Windows/Swift.rc @@ -1,7 +1,7 @@ #include "Swift/Controllers/BuildVersion.h" 1 VERSIONINFO -// FILEVERSION 1.0 + FILEVERSION SWIFT_VERSION_MAJOR, SWIFT_VERSION_MINOR // PRODUCTVERSION 1.0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -22,7 +22,7 @@ BEGIN VALUE "FileDescription", "Swift\0" VALUE "FileVersion", SWIFT_VERSION_STRING VALUE "InternalName", "Swift\0" - VALUE "LegalCopyright", "Copyright (C) 2010 Swift Team\0" + VALUE "LegalCopyright", "Copyright \251 " SWIFT_COPYRIGHT_YEAR " Swift Team\0" VALUE "OriginalFilename", "Swift.exe\0" VALUE "ProductName", "Swift\0" VALUE "ProductVersion", SWIFT_VERSION_STRING diff --git a/Swiften/Avatars/AvatarManager.h b/Swiften/Avatars/AvatarManager.h index 3461973..1e92328 100644 --- a/Swiften/Avatars/AvatarManager.h +++ b/Swiften/Avatars/AvatarManager.h @@ -8,13 +8,14 @@ #include +#include #include #include namespace Swift { class JID; - class AvatarManager { + class SWIFTEN_API AvatarManager { public: virtual ~AvatarManager(); diff --git a/Swiften/Avatars/AvatarProvider.h b/Swiften/Avatars/AvatarProvider.h index d2d408e..5c9460d 100644 --- a/Swiften/Avatars/AvatarProvider.h +++ b/Swiften/Avatars/AvatarProvider.h @@ -8,12 +8,13 @@ #include +#include #include namespace Swift { class JID; - class AvatarProvider { + class SWIFTEN_API AvatarProvider { public: virtual ~AvatarProvider(); diff --git a/Swiften/Avatars/CombinedAvatarProvider.h b/Swiften/Avatars/CombinedAvatarProvider.h index 7b29efc..96989b2 100644 --- a/Swiften/Avatars/CombinedAvatarProvider.h +++ b/Swiften/Avatars/CombinedAvatarProvider.h @@ -9,11 +9,12 @@ #include #include +#include #include #include namespace Swift { - class CombinedAvatarProvider : public AvatarProvider { + class SWIFTEN_API CombinedAvatarProvider : public AvatarProvider { public: virtual std::string getAvatarHash(const JID&) const; diff --git a/Swiften/Avatars/VCardAvatarManager.h b/Swiften/Avatars/VCardAvatarManager.h index cb3945d..ed2ba5d 100644 --- a/Swiften/Avatars/VCardAvatarManager.h +++ b/Swiften/Avatars/VCardAvatarManager.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include @@ -14,7 +15,7 @@ namespace Swift { class AvatarStorage; class VCardManager; - class VCardAvatarManager : public AvatarProvider { + class SWIFTEN_API VCardAvatarManager : public AvatarProvider { public: VCardAvatarManager(VCardManager*, AvatarStorage*, MUCRegistry* = NULL); diff --git a/Swiften/Avatars/VCardUpdateAvatarManager.h b/Swiften/Avatars/VCardUpdateAvatarManager.h index 28630ea..43e1d62 100644 --- a/Swiften/Avatars/VCardUpdateAvatarManager.h +++ b/Swiften/Avatars/VCardUpdateAvatarManager.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace Swift { class StanzaChannel; class VCardManager; - class VCardUpdateAvatarManager : public AvatarProvider, public boost::bsignals::trackable { + class SWIFTEN_API VCardUpdateAvatarManager : public AvatarProvider, public boost::bsignals::trackable { public: VCardUpdateAvatarManager(VCardManager*, StanzaChannel*, AvatarStorage*, MUCRegistry* = NULL); diff --git a/Swiften/Base/DateTime.h b/Swiften/Base/DateTime.h index 2407ddc..bc9eecb 100644 --- a/Swiften/Base/DateTime.h +++ b/Swiften/Base/DateTime.h @@ -6,6 +6,7 @@ #pragma once +#include #include namespace Swift { @@ -13,10 +14,10 @@ namespace Swift { * Converts a date formatted according to XEP-0082 into a ptime * object (in UTC). */ - boost::posix_time::ptime stringToDateTime(const std::string& string); + SWIFTEN_API boost::posix_time::ptime stringToDateTime(const std::string& string); /** * Converts a UTC ptime object to a XEP-0082 formatted string. */ - std::string dateTimeToString(const boost::posix_time::ptime& time); + SWIFTEN_API std::string dateTimeToString(const boost::posix_time::ptime& time); } diff --git a/Swiften/Base/RandomGenerator.h b/Swiften/Base/RandomGenerator.h index 4a3550d..8f33020 100644 --- a/Swiften/Base/RandomGenerator.h +++ b/Swiften/Base/RandomGenerator.h @@ -6,10 +6,11 @@ #pragma once +#include #include namespace Swift { - class RandomGenerator { + class SWIFTEN_API RandomGenerator { public: virtual ~RandomGenerator(); diff --git a/Swiften/Base/SimpleIDGenerator.h b/Swiften/Base/SimpleIDGenerator.h index 677c8d1..fee857d 100644 --- a/Swiften/Base/SimpleIDGenerator.h +++ b/Swiften/Base/SimpleIDGenerator.h @@ -8,8 +8,10 @@ #include +#include + namespace Swift { - class SimpleIDGenerator { + class SWIFTEN_API SimpleIDGenerator { public: SimpleIDGenerator(); diff --git a/Swiften/Base/URL.h b/Swiften/Base/URL.h index 9821ed5..00d58f1 100644 --- a/Swiften/Base/URL.h +++ b/Swiften/Base/URL.h @@ -9,10 +9,11 @@ #include #include #include +#include namespace Swift { -class URL { +class SWIFTEN_API URL { public: URL() : scheme(""), user(""), password(""), host(""), path(""), empty(true) { diff --git a/Swiften/Client/ClientSession.h b/Swiften/Client/ClientSession.h index 66a90ed..2553546 100644 --- a/Swiften/Client/ClientSession.h +++ b/Swiften/Client/ClientSession.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -22,7 +23,7 @@ namespace Swift { class ClientAuthenticator; class CertificateTrustChecker; - class ClientSession : public boost::enable_shared_from_this { + class SWIFTEN_API ClientSession : public boost::enable_shared_from_this { public: enum State { Initial, diff --git a/Swiften/Client/NickManager.h b/Swiften/Client/NickManager.h index 288aa7b..c5a452e 100644 --- a/Swiften/Client/NickManager.h +++ b/Swiften/Client/NickManager.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class NickManager { + class SWIFTEN_API NickManager { public: virtual ~NickManager(); diff --git a/Swiften/Component/ComponentConnector.h b/Swiften/Component/ComponentConnector.h index b47f5da..549457b 100644 --- a/Swiften/Component/ComponentConnector.h +++ b/Swiften/Component/ComponentConnector.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -22,7 +23,7 @@ namespace Swift { class ConnectionFactory; class TimerFactory; - class ComponentConnector : public boost::bsignals::trackable, public boost::enable_shared_from_this { + class SWIFTEN_API ComponentConnector : public boost::bsignals::trackable, public boost::enable_shared_from_this { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Component/ComponentHandshakeGenerator.h b/Swiften/Component/ComponentHandshakeGenerator.h index 4181d3c..c897fdc 100644 --- a/Swiften/Component/ComponentHandshakeGenerator.h +++ b/Swiften/Component/ComponentHandshakeGenerator.h @@ -8,8 +8,10 @@ #include +#include + namespace Swift { - class ComponentHandshakeGenerator { + class SWIFTEN_API ComponentHandshakeGenerator { public: static std::string getHandshake(const std::string& streamID, const std::string& secret); }; diff --git a/Swiften/Component/ComponentSession.h b/Swiften/Component/ComponentSession.h index 647bad7..073c3f4 100644 --- a/Swiften/Component/ComponentSession.h +++ b/Swiften/Component/ComponentSession.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -20,7 +21,7 @@ namespace Swift { class ComponentAuthenticator; - class ComponentSession : public boost::enable_shared_from_this { + class SWIFTEN_API ComponentSession : public boost::enable_shared_from_this { public: enum State { Initial, diff --git a/Swiften/Compress/ZLibCodecompressor.h b/Swiften/Compress/ZLibCodecompressor.h index bfb56f4..6ff64df 100644 --- a/Swiften/Compress/ZLibCodecompressor.h +++ b/Swiften/Compress/ZLibCodecompressor.h @@ -6,10 +6,11 @@ #pragma once +#include #include namespace Swift { - class ZLibCodecompressor { + class SWIFTEN_API ZLibCodecompressor { public: ZLibCodecompressor(); virtual ~ZLibCodecompressor(); diff --git a/Swiften/Compress/ZLibCompressor.h b/Swiften/Compress/ZLibCompressor.h index f4a8d2f..3ba1955 100644 --- a/Swiften/Compress/ZLibCompressor.h +++ b/Swiften/Compress/ZLibCompressor.h @@ -6,10 +6,11 @@ #pragma once +#include #include namespace Swift { - class ZLibCompressor : public ZLibCodecompressor { + class SWIFTEN_API ZLibCompressor : public ZLibCodecompressor { public: ZLibCompressor(); ~ZLibCompressor(); diff --git a/Swiften/Compress/ZLibDecompressor.h b/Swiften/Compress/ZLibDecompressor.h index 0726c8b..e3122f1 100644 --- a/Swiften/Compress/ZLibDecompressor.h +++ b/Swiften/Compress/ZLibDecompressor.h @@ -7,9 +7,10 @@ #pragma once #include +#include namespace Swift { - class ZLibDecompressor : public ZLibCodecompressor { + class SWIFTEN_API ZLibDecompressor : public ZLibCodecompressor { public: ZLibDecompressor(); ~ZLibDecompressor(); diff --git a/Swiften/Disco/CapsInfoGenerator.h b/Swiften/Disco/CapsInfoGenerator.h index d1b2663..62958e7 100644 --- a/Swiften/Disco/CapsInfoGenerator.h +++ b/Swiften/Disco/CapsInfoGenerator.h @@ -7,12 +7,13 @@ #pragma once #include +#include #include namespace Swift { class DiscoInfo; - class CapsInfoGenerator { + class SWIFTEN_API CapsInfoGenerator { public: CapsInfoGenerator(const std::string& node); diff --git a/Swiften/Disco/CapsManager.h b/Swiften/Disco/CapsManager.h index ddc7997..9f1d83b 100644 --- a/Swiften/Disco/CapsManager.h +++ b/Swiften/Disco/CapsManager.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -22,7 +23,7 @@ namespace Swift { class JID; class CapsStorage; - class CapsManager : public CapsProvider, public boost::bsignals::trackable { + class SWIFTEN_API CapsManager : public CapsProvider, public boost::bsignals::trackable { public: CapsManager(CapsStorage*, StanzaChannel*, IQRouter*); diff --git a/Swiften/Disco/DiscoInfoResponder.h b/Swiften/Disco/DiscoInfoResponder.h index af9f48f..cfe4d06 100644 --- a/Swiften/Disco/DiscoInfoResponder.h +++ b/Swiften/Disco/DiscoInfoResponder.h @@ -8,13 +8,14 @@ #include +#include #include #include namespace Swift { class IQRouter; - class DiscoInfoResponder : public GetResponder { + class SWIFTEN_API DiscoInfoResponder : public GetResponder { public: DiscoInfoResponder(IQRouter* router); diff --git a/Swiften/Disco/DummyEntityCapsProvider.h b/Swiften/Disco/DummyEntityCapsProvider.h index a1e3db6..713e21a 100644 --- a/Swiften/Disco/DummyEntityCapsProvider.h +++ b/Swiften/Disco/DummyEntityCapsProvider.h @@ -8,10 +8,11 @@ #include +#include #include namespace Swift { - class DummyEntityCapsProvider : public EntityCapsProvider { + class SWIFTEN_API DummyEntityCapsProvider : public EntityCapsProvider { public: DummyEntityCapsProvider() { } diff --git a/Swiften/Disco/EntityCapsManager.h b/Swiften/Disco/EntityCapsManager.h index e41c15f..4472ba5 100644 --- a/Swiften/Disco/EntityCapsManager.h +++ b/Swiften/Disco/EntityCapsManager.h @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -24,7 +25,7 @@ namespace Swift { * This information is provided in the form of service discovery * information. */ - class EntityCapsManager : public EntityCapsProvider, public boost::bsignals::trackable { + class SWIFTEN_API EntityCapsManager : public EntityCapsProvider, public boost::bsignals::trackable { public: EntityCapsManager(CapsProvider*, StanzaChannel*); diff --git a/Swiften/Disco/EntityCapsProvider.h b/Swiften/Disco/EntityCapsProvider.h index b38992c..54b090b 100644 --- a/Swiften/Disco/EntityCapsProvider.h +++ b/Swiften/Disco/EntityCapsProvider.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -16,7 +17,7 @@ namespace Swift { * This information is provided in the form of service discovery * information. */ - class EntityCapsProvider { + class SWIFTEN_API EntityCapsProvider { public: virtual ~EntityCapsProvider(); diff --git a/Swiften/Disco/JIDDiscoInfoResponder.h b/Swiften/Disco/JIDDiscoInfoResponder.h index ebc1452..df529c6 100644 --- a/Swiften/Disco/JIDDiscoInfoResponder.h +++ b/Swiften/Disco/JIDDiscoInfoResponder.h @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -15,7 +16,7 @@ namespace Swift { class IQRouter; - class JIDDiscoInfoResponder : public GetResponder { + class SWIFTEN_API JIDDiscoInfoResponder : public GetResponder { public: JIDDiscoInfoResponder(IQRouter* router); diff --git a/Swiften/Elements/RosterItemExchangePayload.h b/Swiften/Elements/RosterItemExchangePayload.h index f9aa2c8..622c775 100644 --- a/Swiften/Elements/RosterItemExchangePayload.h +++ b/Swiften/Elements/RosterItemExchangePayload.h @@ -10,16 +10,16 @@ #include #include +#include #include #include - namespace Swift { - class RosterItemExchangePayload : public Payload { + class SWIFTEN_API RosterItemExchangePayload : public Payload { public: typedef boost::shared_ptr ref; - class Item { + class SWIFTEN_API Item { public: enum Action { Add, Modify, Delete }; diff --git a/Swiften/Elements/RosterPayload.h b/Swiften/Elements/RosterPayload.h index c4907cb..47d27f2 100644 --- a/Swiften/Elements/RosterPayload.h +++ b/Swiften/Elements/RosterPayload.h @@ -10,12 +10,13 @@ #include #include +#include #include #include namespace Swift { - class RosterPayload : public Payload { + class SWIFTEN_API RosterPayload : public Payload { public: typedef boost::shared_ptr ref; typedef std::vector RosterItemPayloads; diff --git a/Swiften/Elements/StatusShow.h b/Swiften/Elements/StatusShow.h index cd3477e..3eeb44e 100644 --- a/Swiften/Elements/StatusShow.h +++ b/Swiften/Elements/StatusShow.h @@ -6,10 +6,11 @@ #pragma once +#include #include namespace Swift { - class StatusShow : public Payload { + class SWIFTEN_API StatusShow : public Payload { public: enum Type { Online, Away, FFC, XA, DND, None }; diff --git a/Swiften/Elements/StreamFeatures.h b/Swiften/Elements/StreamFeatures.h index cae5532..5e7b6c9 100644 --- a/Swiften/Elements/StreamFeatures.h +++ b/Swiften/Elements/StreamFeatures.h @@ -10,10 +10,11 @@ #include #include +#include #include namespace Swift { - class StreamFeatures : public Element { + class SWIFTEN_API StreamFeatures : public Element { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Elements/StreamManagementEnabled.h b/Swiften/Elements/StreamManagementEnabled.h index 02e77f3..0985574 100644 --- a/Swiften/Elements/StreamManagementEnabled.h +++ b/Swiften/Elements/StreamManagementEnabled.h @@ -8,10 +8,11 @@ #include +#include #include namespace Swift { - class StreamManagementEnabled : public Element { + class SWIFTEN_API StreamManagementEnabled : public Element { public: StreamManagementEnabled(); ~StreamManagementEnabled(); diff --git a/Swiften/Elements/Whiteboard/WhiteboardColor.h b/Swiften/Elements/Whiteboard/WhiteboardColor.h index a940338..3b3d93c 100644 --- a/Swiften/Elements/Whiteboard/WhiteboardColor.h +++ b/Swiften/Elements/Whiteboard/WhiteboardColor.h @@ -8,8 +8,10 @@ #include +#include + namespace Swift { - class WhiteboardColor { + class SWIFTEN_API WhiteboardColor { public: WhiteboardColor(); WhiteboardColor(int red, int green, int blue, int alpha = 255); diff --git a/Swiften/FileTransfer/FileTransferManager.h b/Swiften/FileTransfer/FileTransferManager.h index d59f029..30d9faf 100644 --- a/Swiften/FileTransfer/FileTransferManager.h +++ b/Swiften/FileTransfer/FileTransferManager.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ namespace Swift { class ReadBytestream; class S5BProxyRequest; - class FileTransferManager { + class SWIFTEN_API FileTransferManager { public: virtual ~FileTransferManager(); diff --git a/Swiften/FileTransfer/IBBReceiveSession.h b/Swiften/FileTransfer/IBBReceiveSession.h index d1c47bf..f075fe2 100644 --- a/Swiften/FileTransfer/IBBReceiveSession.h +++ b/Swiften/FileTransfer/IBBReceiveSession.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -18,7 +19,7 @@ namespace Swift { class IQRouter; - class IBBReceiveSession { + class SWIFTEN_API IBBReceiveSession { public: IBBReceiveSession( const std::string& id, diff --git a/Swiften/FileTransfer/IBBSendSession.h b/Swiften/FileTransfer/IBBSendSession.h index abd217b..a535382 100644 --- a/Swiften/FileTransfer/IBBSendSession.h +++ b/Swiften/FileTransfer/IBBSendSession.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ namespace Swift { class IQRouter; - class IBBSendSession { + class SWIFTEN_API IBBSendSession { public: IBBSendSession(const std::string& id, const JID& from, const JID& to, boost::shared_ptr bytestream, IQRouter* router); ~IBBSendSession(); diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.h b/Swiften/FileTransfer/IncomingJingleFileTransfer.h index 746d837..0731e04 100644 --- a/Swiften/FileTransfer/IncomingJingleFileTransfer.h +++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -35,7 +36,7 @@ namespace Swift { class SOCKS5BytestreamProxy; class IncrementalBytestreamHashCalculator; - class IncomingJingleFileTransfer : public IncomingFileTransfer { + class SWIFTEN_API IncomingJingleFileTransfer : public IncomingFileTransfer { public: typedef boost::shared_ptr ref; enum State { diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h index 041afe3..14c128a 100644 --- a/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h +++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGenerator.h @@ -8,11 +8,12 @@ #include +#include #include #include namespace Swift { - class LocalJingleTransportCandidateGenerator { + class SWIFTEN_API LocalJingleTransportCandidateGenerator { public: virtual ~LocalJingleTransportCandidateGenerator(); /** diff --git a/Swiften/FileTransfer/LocalJingleTransportCandidateGeneratorFactory.h b/Swiften/FileTransfer/LocalJingleTransportCandidateGeneratorFactory.h index c969fc7..422e006 100644 --- a/Swiften/FileTransfer/LocalJingleTransportCandidateGeneratorFactory.h +++ b/Swiften/FileTransfer/LocalJingleTransportCandidateGeneratorFactory.h @@ -6,10 +6,12 @@ #pragma once +#include + namespace Swift { class LocalJingleTransportCandidateGenerator; - class LocalJingleTransportCandidateGeneratorFactory { + class SWIFTEN_API LocalJingleTransportCandidateGeneratorFactory { public: virtual ~LocalJingleTransportCandidateGeneratorFactory(); diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.h b/Swiften/FileTransfer/OutgoingJingleFileTransfer.h index 0260016..e18b5c3 100644 --- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.h +++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.h @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -34,7 +35,7 @@ class IncrementalBytestreamHashCalculator; class SOCKS5BytestreamRegistry; class SOCKS5BytestreamProxy; -class OutgoingJingleFileTransfer : public OutgoingFileTransfer { +class SWIFTEN_API OutgoingJingleFileTransfer : public OutgoingFileTransfer { public: OutgoingJingleFileTransfer(JingleSession::ref, RemoteJingleTransportCandidateSelectorFactory*, diff --git a/Swiften/FileTransfer/ReadBytestream.h b/Swiften/FileTransfer/ReadBytestream.h index c94e4d3..b0663ab 100644 --- a/Swiften/FileTransfer/ReadBytestream.h +++ b/Swiften/FileTransfer/ReadBytestream.h @@ -9,10 +9,11 @@ #include #include +#include #include namespace Swift { - class ReadBytestream { + class SWIFTEN_API ReadBytestream { public: virtual ~ReadBytestream(); diff --git a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h index f8df8f9..487747c 100644 --- a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h +++ b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelector.h @@ -8,13 +8,14 @@ #include +#include #include #include #include #include namespace Swift { - class RemoteJingleTransportCandidateSelector { + class SWIFTEN_API RemoteJingleTransportCandidateSelector { public: virtual ~RemoteJingleTransportCandidateSelector(); diff --git a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelectorFactory.h b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelectorFactory.h index caa3097..4980b0c 100644 --- a/Swiften/FileTransfer/RemoteJingleTransportCandidateSelectorFactory.h +++ b/Swiften/FileTransfer/RemoteJingleTransportCandidateSelectorFactory.h @@ -6,10 +6,12 @@ #pragma once +#include + namespace Swift { class RemoteJingleTransportCandidateSelector; - class RemoteJingleTransportCandidateSelectorFactory { + class SWIFTEN_API RemoteJingleTransportCandidateSelectorFactory { public: virtual ~RemoteJingleTransportCandidateSelectorFactory(); diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h index e522ff8..0b9790d 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -28,7 +29,7 @@ class TimerFactory; * A session which has been connected to a SOCKS5 server (requester). * */ -class SOCKS5BytestreamClientSession { +class SWIFTEN_API SOCKS5BytestreamClientSession { public: enum State { Initial, diff --git a/Swiften/FileTransfer/SOCKS5BytestreamProxy.h b/Swiften/FileTransfer/SOCKS5BytestreamProxy.h index 8f80cea..59ff50c 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamProxy.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamProxy.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -21,7 +22,7 @@ namespace Swift { * - manages list of working S5B proxies * - creates initial connections (for the candidates you provide) */ -class SOCKS5BytestreamProxy { +class SWIFTEN_API SOCKS5BytestreamProxy { public: SOCKS5BytestreamProxy(ConnectionFactory*, TimerFactory*); diff --git a/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h b/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h index 779aabb..6d89e27 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -23,7 +24,7 @@ #include namespace Swift { - class SOCKS5BytestreamRegistry { + class SWIFTEN_API SOCKS5BytestreamRegistry { public: SOCKS5BytestreamRegistry(); diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h index ed77df8..4cbda7c 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamServerSession.h @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -17,7 +18,7 @@ namespace Swift { class SOCKS5BytestreamRegistry; - class SOCKS5BytestreamServerSession { + class SWIFTEN_API SOCKS5BytestreamServerSession { public: typedef boost::shared_ptr ref; diff --git a/Swiften/FileTransfer/WriteBytestream.h b/Swiften/FileTransfer/WriteBytestream.h index fb6f2f1..6085e78 100644 --- a/Swiften/FileTransfer/WriteBytestream.h +++ b/Swiften/FileTransfer/WriteBytestream.h @@ -9,10 +9,11 @@ #include #include +#include #include namespace Swift { - class WriteBytestream { + class SWIFTEN_API WriteBytestream { public: typedef boost::shared_ptr ref; diff --git a/Swiften/IDN/IDNA.h b/Swiften/IDN/IDNA.h index 19af1e6..6ac51bf 100644 --- a/Swiften/IDN/IDNA.h +++ b/Swiften/IDN/IDNA.h @@ -8,8 +8,10 @@ #include +#include + namespace Swift { - class IDNA { + class SWIFTEN_API IDNA { public: static std::string getEncoded(const std::string& s); }; diff --git a/Swiften/IDN/StringPrep.h b/Swiften/IDN/StringPrep.h index dc8fadc..688600c 100644 --- a/Swiften/IDN/StringPrep.h +++ b/Swiften/IDN/StringPrep.h @@ -7,10 +7,11 @@ #pragma once #include +#include #include namespace Swift { - class StringPrep { + class SWIFTEN_API StringPrep { public: enum Profile { NamePrep, diff --git a/Swiften/Jingle/FakeJingleSession.h b/Swiften/Jingle/FakeJingleSession.h index fd3d7b7..ec5cb09 100644 --- a/Swiften/Jingle/FakeJingleSession.h +++ b/Swiften/Jingle/FakeJingleSession.h @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -20,7 +21,7 @@ namespace Swift { class JingleContentID; - class FakeJingleSession : public JingleSession { + class SWIFTEN_API FakeJingleSession : public JingleSession { public: struct InitiateCall { InitiateCall(JingleContentID contentId, JingleDescription::ref desc, JingleTransportPayload::ref payL) : id(contentId), description(desc), payload(payL) {} diff --git a/Swiften/Jingle/JingleSessionManager.h b/Swiften/Jingle/JingleSessionManager.h index b4f2846..3412709 100644 --- a/Swiften/Jingle/JingleSessionManager.h +++ b/Swiften/Jingle/JingleSessionManager.h @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -17,7 +18,7 @@ namespace Swift { class JingleResponder; class IncomingJingleSessionHandler; - class JingleSessionManager { + class SWIFTEN_API JingleSessionManager { friend class JingleResponder; public: JingleSessionManager(IQRouter* router); diff --git a/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h b/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h index 9ce0781..6c36de0 100644 --- a/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h +++ b/Swiften/LinkLocal/DNSSD/DNSSDServiceID.h @@ -6,10 +6,11 @@ #pragma once +#include #include namespace Swift { - class DNSSDServiceID { + class SWIFTEN_API DNSSDServiceID { public: static const char* PresenceServiceType; diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h index f5166ee..9fc4608 100644 --- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h +++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -23,7 +24,7 @@ namespace Swift { class FakeDNSSDBrowseQuery; class EventLoop; - class FakeDNSSDQuerier : + class SWIFTEN_API FakeDNSSDQuerier : public DNSSDQuerier, public EventOwner, public boost::enable_shared_from_this { diff --git a/Swiften/LinkLocal/LinkLocalConnector.h b/Swiften/LinkLocal/LinkLocalConnector.h index 0acdc51..52692ef 100644 --- a/Swiften/LinkLocal/LinkLocalConnector.h +++ b/Swiften/LinkLocal/LinkLocalConnector.h @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -23,7 +24,7 @@ namespace Swift { class DNSSDQuerier; class DNSSDResolveHostnameQuery; - class LinkLocalConnector : public boost::enable_shared_from_this { + class SWIFTEN_API LinkLocalConnector : public boost::enable_shared_from_this { public: LinkLocalConnector( const LinkLocalService& service, diff --git a/Swiften/LinkLocal/LinkLocalService.h b/Swiften/LinkLocal/LinkLocalService.h index 2b7f7b2..56be9ef 100644 --- a/Swiften/LinkLocal/LinkLocalService.h +++ b/Swiften/LinkLocal/LinkLocalService.h @@ -7,13 +7,14 @@ #pragma once #include +#include #include #include #include #include namespace Swift { - class LinkLocalService { + class SWIFTEN_API LinkLocalService { public: LinkLocalService( const DNSSDServiceID& id, diff --git a/Swiften/LinkLocal/LinkLocalServiceBrowser.h b/Swiften/LinkLocal/LinkLocalServiceBrowser.h index 57ed969..f9a12f3 100644 --- a/Swiften/LinkLocal/LinkLocalServiceBrowser.h +++ b/Swiften/LinkLocal/LinkLocalServiceBrowser.h @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -21,7 +22,7 @@ #include namespace Swift { - class LinkLocalServiceBrowser { + class SWIFTEN_API LinkLocalServiceBrowser { public: LinkLocalServiceBrowser(boost::shared_ptr querier); ~LinkLocalServiceBrowser(); diff --git a/Swiften/LinkLocal/LinkLocalServiceInfo.h b/Swiften/LinkLocal/LinkLocalServiceInfo.h index 79a8cb8..ac7b86f 100644 --- a/Swiften/LinkLocal/LinkLocalServiceInfo.h +++ b/Swiften/LinkLocal/LinkLocalServiceInfo.h @@ -8,13 +8,14 @@ #include +#include #include #include #include namespace Swift { - class LinkLocalServiceInfo { + class SWIFTEN_API LinkLocalServiceInfo { public: enum Status { Available, Away, DND }; diff --git a/Swiften/Network/BOSHConnection.h b/Swiften/Network/BOSHConnection.h index a2abfcd..01341cc 100644 --- a/Swiften/Network/BOSHConnection.h +++ b/Swiften/Network/BOSHConnection.h @@ -15,6 +15,7 @@ #include +#include #include #include #include @@ -36,7 +37,7 @@ namespace Swift { class XMLParserFactory; class TLSContextFactory; - class BOSHError : public SessionStream::SessionStreamError { + class SWIFTEN_API BOSHError : public SessionStream::SessionStreamError { public: enum Type {BadRequest, HostGone, HostUnknown, ImproperAddressing, InternalServerError, ItemNotFound, OtherRequest, PolicyViolation, @@ -51,7 +52,7 @@ namespace Swift { }; - class BOSHConnection : public boost::enable_shared_from_this { + class SWIFTEN_API BOSHConnection : public boost::enable_shared_from_this { public: typedef boost::shared_ptr ref; static ref create(const URL& boshURL, Connector::ref connector, XMLParserFactory* parserFactory) { diff --git a/Swiften/Network/BOSHConnectionPool.h b/Swiften/Network/BOSHConnectionPool.h index 028a1f3..de707e8 100644 --- a/Swiften/Network/BOSHConnectionPool.h +++ b/Swiften/Network/BOSHConnectionPool.h @@ -9,6 +9,7 @@ #include +#include #include #include @@ -18,7 +19,7 @@ namespace Swift { class CachingDomainNameResolver; class EventLoop; - class BOSHConnectionPool : public boost::bsignals::trackable { + class SWIFTEN_API BOSHConnectionPool : public boost::bsignals::trackable { public: BOSHConnectionPool(const URL& boshURL, DomainNameResolver* resolver, ConnectionFactory* connectionFactory, XMLParserFactory* parserFactory, TLSContextFactory* tlsFactory, TimerFactory* timerFactory, EventLoop* eventLoop, const std::string& to, unsigned long long initialRID, const URL& boshHTTPConnectProxyURL, const SafeString& boshHTTPConnectProxyAuthID, const SafeString& boshHTTPConnectProxyAuthPassword); ~BOSHConnectionPool(); diff --git a/Swiften/Network/ChainedConnector.h b/Swiften/Network/ChainedConnector.h index 60aea05..4110522 100644 --- a/Swiften/Network/ChainedConnector.h +++ b/Swiften/Network/ChainedConnector.h @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -21,7 +22,7 @@ namespace Swift { class TimerFactory; class DomainNameResolver; - class ChainedConnector { + class SWIFTEN_API ChainedConnector { public: ChainedConnector(const std::string& hostname, int port, bool doServiceLookups, DomainNameResolver*, const std::vector&, TimerFactory*); diff --git a/Swiften/Network/Connection.h b/Swiften/Network/Connection.h index 6ad2999..97c287d 100644 --- a/Swiften/Network/Connection.h +++ b/Swiften/Network/Connection.h @@ -9,12 +9,13 @@ #include #include +#include #include namespace Swift { class HostAddressPort; - class Connection { + class SWIFTEN_API Connection { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Network/ConnectionFactory.h b/Swiften/Network/ConnectionFactory.h index 9e92c36..c8be2fc 100644 --- a/Swiften/Network/ConnectionFactory.h +++ b/Swiften/Network/ConnectionFactory.h @@ -8,10 +8,12 @@ #include +#include + namespace Swift { class Connection; - class ConnectionFactory { + class SWIFTEN_API ConnectionFactory { public: virtual ~ConnectionFactory(); diff --git a/Swiften/Network/Connector.h b/Swiften/Network/Connector.h index e3fd51f..26a98b8 100644 --- a/Swiften/Network/Connector.h +++ b/Swiften/Network/Connector.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -23,7 +24,7 @@ namespace Swift { class ConnectionFactory; class TimerFactory; - class Connector : public boost::bsignals::trackable, public boost::enable_shared_from_this { + class SWIFTEN_API Connector : public boost::bsignals::trackable, public boost::enable_shared_from_this { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Network/DomainNameServiceQuery.h b/Swiften/Network/DomainNameServiceQuery.h index 0e80233..fdf5b5d 100644 --- a/Swiften/Network/DomainNameServiceQuery.h +++ b/Swiften/Network/DomainNameServiceQuery.h @@ -12,12 +12,13 @@ #include #include +#include #include namespace Swift { class RandomGenerator; - class DomainNameServiceQuery { + class SWIFTEN_API DomainNameServiceQuery { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Network/DummyConnection.h b/Swiften/Network/DummyConnection.h index 5191e30..36bf897 100644 --- a/Swiften/Network/DummyConnection.h +++ b/Swiften/Network/DummyConnection.h @@ -8,13 +8,14 @@ #include +#include #include #include #include #include namespace Swift { - class DummyConnection : public Connection, public EventOwner, public boost::enable_shared_from_this { + class SWIFTEN_API DummyConnection : public Connection, public EventOwner, public boost::enable_shared_from_this { public: DummyConnection(EventLoop* eventLoop); diff --git a/Swiften/Network/DummyTimerFactory.h b/Swiften/Network/DummyTimerFactory.h index 0c49f3d..1e9413b 100644 --- a/Swiften/Network/DummyTimerFactory.h +++ b/Swiften/Network/DummyTimerFactory.h @@ -8,10 +8,11 @@ #include +#include #include namespace Swift { - class DummyTimerFactory : public TimerFactory { + class SWIFTEN_API DummyTimerFactory : public TimerFactory { public: class DummyTimer; diff --git a/Swiften/Network/FakeConnection.h b/Swiften/Network/FakeConnection.h index 99cb584..eca45da 100644 --- a/Swiften/Network/FakeConnection.h +++ b/Swiften/Network/FakeConnection.h @@ -10,13 +10,14 @@ #include #include +#include #include #include #include #include namespace Swift { - class FakeConnection : + class SWIFTEN_API FakeConnection : public Connection, public EventOwner, public boost::enable_shared_from_this { diff --git a/Swiften/Network/HTTPConnectProxiedConnection.h b/Swiften/Network/HTTPConnectProxiedConnection.h index e6c8629..c209dc1 100644 --- a/Swiften/Network/HTTPConnectProxiedConnection.h +++ b/Swiften/Network/HTTPConnectProxiedConnection.h @@ -13,6 +13,7 @@ #pragma once +#include #include namespace Swift { @@ -21,7 +22,7 @@ namespace Swift { class EventLoop; class TimerFactory; - class HTTPConnectProxiedConnection : public ProxiedConnection { + class SWIFTEN_API HTTPConnectProxiedConnection : public ProxiedConnection { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Network/StaticDomainNameResolver.h b/Swiften/Network/StaticDomainNameResolver.h index 29d1629..386179b 100644 --- a/Swiften/Network/StaticDomainNameResolver.h +++ b/Swiften/Network/StaticDomainNameResolver.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -17,7 +18,7 @@ #include namespace Swift { - class StaticDomainNameResolver : public DomainNameResolver { + class SWIFTEN_API StaticDomainNameResolver : public DomainNameResolver { public: typedef std::map > AddressesMap; typedef std::vector< std::pair > ServicesCollection; diff --git a/Swiften/Network/Timer.h b/Swiften/Network/Timer.h index b7578f2..d08cf3c 100644 --- a/Swiften/Network/Timer.h +++ b/Swiften/Network/Timer.h @@ -7,12 +7,13 @@ #pragma once #include +#include namespace Swift { /** * A class for triggering an event after a given period. */ - class Timer { + class SWIFTEN_API Timer { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Network/TimerFactory.h b/Swiften/Network/TimerFactory.h index 99903c3..62850bc 100644 --- a/Swiften/Network/TimerFactory.h +++ b/Swiften/Network/TimerFactory.h @@ -8,10 +8,11 @@ #include +#include #include namespace Swift { - class TimerFactory { + class SWIFTEN_API TimerFactory { public: virtual ~TimerFactory(); diff --git a/Swiften/Network/WindowsProxyProvider.h b/Swiften/Network/WindowsProxyProvider.h index c2d1f51..12aa18d 100644 --- a/Swiften/Network/WindowsProxyProvider.h +++ b/Swiften/Network/WindowsProxyProvider.h @@ -5,10 +5,12 @@ */ #pragma once + +#include #include namespace Swift { - class WindowsProxyProvider : public ProxyProvider { + class SWIFTEN_API WindowsProxyProvider : public ProxyProvider { public: WindowsProxyProvider(); virtual HostAddressPort getHTTPConnectProxy() const; diff --git a/Swiften/Parser/BOSHBodyExtractor.h b/Swiften/Parser/BOSHBodyExtractor.h index 07203ae..7510761 100644 --- a/Swiften/Parser/BOSHBodyExtractor.h +++ b/Swiften/Parser/BOSHBodyExtractor.h @@ -8,13 +8,14 @@ #include +#include #include #include namespace Swift { class XMLParserFactory; - class BOSHBodyExtractor { + class SWIFTEN_API BOSHBodyExtractor { friend class BOSHBodyParserClient; public: struct BOSHBody { diff --git a/Swiften/Parser/ElementParser.h b/Swiften/Parser/ElementParser.h index a11b505..1815240 100644 --- a/Swiften/Parser/ElementParser.h +++ b/Swiften/Parser/ElementParser.h @@ -9,11 +9,12 @@ #include #include +#include #include #include namespace Swift { - class ElementParser { + class SWIFTEN_API ElementParser { public: virtual ~ElementParser(); diff --git a/Swiften/Parser/ExpatParser.h b/Swiften/Parser/ExpatParser.h index 956e83f..dcb0915 100644 --- a/Swiften/Parser/ExpatParser.h +++ b/Swiften/Parser/ExpatParser.h @@ -9,10 +9,11 @@ #include #include +#include #include namespace Swift { - class ExpatParser : public XMLParser, public boost::noncopyable { + class SWIFTEN_API ExpatParser : public XMLParser, public boost::noncopyable { public: ExpatParser(XMLParserClient* client); ~ExpatParser(); diff --git a/Swiften/Parser/IQParser.h b/Swiften/Parser/IQParser.h index a7aa967..9773835 100644 --- a/Swiften/Parser/IQParser.h +++ b/Swiften/Parser/IQParser.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class IQParser : public GenericStanzaParser { + class SWIFTEN_API IQParser : public GenericStanzaParser { public: IQParser(PayloadParserFactoryCollection* factories); diff --git a/Swiften/Parser/MessageParser.h b/Swiften/Parser/MessageParser.h index a8aaa99..e908339 100644 --- a/Swiften/Parser/MessageParser.h +++ b/Swiften/Parser/MessageParser.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class MessageParser : public GenericStanzaParser { + class SWIFTEN_API MessageParser : public GenericStanzaParser { public: MessageParser(PayloadParserFactoryCollection* factories); diff --git a/Swiften/Parser/PayloadParsers/RawXMLPayloadParser.h b/Swiften/Parser/PayloadParsers/RawXMLPayloadParser.h index 4a027a1..2e16d00 100644 --- a/Swiften/Parser/PayloadParsers/RawXMLPayloadParser.h +++ b/Swiften/Parser/PayloadParsers/RawXMLPayloadParser.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -13,7 +14,7 @@ namespace Swift { class SerializingParser; - class RawXMLPayloadParser : public GenericPayloadParser { + class SWIFTEN_API RawXMLPayloadParser : public GenericPayloadParser { public: RawXMLPayloadParser(); diff --git a/Swiften/Parser/PresenceParser.h b/Swiften/Parser/PresenceParser.h index 19f90b3..eb07af8 100644 --- a/Swiften/Parser/PresenceParser.h +++ b/Swiften/Parser/PresenceParser.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class PresenceParser : public GenericStanzaParser { + class SWIFTEN_API PresenceParser : public GenericStanzaParser { public: PresenceParser(PayloadParserFactoryCollection* factories); diff --git a/Swiften/Parser/SerializingParser.h b/Swiften/Parser/SerializingParser.h index 5f2c0cd..7706961 100644 --- a/Swiften/Parser/SerializingParser.h +++ b/Swiften/Parser/SerializingParser.h @@ -7,11 +7,12 @@ #pragma once #include +#include #include #include namespace Swift { - class SerializingParser { + class SWIFTEN_API SerializingParser { public: SerializingParser(); diff --git a/Swiften/Parser/StanzaAckParser.h b/Swiften/Parser/StanzaAckParser.h index c188878..c453039 100644 --- a/Swiften/Parser/StanzaAckParser.h +++ b/Swiften/Parser/StanzaAckParser.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class StanzaAckParser : public GenericElementParser { + class SWIFTEN_API StanzaAckParser : public GenericElementParser { public: StanzaAckParser(); diff --git a/Swiften/Parser/StanzaParser.h b/Swiften/Parser/StanzaParser.h index 6887981..0af6b43 100644 --- a/Swiften/Parser/StanzaParser.h +++ b/Swiften/Parser/StanzaParser.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -18,7 +19,7 @@ namespace Swift { class PayloadParser; class PayloadParserFactoryCollection; - class StanzaParser : public ElementParser, public boost::noncopyable { + class SWIFTEN_API StanzaParser : public ElementParser, public boost::noncopyable { public: StanzaParser(PayloadParserFactoryCollection* factories); ~StanzaParser(); diff --git a/Swiften/Parser/StreamFeaturesParser.h b/Swiften/Parser/StreamFeaturesParser.h index d55abe9..4bbb31c 100644 --- a/Swiften/Parser/StreamFeaturesParser.h +++ b/Swiften/Parser/StreamFeaturesParser.h @@ -7,11 +7,12 @@ #pragma once #include +#include #include #include namespace Swift { - class StreamFeaturesParser : public GenericElementParser { + class SWIFTEN_API StreamFeaturesParser : public GenericElementParser { public: StreamFeaturesParser(); diff --git a/Swiften/Parser/StreamManagementEnabledParser.h b/Swiften/Parser/StreamManagementEnabledParser.h index db616af..dfe232c 100644 --- a/Swiften/Parser/StreamManagementEnabledParser.h +++ b/Swiften/Parser/StreamManagementEnabledParser.h @@ -8,9 +8,10 @@ #include #include +#include namespace Swift { - class StreamManagementEnabledParser : public GenericElementParser { + class SWIFTEN_API StreamManagementEnabledParser : public GenericElementParser { public: StreamManagementEnabledParser(); ~StreamManagementEnabledParser(); diff --git a/Swiften/Parser/Tree/ParserElement.h b/Swiften/Parser/Tree/ParserElement.h index b268c76..6be0631 100644 --- a/Swiften/Parser/Tree/ParserElement.h +++ b/Swiften/Parser/Tree/ParserElement.h @@ -9,13 +9,14 @@ #include #include +#include #include #include #include #include namespace Swift { - class ParserElement { + class SWIFTEN_API ParserElement { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Parser/UnitTest/GenericPayloadTreeParserTest.cpp b/Swiften/Parser/UnitTest/GenericPayloadTreeParserTest.cpp index d095afc..93d4e7f 100644 --- a/Swiften/Parser/UnitTest/GenericPayloadTreeParserTest.cpp +++ b/Swiften/Parser/UnitTest/GenericPayloadTreeParserTest.cpp @@ -7,12 +7,20 @@ #include #include +#include #include #include #include using namespace Swift; + +#if !SWIFTEN_STATIC && defined(SWIFTEN_PLATFORM_WINDOWS) +// This base class of a class used in this file is already exported, so need to +// explicitly import it. +template class __declspec(dllimport) Swift::GenericPayloadParser; +#endif + class GenericPayloadTreeParserTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(GenericPayloadTreeParserTest); CPPUNIT_TEST(testTree); diff --git a/Swiften/Presence/DirectedPresenceSender.h b/Swiften/Presence/DirectedPresenceSender.h index 7dbdd37..0eb16a4 100644 --- a/Swiften/Presence/DirectedPresenceSender.h +++ b/Swiften/Presence/DirectedPresenceSender.h @@ -10,9 +10,10 @@ #include #include +#include namespace Swift { - class DirectedPresenceSender : public PresenceSender { + class SWIFTEN_API DirectedPresenceSender : public PresenceSender { public: enum SendPresence {AndSendPresence, DontSendPresence}; DirectedPresenceSender(PresenceSender*); diff --git a/Swiften/Presence/PayloadAddingPresenceSender.h b/Swiften/Presence/PayloadAddingPresenceSender.h index 333842a..4845865 100644 --- a/Swiften/Presence/PayloadAddingPresenceSender.h +++ b/Swiften/Presence/PayloadAddingPresenceSender.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include @@ -17,7 +18,7 @@ namespace Swift { * * This class isn't meant to be used with directed presence. */ - class PayloadAddingPresenceSender : public PresenceSender { + class SWIFTEN_API PayloadAddingPresenceSender : public PresenceSender { public: PayloadAddingPresenceSender(PresenceSender*); diff --git a/Swiften/Presence/StanzaChannelPresenceSender.h b/Swiften/Presence/StanzaChannelPresenceSender.h index d60d29d..8649acb 100644 --- a/Swiften/Presence/StanzaChannelPresenceSender.h +++ b/Swiften/Presence/StanzaChannelPresenceSender.h @@ -6,12 +6,13 @@ #pragma once +#include #include namespace Swift { class StanzaChannel; - class StanzaChannelPresenceSender : public PresenceSender { + class SWIFTEN_API StanzaChannelPresenceSender : public PresenceSender { public: StanzaChannelPresenceSender(StanzaChannel*); diff --git a/Swiften/Queries/IQChannel.h b/Swiften/Queries/IQChannel.h index 71a6dd4..c9da593 100644 --- a/Swiften/Queries/IQChannel.h +++ b/Swiften/Queries/IQChannel.h @@ -10,10 +10,11 @@ #include #include +#include #include namespace Swift { - class IQChannel { + class SWIFTEN_API IQChannel { public: virtual ~IQChannel(); diff --git a/Swiften/Roster/RosterMemoryStorage.h b/Swiften/Roster/RosterMemoryStorage.h index b659d77..c9312db 100644 --- a/Swiften/Roster/RosterMemoryStorage.h +++ b/Swiften/Roster/RosterMemoryStorage.h @@ -6,10 +6,11 @@ #pragma once +#include #include namespace Swift { - class RosterMemoryStorage : public RosterStorage { + class SWIFTEN_API RosterMemoryStorage : public RosterStorage { public: RosterMemoryStorage(); diff --git a/Swiften/Roster/XMPPRosterController.h b/Swiften/Roster/XMPPRosterController.h index f105463..603f350 100644 --- a/Swiften/Roster/XMPPRosterController.h +++ b/Swiften/Roster/XMPPRosterController.h @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -20,7 +21,7 @@ namespace Swift { class XMPPRosterImpl; class RosterStorage; - class XMPPRosterController { + class SWIFTEN_API XMPPRosterController { public: XMPPRosterController(IQRouter *iqRouter, XMPPRosterImpl* xmppRoster, RosterStorage* storage); ~XMPPRosterController(); diff --git a/Swiften/Roster/XMPPRosterImpl.h b/Swiften/Roster/XMPPRosterImpl.h index cbb3166..8c8cf3e 100644 --- a/Swiften/Roster/XMPPRosterImpl.h +++ b/Swiften/Roster/XMPPRosterImpl.h @@ -9,10 +9,11 @@ #include #include +#include #include namespace Swift { - class XMPPRosterImpl : public XMPPRoster { + class SWIFTEN_API XMPPRosterImpl : public XMPPRoster { public: XMPPRosterImpl(); diff --git a/Swiften/SASL/ClientAuthenticator.h b/Swiften/SASL/ClientAuthenticator.h index 8710ac8..bc5b4f1 100644 --- a/Swiften/SASL/ClientAuthenticator.h +++ b/Swiften/SASL/ClientAuthenticator.h @@ -10,11 +10,12 @@ #include #include +#include #include #include namespace Swift { - class ClientAuthenticator { + class SWIFTEN_API ClientAuthenticator { public: ClientAuthenticator(const std::string& name); virtual ~ClientAuthenticator(); diff --git a/Swiften/SASL/DIGESTMD5ClientAuthenticator.h b/Swiften/SASL/DIGESTMD5ClientAuthenticator.h index 7ced962..01cdde9 100644 --- a/Swiften/SASL/DIGESTMD5ClientAuthenticator.h +++ b/Swiften/SASL/DIGESTMD5ClientAuthenticator.h @@ -10,12 +10,13 @@ #include #include +#include #include #include #include namespace Swift { - class DIGESTMD5ClientAuthenticator : public ClientAuthenticator { + class SWIFTEN_API DIGESTMD5ClientAuthenticator : public ClientAuthenticator { public: DIGESTMD5ClientAuthenticator(const std::string& host, const std::string& nonce); diff --git a/Swiften/SASL/DIGESTMD5Properties.h b/Swiften/SASL/DIGESTMD5Properties.h index ef87574..654208d 100644 --- a/Swiften/SASL/DIGESTMD5Properties.h +++ b/Swiften/SASL/DIGESTMD5Properties.h @@ -10,10 +10,11 @@ #include #include +#include #include namespace Swift { - class DIGESTMD5Properties { + class SWIFTEN_API DIGESTMD5Properties { public: DIGESTMD5Properties(); diff --git a/Swiften/SASL/PLAINClientAuthenticator.h b/Swiften/SASL/PLAINClientAuthenticator.h index 83e45c1..ad3a695 100644 --- a/Swiften/SASL/PLAINClientAuthenticator.h +++ b/Swiften/SASL/PLAINClientAuthenticator.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class PLAINClientAuthenticator : public ClientAuthenticator { + class SWIFTEN_API PLAINClientAuthenticator : public ClientAuthenticator { public: PLAINClientAuthenticator(); diff --git a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h index d140013..ace69b0 100644 --- a/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h +++ b/Swiften/SASL/SCRAMSHA1ClientAuthenticator.h @@ -12,9 +12,10 @@ #include #include #include +#include namespace Swift { - class SCRAMSHA1ClientAuthenticator : public ClientAuthenticator { + class SWIFTEN_API SCRAMSHA1ClientAuthenticator : public ClientAuthenticator { public: SCRAMSHA1ClientAuthenticator(const std::string& nonce, bool useChannelBinding = false); diff --git a/Swiften/SConscript b/Swiften/SConscript index 5ee4321..db18cc3 100644 --- a/Swiften/SConscript +++ b/Swiften/SConscript @@ -1,4 +1,4 @@ -import os, re, Version, os.path +import os, re, Version, os.path, time Import("env") @@ -10,7 +10,7 @@ swiften_dep_modules = ["BOOST", "GCONF", "ICU", "LIBIDN", "ZLIB", "OPENSSL", "LI external_swiften_dep_modules = ["BOOST"] if env["SCONS_STAGE"] == "flags" : - env["SWIFTEN_DLL"] = ARGUMENTS.get("swiften_dll") + env["SWIFTEN_DLL"] = env["swiften_dll"] env["SWIFTEN_VERSION"] = Version.getBuildVersion(env.Dir("#").abspath, "swift") version_match = re.match("(\d+)\.(\d+).*", env["SWIFTEN_VERSION"]) if version_match : @@ -26,7 +26,8 @@ if env["SCONS_STAGE"] == "flags" : if env["SWIFTEN_DLL"] : if env["PLATFORM"] == "win32" : - env["SWIFTEN_LIBRARY_FILE"] = "Swiften.dll" + env["SWIFTEN_LIBRARY"] = env.subst("Swiften${SWIFTEN_VERSION_MAJOR}") + env["SWIFTEN_LIBRARY_FILE"] = env.subst("${SWIFTEN_LIBRARY}.dll") elif env["PLATFORM"] == "darwin" : env["SWIFTEN_LIBRARY_FILE"] = env.subst("Swiften.${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}") env["SWIFTEN_LIBRARY_ALIASES"] = ["libSwiften.dylib", env.subst("libSwiften.${SWIFTEN_VERSION_MAJOR}.dylib")] @@ -36,6 +37,7 @@ if env["SCONS_STAGE"] == "flags" : swiften_env = env.Clone() swiften_env["LIBPATH"] = [Dir(".")] + swiften_env["LIBRUNPATH"] = [Dir(".")] swiften_env["LIBS"] = [swiften_env["SWIFTEN_LIBRARY"]] if not env["SWIFTEN_DLL"] : swiften_env.Append(CPPDEFINES = ["SWIFTEN_STATIC"]) @@ -65,6 +67,7 @@ if env["SCONS_STAGE"] == "flags" : "CPPPATH": e.get("CPPPATH", []), "CPPFLAGS": e.get("CPPFLAGS", []), "LIBPATH": e.get("LIBPATH", []), + "LIBRUNPATH": e.get("LIBRUNPATH", []), "LIBS": e.get("LIBS", []), "FRAMEWORKS": e.get("FRAMEWORKS", []), } @@ -267,12 +270,28 @@ if env["SCONS_STAGE"] == "build" : if myenv["PLATFORM"] != "darwin" and myenv["PLATFORM"] != "win32" and myenv.get("HAVE_GCONF", 0) : env.MergeFlags(env["GCONF_FLAGS"]) + if myenv["SWIFTEN_DLL"] : if myenv["PLATFORM"] == "posix" : myenv.Append(LINKFLAGS = ["-Wl,-soname,libSwiften.so.$SWIFTEN_VERSION_MAJOR"]) myenv["SHLIBSUFFIX"] = "" elif myenv["PLATFORM"] == "darwin" : myenv.Append(LINKFLAGS = ["-Wl,-install_name,libSwiften.so.$SWIFTEN_VERSION_MAJOR", "-Wl,-compatibility_version,${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}", "-Wl,-current_version,${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}"]) + elif myenv["PLATFORM"] == "win32" : + res_env = myenv.Clone() + res_env.Append(CPPDEFINES = [ + ("SWIFTEN_LIBRARY_FILE", "\"\\\"${SWIFTEN_LIBRARY_FILE}\\\"\""), + ("SWIFTEN_COPYRIGHT_YEAR", "\"\\\"2010-%s\\\"\"" % str(time.localtime()[0])), + ("SWIFTEN_VERSION_MAJOR", "${SWIFTEN_VERSION_MAJOR}"), + ("SWIFTEN_VERSION_MINOR", "${SWIFTEN_VERSION_MINOR}"), + ("SWIFTEN_VERSION_PATCH", "${SWIFTEN_VERSION_PATCH}"), + ]) + res = res_env.RES("Swiften.rc") + # For some reason, SCons isn't picking up the dependency correctly + # Adding it explicitly until i figure out why + res_env.Depends(res, "Version.h") + sources += res + swiften_lib = myenv.SwiftenLibrary(swiften_env["SWIFTEN_LIBRARY_FILE"], sources + swiften_env["SWIFTEN_OBJECTS"]) def symlink(env, target, source) : if os.path.exists(str(target[0])) : diff --git a/Swiften/Serializer/AuthChallengeSerializer.h b/Swiften/Serializer/AuthChallengeSerializer.h index d485473..7d0b1b8 100644 --- a/Swiften/Serializer/AuthChallengeSerializer.h +++ b/Swiften/Serializer/AuthChallengeSerializer.h @@ -8,11 +8,12 @@ #include +#include #include #include namespace Swift { - class AuthChallengeSerializer : public GenericElementSerializer { + class SWIFTEN_API AuthChallengeSerializer : public GenericElementSerializer { public: AuthChallengeSerializer(); diff --git a/Swiften/Serializer/AuthRequestSerializer.h b/Swiften/Serializer/AuthRequestSerializer.h index add7983..0b49384 100644 --- a/Swiften/Serializer/AuthRequestSerializer.h +++ b/Swiften/Serializer/AuthRequestSerializer.h @@ -8,11 +8,12 @@ #include +#include #include #include namespace Swift { - class AuthRequestSerializer : public GenericElementSerializer { + class SWIFTEN_API AuthRequestSerializer : public GenericElementSerializer { public: AuthRequestSerializer(); diff --git a/Swiften/Serializer/AuthResponseSerializer.h b/Swiften/Serializer/AuthResponseSerializer.h index 495f8cc..af71f59 100644 --- a/Swiften/Serializer/AuthResponseSerializer.h +++ b/Swiften/Serializer/AuthResponseSerializer.h @@ -8,11 +8,12 @@ #include +#include #include #include namespace Swift { - class AuthResponseSerializer : public GenericElementSerializer { + class SWIFTEN_API AuthResponseSerializer : public GenericElementSerializer { public: AuthResponseSerializer(); diff --git a/Swiften/Serializer/AuthSuccessSerializer.h b/Swiften/Serializer/AuthSuccessSerializer.h index 8163d16..370afaa 100644 --- a/Swiften/Serializer/AuthSuccessSerializer.h +++ b/Swiften/Serializer/AuthSuccessSerializer.h @@ -8,11 +8,12 @@ #include +#include #include #include namespace Swift { - class AuthSuccessSerializer : public GenericElementSerializer { + class SWIFTEN_API AuthSuccessSerializer : public GenericElementSerializer { public: AuthSuccessSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h b/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h index 2587ee0..b952a31 100644 --- a/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class CapsInfoSerializer : public GenericPayloadSerializer { + class SWIFTEN_API CapsInfoSerializer : public GenericPayloadSerializer { public: CapsInfoSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h index aa3c315..784d9e1 100644 --- a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h @@ -8,9 +8,10 @@ #include #include +#include namespace Swift { - class DeliveryReceiptRequestSerializer : public GenericPayloadSerializer { + class SWIFTEN_API DeliveryReceiptRequestSerializer : public GenericPayloadSerializer { public: DeliveryReceiptRequestSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h index 5fda3ea..92a531a 100644 --- a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class DeliveryReceiptSerializer : public GenericPayloadSerializer { + class SWIFTEN_API DeliveryReceiptSerializer : public GenericPayloadSerializer { public: DeliveryReceiptSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/FormSerializer.h b/Swiften/Serializer/PayloadSerializers/FormSerializer.h index d10f649..bb31c97 100644 --- a/Swiften/Serializer/PayloadSerializers/FormSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/FormSerializer.h @@ -6,13 +6,14 @@ #pragma once +#include #include #include #include #include namespace Swift { - class FormSerializer : public GenericPayloadSerializer
{ + class SWIFTEN_API FormSerializer : public GenericPayloadSerializer { public: FormSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h index 3b88590..e71671c 100644 --- a/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h @@ -7,11 +7,12 @@ #pragma once +#include #include #include namespace Swift { - class InBandRegistrationPayloadSerializer : public GenericPayloadSerializer { + class SWIFTEN_API InBandRegistrationPayloadSerializer : public GenericPayloadSerializer { public: InBandRegistrationPayloadSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h index 5131435..da8fa55 100644 --- a/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h @@ -7,16 +7,15 @@ #pragma once +#include #include #include - - namespace Swift { class PayloadSerializerCollection; class XMLElement; - class JingleFileTransferDescriptionSerializer : public GenericPayloadSerializer { + class SWIFTEN_API JingleFileTransferDescriptionSerializer : public GenericPayloadSerializer { public: JingleFileTransferDescriptionSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h index ccdb6d0..5ac266f 100644 --- a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include @@ -14,7 +15,7 @@ namespace Swift { class PayloadSerializerCollection; class XMLElement; - class JinglePayloadSerializer : public GenericPayloadSerializer { + class SWIFTEN_API JinglePayloadSerializer : public GenericPayloadSerializer { public: JinglePayloadSerializer(PayloadSerializerCollection*); diff --git a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h index e288cd7..a033a9c 100644 --- a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class MUCAdminPayloadSerializer : public GenericPayloadSerializer { + class SWIFTEN_API MUCAdminPayloadSerializer : public GenericPayloadSerializer { public: MUCAdminPayloadSerializer(); std::string affiliationToString(MUCOccupant::Affiliation affiliation) const; diff --git a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h b/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h index 133e45e..fcc8563 100644 --- a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class ResourceBindSerializer : public GenericPayloadSerializer { + class SWIFTEN_API ResourceBindSerializer : public GenericPayloadSerializer { public: ResourceBindSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h b/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h index f246f9e..71a5b5d 100644 --- a/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class RosterItemExchangeSerializer : public GenericPayloadSerializer { + class SWIFTEN_API RosterItemExchangeSerializer : public GenericPayloadSerializer { public: RosterItemExchangeSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h index e4dbff8..2d8e44b 100644 --- a/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h @@ -7,13 +7,14 @@ #pragma once +#include #include #include namespace Swift { class PayloadSerializerCollection; - class SearchPayloadSerializer : public GenericPayloadSerializer { + class SWIFTEN_API SearchPayloadSerializer : public GenericPayloadSerializer { public: SearchPayloadSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h b/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h index a1915c7..4606546 100644 --- a/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class SecurityLabelSerializer : public GenericPayloadSerializer { + class SWIFTEN_API SecurityLabelSerializer : public GenericPayloadSerializer { public: SecurityLabelSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h b/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h index 02104df..02d7c71 100644 --- a/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class SecurityLabelsCatalogSerializer : public GenericPayloadSerializer { + class SWIFTEN_API SecurityLabelsCatalogSerializer : public GenericPayloadSerializer { public: SecurityLabelsCatalogSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h b/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h index 98fa243..333059d 100644 --- a/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class SoftwareVersionSerializer : public GenericPayloadSerializer { + class SWIFTEN_API SoftwareVersionSerializer : public GenericPayloadSerializer { public: SoftwareVersionSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h b/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h index 4ac0a0d..1f1e9d7 100644 --- a/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h @@ -7,6 +7,7 @@ #pragma once +#include #include #include @@ -15,7 +16,7 @@ namespace Swift { class PayloadSerializerCollection; - class StreamInitiationFileInfoSerializer : public GenericPayloadSerializer { + class SWIFTEN_API StreamInitiationFileInfoSerializer : public GenericPayloadSerializer { public: StreamInitiationFileInfoSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h index 76f0f45..63f845f 100644 --- a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class StreamInitiationSerializer : public GenericPayloadSerializer { + class SWIFTEN_API StreamInitiationSerializer : public GenericPayloadSerializer { public: StreamInitiationSerializer(); diff --git a/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h b/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h index 68084f0..6a63236 100644 --- a/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h @@ -6,11 +6,12 @@ #pragma once +#include #include #include namespace Swift { - class VCardUpdateSerializer : public GenericPayloadSerializer { + class SWIFTEN_API VCardUpdateSerializer : public GenericPayloadSerializer { public: VCardUpdateSerializer(); diff --git a/Swiften/Serializer/StreamFeaturesSerializer.h b/Swiften/Serializer/StreamFeaturesSerializer.h index 5ea3ab1..1bd1136 100644 --- a/Swiften/Serializer/StreamFeaturesSerializer.h +++ b/Swiften/Serializer/StreamFeaturesSerializer.h @@ -8,11 +8,12 @@ #include +#include #include #include namespace Swift { - class StreamFeaturesSerializer : public GenericElementSerializer { + class SWIFTEN_API StreamFeaturesSerializer : public GenericElementSerializer { public: StreamFeaturesSerializer(); diff --git a/Swiften/Serializer/XMPPSerializer.h b/Swiften/Serializer/XMPPSerializer.h index 8727f7a..5b5c9d6 100644 --- a/Swiften/Serializer/XMPPSerializer.h +++ b/Swiften/Serializer/XMPPSerializer.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ namespace Swift { class CompressRequestSerializer; class ProtocolHeader; - class XMPPSerializer { + class SWIFTEN_API XMPPSerializer { public: XMPPSerializer(PayloadSerializerCollection*, StreamType type); diff --git a/Swiften/Session/SessionStream.h b/Swiften/Session/SessionStream.h index 4735d5f..501f588 100644 --- a/Swiften/Session/SessionStream.h +++ b/Swiften/Session/SessionStream.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ #include namespace Swift { - class SessionStream { + class SWIFTEN_API SessionStream { public: class SessionStreamError : public Swift::Error { public: diff --git a/Swiften/StreamManagement/StanzaAckRequester.h b/Swiften/StreamManagement/StanzaAckRequester.h index e8e4997..591dc17 100644 --- a/Swiften/StreamManagement/StanzaAckRequester.h +++ b/Swiften/StreamManagement/StanzaAckRequester.h @@ -9,11 +9,12 @@ #include #include +#include #include #include namespace Swift { - class StanzaAckRequester { + class SWIFTEN_API StanzaAckRequester { public: StanzaAckRequester(); diff --git a/Swiften/StreamManagement/StanzaAckResponder.h b/Swiften/StreamManagement/StanzaAckResponder.h index b5888b7..d8edd2c 100644 --- a/Swiften/StreamManagement/StanzaAckResponder.h +++ b/Swiften/StreamManagement/StanzaAckResponder.h @@ -8,11 +8,12 @@ #include +#include #include #include namespace Swift { - class StanzaAckResponder { + class SWIFTEN_API StanzaAckResponder { public: StanzaAckResponder(); diff --git a/Swiften/StreamStack/HighLayer.h b/Swiften/StreamStack/HighLayer.h index 06b1d25..5669592 100644 --- a/Swiften/StreamStack/HighLayer.h +++ b/Swiften/StreamStack/HighLayer.h @@ -6,12 +6,13 @@ #pragma once +#include #include namespace Swift { class LowLayer; - class HighLayer { + class SWIFTEN_API HighLayer { friend class StreamStack; public: diff --git a/Swiften/StreamStack/LowLayer.h b/Swiften/StreamStack/LowLayer.h index 00960ea..ee3f7d3 100644 --- a/Swiften/StreamStack/LowLayer.h +++ b/Swiften/StreamStack/LowLayer.h @@ -6,12 +6,13 @@ #pragma once +#include #include namespace Swift { class HighLayer; - class LowLayer { + class SWIFTEN_API LowLayer { friend class StreamStack; public: diff --git a/Swiften/StreamStack/StreamStack.h b/Swiften/StreamStack/StreamStack.h index 30e17ce..8bbb235 100644 --- a/Swiften/StreamStack/StreamStack.h +++ b/Swiften/StreamStack/StreamStack.h @@ -10,6 +10,7 @@ #include #include +#include #include namespace Swift { @@ -17,7 +18,7 @@ namespace Swift { class LowLayer; class StreamLayer; - class StreamStack { + class SWIFTEN_API StreamStack { public: StreamStack(XMPPLayer* xmppLayer, LowLayer* physicalLayer); ~StreamStack(); diff --git a/Swiften/StringCodecs/MD5.h b/Swiften/StringCodecs/MD5.h index 5044173..48d62af 100644 --- a/Swiften/StringCodecs/MD5.h +++ b/Swiften/StringCodecs/MD5.h @@ -6,13 +6,14 @@ #pragma once +#include #include #include namespace Swift { struct md5_state_s; - class MD5 { + class SWIFTEN_API MD5 { public: MD5(); ~MD5(); diff --git a/Swiften/StringCodecs/SHA256.h b/Swiften/StringCodecs/SHA256.h index 28a0e05..fe60f2e 100644 --- a/Swiften/StringCodecs/SHA256.h +++ b/Swiften/StringCodecs/SHA256.h @@ -9,11 +9,12 @@ #include #include +#include #include #include namespace Swift { - class SHA256 { + class SWIFTEN_API SHA256 { public: SHA256(); diff --git a/Swiften/Swiften.rc b/Swiften/Swiften.rc new file mode 100644 index 0000000..2a67a34 --- /dev/null +++ b/Swiften/Swiften.rc @@ -0,0 +1,35 @@ +#include "Swiften/Version.h" + +1 VERSIONINFO + FILEVERSION SWIFTEN_VERSION_MAJOR, SWIFTEN_VERSION_MINOR, SWIFTEN_VERSION_PATCH + PRODUCTVERSION 1,2,3 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Swiften XMPP Library\0" + VALUE "CompanyName", "Swift\0" + VALUE "FileDescription", "Swiften\0" + VALUE "FileVersion", SWIFTEN_VERSION_STRING + VALUE "InternalName", "Swiften\0" + VALUE "LegalCopyright", "Copyright \251 " SWIFTEN_COPYRIGHT_YEAR " Swift Team\0" + VALUE "OriginalFilename", SWIFTEN_LIBRARY_FILE + VALUE "ProductName", "Swiften\0" + VALUE "ProductVersion", SWIFTEN_VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/Swiften/TLS/Certificate.h b/Swiften/TLS/Certificate.h index ec59a39..9aec86c 100644 --- a/Swiften/TLS/Certificate.h +++ b/Swiften/TLS/Certificate.h @@ -9,10 +9,11 @@ #include #include +#include #include namespace Swift { - class Certificate { + class SWIFTEN_API Certificate { public: typedef boost::shared_ptr ref; diff --git a/Swiften/TLS/ServerIdentityVerifier.h b/Swiften/TLS/ServerIdentityVerifier.h index b09abd9..730ee74 100644 --- a/Swiften/TLS/ServerIdentityVerifier.h +++ b/Swiften/TLS/ServerIdentityVerifier.h @@ -9,11 +9,12 @@ #include #include +#include #include #include namespace Swift { - class ServerIdentityVerifier { + class SWIFTEN_API ServerIdentityVerifier { public: ServerIdentityVerifier(const JID& jid); diff --git a/Swiften/Whiteboard/IncomingWhiteboardSession.h b/Swiften/Whiteboard/IncomingWhiteboardSession.h index beaf267..54b5fb6 100644 --- a/Swiften/Whiteboard/IncomingWhiteboardSession.h +++ b/Swiften/Whiteboard/IncomingWhiteboardSession.h @@ -6,12 +6,13 @@ #pragma once +#include #include #include #include namespace Swift { - class IncomingWhiteboardSession : public WhiteboardSession { + class SWIFTEN_API IncomingWhiteboardSession : public WhiteboardSession { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Whiteboard/OutgoingWhiteboardSession.h b/Swiften/Whiteboard/OutgoingWhiteboardSession.h index 631f7ba..5db9c97 100644 --- a/Swiften/Whiteboard/OutgoingWhiteboardSession.h +++ b/Swiften/Whiteboard/OutgoingWhiteboardSession.h @@ -10,9 +10,10 @@ #include #include #include +#include namespace Swift { - class OutgoingWhiteboardSession : public WhiteboardSession { + class SWIFTEN_API OutgoingWhiteboardSession : public WhiteboardSession { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Whiteboard/WhiteboardClient.h b/Swiften/Whiteboard/WhiteboardClient.h index 388f948..2cc46a6 100644 --- a/Swiften/Whiteboard/WhiteboardClient.h +++ b/Swiften/Whiteboard/WhiteboardClient.h @@ -6,12 +6,13 @@ #pragma once +#include #include #include #include namespace Swift { - class WhiteboardClient { + class SWIFTEN_API WhiteboardClient { public: struct Result { WhiteboardOperation::ref client; diff --git a/Swiften/Whiteboard/WhiteboardServer.h b/Swiften/Whiteboard/WhiteboardServer.h index 658254b..73e8d33 100644 --- a/Swiften/Whiteboard/WhiteboardServer.h +++ b/Swiften/Whiteboard/WhiteboardServer.h @@ -6,12 +6,13 @@ #pragma once +#include #include #include namespace Swift { - class WhiteboardServer { + class SWIFTEN_API WhiteboardServer { public: void handleLocalOperationReceived(WhiteboardOperation::ref operation); WhiteboardOperation::ref handleClientOperationReceived(WhiteboardOperation::ref operation); diff --git a/Swiften/Whiteboard/WhiteboardSession.h b/Swiften/Whiteboard/WhiteboardSession.h index 39fa341..14fa632 100644 --- a/Swiften/Whiteboard/WhiteboardSession.h +++ b/Swiften/Whiteboard/WhiteboardSession.h @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -20,7 +21,7 @@ namespace Swift { class ErrorPayload; class WhiteboardPayload; - class WhiteboardSession { + class SWIFTEN_API WhiteboardSession { public: typedef boost::shared_ptr ref; diff --git a/Swiften/Whiteboard/WhiteboardSessionManager.h b/Swiften/Whiteboard/WhiteboardSessionManager.h index f696eb8..d06b856 100644 --- a/Swiften/Whiteboard/WhiteboardSessionManager.h +++ b/Swiften/Whiteboard/WhiteboardSessionManager.h @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -22,7 +23,7 @@ namespace Swift { class PresenceOracle; class EntityCapsProvider; - class WhiteboardSessionManager { + class SWIFTEN_API WhiteboardSessionManager { friend class WhiteboardResponder; public: WhiteboardSessionManager(IQRouter* router, StanzaChannel* stanzaChannel, PresenceOracle* presenceOracle, EntityCapsProvider* capsProvider); -- cgit v0.10.2-6-g49f6