-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeviceInformation.cpp
executable file
·101 lines (83 loc) · 2.27 KB
/
DeviceInformation.cpp
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include "DeviceInformation.h"
void DeviceInformation::setStbInfo(STBinformation* stbInfo)
{
this->stbInfo = stbInfo;
}
void DeviceInformation::setTvInfo(TVInformation* tvInfo)
{
this->tvInfo = tvInfo;
}
void DeviceInformation::setAudioAmpliInfo(AudioAmplifierInformation* audioAmpliInfo)
{
this->AudioAmpliInfo = audioAmpliInfo;
}
void DeviceInformation::setIptvInfo(IptvTvInformation* iptvInfo)
{
this->iptvInfo = iptvInfo;
}
void DeviceInformation::setMobileDevInfo(MobileDeviceInformation* mobileDevInfo)
{
this->mobileInfo = mobileDevInfo;
}
void DeviceInformation::setPcInfo(PCInformation* pcInfo)
{
this->pcInfo = pcInfo;
}
DeviceInformation::~DeviceInformation()
{
delete this->AudioAmpliInfo;
delete this->iptvInfo;
delete this->mobileInfo;
delete this->pcInfo;
delete this->stbInfo;
delete this->tvInfo;
}
STBinformation* DeviceInformation::getStbInfo()
{
return this->stbInfo;
}
TVInformation* DeviceInformation::getTvInfo()
{
return this->tvInfo;
}
AudioAmplifierInformation* DeviceInformation::getAudioAmpliInfo()
{
return this->AudioAmpliInfo;
}
IptvTvInformation* DeviceInformation::getIptvInfo()
{
return this->iptvInfo;
}
MobileDeviceInformation* DeviceInformation::getMobileDevInfo()
{
return this->mobileInfo;
}
PCInformation* DeviceInformation::getPcInfo()
{
return this->pcInfo;
}
void DeviceInformation::writeXML(ofstream &xml)
{ xml<<"<DeviceInformation>"<<endl;
if(this->getTvInfo() != NULL)
this->getTvInfo()->writeTVInfo(xml);
if(this->getAudioAmpliInfo() != NULL)
this->getAudioAmpliInfo()->writeAudioAmplifier(xml);
if(this->getIptvInfo() != NULL)
this->getIptvInfo()->writeXML(xml);
if(this->getStbInfo()!= NULL)
this->getStbInfo()->writeXML(xml);
if(this->getMobileDevInfo() != NULL)
this->getMobileDevInfo()->writeXML(xml);
if(this->getPcInfo() != NULL)
this->getPcInfo()->writeXML(xml);
xml<<"</DeviceInformation>"<<endl;
}
DeviceInformation::DeviceInformation()
{
this->AudioAmpliInfo = NULL;
this->iptvInfo = NULL;
this->mobileInfo = NULL;
this->pcInfo = NULL;
this->stbInfo = NULL;
this->tvInfo = NULL;
}