mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
lib/sectionsdclient/sectionsdclient.cpp,h: comment unused
This commit is contained in:
@@ -56,7 +56,6 @@ int CSectionsdClient::readResponse(char* data,unsigned int size)
|
|||||||
return responseHeader.dataLength;
|
return responseHeader.dataLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CSectionsdClient::send(const unsigned char command, const char* data, const unsigned int size)
|
bool CSectionsdClient::send(const unsigned char command, const char* data, const unsigned int size)
|
||||||
{
|
{
|
||||||
sectionsd::msgRequestHeader msgHead;
|
sectionsd::msgRequestHeader msgHead;
|
||||||
@@ -161,7 +160,61 @@ void CSectionsdClient::setServiceChanged(const t_channel_id channel_id, const bo
|
|||||||
close_connection();
|
close_connection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSectionsdClient::freeMemory()
|
||||||
|
{
|
||||||
|
send(sectionsd::freeMemory);
|
||||||
|
|
||||||
|
readResponse();
|
||||||
|
close_connection();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSectionsdClient::readSIfromXML(const char * epgxmlname)
|
||||||
|
{
|
||||||
|
send(sectionsd::readSIfromXML, (char*) epgxmlname, strlen(epgxmlname));
|
||||||
|
|
||||||
|
readResponse();
|
||||||
|
close_connection();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSectionsdClient::writeSI2XML(const char * epgxmlname)
|
||||||
|
{
|
||||||
|
send(sectionsd::writeSI2XML, (char*) epgxmlname, strlen(epgxmlname));
|
||||||
|
|
||||||
|
readResponse();
|
||||||
|
close_connection();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSectionsdClient::setConfig(const epg_config config)
|
||||||
|
{
|
||||||
|
sectionsd::commandSetConfig *msg;
|
||||||
|
char* pData = new char[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1];
|
||||||
|
msg = (sectionsd::commandSetConfig *)pData;
|
||||||
|
|
||||||
|
msg->scanMode = config.scanMode;
|
||||||
|
msg->epg_cache = config.epg_cache;
|
||||||
|
msg->epg_old_events = config.epg_old_events;
|
||||||
|
msg->epg_max_events = config.epg_max_events;
|
||||||
|
msg->network_ntprefresh = config.network_ntprefresh;
|
||||||
|
msg->network_ntpenable = config.network_ntpenable;
|
||||||
|
msg->epg_extendedcache = config.epg_extendedcache;
|
||||||
|
// config.network_ntpserver:
|
||||||
|
strcpy(&pData[sizeof(sectionsd::commandSetConfig)], config.network_ntpserver.c_str());
|
||||||
|
// config.epg_dir:
|
||||||
|
strcpy(&pData[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1], config.epg_dir.c_str());
|
||||||
|
|
||||||
|
send(sectionsd::setConfig, (char*)pData, sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1);
|
||||||
|
readResponse();
|
||||||
|
close_connection();
|
||||||
|
delete[] pData;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSectionsdClient::dumpStatus()
|
||||||
|
{
|
||||||
|
send(sectionsd::dumpStatusinformation);
|
||||||
|
close_connection();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
bool CSectionsdClient::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags)
|
bool CSectionsdClient::getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags)
|
||||||
{
|
{
|
||||||
if (send(sectionsd::ComponentTagsUniqueKey, (char*)&uniqueKey, sizeof(uniqueKey)))
|
if (send(sectionsd::ComponentTagsUniqueKey, (char*)&uniqueKey, sizeof(uniqueKey)))
|
||||||
@@ -277,7 +330,6 @@ bool CSectionsdClient::getNVODTimesServiceKey(const t_channel_id channel_id, CSe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CSectionsdClient::getCurrentNextServiceKey(const t_channel_id channel_id, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next)
|
bool CSectionsdClient::getCurrentNextServiceKey(const t_channel_id channel_id, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next)
|
||||||
{
|
{
|
||||||
if (send(sectionsd::currentNextInformationID, (char*)&channel_id, sizeof(channel_id)))
|
if (send(sectionsd::currentNextInformationID, (char*)&channel_id, sizeof(channel_id)))
|
||||||
@@ -321,8 +373,6 @@ bool CSectionsdClient::getCurrentNextServiceKey(const t_channel_id channel_id, C
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CChannelEventList CSectionsdClient::getChannelEvents(const bool tv_mode, t_channel_id *p_requested_channels, int size_requested_channels)
|
CChannelEventList CSectionsdClient::getChannelEvents(const bool tv_mode, t_channel_id *p_requested_channels, int size_requested_channels)
|
||||||
{
|
{
|
||||||
CChannelEventList eList;
|
CChannelEventList eList;
|
||||||
@@ -375,8 +425,6 @@ CChannelEventList CSectionsdClient::getChannelEvents(const bool tv_mode, t_chann
|
|||||||
3: keyword search in EPG description (INFO2)
|
3: keyword search in EPG description (INFO2)
|
||||||
In case of a match, the EPG event is added to the Eventlist eList.
|
In case of a match, the EPG event is added to the Eventlist eList.
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
//never used
|
|
||||||
bool CSectionsdClient::getEventsServiceKeySearchAdd(CChannelEventList& eList,const t_channel_id channel_id,char search_typ,std::string& search_text)
|
bool CSectionsdClient::getEventsServiceKeySearchAdd(CChannelEventList& eList,const t_channel_id channel_id,char search_typ,std::string& search_text)
|
||||||
{
|
{
|
||||||
int nBufSize=0;
|
int nBufSize=0;
|
||||||
@@ -437,7 +485,7 @@ bool CSectionsdClient::getEventsServiceKeySearchAdd(CChannelEventList& eList,con
|
|||||||
close_connection();
|
close_connection();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
CChannelEventList CSectionsdClient::getEventsServiceKey(const t_channel_id channel_id)
|
CChannelEventList CSectionsdClient::getEventsServiceKey(const t_channel_id channel_id)
|
||||||
{
|
{
|
||||||
CChannelEventList eList;
|
CChannelEventList eList;
|
||||||
@@ -481,7 +529,7 @@ CChannelEventList CSectionsdClient::getEventsServiceKey(const t_channel_id chann
|
|||||||
close_connection();
|
close_connection();
|
||||||
return eList;
|
return eList;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
//never used
|
//never used
|
||||||
void showhexdumpa (char *label, unsigned char * from, int len)
|
void showhexdumpa (char *label, unsigned char * from, int len)
|
||||||
{
|
{
|
||||||
@@ -523,7 +571,7 @@ void showhexdumpa (char *label, unsigned char * from, int len)
|
|||||||
}
|
}
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// 21.07.2005 - rainerk
|
// 21.07.2005 - rainerk
|
||||||
// Convert line-terminated extended events to vector of strings
|
// Convert line-terminated extended events to vector of strings
|
||||||
char * CSectionsdClient::parseExtendedEvents(char * dp, CEPGData * epgdata) {
|
char * CSectionsdClient::parseExtendedEvents(char * dp, CEPGData * epgdata) {
|
||||||
@@ -617,7 +665,6 @@ bool CSectionsdClient::getActualEPGServiceKey(const t_channel_id channel_id, CEP
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata)
|
bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata)
|
||||||
{
|
{
|
||||||
sectionsd::commandGetEPGid msg;
|
sectionsd::commandGetEPGid msg;
|
||||||
@@ -673,7 +720,6 @@ bool CSectionsdClient::getEPGid(const event_id_t eventid, const time_t starttime
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CSectionsdClient::getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata)
|
bool CSectionsdClient::getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata)
|
||||||
{
|
{
|
||||||
if (send(sectionsd::epgEPGidShort, (char*)&eventid, sizeof(eventid)))
|
if (send(sectionsd::epgEPGidShort, (char*)&eventid, sizeof(eventid)))
|
||||||
@@ -721,57 +767,5 @@ void CSectionsdClient::setPrivatePid(const unsigned short pid)
|
|||||||
close_connection();
|
close_connection();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void CSectionsdClient::freeMemory()
|
|
||||||
{
|
|
||||||
send(sectionsd::freeMemory);
|
|
||||||
|
|
||||||
readResponse();
|
|
||||||
close_connection();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSectionsdClient::readSIfromXML(const char * epgxmlname)
|
|
||||||
{
|
|
||||||
send(sectionsd::readSIfromXML, (char*) epgxmlname, strlen(epgxmlname));
|
|
||||||
|
|
||||||
readResponse();
|
|
||||||
close_connection();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSectionsdClient::writeSI2XML(const char * epgxmlname)
|
|
||||||
{
|
|
||||||
send(sectionsd::writeSI2XML, (char*) epgxmlname, strlen(epgxmlname));
|
|
||||||
|
|
||||||
readResponse();
|
|
||||||
close_connection();
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSectionsdClient::setConfig(const epg_config config)
|
|
||||||
{
|
|
||||||
sectionsd::commandSetConfig *msg;
|
|
||||||
char* pData = new char[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1];
|
|
||||||
msg = (sectionsd::commandSetConfig *)pData;
|
|
||||||
|
|
||||||
msg->scanMode = config.scanMode;
|
|
||||||
msg->epg_cache = config.epg_cache;
|
|
||||||
msg->epg_old_events = config.epg_old_events;
|
|
||||||
msg->epg_max_events = config.epg_max_events;
|
|
||||||
msg->network_ntprefresh = config.network_ntprefresh;
|
|
||||||
msg->network_ntpenable = config.network_ntpenable;
|
|
||||||
msg->epg_extendedcache = config.epg_extendedcache;
|
|
||||||
// config.network_ntpserver:
|
|
||||||
strcpy(&pData[sizeof(sectionsd::commandSetConfig)], config.network_ntpserver.c_str());
|
|
||||||
// config.epg_dir:
|
|
||||||
strcpy(&pData[sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1], config.epg_dir.c_str());
|
|
||||||
|
|
||||||
send(sectionsd::setConfig, (char*)pData, sizeof(sectionsd::commandSetConfig) + config.network_ntpserver.length() + 1 + config.epg_dir.length() + 1);
|
|
||||||
readResponse();
|
|
||||||
close_connection();
|
|
||||||
delete[] pData;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSectionsdClient::dumpStatus()
|
|
||||||
{
|
|
||||||
send(sectionsd::dumpStatusinformation);
|
|
||||||
close_connection();
|
|
||||||
}
|
|
||||||
|
@@ -36,13 +36,6 @@ class CShortEPGData
|
|||||||
std::string title;
|
std::string title;
|
||||||
std::string info1;
|
std::string info1;
|
||||||
std::string info2;
|
std::string info2;
|
||||||
|
|
||||||
CShortEPGData()
|
|
||||||
{
|
|
||||||
title = "";
|
|
||||||
info1 = "";
|
|
||||||
info2 = "";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CEPGData;
|
class CEPGData;
|
||||||
@@ -69,7 +62,7 @@ class CSectionsdClient : private CBasicClient
|
|||||||
|
|
||||||
int readResponse(char* data = NULL, unsigned int size = 0);
|
int readResponse(char* data = NULL, unsigned int size = 0);
|
||||||
bool send(const unsigned char command, const char* data = NULL, const unsigned int size = 0);
|
bool send(const unsigned char command, const char* data = NULL, const unsigned int size = 0);
|
||||||
char * parseExtendedEvents(char * dp, CEPGData * epgdata);
|
//char * parseExtendedEvents(char * dp, CEPGData * epgdata);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~CSectionsdClient() {};
|
virtual ~CSectionsdClient() {};
|
||||||
@@ -86,8 +79,10 @@ class CSectionsdClient : private CBasicClient
|
|||||||
{
|
{
|
||||||
EVT_TIMESET,
|
EVT_TIMESET,
|
||||||
EVT_GOT_CN_EPG,
|
EVT_GOT_CN_EPG,
|
||||||
|
#if 0
|
||||||
EVT_SERVICES_UPDATE,
|
EVT_SERVICES_UPDATE,
|
||||||
EVT_BOUQUETS_UPDATE,
|
EVT_BOUQUETS_UPDATE,
|
||||||
|
#endif
|
||||||
EVT_WRITE_SI_FINISHED
|
EVT_WRITE_SI_FINISHED
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -126,6 +121,10 @@ class CSectionsdClient : private CBasicClient
|
|||||||
{
|
{
|
||||||
time_t startzeit;
|
time_t startzeit;
|
||||||
unsigned dauer;
|
unsigned dauer;
|
||||||
|
sectionsdTime() {
|
||||||
|
startzeit = 0;
|
||||||
|
dauer = 0;
|
||||||
|
}
|
||||||
} __attribute__ ((packed)) ;
|
} __attribute__ ((packed)) ;
|
||||||
|
|
||||||
struct responseGetNVODTimes
|
struct responseGetNVODTimes
|
||||||
@@ -165,35 +164,25 @@ class CSectionsdClient : private CBasicClient
|
|||||||
std::string epg_dir;
|
std::string epg_dir;
|
||||||
} epg_config;
|
} epg_config;
|
||||||
|
|
||||||
|
#if 0
|
||||||
bool getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags);
|
bool getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags);
|
||||||
|
|
||||||
bool getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors);
|
bool getLinkageDescriptorsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::LinkageDescriptorList& descriptors);
|
||||||
|
|
||||||
bool getNVODTimesServiceKey(const t_channel_id channel_id, CSectionsdClient::NVODTimesList& nvod_list);
|
bool getNVODTimesServiceKey(const t_channel_id channel_id, CSectionsdClient::NVODTimesList& nvod_list);
|
||||||
|
|
||||||
bool getCurrentNextServiceKey(const t_channel_id channel_id, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next);
|
bool getCurrentNextServiceKey(const t_channel_id channel_id, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next);
|
||||||
|
CChannelEventList getChannelEvents(const bool tv_mode = true, t_channel_id* = NULL, int size = 0);
|
||||||
|
CChannelEventList getEventsServiceKey(const t_channel_id channel_id);
|
||||||
|
bool getEventsServiceKeySearchAdd(CChannelEventList& evtlist,const t_channel_id channel_id,char m_search_typ,std::string& m_search_text);
|
||||||
|
bool getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata);
|
||||||
|
bool getActualEPGServiceKey(const t_channel_id channel_id, CEPGData * epgdata);
|
||||||
|
bool getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata);
|
||||||
|
void setPrivatePid(const unsigned short pid);
|
||||||
|
#endif
|
||||||
|
|
||||||
bool getIsTimeSet();
|
bool getIsTimeSet();
|
||||||
|
|
||||||
void setPauseScanning(const bool doPause);
|
void setPauseScanning(const bool doPause);
|
||||||
|
|
||||||
bool getIsScanningActive();
|
|
||||||
|
|
||||||
void setServiceChanged(const t_channel_id channel_id, const bool requestEvent);
|
void setServiceChanged(const t_channel_id channel_id, const bool requestEvent);
|
||||||
|
|
||||||
CChannelEventList getChannelEvents(const bool tv_mode = true, t_channel_id* = NULL, int size = 0);
|
bool getIsScanningActive();
|
||||||
|
|
||||||
CChannelEventList getEventsServiceKey(const t_channel_id channel_id);
|
|
||||||
|
|
||||||
bool getEventsServiceKeySearchAdd(CChannelEventList& evtlist,const t_channel_id channel_id,char m_search_typ,std::string& m_search_text);
|
|
||||||
|
|
||||||
bool getEPGid(const event_id_t eventid, const time_t starttime, CEPGData * epgdata);
|
|
||||||
|
|
||||||
bool getActualEPGServiceKey(const t_channel_id channel_id, CEPGData * epgdata);
|
|
||||||
|
|
||||||
bool getEPGidShort(const event_id_t eventid, CShortEPGData * epgdata);
|
|
||||||
|
|
||||||
void setPrivatePid(const unsigned short pid);
|
|
||||||
|
|
||||||
void freeMemory();
|
void freeMemory();
|
||||||
|
|
||||||
@@ -235,15 +224,9 @@ class CEPGData
|
|||||||
CEPGData()
|
CEPGData()
|
||||||
{
|
{
|
||||||
eventID = 0;
|
eventID = 0;
|
||||||
title = "";
|
|
||||||
info1 = "";
|
|
||||||
info2 = "";
|
|
||||||
fsk = 0;
|
fsk = 0;
|
||||||
table_id = 0xff;
|
table_id = 0xff;
|
||||||
contentClassification = "";
|
|
||||||
userClassification = "";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user