diff --git a/src/zapit/include/zapit/client/msgtypes.h b/src/zapit/include/zapit/client/msgtypes.h index 1da5b0eb9..1bdaa1fd2 100644 --- a/src/zapit/include/zapit/client/msgtypes.h +++ b/src/zapit/include/zapit/client/msgtypes.h @@ -190,6 +190,7 @@ class CZapitMessages t_channel_id channel_id; bool record; bool pip; + bool epg; }; struct commandSetAudioChannel diff --git a/src/zapit/include/zapit/client/zapitclient.h b/src/zapit/include/zapit/client/zapitclient.h index bb71ad4a0..b71568f83 100644 --- a/src/zapit/include/zapit/client/zapitclient.h +++ b/src/zapit/include/zapit/client/zapitclient.h @@ -72,6 +72,7 @@ class CZapitClient:public CBasicClient EVT_SERVICES_CHANGED, EVT_PMT_CHANGED, EVT_TUNE_COMPLETE, + EVT_BACK_ZAP_COMPLETE, 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_record(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" */ unsigned int zapTo_subServiceID(const t_channel_id channel_id); diff --git a/src/zapit/lib/zapitclient.cpp b/src/zapit/lib/zapitclient.cpp index 393c4e8fa..28e9cf773 100644 --- a/src/zapit/lib/zapitclient.cpp +++ b/src/zapit/lib/zapitclient.cpp @@ -170,6 +170,7 @@ unsigned int CZapitClient::zapTo_record(const t_channel_id channel_id) msg.channel_id = channel_id; msg.record = true; msg.pip = false; + msg.epg = false; 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.record = false; 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));