diff options
author | randomdan <randomdan@localhost> | 2013-12-22 18:47:05 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2013-12-22 18:47:05 +0000 |
commit | cb4129a36dcfc1656b131d37acfdf3e3b9ff9999 (patch) | |
tree | 2bc30c6e72f112807914f6e74809c252539be03a | |
parent | Fix slice scanner and split .ice files back into logical blocks (diff) | |
download | p2pvr-cb4129a36dcfc1656b131d37acfdf3e3b9ff9999.tar.bz2 p2pvr-cb4129a36dcfc1656b131d37acfdf3e3b9ff9999.tar.xz p2pvr-cb4129a36dcfc1656b131d37acfdf3e3b9ff9999.zip |
Bit more tidy up
-rw-r--r-- | p2pvr/ice/commonHelpers.h | 2 | ||||
-rw-r--r-- | p2pvr/ice/dvb.ice | 66 | ||||
-rw-r--r-- | p2pvr/ice/p2pvr.ice | 68 | ||||
-rw-r--r-- | p2pvr/lib/Jamfile.jam | 1 | ||||
-rw-r--r-- | p2pvr/lib/fileSink.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/frontend.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/globalDevices.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/localDevices.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/muxer.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/pch.hpp | 2 | ||||
-rw-r--r-- | p2pvr/lib/siParsers/event.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/siParsers/network.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/siParsers/programAssociation.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/siParsers/programMap.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/siParsers/service.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/siParsers/table.h | 2 | ||||
-rw-r--r-- | p2pvr/lib/tuner.h | 2 | ||||
-rw-r--r-- | p2pvr/util/dvbsiHelpers.h | 2 | ||||
-rw-r--r-- | p2pvr/util/p2Helpers.h | 3 | ||||
-rw-r--r-- | p2pvr/util/p2pvrHelpers/schedule.cpp | 1 |
20 files changed, 87 insertions, 82 deletions
diff --git a/p2pvr/ice/commonHelpers.h b/p2pvr/ice/commonHelpers.h index 58caa3d..bf93800 100644 --- a/p2pvr/ice/commonHelpers.h +++ b/p2pvr/ice/commonHelpers.h @@ -1,7 +1,7 @@ #ifndef ICE_COMMON_HELPERS_H #define ICE_COMMON_HELPERS_H -#include <p2pvr.h> +#include <common.h> #include <ostream> #include <iomanip> diff --git a/p2pvr/ice/dvb.ice b/p2pvr/ice/dvb.ice new file mode 100644 index 0000000..d52c190 --- /dev/null +++ b/p2pvr/ice/dvb.ice @@ -0,0 +1,66 @@ +#ifndef DVB_ICE +#define DVB_ICE + +#include "dvbsi.ice" + +module P2PVR { + exception DeviceError { + string Device; + string Message; + int Errno; + }; + exception IncorrectDeliveryType { }; + + sequence<byte> Data; + sequence<short> PacketIds; + + interface RawDataClient { + bool NewData(Data bytes); + }; + + interface Tuner { + idempotent int GetStatus(); + idempotent long GetLastUsedTime(); + + idempotent void SendNetworkInformation(RawDataClient * client) throws DeviceError; + idempotent void SendBouquetAssociations(RawDataClient * client) throws DeviceError; + idempotent void SendServiceDescriptions(RawDataClient * client) throws DeviceError; + idempotent void SendProgramAssociationTable(RawDataClient * client) throws DeviceError; + idempotent void SendProgramMap(int pid, RawDataClient * client) throws DeviceError; + idempotent void SendEventInformation(RawDataClient * client) throws DeviceError; + + int StartSendingTS(PacketIds pids, RawDataClient * client); + int StartSendingSection(int pid, RawDataClient * client); + idempotent void StopSending(int handle); + }; + interface PrivateTuner extends Tuner { + idempotent void TuneTo(DVBSI::Delivery d) throws DeviceError; + idempotent void ScanAndSendNetworkInformation(RawDataClient * client) throws DeviceError; + }; + + interface Devices { + // Get a tuner that is tuned to <del>, acquire and tune to <del> if required. + Tuner * GetTunerSpecific(DVBSI::Delivery del, long until); + // Get any tuner that is tuned, acquire and tune to <del> if required. + Tuner * GetTunerAny(short type, DVBSI::Delivery del, long until); + // Get a private tuner, not shared or sharable + PrivateTuner * GetPrivateTuner(short type, long until); + // Release a tuner when no longer required. + idempotent void ReleaseTuner(Tuner * t); + // Count available tuners + idempotent int TunerCount(); + }; + + interface LocalDevices extends Devices { + // Add/remove according to device nodes in /dev/dvb/... + idempotent void Scan(); + // Add a device + idempotent void Add(string frontend); + // Remove a device + idempotent void Remove(string frontend); + }; + +}; + +#endif + diff --git a/p2pvr/ice/p2pvr.ice b/p2pvr/ice/p2pvr.ice index e585268..9dba1f9 100644 --- a/p2pvr/ice/p2pvr.ice +++ b/p2pvr/ice/p2pvr.ice @@ -2,22 +2,10 @@ #define P2PVR_ICE #include "common.ice" +#include "dvb.ice" #include "dvbsi.ice" module P2PVR { - exception DeviceError { - string Device; - string Message; - int Errno; - }; - exception IncorrectDeliveryType { }; - - // Event in the database, it has a unique Id. - class Program extends DVBSI::Event { - int ProgramId; - }; - sequence<Program> ProgramList; - // Something that we have recorded. class Recording { int RecordingId; @@ -46,52 +34,6 @@ module P2PVR { }; sequence<Schedule> ScheduleList; - sequence<byte> Data; - sequence<short> PacketIds; - - interface RawDataClient { - bool NewData(Data bytes); - }; - - interface Tuner { - idempotent int GetStatus(); - idempotent long GetLastUsedTime(); - - idempotent void SendNetworkInformation(RawDataClient * client); - idempotent void SendBouquetAssociations(RawDataClient * client); - idempotent void SendServiceDescriptions(RawDataClient * client); - idempotent void SendProgramAssociationTable(RawDataClient * client); - idempotent void SendProgramMap(int pid, RawDataClient * client); - idempotent void SendEventInformation(RawDataClient * client); - - int StartSendingTS(PacketIds pids, RawDataClient * client); - int StartSendingSection(int pid, RawDataClient * client); - idempotent void StopSending(int handle); - }; - interface PrivateTuner extends Tuner { - idempotent void TuneTo(DVBSI::Delivery d); - idempotent void ScanAndSendNetworkInformation(RawDataClient * client); - }; - - interface Devices { - // Get a tuner that is tuned to <del>, acquire and tune to <del> if required. - Tuner * GetTunerSpecific(DVBSI::Delivery del, long until); - // Get any tuner that is tuned, acquire and tune to <del> if required. - Tuner * GetTunerAny(short type, DVBSI::Delivery del, long until); - // Get a private tuner, not shared or sharable - PrivateTuner * GetPrivateTuner(short type, long until); - // Release a tuner when no longer required. - idempotent void ReleaseTuner(Tuner * t); - // Count available tuners - idempotent int TunerCount(); - }; - - interface LocalDevices extends Devices { - idempotent void Scan(); - idempotent void Add(string frontend); - idempotent void Remove(string frontend); - }; - interface Maintenance { idempotent void UpdateAll(); idempotent void UpdateNetwork(short type); @@ -107,10 +49,10 @@ module P2PVR { }; interface Storage { - idempotent string CreateForEventRecording(string ext, Schedule sc, DVBSI::Service se, DVBSI::Event ev); - idempotent RawDataClient * OpenForWrite(string guid); - idempotent void Close(RawDataClient * file); - idempotent void Delete(string guid); + idempotent string CreateForEventRecording(string ext, Schedule sc, DVBSI::Service se, DVBSI::Event ev) throws StorageException; + idempotent RawDataClient * OpenForWrite(string guid) throws StorageException; + idempotent void Close(RawDataClient * file) throws StorageException; + idempotent void Delete(string guid) throws StorageException; }; interface Recordings { diff --git a/p2pvr/lib/Jamfile.jam b/p2pvr/lib/Jamfile.jam index a1b6214..1b250e7 100644 --- a/p2pvr/lib/Jamfile.jam +++ b/p2pvr/lib/Jamfile.jam @@ -4,7 +4,6 @@ lib boost_filesystem ; cpp-pch pch : pch.hpp : <library>boost_system <library>boost_filesystem - <library>../ice//p2pvrice <library>..//p2common <library>..//p2sql <library>..//p2lib diff --git a/p2pvr/lib/fileSink.h b/p2pvr/lib/fileSink.h index 40644cd..8c7594b 100644 --- a/p2pvr/lib/fileSink.h +++ b/p2pvr/lib/fileSink.h @@ -3,7 +3,7 @@ #include <boost/filesystem/path.hpp> #include <stdio.h> -#include <p2pvr.h> +#include <dvb.h> class FileSink : public P2PVR::RawDataClient { public: diff --git a/p2pvr/lib/frontend.h b/p2pvr/lib/frontend.h index 994abfa..d33353d 100644 --- a/p2pvr/lib/frontend.h +++ b/p2pvr/lib/frontend.h @@ -3,7 +3,7 @@ #include <linux/dvb/frontend.h> #include <genLoader.h> -#include <p2pvr.h> +#include <dvb.h> class Tuner; diff --git a/p2pvr/lib/globalDevices.h b/p2pvr/lib/globalDevices.h index 8f2acd9..39b0677 100644 --- a/p2pvr/lib/globalDevices.h +++ b/p2pvr/lib/globalDevices.h @@ -4,7 +4,7 @@ // Global devices implements a device collection (P2PVR::Devices) for any devices known // throughout the system through other Devices interfaces -#include <p2pvr.h> +#include <dvb.h> #include <options.h> class GlobalDevices : public P2PVR::Devices { diff --git a/p2pvr/lib/localDevices.h b/p2pvr/lib/localDevices.h index 7185dde..2a23d7e 100644 --- a/p2pvr/lib/localDevices.h +++ b/p2pvr/lib/localDevices.h @@ -4,7 +4,7 @@ // Local devices implements a device collection (P2PVR::Devices) for any devices physically // attached to the local machine; that is, can be accessed directly through /dev/dvb/adapterX -#include <p2pvr.h> +#include <dvb.h> #include <options.h> #include <mutex> diff --git a/p2pvr/lib/muxer.h b/p2pvr/lib/muxer.h index 5c8ef8e..1058b01 100644 --- a/p2pvr/lib/muxer.h +++ b/p2pvr/lib/muxer.h @@ -1,7 +1,7 @@ #ifndef MUXER_H #define MUXER_H -#include <p2pvr.h> +#include <dvb.h> class Muxer : public P2PVR::RawDataClient { public: diff --git a/p2pvr/lib/pch.hpp b/p2pvr/lib/pch.hpp index 94de047..34c2388 100644 --- a/p2pvr/lib/pch.hpp +++ b/p2pvr/lib/pch.hpp @@ -17,8 +17,6 @@ #include <variableType.h> -#include <p2pvr.h> - #endif #endif diff --git a/p2pvr/lib/siParsers/event.h b/p2pvr/lib/siParsers/event.h index 943f5aa..6b316cc 100644 --- a/p2pvr/lib/siParsers/event.h +++ b/p2pvr/lib/siParsers/event.h @@ -2,7 +2,7 @@ #define EPGROWS_H #include "table.h" -#include <p2pvr.h> +#include <dvbsi.h> struct EventInformation { SiTableHeader header; diff --git a/p2pvr/lib/siParsers/network.h b/p2pvr/lib/siParsers/network.h index 6cf3b50..4f8e6e3 100644 --- a/p2pvr/lib/siParsers/network.h +++ b/p2pvr/lib/siParsers/network.h @@ -2,7 +2,7 @@ #define NETWORKINFORMATIONPARSER_H #include "table.h" -#include <p2pvr.h> +#include <dvbsi.h> struct NetworkInformation { SiTableHeader header; diff --git a/p2pvr/lib/siParsers/programAssociation.h b/p2pvr/lib/siParsers/programAssociation.h index 63c7e4b..653be0c 100644 --- a/p2pvr/lib/siParsers/programAssociation.h +++ b/p2pvr/lib/siParsers/programAssociation.h @@ -2,7 +2,7 @@ #define PROGRAMASSOCIATION_H #include "table.h" -#include <p2pvr.h> +#include <dvbsi.h> struct ProgramAssociationSection { SiTableHeader header; diff --git a/p2pvr/lib/siParsers/programMap.h b/p2pvr/lib/siParsers/programMap.h index a00faa1..07821b5 100644 --- a/p2pvr/lib/siParsers/programMap.h +++ b/p2pvr/lib/siParsers/programMap.h @@ -2,7 +2,7 @@ #define PROGRAMMAP_H #include "table.h" -#include <p2pvr.h> +#include <dvbsi.h> struct ProgramMap { SiTableHeader header; diff --git a/p2pvr/lib/siParsers/service.h b/p2pvr/lib/siParsers/service.h index 65cdbdb..611eb90 100644 --- a/p2pvr/lib/siParsers/service.h +++ b/p2pvr/lib/siParsers/service.h @@ -2,7 +2,7 @@ #define SERVICEROWS_H #include "table.h" -#include <p2pvr.h> +#include <dvbsi.h> struct TransportStreamDescriptor { SiTableHeader header; diff --git a/p2pvr/lib/siParsers/table.h b/p2pvr/lib/siParsers/table.h index 4152b5e..4ed2e8b 100644 --- a/p2pvr/lib/siParsers/table.h +++ b/p2pvr/lib/siParsers/table.h @@ -7,7 +7,7 @@ #include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple_comparison.hpp> #include <arpa/inet.h> -#include <p2pvr.h> +#include <dvb.h> #include <logger.h> typedef unsigned char u_char; diff --git a/p2pvr/lib/tuner.h b/p2pvr/lib/tuner.h index edd1a92..381c804 100644 --- a/p2pvr/lib/tuner.h +++ b/p2pvr/lib/tuner.h @@ -1,7 +1,7 @@ #ifndef P2PVR_TUNER_H #define P2PVR_TUNER_H -#include <p2pvr.h> +#include <dvb.h> #include <boost/filesystem/path.hpp> #include "frontend.h" #include <map> diff --git a/p2pvr/util/dvbsiHelpers.h b/p2pvr/util/dvbsiHelpers.h index b8cc1cf..137bf98 100644 --- a/p2pvr/util/dvbsiHelpers.h +++ b/p2pvr/util/dvbsiHelpers.h @@ -1,7 +1,7 @@ #ifndef ICE_DVBSI_HELPERS_H #define ICE_DVBSI_HELPERS_H -#include <p2pvr.h> +#include <dvbsi.h> #include "objectRowState.h" #define ColumnHelper(T) \ diff --git a/p2pvr/util/p2Helpers.h b/p2pvr/util/p2Helpers.h index e843692..f01be78 100644 --- a/p2pvr/util/p2Helpers.h +++ b/p2pvr/util/p2Helpers.h @@ -2,7 +2,7 @@ #define ICE_P2_HELPERS_H #include <variableType.h> -#include <p2pvr.h> +#include <common.h> template <typename T> const VariableType & @@ -59,6 +59,5 @@ operator<<(VariableType & vt, const IceUtil::Optional<T> & v) return vt; } - #endif diff --git a/p2pvr/util/p2pvrHelpers/schedule.cpp b/p2pvr/util/p2pvrHelpers/schedule.cpp index 264c132..f8abc1e 100644 --- a/p2pvr/util/p2pvrHelpers/schedule.cpp +++ b/p2pvr/util/p2pvrHelpers/schedule.cpp @@ -1,4 +1,5 @@ #include <pch.hpp> +#include <p2pvr.h> #include "../dvbsiHelpers.h" #include "../p2Helpers.h" |