~ubuntu-branches/debian/sid/audacious-plugins/sid

« back to all changes in this revision

Viewing changes to src/daap/daap.c

  • Committer: Bazaar Package Importer
  • Author(s): Bilal Akhtar
  • Date: 2011-04-10 18:56:21 UTC
  • mfrom: (1.1.14 upstream) (2.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110410185621-7eg1k5a7v3f4aqrn
Tags: 2.4.4-1
* New upstream release.
  - Fix FTBFS with GCC 4.5 (Closes: #621989)
* Upload to unstable.
* debian/control:
  - Update versioned dependencies according to upstream changes.
  - Bump Standards-Version to 3.9.2 (no changes needed).
  - Since the package will be building against the new FFMpeg libs,
    fix the problem of depending on old uninstallable libav*
    packages (Closes: #617603)

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
 
307
307
 
308
308
 
309
 
VFSFile * daap_aud_vfs_fopen_impl(const gchar * path, const gchar * mode)
 
309
VFSFile * daap_vfs_fopen_impl(const gchar * path, const gchar * mode)
310
310
{
311
311
    VFSFile *file=NULL;
312
312
    daap_handle_t *handle = g_new0(daap_handle_t, 1);
330
330
 
331
331
    if (handle->fd < 0) 
332
332
    {
333
 
        g_print("aud_vfs_fopen got a negative FD \n");
 
333
        g_print("vfs_fopen got a negative FD \n");
334
334
        g_free(file);
335
335
        file = NULL;
336
336
    } 
339
339
    return file;
340
340
}
341
341
 
342
 
gint daap_aud_vfs_fclose_impl(VFSFile * file)
 
342
gint daap_vfs_fclose_impl(VFSFile * file)
343
343
{
344
344
    gint ret=0;
345
345
    daap_handle_t * handle = (daap_handle_t *)file->handle;
363
363
return -1;
364
364
}
365
365
 
366
 
size_t daap_aud_vfs_fread_impl(gpointer ptr, size_t size, size_t nmemb, VFSFile * file)
 
366
size_t daap_vfs_fread_impl(gpointer ptr, size_t size, size_t nmemb, VFSFile * file)
367
367
{
368
368
    daap_handle_t *handle= (daap_handle_t *)file->handle;
369
369
    size_t ret=0;
378
378
    return 0;
379
379
}
380
380
 
381
 
size_t daap_aud_vfs_fwrite_impl(gconstpointer ptr, size_t size, size_t nmemb, VFSFile * file)
 
381
size_t daap_vfs_fwrite_impl(gconstpointer ptr, size_t size, size_t nmemb, VFSFile * file)
382
382
{
383
383
    return -1;
384
384
}
385
385
 
386
 
gint daap_aud_vfs_getc_impl(VFSFile * file)
 
386
gint daap_vfs_getc_impl(VFSFile * file)
387
387
{
388
388
guchar ret=EOF;
389
389
daap_handle_t *handle = (daap_handle_t *)file->handle;
401
401
}
402
402
}
403
403
 
404
 
gint daap_aud_vfs_fseek_impl(VFSFile * file, glong offset, gint whence)
 
404
gint daap_vfs_fseek_impl(VFSFile * file, glong offset, gint whence)
405
405
{
406
406
    return -1;
407
407
}
408
408
 
409
 
gint daap_aud_vfs_ungetc_impl(gint c, VFSFile * stream)
 
409
gint daap_vfs_ungetc_impl(gint c, VFSFile * stream)
410
410
{
411
411
return c;
412
412
}
413
413
 
414
 
void daap_aud_vfs_rewind_impl(VFSFile * stream)
 
414
void daap_vfs_rewind_impl(VFSFile * stream)
415
415
{
416
416
    return;
417
417
}
418
418
 
419
 
glong daap_aud_vfs_ftell_impl(VFSFile * stream)
 
419
glong daap_vfs_ftell_impl(VFSFile * stream)
420
420
{
421
421
    daap_handle_t *handle=stream->handle;
422
422
   return handle->pos;
423
423
}
424
424
 
425
 
gboolean daap_aud_vfs_feof_impl(VFSFile * file)
 
425
gboolean daap_vfs_feof_impl(VFSFile * file)
426
426
{
427
427
   daap_handle_t *handle=file->handle;
428
 
  off_t at = daap_aud_vfs_ftell_impl(file);
 
428
  off_t at = daap_vfs_ftell_impl(file);
429
429
  return (gboolean) (at >= handle->length) ? TRUE : FALSE;
430
430
}
431
431
 
432
 
gint daap_aud_vfs_truncate_impl(VFSFile * file, glong size)
 
432
gint daap_vfs_truncate_impl(VFSFile * file, glong size)
433
433
{
434
434
    return -1;
435
435
}
436
 
off_t daap_aud_vfs_fsize_impl(VFSFile * file)
 
436
off_t daap_vfs_fsize_impl(VFSFile * file)
437
437
{
438
438
return 0;
439
439
}
440
440
 
441
 
gchar *daap_aud_vfs_metadata_impl(VFSFile * file, const gchar * field)
 
441
gchar *daap_vfs_metadata_impl(VFSFile * file, const gchar * field)
442
442
{
443
443
daap_handle_t *handle;
444
444
g_print("Requested metadata: '%s' \n",field);
462
462
 
463
463
VFSConstructor daap_const = {
464
464
    "daap://",
465
 
    daap_aud_vfs_fopen_impl,
466
 
    daap_aud_vfs_fclose_impl,
467
 
    daap_aud_vfs_fread_impl,
468
 
    daap_aud_vfs_fwrite_impl,
469
 
    daap_aud_vfs_getc_impl,
470
 
    daap_aud_vfs_ungetc_impl,
471
 
    daap_aud_vfs_fseek_impl,
472
 
    daap_aud_vfs_rewind_impl,
473
 
    daap_aud_vfs_ftell_impl,
474
 
    daap_aud_vfs_feof_impl,
475
 
    daap_aud_vfs_truncate_impl,
476
 
    daap_aud_vfs_fsize_impl,
477
 
    daap_aud_vfs_metadata_impl
 
465
    daap_vfs_fopen_impl,
 
466
    daap_vfs_fclose_impl,
 
467
    daap_vfs_fread_impl,
 
468
    daap_vfs_fwrite_impl,
 
469
    daap_vfs_getc_impl,
 
470
    daap_vfs_ungetc_impl,
 
471
    daap_vfs_fseek_impl,
 
472
    daap_vfs_rewind_impl,
 
473
    daap_vfs_ftell_impl,
 
474
    daap_vfs_feof_impl,
 
475
    daap_vfs_truncate_impl,
 
476
    daap_vfs_fsize_impl,
 
477
    daap_vfs_metadata_impl
478
478
};
479
479
 
480
480
static void init(void)
481
481
{   
482
482
    mutex_init = g_mutex_new();        
483
483
    mutex_discovery = g_mutex_new();        
484
 
    aud_vfs_register_transport(&daap_const);
 
484
    vfs_register_transport(&daap_const);
485
485
    daap_mdns_initialize ();
486
486
    if (!login_sessions) 
487
487
        login_sessions = g_hash_table_new (g_str_hash, g_str_equal);