Ejemplo n.º 1
0
void
gu_nav_open_newwin(gtk_ui_t *gu, const char *url)
{
  gu_window_t *gw = gu_win_create(gu, NULL, 0);
  gu_tab_send_event(gw->gw_current_tab,
		    event_create_openurl(url, NULL, NULL, NULL, NULL));
}
Ejemplo n.º 2
0
static int
hc_open(http_connection_t *hc, const char *remain, void *opaque,
	http_cmd_t method)
{
  htsbuf_queue_t out;

  const char *url = http_arg_get_req(hc, "url");

  if(url != NULL) {
    event_dispatch(event_create_openurl(url, NULL, NULL, NULL, NULL, NULL));
    return http_redirect(hc, "/showtime/open");
  }

  htsbuf_queue_init(&out, 0);
  htsbuf_append(&out, openpage, strlen(openpage));
  return http_send_reply(hc, 0, "text/html", NULL, NULL, 0, &out);
}
Ejemplo n.º 3
0
static int
airplay_play(http_connection_t *hc, const char *remain, void *opaque,
		http_cmd_t method)
{
  char *data = http_get_post_data(hc, NULL, 0);

  char *url = strstr(data, "Content-Location: ");
  char *startpos = strstr(data, "Start-Position: ");

  if(url == NULL)
    return 400;

  url += strlen("Content-Location: ");
  url[strcspn(url, "\r\n")] = 0;

  if(startpos != NULL) {
    startpos += strlen("Start-Position: ");
    startpos[strcspn(startpos, "\r\n")] = 0;
  }

  event_dispatch(event_create_openurl(url, NULL, NULL, NULL, NULL));
  return 200;
}
Ejemplo n.º 4
0
static int
hc_root_old(http_connection_t *hc)
{
  htsbuf_queue_t out;

  const char *url = http_arg_get_req(hc, "url");

  if(url != NULL) {
    event_dispatch(event_create_openurl(url, NULL, NULL, NULL, NULL, NULL));
    return http_redirect(hc, "/");
  }

  htsbuf_queue_init(&out, 0);

  htsbuf_qprintf(&out, 
		 "<html><body>"
		 "<h2>%s</h2><p>Version %s"
		 , gconf.system_name,
		 htsversion_full);

  htsbuf_qprintf(&out, 
		 "<form name=\"input\" method=\"get\">"
		 "Open URL in Showtime: "
		 "<input type=\"text\" name=\"url\" style=\"width:500px\"/>"
		 "<input type=\"submit\" value=\"Open\" />"
		 "</form>");
  
  htsbuf_qprintf(&out, "<h3>Diagnostics</h3>"); 

  diag_html(hc, &out);

  htsbuf_qprintf(&out, "<p><a href=\"/showtime/translation\">Upload and test new translation (.lang) file</a></p>");

  htsbuf_qprintf(&out, "</body></html>");
		 
  return http_send_reply(hc, 0, "text/html", NULL, NULL, 0, &out);
}
Ejemplo n.º 5
0
void
gu_nav_open_newtab(gu_window_t *gw, const char *url)
{
  gu_tab_t *gt = gu_tab_create(gw, NULL, 0);
  gu_tab_send_event(gt, event_create_openurl(url, NULL, NULL, NULL, NULL));
}
Ejemplo n.º 6
0
void
gu_tab_open(gu_tab_t *gt, const char *url)
{
  gu_tab_send_event(gt, event_create_openurl(url, NULL, NULL, NULL, NULL));
}
Ejemplo n.º 7
0
void
nav_open(const char *url, const char *view)
{
  event_dispatch(event_create_openurl(url, view, NULL));
}