Changeset 3112:0aea28dfd322 in roaraudio


Ignore:
Timestamp:
01/11/10 09:36:03 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

do the actual SLP request

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vio_tantalos.h

    r3110 r3112  
    3838#include "libroar.h" 
    3939 
     40#define ROAR_SLP_URL_TYPE_DOWNLOAD_HTTP     "service:download.fellig:http" 
     41#define ROAR_SLP_URL_TYPE_DOWNLOAD_HTTP_LEN 28 
     42 
    4043int     roar_vio_open_tantalos    (struct roar_vio_calls * calls, struct roar_vio_calls * dst); 
    4144ssize_t roar_vio_tantalos_read    (struct roar_vio_calls * vio, void *buf, size_t count); 
  • libroar/vio_tantalos.c

    r3111 r3112  
    3535#include "libroar.h" 
    3636 
     37int     roar_vio_open_tantalos    (struct roar_vio_calls * calls, struct roar_vio_calls * dst) { 
     38#ifdef ROAR_HAVE_LIBSLP 
     39 struct roar_slp_cookie   cookie; 
     40 char * url; 
     41 int i; 
     42 
     43 if ( roar_slp_cookie_init(&cookie, NULL) == -1 ) 
     44  return -1; 
     45 
     46 if ( roar_slp_search(&cookie, ROAR_SLP_URL_TYPE_DOWNLOAD_HTTP) == -1 ) 
     47  return -1; 
     48 
     49 for (i = 0; i < cookie.matchcount; i++) { 
     50  url = cookie.match[i].url + ROAR_SLP_URL_TYPE_DOWNLOAD_HTTP_LEN - 4; 
     51 } 
     52 
     53 return -1; 
     54#else 
     55 return -1; 
     56#endif 
     57} 
     58 
     59#ifdef ROAR_HAVE_LIBSLP 
     60ssize_t roar_vio_tantalos_read    (struct roar_vio_calls * vio, void *buf, size_t count); 
     61ssize_t roar_vio_tantalos_write   (struct roar_vio_calls * vio, void *buf, size_t count); 
     62off_t   roar_vio_tantalos_lseek   (struct roar_vio_calls * vio, off_t offset, int whence); 
     63int     roar_vio_tantalos_nonblock(struct roar_vio_calls * vio, int state); 
     64int     roar_vio_tantalos_sync    (struct roar_vio_calls * vio); 
     65int     roar_vio_tantalos_ctl     (struct roar_vio_calls * vio, int cmd, void * data); 
     66int     roar_vio_tantalos_close   (struct roar_vio_calls * vio); 
     67#endif 
     68 
    3769//ll 
Note: See TracChangeset for help on using the changeset viewer.