MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / SatPI

Method SatPI

src/Satpi.cpp:31–65  ·  view source on GitHub ↗

============================================================================= -- Constructors and destructor --------------------------------------------- =============================================================================

Source from the content-addressed store, hash-verified

29// -- Constructors and destructor ---------------------------------------------
30// =============================================================================
31SatPI::SatPI(bool ssdp,
32 const std::string &ifaceName,
33 const std::string &currentPath,
34 const std::string &appdataPath,
35 const std::string &webPath,
36 const std::string &dvbPath,
37 unsigned int httpPort,
38 unsigned int rtspPort,
39 const bool enableChildPIPE) :
40 XMLSaveSupport((appdataPath.empty() ? currentPath : appdataPath) + "/" + "SatPI.xml"),
41 _interface(ifaceName),
42 _streamManager(),
43 _properties(_interface.getUUID(), currentPath, appdataPath, webPath, _interface.getIPAddress(), httpPort, rtspPort),
44 _httpServer(*this, _streamManager, _interface.getIPAddress(), _properties),
45 _rtspServer(_streamManager, _interface.getIPAddress()),
46 _ssdpServer(_interface.getIPAddress(), _properties) {
47 _properties.setFunctionNotifyChanges(std::bind(&XMLSaveSupport::notifyChanges, this));
48 _ssdpServer.setFunctionNotifyChanges(std::bind(&XMLSaveSupport::notifyChanges, this));
49 //
50 _streamManager.enumerateDevices(_interface.getIPAddress(),
51 _properties.getAppDataPath(), dvbPath, enableChildPIPE);
52 //
53 std::string xml;
54 if (restoreXML(xml)) {
55 fromXML(xml);
56 } else {
57 saveXML();
58 }
59
60 _httpServer.initialize(_properties.getHttpPort(), true);
61 _rtspServer.initialize(_properties.getRtspPort(), true);
62 if (ssdp) {
63 _ssdpServer.startThread();
64 }
65}
66
67SatPI::~SatPI() {}
68

Callers

nothing calls this directly

Calls 8

enumerateDevicesMethod · 0.80
getAppDataPathMethod · 0.80
getHttpPortMethod · 0.80
getRtspPortMethod · 0.80
getUUIDMethod · 0.45
initializeMethod · 0.45
startThreadMethod · 0.45

Tested by

no test coverage detected