Skip to content
This repository has been archived by the owner on Dec 21, 2020. It is now read-only.

Commit

Permalink
bump protocol to 10, fixes for search timers
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Dec 23, 2016
1 parent 1393420 commit cdd44e4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/VNSIData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ PVR_ERROR cVNSIData::GetTimerInfo(unsigned int timernumber, PVR_TIMER &tag)
strncpy(tag.strEpgSearchString, epgSearch, sizeof(tag.strEpgSearchString) - 1);
}

if (GetProtocol() >= 10)
{
tag.iParentClientIndex = vresp->extract_U32();
}

return PVR_ERROR_NO_ERROR;
}

Expand Down Expand Up @@ -455,6 +460,11 @@ bool cVNSIData::GetTimersList(ADDON_HANDLE handle)
strncpy(tag.strEpgSearchString, epgSearch, sizeof(tag.strEpgSearchString) - 1);
}

if (GetProtocol() >= 10)
{
tag.iParentClientIndex = vresp->extract_U32();
}

if (tag.startTime == 0)
tag.bStartAnyTime = true;
if (tag.endTime == 0)
Expand Down Expand Up @@ -548,6 +558,12 @@ PVR_ERROR cVNSIData::AddTimer(const PVR_TIMER &timerinfo)
vrp.add_String(timerinfo.strEpgSearchString);
}

if (GetProtocol() >= 10)
{
vrp.add_U32(timerinfo.iMarginStart*60);
vrp.add_U32(timerinfo.iMarginEnd*60);
}

auto vresp = ReadResult(&vrp);
if (vresp == NULL || vresp->noResponse())
{
Expand Down
2 changes: 1 addition & 1 deletion src/vnsicommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define VNSI_COMMAND_H

/** Current VNSI Protocol Version number */
#define VNSI_PROTOCOLVERSION 9
#define VNSI_PROTOCOLVERSION 10

/** Start of RDS support protocol Version */
#define VNSI_RDS_PROTOCOLVERSION 8
Expand Down

0 comments on commit cdd44e4

Please sign in to comment.