From f2667ed93ae631dc90eb6935692edfad5e7edb85 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 24 Oct 2015 16:49:16 +0100 Subject: Enable hidden visibility and LTO --- p2pvr/carddaemon/Jamfile.jam | 2 ++ p2pvr/daemon/Jamfile.jam | 2 ++ p2pvr/daemon/globalDevices.h | 3 ++- p2pvr/daemon/maintenance.h | 6 ++++-- p2pvr/daemon/recorder.h | 7 ++++--- p2pvr/daemon/recordings.h | 3 ++- p2pvr/daemon/schedules.h | 4 +++- p2pvr/daemon/si.h | 3 ++- p2pvr/daemon/storage.h | 3 ++- p2pvr/daemon/unittests/testp2ice.cpp | 5 ++--- p2pvr/daemonbase/Jamfile.jam | 2 ++ p2pvr/daemonbase/daemonBase.h | 3 ++- p2pvr/daemonbase/fileSink.h | 3 ++- p2pvr/daemonbase/p2LoggerWrapper.h | 3 ++- p2pvr/devices/Jamfile.jam | 2 ++ p2pvr/devices/localDevices.h | 8 +++++--- p2pvr/dvb/Jamfile.jam | 2 ++ p2pvr/dvb/siParsers/event.h | 13 +++++++------ p2pvr/dvb/siParsers/network.h | 13 +++++++------ p2pvr/dvb/siParsers/programAssociation.h | 3 ++- p2pvr/dvb/siParsers/programMap.h | 3 ++- p2pvr/dvb/siParsers/service.h | 7 ++++--- p2pvr/dvb/siParsers/table.h | 7 +++++-- p2pvr/ice/Jamfile.jam | 1 + p2pvr/ice/commonHelpers.h | 9 +++++---- p2pvr/ice/converters.cpp | 18 +++++++++--------- p2pvr/lib/Jamfile.jam | 2 ++ p2pvr/lib/bindTimerTask.h | 3 ++- p2pvr/lib/fileHandle.h | 4 +++- p2pvr/lib/muxer.h | 9 +++++---- p2pvr/lib/p2Helpers.h | 10 ++++++++++ p2pvr/lib/serviceStreamer.h | 3 ++- p2pvr/lib/serviceStreamerCore.h | 3 ++- p2pvr/lib/temporaryIceAdapterObject.h | 3 ++- p2pvr/p2comp/Jamfile.jam | 4 +++- 35 files changed, 115 insertions(+), 61 deletions(-) diff --git a/p2pvr/carddaemon/Jamfile.jam b/p2pvr/carddaemon/Jamfile.jam index 7088966..afa055f 100644 --- a/p2pvr/carddaemon/Jamfile.jam +++ b/p2pvr/carddaemon/Jamfile.jam @@ -5,4 +5,6 @@ lib p2pvrcarddaemon : ../ice//p2pvrice ../devices//p2pvrdevices ../daemonbase//p2pvrdaemonbase + -fvisibility=hidden + release:-flto ; diff --git a/p2pvr/daemon/Jamfile.jam b/p2pvr/daemon/Jamfile.jam index 369e714..05b0e9b 100644 --- a/p2pvr/daemon/Jamfile.jam +++ b/p2pvr/daemon/Jamfile.jam @@ -23,6 +23,8 @@ lib p2pvrdaemon : ../devices//p2pvrdevices ../daemonbase//p2pvrdaemonbase ..//adhocutil + -fvisibility=hidden + release:-flto ../../libtmdb//tmdb slicer slicer-db diff --git a/p2pvr/daemon/globalDevices.h b/p2pvr/daemon/globalDevices.h index 33f6231..86d80c5 100644 --- a/p2pvr/daemon/globalDevices.h +++ b/p2pvr/daemon/globalDevices.h @@ -6,8 +6,9 @@ #include #include +#include -class GlobalDevices : public P2PVR::Devices { +class DLL_PUBLIC GlobalDevices : public P2PVR::Devices { public: P2PVR::TunerPrx GetTunerSpecific(const DVBSI::DeliveryPtr &, const Ice::Current &); P2PVR::TunerPrx GetTunerAny(const DVBSI::DeliveryPtr &, const Ice::Current &); diff --git a/p2pvr/daemon/maintenance.h b/p2pvr/daemon/maintenance.h index 7ec0541..7c3e9b3 100644 --- a/p2pvr/daemon/maintenance.h +++ b/p2pvr/daemon/maintenance.h @@ -2,9 +2,11 @@ #define P2PVR_MAINTENANCE_H #include +#include #include "dbClient.h" +#include -class Maintenance : public P2PVR::Maintenance, public DatabaseClient { +class DLL_PUBLIC Maintenance : public P2PVR::Maintenance, public DatabaseClient { public: Maintenance(Ice::ObjectAdapterPtr, IceUtil::TimerPtr); @@ -17,7 +19,7 @@ class Maintenance : public P2PVR::Maintenance, public DatabaseClient { INITOPTIONS; private: - void ScheduledUpdate(); + DLL_PRIVATE void ScheduledUpdate(); Ice::ObjectAdapterPtr adapter; IceUtil::TimerPtr timer; diff --git a/p2pvr/daemon/recorder.h b/p2pvr/daemon/recorder.h index bef331b..6a6940e 100644 --- a/p2pvr/daemon/recorder.h +++ b/p2pvr/daemon/recorder.h @@ -7,8 +7,9 @@ #include #include #include "serviceStreamer.h" +#include -class Recorder : public P2PVR::Recorder { +class DLL_PUBLIC Recorder : public P2PVR::Recorder { public: typedef std::vector Pendings; @@ -32,8 +33,8 @@ class Recorder : public P2PVR::Recorder { INITOPTIONS; private: - void StartRecording(P2PVR::SchedulePtr schedule, DVBSI::ServicePtr service, P2PVR::EventPtr event); - void StopRecording(CurrentPtr); + DLL_PRIVATE void StartRecording(P2PVR::SchedulePtr schedule, DVBSI::ServicePtr service, P2PVR::EventPtr event); + DLL_PRIVATE void StopRecording(CurrentPtr); Ice::ObjectAdapterPtr adapter; IceUtil::TimerPtr timer; diff --git a/p2pvr/daemon/recordings.h b/p2pvr/daemon/recordings.h index fc7863a..482ce23 100644 --- a/p2pvr/daemon/recordings.h +++ b/p2pvr/daemon/recordings.h @@ -4,8 +4,9 @@ #include #include #include "dbClient.h" +#include -class Recordings : public DatabaseClient, public P2PVR::Recordings { +class DLL_PUBLIC Recordings : public DatabaseClient, public P2PVR::Recordings { public: Ice::Int NewRecording(const P2PVR::RecordingPtr & rec, const Ice::Current &); void DeleteRecording(int recordingId, const Ice::Current &); diff --git a/p2pvr/daemon/schedules.h b/p2pvr/daemon/schedules.h index 2669449..122e214 100644 --- a/p2pvr/daemon/schedules.h +++ b/p2pvr/daemon/schedules.h @@ -5,6 +5,7 @@ #include #include "dbClient.h" #include +#include typedef boost::posix_time::ptime datetime; class Episode; @@ -61,7 +62,7 @@ class EpisodeGroup { Showings selected; }; -class Schedules : public P2PVR::Schedules, public DatabaseClient { +class DLL_PUBLIC Schedules : public P2PVR::Schedules, public DatabaseClient { public: void DeleteSchedule(int id, const Ice::Current &); P2PVR::SchedulePtr GetSchedule(int id, const Ice::Current &); @@ -74,6 +75,7 @@ class Schedules : public P2PVR::Schedules, public DatabaseClient { INITOPTIONS; protected: static void GetEpisodeIntersects(Episodes &, Episodes &); + private: static std::string SchedulerAlgorithm; }; diff --git a/p2pvr/daemon/si.h b/p2pvr/daemon/si.h index c57a018..0e388a1 100644 --- a/p2pvr/daemon/si.h +++ b/p2pvr/daemon/si.h @@ -3,8 +3,9 @@ #include #include "dbClient.h" +#include -class SI : public P2PVR::SI, public DatabaseClient { +class DLL_PUBLIC SI : public P2PVR::SI, public DatabaseClient { public: DVBSI::Networks GetNetworks(const Ice::Current &); P2PVR::Deliveries GetAllDeliveries(const Ice::Current &); diff --git a/p2pvr/daemon/storage.h b/p2pvr/daemon/storage.h index 144d6bd..982c3fd 100644 --- a/p2pvr/daemon/storage.h +++ b/p2pvr/daemon/storage.h @@ -6,8 +6,9 @@ #include #include #include "temporaryIceAdapterObject.h" +#include -class Storage : public P2PVR::Storage { +class DLL_PUBLIC Storage : public P2PVR::Storage { public: P2PVR::RawDataClientPrx OpenForWrite(const std::string &, const Ice::Current &) override; void Close(const P2PVR::RawDataClientPrx & file, const Ice::Current &) override; diff --git a/p2pvr/daemon/unittests/testp2ice.cpp b/p2pvr/daemon/unittests/testp2ice.cpp index dc584b6..6eece19 100644 --- a/p2pvr/daemon/unittests/testp2ice.cpp +++ b/p2pvr/daemon/unittests/testp2ice.cpp @@ -27,9 +27,8 @@ void unloadTests() { BOOST_REQUIRE_THROW(RowSetFactory::get("P2PVR-SI-GetEvent"), AdHoc::NoSuchPluginException); - // Known issue, these *should* unload, but for some reason, don't. - BOOST_WARN_THROW(StreamFactory::get("p2pvrrecordingstream"), AdHoc::NoSuchPluginException); - BOOST_WARN_THROW(StreamFactory::get("p2pvrservicestream"), AdHoc::NoSuchPluginException); + BOOST_REQUIRE_THROW(StreamFactory::get("p2pvrrecordingstream"), AdHoc::NoSuchPluginException); + BOOST_REQUIRE_THROW(StreamFactory::get("p2pvrservicestream"), AdHoc::NoSuchPluginException); } BOOST_GLOBAL_FIXTURE( TestAppInstance ); diff --git a/p2pvr/daemonbase/Jamfile.jam b/p2pvr/daemonbase/Jamfile.jam index f02a172..2168986 100644 --- a/p2pvr/daemonbase/Jamfile.jam +++ b/p2pvr/daemonbase/Jamfile.jam @@ -15,6 +15,8 @@ lib p2pvrdaemonbase : ../lib//p2pvrlib ../ice//p2pvrice ..//adhocutil + -fvisibility=hidden + release:-flto ../ice//p2pvrice : : ../ice//p2pvrice diff --git a/p2pvr/daemonbase/daemonBase.h b/p2pvr/daemonbase/daemonBase.h index 3cf9b19..87e741b 100644 --- a/p2pvr/daemonbase/daemonBase.h +++ b/p2pvr/daemonbase/daemonBase.h @@ -5,8 +5,9 @@ #include #include #include +#include -class DaemonBase : public Daemon { +class DLL_PUBLIC DaemonBase : public Daemon { public: DaemonBase(int argc, char ** argv); ~DaemonBase(); diff --git a/p2pvr/daemonbase/fileSink.h b/p2pvr/daemonbase/fileSink.h index 8c7594b..fbd469c 100644 --- a/p2pvr/daemonbase/fileSink.h +++ b/p2pvr/daemonbase/fileSink.h @@ -4,8 +4,9 @@ #include #include #include +#include -class FileSink : public P2PVR::RawDataClient { +class DLL_PUBLIC FileSink : public P2PVR::RawDataClient { public: FileSink(const boost::filesystem::path & path); FileSink(int fd); diff --git a/p2pvr/daemonbase/p2LoggerWrapper.h b/p2pvr/daemonbase/p2LoggerWrapper.h index e8de1e8..0d84683 100644 --- a/p2pvr/daemonbase/p2LoggerWrapper.h +++ b/p2pvr/daemonbase/p2LoggerWrapper.h @@ -2,8 +2,9 @@ #define P2LOGGERWRAPPER #include +#include -class P2LoggerWrapper : public Ice::Logger { +class DLL_PUBLIC P2LoggerWrapper : public Ice::Logger { public: P2LoggerWrapper(const std::string & prefix = std::string()); diff --git a/p2pvr/devices/Jamfile.jam b/p2pvr/devices/Jamfile.jam index f39256b..67c86fe 100644 --- a/p2pvr/devices/Jamfile.jam +++ b/p2pvr/devices/Jamfile.jam @@ -25,6 +25,8 @@ lib p2pvrdevices : ..//p2common ..//adhocutil ../ice//p2pvrice + -fvisibility=hidden + release:-flto : : boost_filesystem ../ice//p2pvrice diff --git a/p2pvr/devices/localDevices.h b/p2pvr/devices/localDevices.h index 3c3d51b..1845256 100644 --- a/p2pvr/devices/localDevices.h +++ b/p2pvr/devices/localDevices.h @@ -7,8 +7,10 @@ #include #include #include +#include +#include -class LocalDevices : public P2PVR::LocalDevices { +class DLL_PUBLIC LocalDevices : public P2PVR::LocalDevices { public: LocalDevices(Ice::ObjectAdapterPtr adapter, IceUtil::TimerPtr); ~LocalDevices(); @@ -30,9 +32,9 @@ class LocalDevices : public P2PVR::LocalDevices { IceUtil::TimerTaskPtr clientCheck; // Check that registered clients haven't silently gone away - void ClientCheck(Ice::ObjectAdapterPtr adapter); + DLL_PRIVATE void ClientCheck(Ice::ObjectAdapterPtr adapter); - class OpenTuner { + class DLL_PRIVATE OpenTuner { public: OpenTuner(DVBSI::DeliveryPtr, P2PVR::PrivateTunerPrx, bool); diff --git a/p2pvr/dvb/Jamfile.jam b/p2pvr/dvb/Jamfile.jam index e71093a..1e81a73 100644 --- a/p2pvr/dvb/Jamfile.jam +++ b/p2pvr/dvb/Jamfile.jam @@ -8,6 +8,8 @@ lib p2pvrdvb : : ../ice//p2pvrice ..//adhocutil + -fvisibility=hidden + release:-flto ../ice//p2pvrice : : ../ice//p2pvrice diff --git a/p2pvr/dvb/siParsers/event.h b/p2pvr/dvb/siParsers/event.h index d437c4e..5baadd4 100644 --- a/p2pvr/dvb/siParsers/event.h +++ b/p2pvr/dvb/siParsers/event.h @@ -3,6 +3,7 @@ #include "table.h" #include +#include struct EventInformation { SiTableHeader header; @@ -13,7 +14,7 @@ struct EventInformation { u_char data[]; } __attribute__((packed)); -class SiEpgParser : public SiTableParser { +class DLL_PUBLIC SiEpgParser : public SiTableParser { protected: bool CheckTableId(u_char tableId) const; int SectionNumberShift() const { return 3; } @@ -24,11 +25,11 @@ class SiEpgParser : public SiTableParser +#include struct NetworkInformation { SiTableHeader header; @@ -17,17 +18,17 @@ struct NetworkInformation { u_char data[]; } __attribute__((packed)); -class SiNetworkInformationParser : public SiTableParser { +class DLL_PUBLIC SiNetworkInformationParser : public SiTableParser { protected: bool CheckTableId(u_char tableId) const; void ParseSiTable(const struct NetworkInformation * nit, DVBSI::NetworkPtr); private: - static void parseDescriptor_NetworkName(DVBSI::NetworkPtr, const u_char *data, size_t len); - static void parseDescriptor_ServiceList(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); - static void parseDescriptor_TerrestrialDelivery(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); - static void parseDescriptor_SatelliteDelivery(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); - static void parseDescriptor_CableDelivery(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); + DLL_PRIVATE static void parseDescriptor_NetworkName(DVBSI::NetworkPtr, const u_char *data, size_t len); + DLL_PRIVATE static void parseDescriptor_ServiceList(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); + DLL_PRIVATE static void parseDescriptor_TerrestrialDelivery(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); + DLL_PRIVATE static void parseDescriptor_SatelliteDelivery(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); + DLL_PRIVATE static void parseDescriptor_CableDelivery(DVBSI::NetworkTransportStreamPtr, const u_char *data, size_t len); }; #endif diff --git a/p2pvr/dvb/siParsers/programAssociation.h b/p2pvr/dvb/siParsers/programAssociation.h index 653be0c..3ef44f0 100644 --- a/p2pvr/dvb/siParsers/programAssociation.h +++ b/p2pvr/dvb/siParsers/programAssociation.h @@ -3,6 +3,7 @@ #include "table.h" #include +#include struct ProgramAssociationSection { SiTableHeader header; @@ -12,7 +13,7 @@ struct ProgramAssociationSection { typedef std::map ProgramAssociationMap; typedef boost::shared_ptr ProgramAssociationMapPtr; -class SiProgramAssociationParser : public SiTableParser { +class DLL_PUBLIC SiProgramAssociationParser : public SiTableParser { protected: bool CheckTableId(u_char tableId) const; void ParseSiTable(const struct ProgramAssociationSection * pas, ProgramAssociationMapPtr); diff --git a/p2pvr/dvb/siParsers/programMap.h b/p2pvr/dvb/siParsers/programMap.h index 07821b5..14f0c8d 100644 --- a/p2pvr/dvb/siParsers/programMap.h +++ b/p2pvr/dvb/siParsers/programMap.h @@ -3,6 +3,7 @@ #include "table.h" #include +#include struct ProgramMap { SiTableHeader header; @@ -25,7 +26,7 @@ struct ProgramMap { u_char data[]; } __attribute__((packed)); -class SiProgramMapParser : public SiTableParser { +class DLL_PUBLIC SiProgramMapParser : public SiTableParser { protected: bool CheckTableId(u_char tableId) const; void ParseSiTable(const struct ProgramMap * nit, DVBSI::ProgramMapPtr); diff --git a/p2pvr/dvb/siParsers/service.h b/p2pvr/dvb/siParsers/service.h index 611eb90..64ec351 100644 --- a/p2pvr/dvb/siParsers/service.h +++ b/p2pvr/dvb/siParsers/service.h @@ -3,6 +3,7 @@ #include "table.h" #include +#include struct TransportStreamDescriptor { SiTableHeader header; @@ -11,14 +12,14 @@ struct TransportStreamDescriptor { u_char data[]; } __attribute__((packed)); -class SiServicesParser : public SiTableParser { +class DLL_PUBLIC SiServicesParser : public SiTableParser { protected: bool CheckTableId(u_char tableId) const; void ParseSiTable(const struct TransportStreamDescriptor * nit, DVBSI::TransportStreamPtr); private: - static void parseDescriptor_Service(DVBSI::ServicePtr, const u_char *data, size_t len); - static void parseDescriptor_DefaultAuthority(DVBSI::ServicePtr, const u_char *data, size_t len); + DLL_PRIVATE static void parseDescriptor_Service(DVBSI::ServicePtr, const u_char *data, size_t len); + DLL_PRIVATE static void parseDescriptor_DefaultAuthority(DVBSI::ServicePtr, const u_char *data, size_t len); }; #endif diff --git a/p2pvr/dvb/siParsers/table.h b/p2pvr/dvb/siParsers/table.h index c470159..6333a2a 100644 --- a/p2pvr/dvb/siParsers/table.h +++ b/p2pvr/dvb/siParsers/table.h @@ -10,6 +10,7 @@ #include #include #include +#include typedef unsigned char u_char; @@ -19,9 +20,10 @@ typedef unsigned char u_char; #define HILO4(x) (x##4 << 24 | x##2 << 16 | x##3 << 8 | x##4) #define BcdCharToInt(x) (10*((x & 0xF0)>>4) + (x & 0xF)) -class SiTableParserBase : public P2PVR::RawDataClient { +class DLL_PUBLIC SiTableParserBase : public P2PVR::RawDataClient { public: const P2PVR::Data & CurrentRawData() const; + protected: SiTableParserBase(); virtual ~SiTableParserBase() = 0; @@ -35,11 +37,12 @@ class SiTableParserBase : public P2PVR::RawDataClient { static const std::string ISO10646; static const std::string EitEncoding; static const std::string UTF8; - protected: + virtual bool ParseInfoTable(const u_char * data, size_t len) = 0; time_t startTime; unsigned int incomplete; std::mutex lock; + private: const P2PVR::Data * currentRawData; }; diff --git a/p2pvr/ice/Jamfile.jam b/p2pvr/ice/Jamfile.jam index ca27324..98d6018 100644 --- a/p2pvr/ice/Jamfile.jam +++ b/p2pvr/ice/Jamfile.jam @@ -12,6 +12,7 @@ lib p2pvrice : ..//adhocutil ..//p2ice slicer + -fvisibility=hidden yes : : . diff --git a/p2pvr/ice/commonHelpers.h b/p2pvr/ice/commonHelpers.h index 3f7e57d..67e861c 100644 --- a/p2pvr/ice/commonHelpers.h +++ b/p2pvr/ice/commonHelpers.h @@ -5,6 +5,7 @@ #include #include #include +#include namespace Common { template @@ -30,13 +31,13 @@ namespace Common { return o; } - boost::posix_time::ptime operator*(const Common::DateTime &); - boost::posix_time::time_duration operator*(const Common::Duration &); + DLL_PUBLIC boost::posix_time::ptime operator*(const Common::DateTime &); + DLL_PUBLIC boost::posix_time::time_duration operator*(const Common::Duration &); } namespace boost { namespace posix_time { - Common::DateTime operator*(const boost::posix_time::ptime &); - Common::Duration operator*(const boost::posix_time::time_duration &); + DLL_PUBLIC Common::DateTime operator*(const boost::posix_time::ptime &); + DLL_PUBLIC Common::Duration operator*(const boost::posix_time::time_duration &); } } diff --git a/p2pvr/ice/converters.cpp b/p2pvr/ice/converters.cpp index 2a6b3c2..2b5f653 100644 --- a/p2pvr/ice/converters.cpp +++ b/p2pvr/ice/converters.cpp @@ -5,53 +5,53 @@ template<> VariableType -IceConvert::ToVariable(const Common::DateTime & dt) +DLL_PUBLIC IceConvert::ToVariable(const Common::DateTime & dt) { return *dt; } template<> VariableType -IceConvert::ToVariable(const Common::Duration & d) +DLL_PUBLIC IceConvert::ToVariable(const Common::Duration & d) { return *d; } template<> Common::DateTime -IceConvert::FromVariable(const VariableType & dt) +DLL_PUBLIC IceConvert::FromVariable(const VariableType & dt) { return *dt.as(); } template<> Common::Duration -IceConvert::FromVariable(const VariableType & d) +DLL_PUBLIC IceConvert::FromVariable(const VariableType & d) { return *d.as(); } - + namespace Slicer { Common::DateTime - ptimeToDateTime(boost::posix_time::ptime const & p) + DLL_PUBLIC ptimeToDateTime(boost::posix_time::ptime const & p) { return *p; } boost::posix_time::ptime - dateTimeToPTime(Common::DateTime const & c) + DLL_PUBLIC dateTimeToPTime(Common::DateTime const & c) { return *c; } Common::Duration - timedurationToDuration(const boost::posix_time::time_duration & td) + DLL_PUBLIC timedurationToDuration(const boost::posix_time::time_duration & td) { return *td; } boost::posix_time::time_duration - durationToTimeDuration(const Common::Duration & td) + DLL_PUBLIC durationToTimeDuration(const Common::Duration & td) { return *td; } diff --git a/p2pvr/lib/Jamfile.jam b/p2pvr/lib/Jamfile.jam index 31974b7..1cb0033 100644 --- a/p2pvr/lib/Jamfile.jam +++ b/p2pvr/lib/Jamfile.jam @@ -22,6 +22,8 @@ lib p2pvrlib : ..//adhocutil ../ice//p2pvrice slicer + -fvisibility=hidden + release:-flto : : boost_filesystem ../ice//p2pvrice diff --git a/p2pvr/lib/bindTimerTask.h b/p2pvr/lib/bindTimerTask.h index 8c82680..f420ee0 100644 --- a/p2pvr/lib/bindTimerTask.h +++ b/p2pvr/lib/bindTimerTask.h @@ -3,8 +3,9 @@ #include #include +#include -class BindTimerTask : public IceUtil::TimerTask { +class DLL_PUBLIC BindTimerTask : public IceUtil::TimerTask { public: typedef boost::function Event; BindTimerTask(const Event & event); diff --git a/p2pvr/lib/fileHandle.h b/p2pvr/lib/fileHandle.h index 3c8d45e..0a3b7fc 100644 --- a/p2pvr/lib/fileHandle.h +++ b/p2pvr/lib/fileHandle.h @@ -1,7 +1,9 @@ #ifndef FILEHANDLE_H #define FILEHANDLE_H -class FileHandle { +#include + +class DLL_PUBLIC FileHandle { public: FileHandle(int fd); ~FileHandle(); diff --git a/p2pvr/lib/muxer.h b/p2pvr/lib/muxer.h index cf0db1c..f0563a4 100644 --- a/p2pvr/lib/muxer.h +++ b/p2pvr/lib/muxer.h @@ -5,8 +5,9 @@ #include #include #include +#include -class Muxer : public P2PVR::RawDataClient { +class DLL_PUBLIC Muxer : public P2PVR::RawDataClient { public: Muxer(const P2PVR::RawDataClientPrx & target, const std::string & cmd); ~Muxer(); @@ -14,9 +15,9 @@ class Muxer : public P2PVR::RawDataClient { bool NewData(const P2PVR::Data &, const Ice::Current &); private: - bool ReadWaiting() const; - bool ReadAvailable() const; - bool ReadMuxerAndSend(int wait) const; + DLL_PRIVATE bool ReadWaiting() const; + DLL_PRIVATE bool ReadAvailable() const; + DLL_PRIVATE bool ReadMuxerAndSend(int wait) const; const P2PVR::RawDataClientPrx target; typedef boost::shared_ptr ProcessPipesPtr; ProcessPipesPtr fds; diff --git a/p2pvr/lib/p2Helpers.h b/p2pvr/lib/p2Helpers.h index 3b73f1b..d94d161 100644 --- a/p2pvr/lib/p2Helpers.h +++ b/p2pvr/lib/p2Helpers.h @@ -3,8 +3,10 @@ #include #include +#include template +DLL_PUBLIC const VariableType & operator>>(const VariableType & vt, T & v) { @@ -13,14 +15,17 @@ operator>>(const VariableType & vt, T & v) } template <> +DLL_PUBLIC const VariableType & operator>>(const VariableType & vt, Common::Duration & d); template <> +DLL_PUBLIC const VariableType & operator>>(const VariableType & vt, Common::DateTime & dt); template +DLL_PUBLIC const VariableType & operator>>(const VariableType & vt, IceUtil::Optional & v) { @@ -35,10 +40,12 @@ operator>>(const VariableType & vt, IceUtil::Optional & v) } template <> +DLL_PUBLIC const VariableType & operator>>(const VariableType & vt, short int & v); template +DLL_PUBLIC VariableType & operator<<(VariableType & vt, const T & v) { @@ -47,14 +54,17 @@ operator<<(VariableType & vt, const T & v) } template <> +DLL_PUBLIC VariableType & operator<<(VariableType & vt, const Common::Duration & d); template <> +DLL_PUBLIC VariableType & operator<<(VariableType & vt, const Common::DateTime & dt); template +DLL_PUBLIC VariableType & operator<<(VariableType & vt, const IceUtil::Optional & v) { diff --git a/p2pvr/lib/serviceStreamer.h b/p2pvr/lib/serviceStreamer.h index bff14ec..c4aa93e 100644 --- a/p2pvr/lib/serviceStreamer.h +++ b/p2pvr/lib/serviceStreamer.h @@ -2,8 +2,9 @@ #define SERVICESTREAMER_H #include "serviceStreamerCore.h" +#include -class ServiceStreamer : public ServiceStreamerCore { +class DLL_PUBLIC ServiceStreamer : public ServiceStreamerCore { public: ServiceStreamer(int sid, P2PVR::RawDataClientPrx, const Ice::CommunicatorPtr & ic, const Ice::ObjectAdapterPtr & a); ServiceStreamer(int sid, P2PVR::RawDataClientPrx, const P2PVR::DevicesPrx & d, const P2PVR::SIPrx & s, const Ice::ObjectAdapterPtr & a); diff --git a/p2pvr/lib/serviceStreamerCore.h b/p2pvr/lib/serviceStreamerCore.h index 4af422a..1db80f8 100644 --- a/p2pvr/lib/serviceStreamerCore.h +++ b/p2pvr/lib/serviceStreamerCore.h @@ -8,8 +8,9 @@ #include "temporaryIceAdapterObject.h" #include #include +#include -class ServiceStreamerCore { +class DLL_PUBLIC ServiceStreamerCore { public: ServiceStreamerCore(int sid, P2PVR::RawDataClientPrx, P2PVR::RawDataClientPrx, P2PVR::RawDataClientPrx, P2PVR::DevicesPrx, Ice::ObjectAdapterPtr); diff --git a/p2pvr/lib/temporaryIceAdapterObject.h b/p2pvr/lib/temporaryIceAdapterObject.h index d7fc77d..0614066 100644 --- a/p2pvr/lib/temporaryIceAdapterObject.h +++ b/p2pvr/lib/temporaryIceAdapterObject.h @@ -2,9 +2,10 @@ #define TEMPORARYICEADAPTER_H #include +#include template -class TemporaryIceAdapterObject { +class DLL_PUBLIC TemporaryIceAdapterObject { public: TemporaryIceAdapterObject(Ice::ObjectAdapterPtr a, IceUtil::Handle o) : adapter(a), diff --git a/p2pvr/p2comp/Jamfile.jam b/p2pvr/p2comp/Jamfile.jam index 10b7fea..6540d77 100644 --- a/p2pvr/p2comp/Jamfile.jam +++ b/p2pvr/p2comp/Jamfile.jam @@ -1,11 +1,13 @@ lib p2pvrp2comp : [ glob-tree *.cpp ] - : : + : ../ice//p2pvrice ../lib//p2pvrlib ..//p2streams ..//p2ice ..//p2cgi ..//adhocutil + -fvisibility=hidden + release:-flto ../ice//p2pvrice ; -- cgit v1.2.3