[Redbutton-devel] SF.net SVN: redbutton: [280] redbutton-download/trunk/command.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-04-11 09:44:35
|
Revision: 280
http://svn.sourceforge.net/redbutton/?rev=280&view=rev
Author: skilvington
Date: 2007-04-11 02:44:27 -0700 (Wed, 11 Apr 2007)
Log Message:
-----------
add a command to show the current service ID
Modified Paths:
--------------
redbutton-download/trunk/command.c
Modified: redbutton-download/trunk/command.c
===================================================================
--- redbutton-download/trunk/command.c 2007-04-08 11:50:31 UTC (rev 279)
+++ redbutton-download/trunk/command.c 2007-04-11 09:44:27 UTC (rev 280)
@@ -34,6 +34,7 @@
bool cmd_help(struct listen_data *, FILE *, int, char **);
bool cmd_quit(struct listen_data *, FILE *, int, char **);
bool cmd_retune(struct listen_data *, FILE *, int, char **);
+bool cmd_service(struct listen_data *, FILE *, int, char **);
bool cmd_vdemux(struct listen_data *, FILE *, int, char **);
bool cmd_vstream(struct listen_data *, FILE *, int, char **);
@@ -56,6 +57,7 @@
{ "help", "", cmd_help, "List available commands" },
{ "quit", "", cmd_quit, "Close the connection" },
{ "retune", "<ServiceID>", cmd_retune, "Start downloading the carousel from ServiceID" },
+ { "service", "", cmd_service, "Show the current service ID" },
{ "vdemux", "[<ServiceID>] <ComponentTag>", cmd_vdemux, "Demux the given video component tag" },
{ "vstream", "[<ServiceID>] <ComponentTag>", cmd_vstream, "Stream the given video component tag" },
{ NULL, NULL, NULL, NULL }
@@ -801,6 +803,27 @@
}
/*
+ * service
+ * show the service ID we are downloading the carousel from
+ * will be in the form, "dvb://network_id..service_id"
+ */
+
+bool
+cmd_service(struct listen_data *listen_data, FILE *client, int argc, char *argv[])
+{
+ struct carousel *car = listen_data->carousel;
+
+ SEND_RESPONSE(200, "OK");
+
+/* TODO */
+printf("TODO: cmd_service network_id\n");
+
+ fprintf(client, "dvb://..%x\n", car->service_id);
+
+ return false;
+}
+
+/*
* help
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|