1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef P2PVR_MOCKTUNER_H
#define P2PVR_MOCKTUNER_H
#include <dvb.h>
#include <visibility.h>
#include <Ice/BuiltinSequences.h>
#include <boost/thread.hpp>
#include <logger.h>
namespace P2PVR {
namespace Testing {
class DLL_PUBLIC MockTuner : public PrivateTuner {
public:
MockTuner();
void TuneTo(const DVBSI::DeliveryPtr &, const Ice::Current&);
int GetStatus(const Ice::Current&);
void ScanAndSendNetworkInformation(const RawDataClientPrx & client, const Ice::Current&);
void SendNetworkInformation(const RawDataClientPrx & client, const Ice::Current&);
void SendBouquetAssociations(const RawDataClientPrx & client, const Ice::Current&);
void SendServiceDescriptions(const RawDataClientPrx & client, const Ice::Current&);
void SendProgramMap(Ice::Int pid, const RawDataClientPrx & client, const Ice::Current&);
void SendProgramAssociationTable(const RawDataClientPrx & client, const Ice::Current&);
void SendEventInformation(const RawDataClientPrx & client, const Ice::Current&);
int StartSendingTS(const PacketIds & pids, const RawDataClientPrx & client, const Ice::Current &);
int StartSendingSection(Ice::Int pid, const RawDataClientPrx & client, const Ice::Current &);
void StopSending(int handle, const Ice::Current &);
Ice::Long GetLastUsedTime(const Ice::Current&);
static void SetEventsSet(int n);
protected:
static Ice::ByteSeq Decompress(const Ice::ByteSeq &);
static void LZMA_ASSERT(int ret_xz);
void DecompressAndSendPackets(const Ice::ByteSeq &, const RawDataClientPrx &, const Ice::Current&) const;
void SendLoop(const RawDataClientPrx & t, const Ice::ByteSeq & dataxz, const Ice::Current & ice) const;
static int eventSet;
std::map<int, boost::thread *> senders;
int senderId;
static IceTray::Logging::LoggerPtr logger;
};
}
}
#endif
|