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
|
diff --git a/src/VNSIData.cpp b/src/VNSIData.cpp
index 7c4418c..76c27b8 100644
--- a/src/VNSIData.cpp
+++ b/src/VNSIData.cpp
@@ -409,6 +409,9 @@ PVR_ERROR cVNSIData::GetTimerInfo(unsigned int timernumber, PVR_TIMER &tag)
return PVR_ERROR_SERVER_ERROR;
}
+ /* TODO: Implement own timer types to get support for the timer features introduced with PVR API 1.9.7 */
+ tag.iTimerType = PVR_TIMER_TYPE_NONE;
+
tag.iClientIndex = vresp->extract_U32();
int iActive = vresp->extract_U32();
int iRecording = vresp->extract_U32();
@@ -427,7 +430,6 @@ PVR_ERROR cVNSIData::GetTimerInfo(unsigned int timernumber, PVR_TIMER &tag)
tag.endTime = vresp->extract_U32();
tag.firstDay = vresp->extract_U32();
tag.iWeekdays = vresp->extract_U32();
- tag.bIsRepeating = tag.iWeekdays == 0 ? false : true;
char *strTitle = vresp->extract_String();
strncpy(tag.strTitle, strTitle, sizeof(tag.strTitle) - 1);
delete[] strTitle;
@@ -460,6 +462,10 @@ bool cVNSIData::GetTimersList(ADDON_HANDLE handle)
{
PVR_TIMER tag;
memset(&tag, 0, sizeof(tag));
+
+ /* TODO: Implement own timer types to get support for the timer features introduced with PVR API 1.9.7 */
+ tag.iTimerType = PVR_TIMER_TYPE_NONE;
+
tag.iClientIndex = vresp->extract_U32();
int iActive = vresp->extract_U32();
int iRecording = vresp->extract_U32();
@@ -478,7 +484,6 @@ bool cVNSIData::GetTimersList(ADDON_HANDLE handle)
tag.endTime = vresp->extract_U32();
tag.firstDay = vresp->extract_U32();
tag.iWeekdays = vresp->extract_U32();
- tag.bIsRepeating = tag.iWeekdays == 0 ? false : true;
char *strTitle = vresp->extract_String();
strncpy(tag.strTitle, strTitle, sizeof(tag.strTitle) - 1);
tag.iMarginStart = 0;
@@ -546,7 +551,7 @@ PVR_ERROR cVNSIData::AddTimer(const PVR_TIMER &timerinfo)
if (!vrp.add_U32(timerinfo.iClientChannelUid)) return PVR_ERROR_UNKNOWN;
if (!vrp.add_U32(starttime)) return PVR_ERROR_UNKNOWN;
if (!vrp.add_U32(endtime)) return PVR_ERROR_UNKNOWN;
- if (!vrp.add_U32(timerinfo.bIsRepeating ? timerinfo.firstDay : 0)) return PVR_ERROR_UNKNOWN;
+ if (!vrp.add_U32(timerinfo.iWeekdays != PVR_WEEKDAY_NONE ? timerinfo.firstDay : 0)) return PVR_ERROR_UNKNOWN;
if (!vrp.add_U32(timerinfo.iWeekdays))return PVR_ERROR_UNKNOWN;
if (!vrp.add_String(path.c_str())) return PVR_ERROR_UNKNOWN;
if (!vrp.add_String("")) return PVR_ERROR_UNKNOWN;
@@ -629,7 +634,7 @@ PVR_ERROR cVNSIData::UpdateTimer(const PVR_TIMER &timerinfo)
if (!vrp.add_U32(timerinfo.iClientChannelUid)) return PVR_ERROR_UNKNOWN;
if (!vrp.add_U32(starttime)) return PVR_ERROR_UNKNOWN;
if (!vrp.add_U32(endtime)) return PVR_ERROR_UNKNOWN;
- if (!vrp.add_U32(timerinfo.bIsRepeating ? timerinfo.firstDay : 0)) return PVR_ERROR_UNKNOWN;
+ if (!vrp.add_U32(timerinfo.iWeekdays != PVR_WEEKDAY_NONE ? timerinfo.firstDay : 0)) return PVR_ERROR_UNKNOWN;
if (!vrp.add_U32(timerinfo.iWeekdays))return PVR_ERROR_UNKNOWN;
if (!vrp.add_String(timerinfo.strTitle)) return PVR_ERROR_UNKNOWN;
if (!vrp.add_String("")) return PVR_ERROR_UNKNOWN;
diff --git a/src/client.cpp b/src/client.cpp
index 8d4c29b..5e72f78 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -537,6 +537,12 @@ PVR_ERROR GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANNEL_GROUP &g
/*******************************************/
/** PVR Timer Functions **/
+PVR_ERROR GetTimerTypes(PVR_TIMER_TYPE types[], int *size)
+{
+ /* TODO: Implement this to get support for the timer features introduced with PVR API 1.9.7 */
+ return PVR_ERROR_NOT_IMPLEMENTED;
+}
+
int GetTimersAmount(void)
{
if (!VNSIData)
@@ -550,6 +556,7 @@ PVR_ERROR GetTimers(ADDON_HANDLE handle)
if (!VNSIData)
return PVR_ERROR_SERVER_ERROR;
+ /* TODO: Change implementation to get support for the timer features introduced with PVR API 1.9.7 */
return (VNSIData->GetTimersList(handle) ? PVR_ERROR_NO_ERROR : PVR_ERROR_SERVER_ERROR);
}
@@ -561,11 +568,12 @@ PVR_ERROR AddTimer(const PVR_TIMER &timer)
return VNSIData->AddTimer(timer);
}
-PVR_ERROR DeleteTimer(const PVR_TIMER &timer, bool bForce)
+PVR_ERROR DeleteTimer(const PVR_TIMER &timer, bool bForce, bool /*bDeleteScheduled*/)
{
if (!VNSIData)
return PVR_ERROR_SERVER_ERROR;
+ /* TODO: Change implementation to support bDeleteScheduled (introduced with PVR API 1.9.7 */
return VNSIData->DeleteTimer(timer, bForce);
}
|