[svn r271] Updated config files to completely support libcurl trunk
authormorphbr
Mon Jan 15 15:01:29 2007 +0000 (2007-01-15)
branchtrunk
changeset 270bb8a8b1c449d
parent 269 6c34a8d85a9b
child 271 f249c6e05094
[svn r271] Updated config files to completely support libcurl
gmyth/debian/control
gmyth/gmyth.pc.in
gmyth/src/gmyth_http.c
gmyth/tests/http.c
     1.1 --- a/gmyth/debian/control	Mon Jan 15 14:41:09 2007 +0000
     1.2 +++ b/gmyth/debian/control	Mon Jan 15 15:01:29 2007 +0000
     1.3 @@ -8,12 +8,12 @@
     1.4  Package: gmyth
     1.5  Section: libs
     1.6  Architecture: any
     1.7 -Depends: ${shlibs:Depends}, ${misc:Depends}
     1.8 +Depends: ${shlibs:Depends}, ${misc:Depends}, libcurl3
     1.9  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.
    1.10  
    1.11  Package: gmyth-dev
    1.12  Section: libdevel
    1.13  Architecture: any
    1.14 -Depends: gmyth (= ${Source-Version})
    1.15 +Depends: gmyth (= ${Source-Version}), libcurl3, libcurl3-openssl-dev
    1.16  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.
    1.17  
     2.1 --- a/gmyth/gmyth.pc.in	Mon Jan 15 14:41:09 2007 +0000
     2.2 +++ b/gmyth/gmyth.pc.in	Mon Jan 15 15:01:29 2007 +0000
     2.3 @@ -8,5 +8,5 @@
     2.4  Version: @VERSION@
     2.5  Requires: gobject-2.0 glib-2.0 libcurl
     2.6  
     2.7 -Libs: @MYSQL_LIBS@ -L${libdir} -lgmyth
     2.8 +Libs: @MYSQL_LIBS@ -L${libdir} -lgmyth -lcurl
     2.9  Cflags: -I${includedir}/gmyth
     3.1 --- a/gmyth/src/gmyth_http.c	Mon Jan 15 14:41:09 2007 +0000
     3.2 +++ b/gmyth/src/gmyth_http.c	Mon Jan 15 15:01:29 2007 +0000
     3.3 @@ -9,7 +9,8 @@
     3.4   * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
     3.5   * @author Artur Duque de Souza <@indt.org.br>
     3.6   *
     3.7 - *//*
     3.8 + */
     3.9 +/*
    3.10   * 
    3.11   * This program is free software; you can redistribute it and/or modify
    3.12   * it under the terms of the GNU Lesser General Public License as published by
    3.13 @@ -30,10 +31,9 @@
    3.14  #include "config.h"
    3.15  #endif
    3.16  
    3.17 -#include <stdlib.h>
    3.18 -#include <stdio.h>
    3.19  #include <assert.h>
    3.20 -#include <sys/select.h>
    3.21 +#include <libxml/parser.h>
    3.22 +#include <libxml/tree.h>
    3.23  
    3.24  #include "gmyth_http.h"
    3.25  #include "gmyth_debug.h"
    3.26 @@ -86,6 +86,7 @@
    3.27  
    3.28      g_string_append(command, "?");
    3.29  
    3.30 +    /* Sintax: var, value */
    3.31      while ( (s = va_arg(args, char *)) != NULL ) 
    3.32      {
    3.33          g_string_append(command, s);
    3.34 @@ -95,11 +96,7 @@
    3.35          g_string_append(command, "&");
    3.36      }
    3.37  
    3.38 -
    3.39 -    /* TODO: erase this */
    3.40 -    printf("Comando: %s\n", command);
    3.41      free(s);
    3.42 -
    3.43      va_end(args);
    3.44  
    3.45      return command;
    3.46 @@ -108,11 +105,14 @@
    3.47  /** Send HTTP Command and receives the result of it
    3.48   *
    3.49   * @return A string with the response from the server
    3.50 + *          NULL if there is no response.
    3.51   */
    3.52  GString 
    3.53  *gmyth_http_request (GMythBackendInfo *backend_info, GString *command)
    3.54  {
    3.55  
    3.56 +    LIBXML_TEST_VERSION
    3.57 +
    3.58      size_t size = strlen(backend_info->hostname) + strlen(command->str) + 13;
    3.59      char *URL = malloc(sizeof(char)*size);
    3.60      snprintf(URL, size+1, "http://%s:6544/%s", backend_info->hostname, command->str);     
     4.1 --- a/gmyth/tests/http.c	Mon Jan 15 14:41:09 2007 +0000
     4.2 +++ b/gmyth/tests/http.c	Mon Jan 15 15:01:29 2007 +0000
     4.3 @@ -15,8 +15,8 @@
     4.4      
     4.5      GString *command = g_string_new(argv[1]);
     4.6  
     4.7 -    GString *new_command = gmyth_http_create_command(command, "ChanId", "1001", "StartTime", "2006-12-20T00:05:00", NULL);
     4.8 -    GString *result = gmyth_http_request(backend_info, new_command);
     4.9 +    //GString *new_command = gmyth_http_create_command(command, "ChanId", "1001", "StartTime", "2006-12-20T00:05:00", NULL);
    4.10 +    GString *result = gmyth_http_request(backend_info, command);
    4.11  
    4.12      printf("%s", result->str);
    4.13