# HG changeset patch # User morphbr # Date 1168603081 0 # Node ID 55e1c59ed983e66264de34b35d43c27c865ce9be # Parent 1098f58ae8e142a72680dbf852352928b99a44fa [svn r268] Created an application inside tests to test gmyth_http diff -r 1098f58ae8e1 -r 55e1c59ed983 gmyth/tests/http.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gmyth/tests/http.c Fri Jan 12 11:58:01 2007 +0000 @@ -0,0 +1,26 @@ +#include +#include "gmyth.h" + +int +main (int args, const char **argv) +{ + GMythBackendInfo *backend_info; + g_type_init (); + g_thread_init (NULL); + + backend_info = gmyth_backend_info_new (); + + gmyth_backend_info_set_hostname (backend_info, "localhost"); + gmyth_backend_info_set_port (backend_info, 6543); + + GMythHttp *gmyth_http = gmyth_http_new(); + gmyth_http->backend_info = backend_info; + + GString *command = g_string_new(argv[1]); + + GString *result = gmyth_http_request(gmyth_http, command); + + printf("%s", result->str); + + return 0; +}