From cb4129a36dcfc1656b131d37acfdf3e3b9ff9999 Mon Sep 17 00:00:00 2001 From: randomdan Date: Sun, 22 Dec 2013 18:47:05 +0000 Subject: Bit more tidy up --- p2pvr/ice/commonHelpers.h | 2 +- p2pvr/ice/dvb.ice | 66 +++++++++++++++++++++++++++++++ p2pvr/ice/p2pvr.ice | 68 +++----------------------------- p2pvr/lib/Jamfile.jam | 1 - p2pvr/lib/fileSink.h | 2 +- p2pvr/lib/frontend.h | 2 +- p2pvr/lib/globalDevices.h | 2 +- p2pvr/lib/localDevices.h | 2 +- p2pvr/lib/muxer.h | 2 +- p2pvr/lib/pch.hpp | 2 - p2pvr/lib/siParsers/event.h | 2 +- p2pvr/lib/siParsers/network.h | 2 +- p2pvr/lib/siParsers/programAssociation.h | 2 +- p2pvr/lib/siParsers/programMap.h | 2 +- p2pvr/lib/siParsers/service.h | 2 +- p2pvr/lib/siParsers/table.h | 2 +- p2pvr/lib/tuner.h | 2 +- p2pvr/util/dvbsiHelpers.h | 2 +- p2pvr/util/p2Helpers.h | 3 +- p2pvr/util/p2pvrHelpers/schedule.cpp | 1 + 20 files changed, 87 insertions(+), 82 deletions(-) create mode 100644 p2pvr/ice/dvb.ice 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 +#include #include #include 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 Data; + sequence 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 , acquire and tune to if required. + Tuner * GetTunerSpecific(DVBSI::Delivery del, long until); + // Get any tuner that is tuned, acquire and tune to 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 ProgramList; - // Something that we have recorded. class Recording { int RecordingId; @@ -46,52 +34,6 @@ module P2PVR { }; sequence ScheduleList; - sequence Data; - sequence 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 , acquire and tune to if required. - Tuner * GetTunerSpecific(DVBSI::Delivery del, long until); - // Get any tuner that is tuned, acquire and tune to 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 : boost_system boost_filesystem - ../ice//p2pvrice ..//p2common ..//p2sql ..//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 #include -#include +#include 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 #include -#include +#include 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 +#include #include 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 +#include #include #include 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 +#include 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 -#include - #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 +#include 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 +#include 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 +#include 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 +#include 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 +#include 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 #include #include -#include +#include #include 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 +#include #include #include "frontend.h" #include 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 +#include #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 -#include +#include template const VariableType & @@ -59,6 +59,5 @@ operator<<(VariableType & vt, const IceUtil::Optional & 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 +#include #include "../dvbsiHelpers.h" #include "../p2Helpers.h" -- cgit v1.2.3