/*
* tvheadend, AJAX / HTML user interface
* Copyright (C) 2008 Andreas Öman
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#define _GNU_SOURCE
#include
#include
#include
#include
#include
#include
#include "tvhead.h"
#include "http.h"
#include "ajaxui.h"
#include "channels.h"
#include "epg_xmltv.h"
#include "psi.h"
#include "transports.h"
#include "ajaxui_mailbox.h"
/**
* XMLTV configuration
*/
int
ajax_config_xmltv_tab(http_connection_t *hc, http_reply_t *hr)
{
tcp_queue_t *tq = &hr->hr_tq;
xmltv_grabber_t *xg;
int ngrabbers = 0;
int displines = 21;
int csize[10];
const char *cells[10];
int o = 1;
char buf[200];
tcp_qprintf(tq, "
", xg->xg_identifier);
switch(xg->xg_status) {
case XMLTV_GRABBER_DISABLED:
tcp_qprintf(tq,
"
This grabber is currently not enabled, click "
"here "
"to enable it
");
break;
case XMLTV_GRABBER_ENQUEUED:
case XMLTV_GRABBER_GRABBING:
case XMLTV_GRABBER_UNCONFIGURED:
case XMLTV_GRABBER_DYSFUNCTIONAL:
tcp_qprintf(tq, "