# HG changeset patch # User morphbr # Date 1168873289 0 # Node ID bb8a8b1c449d03e3a4741076918c4c3f78155d1d # Parent 6c34a8d85a9b278022ea3ad410ec935945aaa31c [svn r271] Updated config files to completely support libcurl diff -r 6c34a8d85a9b -r bb8a8b1c449d gmyth/debian/control --- a/gmyth/debian/control Mon Jan 15 14:41:09 2007 +0000 +++ b/gmyth/debian/control Mon Jan 15 15:01:29 2007 +0000 @@ -8,12 +8,12 @@ Package: gmyth Section: libs Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, libcurl3 Description: The gmyth library binary files. GMyth is a library intended to access mythtv backend functionalities from a glib/gobject perspective. It includes access to the program guide, recorded programs, scheduling, etc. Package: gmyth-dev Section: libdevel Architecture: any -Depends: gmyth (= ${Source-Version}) +Depends: gmyth (= ${Source-Version}), libcurl3, libcurl3-openssl-dev Description: The gmyth library development files. GMyth is a library intended to access mythtv backend functionalities from a glib/gobject perspective. It includes access to the program guide, recorded programs, scheduling, etc. diff -r 6c34a8d85a9b -r bb8a8b1c449d gmyth/gmyth.pc.in --- a/gmyth/gmyth.pc.in Mon Jan 15 14:41:09 2007 +0000 +++ b/gmyth/gmyth.pc.in Mon Jan 15 15:01:29 2007 +0000 @@ -8,5 +8,5 @@ Version: @VERSION@ Requires: gobject-2.0 glib-2.0 libcurl -Libs: @MYSQL_LIBS@ -L${libdir} -lgmyth +Libs: @MYSQL_LIBS@ -L${libdir} -lgmyth -lcurl Cflags: -I${includedir}/gmyth diff -r 6c34a8d85a9b -r bb8a8b1c449d gmyth/src/gmyth_http.c --- a/gmyth/src/gmyth_http.c Mon Jan 15 14:41:09 2007 +0000 +++ b/gmyth/src/gmyth_http.c Mon Jan 15 15:01:29 2007 +0000 @@ -9,7 +9,8 @@ * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia. * @author Artur Duque de Souza <@indt.org.br> * - *//* + */ +/* * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -30,10 +31,9 @@ #include "config.h" #endif -#include -#include #include -#include +#include +#include #include "gmyth_http.h" #include "gmyth_debug.h" @@ -86,6 +86,7 @@ g_string_append(command, "?"); + /* Sintax: var, value */ while ( (s = va_arg(args, char *)) != NULL ) { g_string_append(command, s); @@ -95,11 +96,7 @@ g_string_append(command, "&"); } - - /* TODO: erase this */ - printf("Comando: %s\n", command); free(s); - va_end(args); return command; @@ -108,11 +105,14 @@ /** Send HTTP Command and receives the result of it * * @return A string with the response from the server + * NULL if there is no response. */ GString *gmyth_http_request (GMythBackendInfo *backend_info, GString *command) { + LIBXML_TEST_VERSION + size_t size = strlen(backend_info->hostname) + strlen(command->str) + 13; char *URL = malloc(sizeof(char)*size); snprintf(URL, size+1, "http://%s:6544/%s", backend_info->hostname, command->str); diff -r 6c34a8d85a9b -r bb8a8b1c449d gmyth/tests/http.c --- a/gmyth/tests/http.c Mon Jan 15 14:41:09 2007 +0000 +++ b/gmyth/tests/http.c Mon Jan 15 15:01:29 2007 +0000 @@ -15,8 +15,8 @@ GString *command = g_string_new(argv[1]); - GString *new_command = gmyth_http_create_command(command, "ChanId", "1001", "StartTime", "2006-12-20T00:05:00", NULL); - GString *result = gmyth_http_request(backend_info, new_command); + //GString *new_command = gmyth_http_create_command(command, "ChanId", "1001", "StartTime", "2006-12-20T00:05:00", NULL); + GString *result = gmyth_http_request(backend_info, command); printf("%s", result->str);