zapit/lib/zapitclient.cpp: add zapTo_epg, EVT_BACK_ZAP_COMPLETE event

This commit is contained in:
[CST] Focus
2013-08-12 13:31:20 +04:00
parent ff161a699c
commit 322db8b591
3 changed files with 24 additions and 0 deletions

View File

@@ -190,6 +190,7 @@ class CZapitMessages
t_channel_id channel_id; t_channel_id channel_id;
bool record; bool record;
bool pip; bool pip;
bool epg;
}; };
struct commandSetAudioChannel struct commandSetAudioChannel

View File

@@ -72,6 +72,7 @@ class CZapitClient:public CBasicClient
EVT_SERVICES_CHANGED, EVT_SERVICES_CHANGED,
EVT_PMT_CHANGED, EVT_PMT_CHANGED,
EVT_TUNE_COMPLETE, EVT_TUNE_COMPLETE,
EVT_BACK_ZAP_COMPLETE,
LAST_EVENT_MARKER // <- no actual event, needed by pzapit LAST_EVENT_MARKER // <- no actual event, needed by pzapit
}; };
@@ -274,6 +275,7 @@ class CZapitClient:public CBasicClient
unsigned int zapTo_serviceID(const t_channel_id channel_id); unsigned int zapTo_serviceID(const t_channel_id channel_id);
unsigned int zapTo_record(const t_channel_id channel_id); unsigned int zapTo_record(const t_channel_id channel_id);
unsigned int zapTo_pip(const t_channel_id channel_id); unsigned int zapTo_pip(const t_channel_id channel_id);
unsigned int zapTo_epg(const t_channel_id channel_id);
/* zaps to subservice, returns the "zap-status" */ /* zaps to subservice, returns the "zap-status" */
unsigned int zapTo_subServiceID(const t_channel_id channel_id); unsigned int zapTo_subServiceID(const t_channel_id channel_id);

View File

@@ -170,6 +170,7 @@ unsigned int CZapitClient::zapTo_record(const t_channel_id channel_id)
msg.channel_id = channel_id; msg.channel_id = channel_id;
msg.record = true; msg.record = true;
msg.pip = false; msg.pip = false;
msg.epg = false;
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg)); send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));
@@ -188,6 +189,26 @@ unsigned int CZapitClient::zapTo_pip(const t_channel_id channel_id)
msg.channel_id = channel_id; msg.channel_id = channel_id;
msg.record = false; msg.record = false;
msg.pip = true; msg.pip = true;
msg.epg = false;
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));
CZapitMessages::responseZapComplete response;
CBasicClient::receive_data((char* )&response, sizeof(response));
close_connection();
return response.zapStatus;
}
unsigned int CZapitClient::zapTo_epg(const t_channel_id channel_id)
{
CZapitMessages::commandZaptoServiceID msg;
msg.channel_id = channel_id;
msg.record = false;
msg.pip = false;
msg.epg = true;
send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg)); send(CZapitMessages::CMD_ZAPTO_SERVICEID, (const char *) & msg, sizeof(msg));