add pvr_op2int() func
This commit is contained in:
parent
efa39aa0ff
commit
45d09db30a
2 changed files with 19 additions and 0 deletions
17
pvr.c
17
pvr.c
|
@ -43,6 +43,7 @@
|
|||
#include "epg.h"
|
||||
#include "dispatch.h"
|
||||
#include "buffer.h"
|
||||
#include "strtab.h"
|
||||
|
||||
struct pvr_rec_list pvrr_global_list;
|
||||
|
||||
|
@ -1115,3 +1116,19 @@ pvrr_record_packet(pvr_rec_t *pvrr, th_pkt_t *pkt)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static struct strtab recoptab[] = {
|
||||
{ "once", RECOP_ONCE },
|
||||
{ "daily", RECOP_DAILY },
|
||||
{ "weekly", RECOP_WEEKLY },
|
||||
{ "cancel", RECOP_CANCEL },
|
||||
{ "toggle", RECOP_TOGGLE }
|
||||
};
|
||||
|
||||
int
|
||||
pvr_op2int(const char *op)
|
||||
{
|
||||
return str2val(op, recoptab);
|
||||
}
|
||||
|
|
2
pvr.h
2
pvr.h
|
@ -115,4 +115,6 @@ void pvrr_set_rec_state(pvr_rec_t *pvrr, pvrr_rec_status_t status);
|
|||
|
||||
void pvr_channel_record_op(th_channel_t *ch, int duration);
|
||||
|
||||
int pvr_op2int(const char *op);
|
||||
|
||||
#endif /* PVR_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue