summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--p2pvr/carddaemon/Jamfile.jam2
-rw-r--r--p2pvr/daemon/Jamfile.jam2
-rw-r--r--p2pvr/daemon/globalDevices.h3
-rw-r--r--p2pvr/daemon/maintenance.h6
-rw-r--r--p2pvr/daemon/recorder.h7
-rw-r--r--p2pvr/daemon/recordings.h3
-rw-r--r--p2pvr/daemon/schedules.h4
-rw-r--r--p2pvr/daemon/si.h3
-rw-r--r--p2pvr/daemon/storage.h3
-rw-r--r--p2pvr/daemon/unittests/testp2ice.cpp5
-rw-r--r--p2pvr/daemonbase/Jamfile.jam2
-rw-r--r--p2pvr/daemonbase/daemonBase.h3
-rw-r--r--p2pvr/daemonbase/fileSink.h3
-rw-r--r--p2pvr/daemonbase/p2LoggerWrapper.h3
-rw-r--r--p2pvr/devices/Jamfile.jam2
-rw-r--r--p2pvr/devices/localDevices.h8
-rw-r--r--p2pvr/dvb/Jamfile.jam2
-rw-r--r--p2pvr/dvb/siParsers/event.h13
-rw-r--r--p2pvr/dvb/siParsers/network.h13
-rw-r--r--p2pvr/dvb/siParsers/programAssociation.h3
-rw-r--r--p2pvr/dvb/siParsers/programMap.h3
-rw-r--r--p2pvr/dvb/siParsers/service.h7
-rw-r--r--p2pvr/dvb/siParsers/table.h7
-rw-r--r--p2pvr/ice/Jamfile.jam1
-rw-r--r--p2pvr/ice/commonHelpers.h9
-rw-r--r--p2pvr/ice/converters.cpp18
-rw-r--r--p2pvr/lib/Jamfile.jam2
-rw-r--r--p2pvr/lib/bindTimerTask.h3
-rw-r--r--p2pvr/lib/fileHandle.h4
-rw-r--r--p2pvr/lib/muxer.h9
-rw-r--r--p2pvr/lib/p2Helpers.h10
-rw-r--r--p2pvr/lib/serviceStreamer.h3
-rw-r--r--p2pvr/lib/serviceStreamerCore.h3
-rw-r--r--p2pvr/lib/temporaryIceAdapterObject.h3
-rw-r--r--p2pvr/p2comp/Jamfile.jam4
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 :
<library>../ice//p2pvrice
<library>../devices//p2pvrdevices
<library>../daemonbase//p2pvrdaemonbase
+ <cflags>-fvisibility=hidden
+ <variant>release:<cflags>-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 :
<library>../devices//p2pvrdevices
<library>../daemonbase//p2pvrdaemonbase
<library>..//adhocutil
+ <cflags>-fvisibility=hidden
+ <variant>release:<cflags>-flto
<implicit-dependency>../../libtmdb//tmdb
<library>slicer
<library>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 <dvb.h>
#include <options.h>
+#include <visibility.h>
-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 <p2pvr.h>
+#include <IceUtil/Timer.h>
#include "dbClient.h"
+#include <visibility.h>
-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 <p2pvr.h>
#include <mutex>
#include "serviceStreamer.h"
+#include <visibility.h>
-class Recorder : public P2PVR::Recorder {
+class DLL_PUBLIC Recorder : public P2PVR::Recorder {
public:
typedef std::vector<IceUtil::TimerTaskPtr> 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 <p2pvr.h>
#include <string>
#include "dbClient.h"
+#include <visibility.h>
-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 <options.h>
#include "dbClient.h"
#include <factory.h>
+#include <visibility.h>
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 <p2pvr.h>
#include "dbClient.h"
+#include <visibility.h>
-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 <string>
#include <boost/filesystem/path.hpp>
#include "temporaryIceAdapterObject.h"
+#include <visibility.h>
-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 :
<library>../lib//p2pvrlib
<library>../ice//p2pvrice
<library>..//adhocutil
+ <cflags>-fvisibility=hidden
+ <variant>release:<cflags>-flto
<implicit-dependency>../ice//p2pvrice
: :
<implicit-dependency>../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 <Ice/Initialize.h>
#include <daemon.h>
#include <options.h>
+#include <visibility.h>
-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 <boost/filesystem/path.hpp>
#include <stdio.h>
#include <dvb.h>
+#include <visibility.h>
-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 <Ice/Logger.h>
+#include <visibility.h>
-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 :
<library>..//p2common
<library>..//adhocutil
<implicit-dependency>../ice//p2pvrice
+ <cflags>-fvisibility=hidden
+ <variant>release:<cflags>-flto
: :
<library>boost_filesystem
<implicit-dependency>../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 <dvb.h>
#include <options.h>
#include <mutex>
+#include <visibility.h>
+#include <IceUtil/Timer.h>
-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 :
:
<library>../ice//p2pvrice
<library>..//adhocutil
+ <cflags>-fvisibility=hidden
+ <variant>release:<cflags>-flto
<implicit-dependency>../ice//p2pvrice
: :
<implicit-dependency>../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 <dvbsi.h>
+#include <visibility.h>
struct EventInformation {
SiTableHeader header;
@@ -13,7 +14,7 @@ struct EventInformation {
u_char data[];
} __attribute__((packed));
-class SiEpgParser : public SiTableParser<EventInformation, DVBSI::EitInformationPtr, int> {
+class DLL_PUBLIC SiEpgParser : public SiTableParser<EventInformation, DVBSI::EitInformationPtr, int> {
protected:
bool CheckTableId(u_char tableId) const;
int SectionNumberShift() const { return 3; }
@@ -24,11 +25,11 @@ class SiEpgParser : public SiTableParser<EventInformation, DVBSI::EitInformation
virtual bool HandleTable(DVBSI::EventPtr) = 0;
private:
- static void parseStartTimeAndDuration(DVBSI::EventPtr, const u_char * data);
- static void parseDescriptor_ShortEvent(DVBSI::EventPtr, const u_char * data);
- static void parseDescriptor_Component(DVBSI::EventPtr, const u_char * data);
- static void parseDescriptor_Content(DVBSI::EventPtr, const u_char * data);
- static void parseDescriptor_ParentalRating(DVBSI::EventPtr, const u_char * data);
+ DLL_PRIVATE static void parseStartTimeAndDuration(DVBSI::EventPtr, const u_char * data);
+ DLL_PRIVATE static void parseDescriptor_ShortEvent(DVBSI::EventPtr, const u_char * data);
+ DLL_PRIVATE static void parseDescriptor_Component(DVBSI::EventPtr, const u_char * data);
+ DLL_PRIVATE static void parseDescriptor_Content(DVBSI::EventPtr, const u_char * data);
+ DLL_PRIVATE static void parseDescriptor_ParentalRating(DVBSI::EventPtr, const u_char * data);
};
#endif
diff --git a/p2pvr/dvb/siParsers/network.h b/p2pvr/dvb/siParsers/network.h
index 4f8e6e3..fef11d0 100644
--- a/p2pvr/dvb/siParsers/network.h
+++ b/p2pvr/dvb/siParsers/network.h
@@ -3,6 +3,7 @@
#include "table.h"
#include <dvbsi.h>
+#include <visibility.h>
struct NetworkInformation {
SiTableHeader header;
@@ -17,17 +18,17 @@ struct NetworkInformation {
u_char data[];
} __attribute__((packed));
-class SiNetworkInformationParser : public SiTableParser<NetworkInformation, DVBSI::NetworkPtr, u_char> {
+class DLL_PUBLIC SiNetworkInformationParser : public SiTableParser<NetworkInformation, DVBSI::NetworkPtr, u_char> {
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 <dvbsi.h>
+#include <visibility.h>
struct ProgramAssociationSection {
SiTableHeader header;
@@ -12,7 +13,7 @@ struct ProgramAssociationSection {
typedef std::map<uint16_t, uint16_t> ProgramAssociationMap;
typedef boost::shared_ptr<ProgramAssociationMap> ProgramAssociationMapPtr;
-class SiProgramAssociationParser : public SiTableParser<ProgramAssociationSection, ProgramAssociationMapPtr, int> {
+class DLL_PUBLIC SiProgramAssociationParser : public SiTableParser<ProgramAssociationSection, ProgramAssociationMapPtr, int> {
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 <dvbsi.h>
+#include <visibility.h>
struct ProgramMap {
SiTableHeader header;
@@ -25,7 +26,7 @@ struct ProgramMap {
u_char data[];
} __attribute__((packed));
-class SiProgramMapParser : public SiTableParser<ProgramMap, DVBSI::ProgramMapPtr, u_char> {
+class DLL_PUBLIC SiProgramMapParser : public SiTableParser<ProgramMap, DVBSI::ProgramMapPtr, u_char> {
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 <dvbsi.h>
+#include <visibility.h>
struct TransportStreamDescriptor {
SiTableHeader header;
@@ -11,14 +12,14 @@ struct TransportStreamDescriptor {
u_char data[];
} __attribute__((packed));
-class SiServicesParser : public SiTableParser<TransportStreamDescriptor, DVBSI::TransportStreamPtr, int> {
+class DLL_PUBLIC SiServicesParser : public SiTableParser<TransportStreamDescriptor, DVBSI::TransportStreamPtr, int> {
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 <dvb.h>
#include <logger.h>
#include <mutex>
+#include <visibility.h>
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 :
<library>..//adhocutil
<library>..//p2ice
<library>slicer
+ <cflags>-fvisibility=hidden
<slicer>yes
: :
<include>.
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 <ostream>
#include <iomanip>
#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <visibility.h>
namespace Common {
template<typename C, typename T>
@@ -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<Common::DateTime>::ToVariable(const Common::DateTime & dt)
+DLL_PUBLIC IceConvert<Common::DateTime>::ToVariable(const Common::DateTime & dt)
{
return *dt;
}
template<>
VariableType
-IceConvert<Common::Duration>::ToVariable(const Common::Duration & d)
+DLL_PUBLIC IceConvert<Common::Duration>::ToVariable(const Common::Duration & d)
{
return *d;
}
template<>
Common::DateTime
-IceConvert<Common::DateTime>::FromVariable(const VariableType & dt)
+DLL_PUBLIC IceConvert<Common::DateTime>::FromVariable(const VariableType & dt)
{
return *dt.as<boost::posix_time::ptime>();
}
template<>
Common::Duration
-IceConvert<Common::Duration>::FromVariable(const VariableType & d)
+DLL_PUBLIC IceConvert<Common::Duration>::FromVariable(const VariableType & d)
{
return *d.as<boost::posix_time::time_duration>();
}
-
+
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 :
<library>..//adhocutil
<implicit-dependency>../ice//p2pvrice
<library>slicer
+ <cflags>-fvisibility=hidden
+ <variant>release:<cflags>-flto
: :
<library>boost_filesystem
<implicit-dependency>../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 <boost/function.hpp>
#include <IceUtil/Timer.h>
+#include <visibility.h>
-class BindTimerTask : public IceUtil::TimerTask {
+class DLL_PUBLIC BindTimerTask : public IceUtil::TimerTask {
public:
typedef boost::function<void()> 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 <visibility.h>
+
+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 <mutex>
#include <boost/shared_ptr.hpp>
#include <processPipes.h>
+#include <visibility.h>
-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<AdHoc::System::ProcessPipes> 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 <variableType.h>
#include <common.h>
+#include <visibility.h>
template <typename T>
+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>><Common::Duration>(const VariableType & vt, Common::Duration & d);
template <>
+DLL_PUBLIC
const VariableType &
operator>><Common::DateTime>(const VariableType & vt, Common::DateTime & dt);
template <typename T>
+DLL_PUBLIC
const VariableType &
operator>>(const VariableType & vt, IceUtil::Optional<T> & v)
{
@@ -35,10 +40,12 @@ operator>>(const VariableType & vt, IceUtil::Optional<T> & v)
}
template <>
+DLL_PUBLIC
const VariableType &
operator>>(const VariableType & vt, short int & v);
template <typename T>
+DLL_PUBLIC
VariableType &
operator<<(VariableType & vt, const T & v)
{
@@ -47,14 +54,17 @@ operator<<(VariableType & vt, const T & v)
}
template <>
+DLL_PUBLIC
VariableType &
operator<<<Common::Duration>(VariableType & vt, const Common::Duration & d);
template <>
+DLL_PUBLIC
VariableType &
operator<<<Common::DateTime>(VariableType & vt, const Common::DateTime & dt);
template <typename T>
+DLL_PUBLIC
VariableType &
operator<<(VariableType & vt, const IceUtil::Optional<T> & 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 <visibility.h>
-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 <p2pvr.h>
#include <set>
+#include <visibility.h>
-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 <Ice/ObjectAdapter.h>
+#include <visibility.h>
template <typename Object>
-class TemporaryIceAdapterObject {
+class DLL_PUBLIC TemporaryIceAdapterObject {
public:
TemporaryIceAdapterObject(Ice::ObjectAdapterPtr a, IceUtil::Handle<Object> 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 ]
- : :
+ :
<library>../ice//p2pvrice
<library>../lib//p2pvrlib
<library>..//p2streams
<library>..//p2ice
<library>..//p2cgi
<library>..//adhocutil
+ <cflags>-fvisibility=hidden
+ <variant>release:<cflags>-flto
<implicit-dependency>../ice//p2pvrice
;